diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 195903da7a4..15864ee6272 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1390,3 +1390,5 @@ proc/pick_closest_path(value) animate(C, color = old_color, time = flash_time) #define RANDOM_COLOUR (rgb(rand(0,255),rand(0,255),rand(0,255))) + +#define QDEL_IN(item, time) addtimer(GLOBAL_PROC, "qdel", time, FALSE, item) diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm index 84f2c8eb4ea..f4db2f376a5 100644 --- a/code/game/area/ai_monitored.dm +++ b/code/game/area/ai_monitored.dm @@ -11,8 +11,6 @@ if(M.isMotion()) motioncamera = M M.area_motion = src - return - return /area/ai_monitored/Entered(atom/movable/O) ..() diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 6d4333f511a..5032ea6ec26 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -74,7 +74,6 @@ D.cancelAlarm("Power", src, source) else D.triggerAlarm("Power", src, cameras, source) - return /area/proc/atmosalert(danger_level, obj/source) if(danger_level != atmosalm) @@ -129,7 +128,6 @@ aiPlayer.triggerAlarm("Fire", src, cameras, source) for (var/mob/living/simple_animal/drone/D in mob_list) D.triggerAlarm("Fire", src, cameras, source) - return /area/proc/firereset(obj/source) for(var/area/RA in related) @@ -152,7 +150,6 @@ a.cancelAlarm("Fire", src, source) for (var/mob/living/simple_animal/drone/D in mob_list) D.cancelAlarm("Fire", src, source) - return /area/proc/burglaralert(obj/trigger) if(always_unpowered == 1) //no burglar alarms in space/asteroid @@ -188,13 +185,11 @@ if(!eject) eject = 1 updateicon() - return /area/proc/readyreset() if(eject) eject = 0 updateicon() - return /area/proc/partyalert() if(src.name == "Space") //no parties in space!!! @@ -203,7 +198,6 @@ src.party = 1 src.updateicon() src.mouse_opacity = 0 - return /area/proc/partyreset() if (src.party) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 23fdaa81d82..a6625ffafd0 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -66,7 +66,6 @@ hulk.changeNext_move(CLICK_CD_MELEE) add_logs(hulk, src, "punched", "hulk powers") hulk.do_attack_animation(src) - return /atom/proc/CheckParts(list/parts_list) for(var/A in parts_list) @@ -141,7 +140,6 @@ return 1 else if(src in container) return 1 - return /* * atom/proc/search_contents_for(path,list/filter_path=null) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 366cd3e5945..ef0611a9cd7 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -312,22 +312,18 @@ /atom/movable/overlay/New() verbs.Cut() - return /atom/movable/overlay/attackby(a, b, c) if (src.master) return src.master.attackby(a, b, c) - return /atom/movable/overlay/attack_paw(a, b, c) if (src.master) return src.master.attack_paw(a, b, c) - return /atom/movable/overlay/attack_hand(a, b, c) if (src.master) return src.master.attack_hand(a, b, c) - return /atom/movable/proc/handle_buckled_mob_movement(newloc,direct) for(var/m in buckled_mobs) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index e75c9827e14..d3f75788571 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -95,7 +95,6 @@ return src.attack_hand(usr) - return /obj/machinery/ai_slipper/proc/slip_process() while(cooldown_time - world.timeofday > 0) @@ -112,4 +111,3 @@ if (uses >= 0) cooldown_on = 0 src.power_change() - return \ No newline at end of file diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index ede331be5ee..a3cb942cc2e 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -160,8 +160,7 @@ if(device) device.pulsed() - spawn(15) - update_icon() + addtimer(src, "update_icon", 15) /obj/machinery/button/power_change() ..() @@ -220,4 +219,4 @@ icon = 'icons/obj/apc_repair.dmi' icon_state = "button_frame" result_path = /obj/machinery/button - materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT) \ No newline at end of file + materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT) diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index ce484c4b05e..e8370cec19d 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -142,11 +142,13 @@ /obj/structure/barricade/security/New() ..() - spawn(40) - icon_state = "barrier1" - density = 1 - anchored = 1 - visible_message("[src] deploys!") + addtimer(src, "deploy", 40) + +/obj/structure/barricade/security/proc/deploy() + icon_state = "barrier1" + density = 1 + anchored = 1 + visible_message("[src] deploys!") /obj/item/weapon/grenade/barrier diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 3145ab44da8..f7ca0ccd18f 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -1,6 +1,8 @@ /obj/machinery/transformer name = "\improper Automatic Robotic Factory 5000" - desc = "A large metallic machine with an entrance and an exit. A sign on the side reads, 'human go in, robot come out', human must be lying down and alive. Has to cooldown between each use." + desc = "A large metallic machine with an entrance and an exit. A sign on \ + the side reads, 'human go in, robot come out'. The human must be \ + lying down and alive. Has to cooldown between each use." icon = 'icons/obj/recycling.dmi' icon_state = "separator-AO1" layer = ABOVE_ALL_MOB_LAYER // Overhead @@ -10,12 +12,28 @@ var/transform_standing = 0 var/cooldown_duration = 600 // 1 minute var/cooldown = 0 + var/cooldown_timer var/robot_cell_charge = 5000 + var/obj/effect/countdown/transformer/countdown /obj/machinery/transformer/New() // On us ..() new /obj/machinery/conveyor/auto(loc, WEST) + countdown = new(src) + countdown.start() + +/obj/machinery/transformer/examine(mob/user) + . = ..() + if(cooldown && (issilicon(user) || isobserver(user))) + var/seconds_remaining = (cooldown_timer - world.time) / 10 + user << "It will be ready in [max(0, seconds_remaining)] seconds." + +/obj/machinery/transformer/Destroy() + if(countdown) + qdel(countdown) + countdown = null + . = ..() /obj/machinery/transformer/power_change() ..() @@ -29,7 +47,6 @@ icon_state = initial(icon_state) /obj/machinery/transformer/Bumped(atom/movable/AM) - if(cooldown == 1) return @@ -43,12 +60,19 @@ do_transform(AM) /obj/machinery/transformer/CanPass(atom/movable/mover, turf/target, height=0) - if(!ishuman(mover)) // Allows items to go through, to stop them from blocking the conveyour belt. + // Allows items to go through, + // to stop them from blocking the conveyor belt. + if(!ishuman(mover)) var/dir = get_dir(src, mover) if(dir == EAST) return ..() return 0 +/obj/machinery/transformer/process() + if(cooldown && (cooldown_timer <= world.time)) + cooldown = FALSE + update_icon() + /obj/machinery/transformer/proc/do_transform(mob/living/carbon/human/H) if(stat & (BROKEN|NOPOWER)) return @@ -61,10 +85,8 @@ // Activate the cooldown cooldown = 1 + cooldown_timer = world.time + cooldown_duration update_icon() - spawn(cooldown_duration) - cooldown = 0 - update_icon() playsound(src.loc, 'sound/items/Welder.ogg', 50, 1) H.emote("scream") // It is painful @@ -81,18 +103,20 @@ // So he can't jump out the gate right away. R.SetLockdown() - spawn(50) - playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) - sleep(30) - if(R) - R.SetLockdown(0) - R.notify_ai(1) + addtimer(src, "unlock_new_robot", 50, FALSE, R) + +/obj/machinery/transformer/proc/unlock_new_robot(mob/living/silicon/robot/R) + playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + sleep(30) + if(R) + R.SetLockdown(0) + R.notify_ai(1) /obj/machinery/transformer/conveyor/New() ..() var/turf/T = loc if(T) - // Spawn Conveyour Belts + // Spawn Conveyor Belts //East var/turf/east = locate(T.x + 1, T.y, T.z) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index b0c0ee1114d..80b4e2be990 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -579,7 +579,6 @@ stat |= BROKEN icon_state = "[initial(icon_state)]-broken" - return //Somebody cut an important wire and now we're following a new definition of "pitch." /obj/machinery/vending/proc/throw_item() diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 843bf4411b8..e79f76f6722 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -91,7 +91,6 @@ var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src))) A.throw_at(target, 5, 1) boing = 0 - return ///////////////////// @@ -156,7 +155,6 @@ /obj/effect/anomaly/bluespace/Bumped(atom/A) if(isliving(A)) do_teleport(A, locate(A.x, A.y, A.z), 8) - return ///////////////////// @@ -210,7 +208,6 @@ affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance) affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance) affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance) - return /obj/effect/anomaly/bhole/proc/affect_coord(x, y, ex_act_force, pull_chance, turf_removal_chance) //Get turf at coordinate @@ -231,4 +228,3 @@ //Damaging the turf if( T && prob(turf_removal_chance) ) T.ex_act(ex_act_force) - return diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index cd2f5705fc4..28c5fca5cc1 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -208,7 +208,6 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v else user << "You carefully remove the poster from the wall." roll_and_drop(user.loc, official) - return /obj/structure/sign/poster/attack_hand(mob/user) @@ -277,4 +276,3 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v user << "You place the poster!" else D.roll_and_drop(temp_loc,D.official) - return \ No newline at end of file diff --git a/code/game/objects/effects/forcefields.dm b/code/game/objects/effects/forcefields.dm index b9615f3153e..5ec9788a733 100644 --- a/code/game/objects/effects/forcefields.dm +++ b/code/game/objects/effects/forcefields.dm @@ -22,15 +22,7 @@ name = "invisible wall" desc = "You have a bad feeling about this." var/timeleft = 300 - var/last_process = 0 /obj/effect/forcefield/mime/New() ..() - last_process = world.time - START_PROCESSING(SSobj, src) - -/obj/effect/forcefield/mime/process() - timeleft -= (world.time - last_process) - if(timeleft <= 0) - STOP_PROCESSING(SSobj, src) - qdel(src) \ No newline at end of file + QDEL_IN(src, timeleft) diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm index b898b2d9dc3..f00d154b024 100644 --- a/code/game/objects/effects/manifest.dm +++ b/code/game/objects/effects/manifest.dm @@ -5,9 +5,7 @@ unacidable = 1//Just to be sure. /obj/effect/manifest/New() - src.invisibility = INVISIBILITY_ABSTRACT - return /obj/effect/manifest/proc/manifest() var/dat = "Crew Manifest:
" @@ -18,4 +16,3 @@ P.name = "paper- 'Crew Manifest'" //SN src = null qdel(src) - return \ No newline at end of file diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index b942d1b5323..15ca41836fc 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -17,7 +17,6 @@ if(3) if (prob(5)) qdel(src) - return /obj/effect/spider/attacked_by(obj/item/I, mob/user) ..() diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm index e6b53aacdad..c7ad91b2b0f 100644 --- a/code/modules/countdown/countdown.dm +++ b/code/modules/countdown/countdown.dm @@ -121,3 +121,15 @@ return else if(G.health && !G.purpose_fulfilled) return "
[GATEWAY_RATVAR_ARRIVAL - G.progress_in_seconds]
" + +/obj/effect/countdown/transformer + name = "transformer countdown" + text_color = "#4C5866" + +/obj/effect/countdown/transformer/get_value() + var/obj/machinery/transformer/T = attached_to + if(!istype(T)) + return + else if(T.cooldown) + var/seconds_left = max(0, (T.cooldown_timer - world.time) / 10) + return "[round(seconds_left)]"