diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index cd7b8f43ee4..ea4eee5e2c4 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -174,8 +174,7 @@ verbs -= /mob/living/silicon/ai/proc/lockdown minor_announce("Hostile runtime detected in door controllers. Isolation Lockdown protocols are now in effect. Please remain calm.","Network Alert:", 1) src << "Lockdown Initiated. Network reset in 90 seconds." - spawn(900) //90 Seconds. - disablelockdown() //Reset the lockdown after 90 seconds. + addtimer(src, "disablelockdown", 900) /mob/living/silicon/ai/proc/disablelockdown() set category = "Malfunction" @@ -217,11 +216,7 @@ for(var/obj/item/RCD in rcd_list) if(!istype(RCD, /obj/item/weapon/rcd/borg)) //Ensures that cyborg RCDs are spared. - RCD.audible_message("[RCD] begins to vibrate and buzz loudly!","[RCD] begins vibrating violently!") - spawn(50) //5 seconds to get rid of it! - if(RCD) //Make sure it still exists (In case of chain-reaction) - explosion(RCD, 0, 0, 3, 1, flame_range = 1) - qdel(RCD) + RCD.detonate_pulse() src << "RCD detonation pulse emitted." malf_cooldown = 1 @@ -425,7 +420,6 @@ if(success) return 1 alert(src, alert_msg) - return /datum/AI_Module/small/blackout module_name = "Blackout" @@ -568,7 +562,6 @@ var/datum/browser/popup = new(user, "modpicker", "Malf Module Menu") popup.set_content(dat) popup.open() - return /datum/module_picker/Topic(href, href_list) ..() @@ -612,7 +605,6 @@ if(AM.mod_pick_name == href_list["showdesc"]) temp = AM.description src.use(usr) - return /datum/AI_Module/large/eavesdrop module_name = "Enhanced Surveillance" diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 4f5071d670c..3edc3ea2f25 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -9,9 +9,9 @@ w_class = 2 /obj/item/bodybag/attack_self(mob/user) - var/obj/structure/closet/body_bag/R = new unfoldedbag_path(user.loc) - R.add_fingerprint(user) - qdel(src) + var/obj/structure/closet/body_bag/R = new unfoldedbag_path(user.loc) + R.add_fingerprint(user) + qdel(src) /obj/item/weapon/storage/box/bodybags @@ -21,13 +21,8 @@ /obj/item/weapon/storage/box/bodybags/New() ..() - new /obj/item/bodybag(src) - new /obj/item/bodybag(src) - new /obj/item/bodybag(src) - new /obj/item/bodybag(src) - new /obj/item/bodybag(src) - new /obj/item/bodybag(src) - new /obj/item/bodybag(src) + for(var/i in 1 to 7) + new /obj/item/bodybag(src) /obj/structure/closet/body_bag diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 762763a36e7..3950e17d5fa 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -1,6 +1,6 @@ /obj/item/latexballon name = "latex glove" - desc = "" //todo + desc = "Sterile and airtight." icon_state = "latexballon" item_state = "lgloves" force = 0 @@ -48,7 +48,6 @@ /obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume) if(temperature > T0C+100) burst() - return /obj/item/latexballon/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/tank)) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm old mode 100755 new mode 100644 diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index e74ac78c8d8..ecc3b4776b4 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -64,5 +64,6 @@ name = "crushed can" icon_state = "cola" burn_state = FIRE_PROOF + /obj/item/trash/attack(mob/M, mob/living/user) - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index bdc94dd94e6..0f0dbda79ec 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -215,7 +215,6 @@ RCD spark_system.set_up(5, 0, src) spark_system.attach(src) rcd_list += src - return /obj/item/weapon/rcd/Destroy() @@ -288,7 +287,6 @@ RCD if(prob(20)) src.spark_system.start() - return /obj/item/weapon/rcd/proc/activate() playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) @@ -472,15 +470,34 @@ RCD /obj/item/weapon/rcd/proc/checkResource(amount, mob/user) return matter >= amount + +/obj/item/weapon/rcd/proc/detonate_pulse() + audible_message("[src] begins to vibrate and \ + buzz loudly!","[src] begins \ + vibrating violently!") + // 5 seconds to get rid of it + addtimer(src, "detonate_pulse_explode", 50) + +/obj/item/weapon/rcd/proc/detonate_pulse_explode() + explosion(src, 0, 0, 3, 1, flame_range = 1) + qdel(src) + + /obj/item/weapon/rcd/borg/useResource(amount, mob/user) if(!isrobot(user)) return 0 - return user:cell:use(amount * 72) //borgs get 1.3x the use of their RCDs + var/mob/living/silicon/robot/borgy = user + if(!borgy.cell) + return 0 + return borgy.cell.use(amount * 72) //borgs get 1.3x the use of their RCDs /obj/item/weapon/rcd/borg/checkResource(amount, mob/user) if(!isrobot(user)) return 0 - return user:cell:charge >= (amount * 72) + var/mob/living/silicon/robot/borgy = user + if(!borgy.cell) + return 0 + return borgy.cell.charge >= (amount * 72) /obj/item/weapon/rcd/borg/New() ..() diff --git a/code/game/objects/items/weapons/holosign_creator.dm b/code/game/objects/items/weapons/holosign_creator.dm index 7b5404b760d..854055af4ee 100644 --- a/code/game/objects/items/weapons/holosign_creator.dm +++ b/code/game/objects/items/weapons/holosign_creator.dm @@ -240,20 +240,21 @@ holo_integrity = 3 var/shockcd = 0 +/obj/effect/overlay/holograph/barrier/cyborg/hacked/proc/cooldown() + shockcd = FALSE + /obj/effect/overlay/holograph/barrier/cyborg/hacked/attack_hand(mob/living/user) if(!shockcd) if(ismob(user)) var/mob/living/M = user M.electrocute_act(15,"Energy Barrier", safety=1) - shockcd = 1 - spawn(10) - shockcd = 0 + shockcd = TRUE + addtimer(src, "cooldown", 10) /obj/effect/overlay/holograph/barrier/cyborg/hacked/Bumped(atom/user) if(!shockcd) if(ismob(user)) var/mob/living/M = user M.electrocute_act(15,"Energy Barrier", safety=1) - shockcd = 1 - spawn(10) - shockcd = 0 + shockcd = TRUE + addtimer(src, "cooldown", 10) diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 640a08f06e8..efac43f30ea 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -40,7 +40,6 @@ M.reagents.add_reagent(forkload.id, 1) icon_state = "fork" forkload = null - return else if(user.zone_selected == "eyes") if(user.disabilities & CLUMSY && prob(50)) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 22683b1bcdf..ee05c0a1568 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -99,7 +99,6 @@ playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness user << "[src] can now be concealed." add_fingerprint(user) - return /obj/item/weapon/melee/energy/is_hot() return active * heat @@ -156,21 +155,16 @@ /obj/item/weapon/melee/energy/sword/saber/attackby(obj/item/weapon/W, mob/living/user, params) if(istype(W, /obj/item/weapon/melee/energy/sword/saber)) - if(W == src) - user << "You try to attach the end of the energy sword to... itself. You're not very smart, are you?" - if(ishuman(user)) - user.adjustBrainLoss(10) - else - user << "You attach the ends of the two energy swords, making a single double-bladed weapon! You're cool." - var/obj/item/weapon/twohanded/dualsaber/newSaber = new /obj/item/weapon/twohanded/dualsaber(user.loc) - if(src.hacked) // That's right, we'll only check the "original" esword. - newSaber.hacked = 1 - newSaber.item_color = "rainbow" - user.unEquip(W) - user.unEquip(src) - qdel(W) - qdel(src) - user.put_in_hands(newSaber) + user << "You attach the ends of the two energy swords, making a single double-bladed weapon! You're cool." + var/obj/item/weapon/twohanded/dualsaber/newSaber = new /obj/item/weapon/twohanded/dualsaber(user.loc) + if(src.hacked) // That's right, we'll only check the "original" esword. + newSaber.hacked = 1 + newSaber.item_color = "rainbow" + user.unEquip(W) + user.unEquip(src) + qdel(W) + qdel(src) + user.put_in_hands(newSaber) else if(istype(W, /obj/item/device/multitool)) if(hacked == 0) hacked = 1 diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index f7582cadc63..82687066ff4 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -35,49 +35,46 @@ var/on = 1 /obj/item/weapon/melee/classic_baton/attack(mob/target, mob/living/user) - if(on) - add_fingerprint(user) - if((CLUMSY in user.disabilities) && prob(50)) - user << "You club yourself over the head." - user.Weaken(3 * force) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - H.apply_damage(2*force, BRUTE, "head") - else - user.take_organ_damage(2*force) - return - if(isrobot(target)) - ..() - return - if(!isliving(target)) - return - if (user.a_intent == "harm") - if(!..()) return - if(!isrobot(target)) return - else - if(cooldown <= 0) - if(ishuman(target)) - var/mob/living/carbon/human/H = target - if (H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) - return - playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1) - target.Weaken(3) - add_logs(user, target, "stunned", src) - src.add_fingerprint(user) - target.visible_message("[user] has knocked down [target] with \the [src]!", \ - "[user] has knocked down [target] with \the [src]!") - if(!iscarbon(user)) - target.LAssailant = null - else - target.LAssailant = user - cooldown = 1 - spawn(40) - cooldown = 0 - return - else + if(!on) return ..() - + add_fingerprint(user) + if((CLUMSY in user.disabilities) && prob(50)) + user << "You club yourself over the head." + user.Weaken(3 * force) + if(ishuman(user)) + var/mob/living/carbon/human/H = user + H.apply_damage(2*force, BRUTE, "head") + else + user.take_organ_damage(2*force) + return + if(isrobot(target)) + ..() + return + if(!isliving(target)) + return + if (user.a_intent == "harm") + if(!..()) + return + if(!isrobot(target)) + return + else + if(cooldown <= world.time) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if (H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) + return + playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1) + target.Weaken(3) + add_logs(user, target, "stunned", src) + src.add_fingerprint(user) + target.visible_message("[user] has knocked down [target] with \the [src]!", \ + "[user] has knocked down [target] with \the [src]!") + if(!iscarbon(user)) + target.LAssailant = null + else + target.LAssailant = user + cooldown = world.time + 40 /obj/item/weapon/melee/classic_baton/telescopic name = "telescopic baton" @@ -108,7 +105,6 @@ qdel(B) gibs(H.loc, H.viruses, H.dna) return (BRUTELOSS) - return /obj/item/weapon/melee/classic_baton/telescopic/attack_self(mob/user) on = !on diff --git a/code/game/objects/items/weapons/miscellaneous.dm b/code/game/objects/items/weapons/miscellaneous.dm index 58711c23a66..c5ed9639c9d 100644 --- a/code/game/objects/items/weapons/miscellaneous.dm +++ b/code/game/objects/items/weapons/miscellaneous.dm @@ -1,4 +1,3 @@ - /obj/item/weapon/caution desc = "Caution! Wet Floor!" name = "wet floor sign" diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index f8d6a2c3590..0fcece5d30f 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -55,28 +55,27 @@ name = "any color" icon_state = "paint_neutral" - attack_self(mob/user) - var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "violet", "black", "white") - if ((user.get_active_hand() != src || user.stat || user.restrained())) - return - switch(t1) - if("red") - item_color = "C73232" - if("blue") - item_color = "5998FF" - if("green") - item_color = "2A9C3B" - if("yellow") - item_color = "CFB52B" - if("violet") - item_color = "AE4CCD" - if("white") - item_color = "FFFFFF" - if("black") - item_color = "333333" - icon_state = "paint_[t1]" - add_fingerprint(user) +/obj/item/weapon/paint/anycolor/attack_self(mob/user) + var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "violet", "black", "white") + if ((user.get_active_hand() != src || user.stat || user.restrained())) return + switch(t1) + if("red") + item_color = "C73232" + if("blue") + item_color = "5998FF" + if("green") + item_color = "2A9C3B" + if("yellow") + item_color = "CFB52B" + if("violet") + item_color = "AE4CCD" + if("white") + item_color = "FFFFFF" + if("black") + item_color = "333333" + icon_state = "paint_[t1]" + add_fingerprint(user) /obj/item/weapon/paint/afterattack(turf/target, mob/user, proximity) @@ -87,15 +86,14 @@ if(!istype(target) || istype(target, /turf/open/space)) return target.color = "#" + item_color - return /obj/item/weapon/paint/paint_remover gender = PLURAL name = "paint remover" icon_state = "paint_neutral" - afterattack(turf/target, mob/user,proximity) - if(!proximity) return +/obj/item/weapon/paint/paint_remover/afterattack(turf/target, mob/user, proximity) + if(!proximity) + return if(istype(target) && target.color != initial(target.color)) target.color = initial(target.color) - return diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 605cdd9c5f9..e7505951b42 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -27,7 +27,6 @@ ..() bcell = new(src) update_icon() - return /obj/item/weapon/melee/baton/proc/deductcharge(chrgdeductamt) if(bcell) diff --git a/code/game/turfs/simulated/dirtystation.dm b/code/game/turfs/simulated/dirtystation.dm index b7b6d0ea309..2d65237947c 100644 --- a/code/game/turfs/simulated/dirtystation.dm +++ b/code/game/turfs/simulated/dirtystation.dm @@ -129,5 +129,3 @@ if(prob(20)) new /obj/effect/decal/cleanable/greenglow(src) //this cleans itself up but it might startle you when you see it. return - - return diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 35631605ded..ad237db5be9 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -58,6 +58,10 @@ Gunshots/explosions/opening doors/less rare audio (done) invisibility = INVISIBILITY_OBSERVER var/mob/living/carbon/target = null +/obj/effect/hallucination/proc/wake_and_restore() + target.hal_screwyhud = 0 + target.SetSleeping(0) + /obj/effect/hallucination/simple var/image_icon = 'icons/mob/alien.dmi' var/image_state = "alienh_pounce" @@ -72,7 +76,6 @@ Gunshots/explosions/opening doors/less rare audio (done) target = T current_image = GetImage() if(target.client) target.client.images |= current_image - return /obj/effect/hallucination/simple/proc/GetImage() var/image/I = image(image_icon,loc,image_state,image_layer,dir=src.dir) @@ -101,7 +104,6 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/simple/Moved(atom/OldLoc, Dir) Show() - return /obj/effect/hallucination/simple/Destroy() if(target.client) target.client.images.Remove(current_image) @@ -170,7 +172,6 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/simple/xeno/New(loc,var/mob/living/carbon/T) ..() name = "alien hunter ([rand(1, 1000)])" - return /obj/effect/hallucination/simple/xeno/throw_impact(A) update_icon("alienh_pounce") @@ -236,9 +237,7 @@ Gunshots/explosions/opening doors/less rare audio (done) if(target_dist<=3) //"Eaten" target.hal_screwyhud = 1 target.SetSleeping(20) - spawn(rand(50,100)) - target.hal_screwyhud = 0 - target.SetSleeping(0) + addtimer(src, "wake_and_restore", rand(50, 100)) /obj/effect/hallucination/battle @@ -379,7 +378,6 @@ Gunshots/explosions/opening doors/less rare audio (done) "[my_target] has attacked [src]!") src.health -= P.force - return /obj/effect/fake_attacker/Crossed(mob/M, somenumber) if(M == my_target) @@ -391,11 +389,9 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/fake_attacker/New(loc,var/mob/living/carbon/T) ..() my_target = T - spawn(300) - qdel(src) + QDEL_IN(src, 300) step_away(src,my_target,2) - spawn(0) - attack_loop() + addtimer(src, "attack_loop", 0) /obj/effect/fake_attacker/proc/updateimage() @@ -457,9 +453,7 @@ Gunshots/explosions/opening doors/less rare audio (done) O.name = "blood" var/image/I = image('icons/effects/blood.dmi',O,"floor[rand(1,7)]",O.dir,1) target << I - spawn(300) - qdel(O) - return + QDEL_IN(O, 300) var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\ /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, /obj/item/weapon/melee/energy/sword/saber,\ @@ -664,8 +658,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite halitem.icon_state = "flashbang1" halitem.name = "Flashbang" if(client) client.screen += halitem - spawn(rand(100,250)) - qdel(halitem) + QDEL_IN(halitem, rand(100, 250)) if("dangerflash") //Flashes of danger //src << "Danger Flash" @@ -721,4 +714,4 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite if(client) client.images += halbody spawn(rand(50,80)) //Only seen for a brief moment. if(client) client.images -= halbody - halbody = null \ No newline at end of file + halbody = null