Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe2013 committed Jun 15, 2024
1 parent 5b3bd2a commit 1121be5
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 137 deletions.
2 changes: 1 addition & 1 deletion code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var/list/datum/mob_hud/huds = list(
// makes the client able to 'see' them whenever they're offscreen
// somewhat confusingly
/datum/mob_hud/proc/add_to_single_hud(mob/user, mob/target)
if(!user.client)
if(!user?.client)
return
for(var/i in hud_icons)
if(i in target.hud_list)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/cm_marines/equipment/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ GLOBAL_LIST_INIT_TYPED(map_type_list, /obj/item/map, setup_all_maps())
/obj/item/map/current_map/Initialize(mapload, ...)
. = ..()

var/map_name = SSmapping.configs[GROUND_MAP].map_name
/*var/map_name = SSmapping.configs[GROUND_MAP].map_name
var/obj/item/map/map = GLOB.map_type_list[map_name]
if (!map && (map_name == MAP_RUNTIME || map_name == MAP_CHINOOK || (map_name in SHIP_MAP_NAMES)))
return // "Maps" we don't have maps for so we don't need to throw a runtime for (namely in unit_testing)
name = map.name
desc = map.desc
html_link = map.html_link
color = map.color
color = map.color*/ // SHUT UP SHUT uP

// Landmark - Used for mapping. Will spawn the appropriate map for each gamemode (LV map items will spawn when LV is the gamemode, etc)
/obj/effect/landmark/map_item
Expand Down
16 changes: 14 additions & 2 deletions code/modules/events/timeevent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ GLOBAL_VAR(timeloop_nuke)
GLOBAL_VAR(tdd_cell)
GLOBAL_VAR_INIT(map_iteration, 1)
GLOBAL_VAR(midway_dockingport)
GLOBAL_VAR(nuketimer_id)

// <p>Your squad has been tasked with investigating a distress signal from an abandoned USCM outpost designated "Whiskey". The cause of the distress signal is unknown, considering the base was decommissioned years ago. Additionally, strange readings inconsistent with anything seen before have been reported emitting from the outpost. RADAR suggests the existence of an unknown shuttle west of the main outpost's defensive pads. <br><br>Investigate the outpost, find out what's happened, and extract any survivors if needed. To that end, ARES will be piloting the Midway for this operation.</p>

Expand Down Expand Up @@ -57,7 +58,7 @@ GLOBAL_VAR(midway_dockingport)
/proc/start_nuketimer()
//addtimer(CALLBACK(bomb, TYPE_PROC_REF(/obj/structure/machinery/nuclearbomb, explode)), SStimeloop.nukepostloop)
GLOB.nuketimer_started = TRUE
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(message_admins), "TIME IS UP. DETONATE THE BOMB."), SStimeloop.nukepostloop)
GLOB.nuketimer_id = addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(message_admins), "TIME IS UP. DETONATE THE BOMB."), SStimeloop.nukepostloop, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE)

/proc/revert_timeloop()
if(!GLOB.timeloop_power)
Expand Down Expand Up @@ -137,6 +138,7 @@ GLOBAL_VAR(midway_dockingport)
light_range = 3
indestructible = TRUE
unacidable = TRUE
var/mid_removal = FALSE

/obj/structure/tdd/get_examine_text(mob/user)
. = ..()
Expand All @@ -149,16 +151,22 @@ GLOBAL_VAR(midway_dockingport)
/obj/structure/tdd/attackby(obj/item/W, mob/user)
. = ..()
if(HAS_TRAIT(W, TRAIT_TOOL_WRENCH))
if(mid_removal)
return

if(!GLOB.timeloop_power)
to_chat(user, SPAN_WARNING("There's nothing to remove!"))
return

to_chat(user, SPAN_WARNING("You start to unwrench [src]'s power source. You hope you know what you're doing..."))
playsound(src, 'sound/items/Ratchet.ogg', 25, 1)
mid_removal = TRUE
if(!do_after(user, 10 SECONDS, show_busy_icon = BUSY_ICON_GENERIC))
to_chat(user, SPAN_WARNING("You stop trying to remove [src]'s power source."))
mid_removal = FALSE
return

mid_removal = FALSE
remove_power_source(user)

/obj/structure/tdd/proc/remove_power_source(mob/user)
Expand All @@ -184,7 +192,11 @@ GLOBAL_VAR(midway_dockingport)

/obj/structure/machinery/nuclearbomb/emplaced/get_examine_text(mob/user)
. = ..()
. += "A timer on [src] reads \"DETONATION IN [(timeleft(SStimeloop.mainloop_timer_id) / 10) + 120] SECONDS\"." //roughly
if(!GLOB.nuketimer_started)
. += "A timer on [src] reads \"DETONATION IN [(timeleft(SStimeloop.mainloop_timer_id) / 10) + 120] SECONDS\"." //roughly
else
. += "A timer on [src] reads \"DETONATION IN [(timeleft(GLOB.nuketimer_id) / 10)] SECONDS\"."


/obj/structure/machinery/nuclearbomb/emplaced/update_icon()
return
Expand Down
Loading

0 comments on commit 1121be5

Please sign in to comment.