From 4a39151e9ee39725fb35b8bd963a3248d4dede3d Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Mon, 9 Apr 2012 13:28:45 +0100 Subject: [PATCH] TG: Renamed the prisoner computer's file to prisoner and added a sanity check. The singularity is now able to eat things like signs and chameleon projectors' projections. A few other misc runtime fixes. r2916 --- baystation12.dme | 4 +- code/defines/obj/weapon.dm | 70 +----- .../computer/{explosive.dm => prisoner.dm} | 214 +++++++++--------- .../objects/items/weapons/mops_cleaners.dm | 116 +++++++--- code/game/objects/stacks/glass.dm | 182 +++++++++------ code/modules/admin/verbs/randomverbs.dm | 4 +- code/modules/mob/mob.dm | 100 +++----- code/modules/power/singularity/singularity.dm | 2 - 8 files changed, 339 insertions(+), 353 deletions(-) rename code/game/machinery/computer/{explosive.dm => prisoner.dm} (95%) diff --git a/baystation12.dme b/baystation12.dme index 344c54397ed..11b3b871df3 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -523,13 +523,13 @@ #include "code\game\machinery\computer\communications.dm" #include "code\game\machinery\computer\computer.dm" #include "code\game\machinery\computer\crew.dm" -#include "code\game\machinery\computer\explosive.dm" #include "code\game\machinery\computer\hologram.dm" #include "code\game\machinery\computer\id.dm" #include "code\game\machinery\computer\lockdown.dm" #include "code\game\machinery\computer\medical.dm" #include "code\game\machinery\computer\Operating.dm" #include "code\game\machinery\computer\power.dm" +#include "code\game\machinery\computer\prisoner.dm" #include "code\game\machinery\computer\robot.dm" #include "code\game\machinery\computer\security.dm" #include "code\game\machinery\computer\shuttle.dm" @@ -1140,4 +1140,4 @@ #include "code\ZAS\Variable Settings.dm" #include "interface\skin.dmf" #include "maps\tgstation.2.0.8.dmm" -// END_INCLUDE \ No newline at end of file +// END_INCLUDE diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 13112d967b5..986e24622ea 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -564,61 +564,6 @@ access = get_all_centcom_access() ..() -/obj/item/weapon/cleaner - desc = "A chemical that cleans messes." - icon = 'janitor.dmi' - name = "space cleaner" - icon_state = "cleaner" - item_state = "cleaner" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY - throwforce = 3 - w_class = 2.0 - throw_speed = 2 - throw_range = 10 - var/catch = 1 - -/obj/item/weapon/chemsprayer - desc = "A utility used to spray large amounts of reagent in a given area." - icon = 'gun.dmi' - name = "chem sprayer" - icon_state = "chemsprayer" - item_state = "chemsprayer" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY - throwforce = 3 - w_class = 3.0 - throw_speed = 2 - throw_range = 10 - origin_tech = "combat=3;materials=3;engineering=3" - -/obj/item/weapon/pepperspray //This is riot control - desc = "Manufactred by UhangInc., used to blind and down an opponent quickly." - icon = 'weapons.dmi' - name = "pepperspray" - icon_state = "pepperspray" - item_state = "pepperspray" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY - throwforce = 3 - w_class = 2.0 - throw_speed = 2 - throw_range = 10 - var/catch = 1 - var/BottleSize = 1 - var/ReagentAmount = 30 - -/obj/item/weapon/pepperspray/small //And this is for personal defense. - desc = "This appears to be a small, nonlethal, single use personal defense weapon. Hurts like a bitch, though." - icon = 'weapons.dmi' - name = "mace" - icon_state = "pepperspray" - item_state = "pepperspray" - flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY - throwforce = 3 - w_class = 1.0 - throw_speed = 2 - throw_range = 10 - catch = 1 - BottleSize = 0 - ReagentAmount = 1 /obj/item/weapon/clipboard name = "clipboard" @@ -870,19 +815,6 @@ -/obj/item/weapon/mop - desc = "The world of the janitor wouldn't be complete without a mop." - name = "mop" - icon = 'janitor.dmi' - icon_state = "mop" - var/mopping = 0 - var/mopcount = 0 - force = 3.0 - throwforce = 10.0 - throw_speed = 5 - throw_range = 10 - w_class = 3.0 - flags = FPRINT | TABLEPASS /obj/item/weapon/caution desc = "Caution! Wet Floor!" @@ -1885,4 +1817,4 @@ desc = "spooky" gender = PLURAL icon = 'wizard.dmi' - icon_state = "ectoplasm" \ No newline at end of file + icon_state = "ectoplasm" diff --git a/code/game/machinery/computer/explosive.dm b/code/game/machinery/computer/prisoner.dm similarity index 95% rename from code/game/machinery/computer/explosive.dm rename to code/game/machinery/computer/prisoner.dm index 7161d2f2493..ddd19232481 100644 --- a/code/game/machinery/computer/explosive.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -1,107 +1,107 @@ -/obj/machinery/computer/prisoner - name = "Prisoner Management" - icon = 'computer.dmi' - icon_state = "explosive" - req_access = list(access_armory) - circuit = "/obj/item/weapon/circuitboard/prisoner" - var - id = 0.0 - temp = null - status = 0 - timeleft = 60 - stop = 0.0 - screen = 0 // 0 - No Access Denied, 1 - Access allowed - - - attack_ai(var/mob/user as mob) - return src.attack_hand(user) - - - attack_paw(var/mob/user as mob) - return - - - attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - dat += "Prisoner Implant Manager System
" - if(screen == 0) - dat += "
Unlock Console" - else if(screen == 1) - dat += "
Chemical Implants
" - var/turf/Tr = null - for(var/obj/item/weapon/implant/chem/C in world) - Tr = get_turf(C) - if((Tr) && (Tr.z != src.z)) continue//Out of range - if(!C.implanted) continue - dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: " - dat += "((1))" - dat += "((5))" - dat += "((10))
" - dat += "********************************
" - dat += "
Tracking Implants
" - for(var/obj/item/weapon/implant/tracking/T in world) - Tr = get_turf(T) - if((Tr) && (Tr.z != src.z)) continue//Out of range - if(!T.implanted) continue - var/loc_display = "Unknown" - var/mob/living/carbon/M = T.imp_in - if(M.z == 1 && !istype(M.loc, /turf/space)) - var/turf/mob_loc = get_turf_loc(M) - loc_display = mob_loc.loc - dat += "ID: [T.id] | Location: [loc_display]
" - dat += "(Message Holder) |
" - dat += "********************************
" - dat += "
Lock Console" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - - - process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - return - - - Topic(href, href_list) - if(..()) - return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if(href_list["inject1"]) - var/obj/item/weapon/implant/I = locate(href_list["inject1"]) - I.activate(1) - - else if(href_list["inject5"]) - var/obj/item/weapon/implant/I = locate(href_list["inject5"]) - I.activate(5) - - else if(href_list["inject10"]) - var/obj/item/weapon/implant/I = locate(href_list["inject10"]) - I.activate(10) - - else if(href_list["lock"]) - if(src.allowed(usr)) - screen = !screen - else - usr << "Unauthorized Access." - - else if(href_list["warn"]) - var/warning = input(usr,"Message:","Enter your message here!","") - var/obj/item/weapon/implant/I = locate(href_list["warn"]) - if((I)&&(I.imp_in)) - var/mob/living/carbon/R = I.imp_in - R << "\green You hear a voice in your head saying: '[warning]'" - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - +/obj/machinery/computer/prisoner + name = "Prisoner Management" + icon = 'computer.dmi' + icon_state = "explosive" + req_access = list(access_armory) + circuit = "/obj/item/weapon/circuitboard/prisoner" + var + id = 0.0 + temp = null + status = 0 + timeleft = 60 + stop = 0.0 + screen = 0 // 0 - No Access Denied, 1 - Access allowed + + + attack_ai(var/mob/user as mob) + return src.attack_hand(user) + + + attack_paw(var/mob/user as mob) + return + + + attack_hand(var/mob/user as mob) + if(..()) + return + user.machine = src + var/dat + dat += "Prisoner Implant Manager System
" + if(screen == 0) + dat += "
Unlock Console" + else if(screen == 1) + dat += "
Chemical Implants
" + var/turf/Tr = null + for(var/obj/item/weapon/implant/chem/C in world) + Tr = get_turf(C) + if((Tr) && (Tr.z != src.z)) continue//Out of range + if(!C.implanted) continue + dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: " + dat += "((1))" + dat += "((5))" + dat += "((10))
" + dat += "********************************
" + dat += "
Tracking Implants
" + for(var/obj/item/weapon/implant/tracking/T in world) + Tr = get_turf(T) + if((Tr) && (Tr.z != src.z)) continue//Out of range + if(!T.implanted) continue + var/loc_display = "Unknown" + var/mob/living/carbon/M = T.imp_in + if(M.z == 1 && !istype(M.loc, /turf/space)) + var/turf/mob_loc = get_turf_loc(M) + loc_display = mob_loc.loc + dat += "ID: [T.id] | Location: [loc_display]
" + dat += "(Message Holder) |
" + dat += "********************************
" + dat += "
Lock Console" + + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + return + + + process() + if(stat & (NOPOWER|BROKEN)) + return + use_power(500) + src.updateDialog() + return + + + Topic(href, href_list) + if(..()) + return + if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + usr.machine = src + + if(href_list["inject1"]) + var/obj/item/weapon/implant/I = locate(href_list["inject1"]) + if(I) I.activate(1) + + else if(href_list["inject5"]) + var/obj/item/weapon/implant/I = locate(href_list["inject5"]) + if(I) I.activate(5) + + else if(href_list["inject10"]) + var/obj/item/weapon/implant/I = locate(href_list["inject10"]) + if(I) I.activate(10) + + else if(href_list["lock"]) + if(src.allowed(usr)) + screen = !screen + else + usr << "Unauthorized Access." + + else if(href_list["warn"]) + var/warning = input(usr,"Message:","Enter your message here!","") + var/obj/item/weapon/implant/I = locate(href_list["warn"]) + if((I)&&(I.imp_in)) + var/mob/living/carbon/R = I.imp_in + R << "\green You hear a voice in your head saying: '[warning]'" + + src.add_fingerprint(usr) + src.updateUsrDialog() + return + + diff --git a/code/game/objects/items/weapons/mops_cleaners.dm b/code/game/objects/items/weapons/mops_cleaners.dm index 9cf664663e3..db2191537b9 100644 --- a/code/game/objects/items/weapons/mops_cleaners.dm +++ b/code/game/objects/items/weapons/mops_cleaners.dm @@ -1,9 +1,16 @@ -/* -CONTAINS: -SPACE CLEANER -MOP +/obj/item/weapon/cleaner + desc = "A chemical that cleans messes." + icon = 'janitor.dmi' + name = "space cleaner" + icon_state = "cleaner" + item_state = "cleaner" + flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + throwforce = 3 + w_class = 2.0 + throw_speed = 2 + throw_range = 10 + var/catch = 1 -*/ /obj/item/weapon/cleaner/New() var/datum/reagents/R = new/datum/reagents(250) reagents = R @@ -84,13 +91,12 @@ MOP spawn(600) src.reagents.add_reagent(refill, 10) - - if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Cleaner bottle. - message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Cleaner bottle.") // Polymorph - log_game("[key_name(user)] fired Polyacid/Space lube from a Cleaner bottle.") - - - + if(src.reagents.has_reagent("pacid")) + message_admins("[key_name_admin(user)] fired Polyacid from a Cleaner bottle.") + log_game("[key_name(user)] fired Polyacid from a Cleaner bottle.") + if(src.reagents.has_reagent("lube")) + message_admins("[key_name_admin(user)] fired Space lube from a Cleaner bottle.") + log_game("[key_name(user)] fired Space lube from a Cleaner bottle.") return /obj/item/weapon/cleaner/examine() @@ -101,6 +107,21 @@ MOP ..() return + + +/obj/item/weapon/chemsprayer//Another copy paste with a tiny change it seems + desc = "A utility used to spray large amounts of reagent in a given area." + icon = 'gun.dmi' + name = "chem sprayer" + icon_state = "chemsprayer" + item_state = "chemsprayer" + flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + throwforce = 3 + w_class = 3.0 + throw_speed = 2 + throw_range = 10 + origin_tech = "combat=3;materials=3;engineering=3" + /obj/item/weapon/chemsprayer/New() var/datum/reagents/R = new/datum/reagents(1000) reagents = R @@ -183,15 +204,44 @@ MOP spawn(600) src.reagents.add_reagent(refill, 10) - if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Chem Sprayer. message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Chem Sprayer.") // Polymorph log_game("[key_name(user)] fired Polyacid/Space lube from a Chem Sprayer.") + return return //Pepper spray, set up to make the 2 different types +/obj/item/weapon/pepperspray //This is riot control + desc = "Manufactured by UhangInc., used to blind and down an opponent quickly." + icon = 'weapons.dmi' + name = "pepperspray" + icon_state = "pepperspray" + item_state = "pepperspray" + flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + throwforce = 3 + w_class = 2.0 + throw_speed = 2 + throw_range = 10 + var/catch = 1 + var/BottleSize = 1 + var/ReagentAmount = 30 + +/obj/item/weapon/pepperspray/small //And this is for personal defense. + desc = "This appears to be a small, nonlethal, single use personal defense weapon. Hurts like a bitch, though." + icon = 'weapons.dmi' + name = "mace" + icon_state = "pepperspray" + item_state = "pepperspray" + flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY + throwforce = 3 + w_class = 1.0 + throw_speed = 2 + throw_range = 10 + catch = 1 + BottleSize = 0 + ReagentAmount = 1 /obj/item/weapon/pepperspray/New() var/datum/reagents/R = new/datum/reagents(ReagentAmount) @@ -331,12 +381,26 @@ MOP return // MOP +/obj/item/weapon/mop + desc = "The world of the janitor wouldn't be complete without a mop." + name = "mop" + icon = 'janitor.dmi' + icon_state = "mop" + var/mopping = 0 + var/mopcount = 0 + force = 3.0 + throwforce = 10.0 + throw_speed = 5 + throw_range = 10 + w_class = 3.0 + flags = FPRINT | TABLEPASS /obj/item/weapon/mop/New() var/datum/reagents/R = new/datum/reagents(5) reagents = R R.my_atom = src + obj/item/weapon/mop/proc/clean(turf/simulated/A as turf) src.reagents.reaction(A,1,10) A.clean_blood() @@ -347,6 +411,7 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf) for(var/obj/effect/overlay/R in A) del(R) + /obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/mop)) return @@ -380,7 +445,6 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf) spawn(5) src.reagents.clear_reagents() mopcount = 0 - return @@ -389,18 +453,18 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf) * Hope it's okay to stick this shit here: it basically just turns a hexadecimal color into rgb */ -proc/GetColors(hex) - hex = uppertext(hex) - var - hi1 = text2ascii(hex, 2) - lo1 = text2ascii(hex, 3) - hi2 = text2ascii(hex, 4) - lo2 = text2ascii(hex, 5) - hi3 = text2ascii(hex, 6) - lo3 = text2ascii(hex, 7) - return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48), - ((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48), - ((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48)) +/proc/GetColors(hex) + hex = uppertext(hex) + var + hi1 = text2ascii(hex, 2) + lo1 = text2ascii(hex, 3) + hi2 = text2ascii(hex, 4) + lo2 = text2ascii(hex, 5) + hi3 = text2ascii(hex, 6) + lo3 = text2ascii(hex, 7) + return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48), + ((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48), + ((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48)) diff --git a/code/game/objects/stacks/glass.dm b/code/game/objects/stacks/glass.dm index f7d10691369..38370bf098d 100644 --- a/code/game/objects/stacks/glass.dm +++ b/code/game/objects/stacks/glass.dm @@ -6,79 +6,10 @@ SHARDS */ -/proc/construct_window(mob/usr as mob, obj/item/stack/sheet/src as obj) - if (!( istype(usr.loc, /turf/simulated) )) - return - if ( ! (istype(usr, /mob/living/carbon/human) || \ - istype(usr, /mob/living/silicon) || \ - istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") ) - usr << "\red You don't have the dexterity to do this!" - return 1 - var/reinf = istype(src, /obj/item/stack/sheet/rglass) - var/title = reinf?"Sheet Reinf. Glass":"Sheet-Glass" - title += " ([src.amount] sheet\s left)" - switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null)) - if("one direct") - if (src.loc != usr) - return 1 - if (src.amount < 1) - return 1 - var/list/directions = new/list(cardinal) - for (var/obj/structure/window/win in usr.loc) - directions-=win.dir - if(!(win.ini_dir in cardinal)) - usr << "\red Can't let you do that." - return 1 - var/dir_to_set = 2 - //yes, this could probably be done better but hey... it works... - for(var/obj/structure/window/WT in usr.loc) - if (WT.dir == dir_to_set) - dir_to_set = 4 - for(var/obj/structure/window/WT in usr.loc) - if (WT.dir == dir_to_set) - dir_to_set = 1 - for(var/obj/structure/window/WT in usr.loc) - if (WT.dir == dir_to_set) - dir_to_set = 8 - for(var/obj/structure/window/WT in usr.loc) - if (WT.dir == dir_to_set) - dir_to_set = 2 - var/obj/structure/window/W - if(reinf) - W = new /obj/structure/window/reinforced( usr.loc, reinf ) - W.state = 0 - else - W = new /obj/structure/window/basic( usr.loc, reinf ) - W.dir = dir_to_set - W.ini_dir = W.dir - W.anchored = 0 - src.use(1) - if("full (2 sheets)") - if (src.loc != usr) - return 1 - if (src.amount < 2) - return 1 - if (locate(/obj/structure/window) in usr.loc) - usr << "\red Can't let you do that." - return 1 - var/obj/structure/window/W - if(reinf) - W = new /obj/structure/window/reinforced( usr.loc, reinf ) - W.state = 0 - else - W = new /obj/structure/window/basic( usr.loc, reinf ) - W.dir = SOUTHWEST - W.ini_dir = SOUTHWEST - W.anchored = 0 - src.use(2) - else - //do nothing - return - // GLASS /obj/item/stack/sheet/glass/attack_self(mob/user as mob) - construct_window(usr, src) + construct_window(user) /obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user) ..() @@ -111,16 +42,117 @@ SHARDS else return ..() +/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob) + if(!user || !src) return 0 + if(!istype(user.loc,/turf)) return 0 + if(!user.IsAdvancedToolUser()) + user << "\red You don't have the dexterity to do this!" + return 0 + var/title = "Sheet-Glass" + title += " ([src.amount] sheet\s left)" + switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null)) + if("one direct") + if(!src) return 1 + if(src.loc != user) return 1 + var/list/directions = new/list(cardinal) + for (var/obj/structure/window/win in user.loc) + directions-=win.dir + if(!(win.ini_dir in cardinal)) + user << "\red Can't let you do that." + return 1 + var/dir_to_set = 2 + //yes, this could probably be done better but hey... it works... + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 4 + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 1 + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 8 + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 2 + var/obj/structure/window/W + W = new /obj/structure/window/basic( user.loc, 0 ) + W.dir = dir_to_set + W.ini_dir = W.dir + W.anchored = 0 + src.use(1) + if("full (2 sheets)") + if(!src) return 1 + if(src.loc != user) return 1 + if(locate(/obj/structure/window) in user.loc) + user << "\red There is a window in the way." + return 1 + var/obj/structure/window/W + W = new /obj/structure/window/basic( user.loc, 0 ) + W.dir = SOUTHWEST + W.ini_dir = SOUTHWEST + W.anchored = 0 + src.use(2) + return 0 + // REINFORCED GLASS /obj/item/stack/sheet/rglass/attack_self(mob/user as mob) - construct_window(usr, src) - - - - + construct_window(user) +/obj/item/stack/sheet/rglass/proc/construct_window(mob/user as mob) + if(!user || !src) return 0 + if(!istype(user.loc,/turf)) return 0 + if(!user.IsAdvancedToolUser()) + user << "\red You don't have the dexterity to do this!" + return 0 + var/title = "Sheet Reinf. Glass" + title += " ([src.amount] sheet\s left)" + switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null)) + if("one direct") + if(!src) return 1 + if(src.loc != user) return 1 + var/list/directions = new/list(cardinal) + for (var/obj/structure/window/win in user.loc) + directions-=win.dir + if(!(win.ini_dir in cardinal)) + user << "\red Can't let you do that." + return 1 + var/dir_to_set = 2 + //yes, this could probably be done better but hey... it works... + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 4 + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 1 + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 8 + for(var/obj/structure/window/WT in user.loc) + if (WT.dir == dir_to_set) + dir_to_set = 2 + var/obj/structure/window/W + W = new /obj/structure/window/reinforced( user.loc, 1 ) + W.state = 0 + W.dir = dir_to_set + W.ini_dir = W.dir + W.anchored = 0 + src.use(1) + if("full (2 sheets)") + if(!src) return 1 + if(src.loc != user) return 1 + if(locate(/obj/structure/window) in user.loc) + user << "\red There is a window in the way." + return 1 + var/obj/structure/window/W + W = new /obj/structure/window/reinforced( user.loc, 1 ) + W.state = 0 + W.dir = SOUTHWEST + W.ini_dir = SOUTHWEST + W.anchored = 0 + src.use(2) + return 0 // SHARDS diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index d9b99a5ee7c..5b73512598c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -650,12 +650,14 @@ Traitors and the like can also be revived with the previous role mostly intact. var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") if(confirm != "Yes") return + //Due to the delay here its easy for something to have happened to the mob + if(!M) return if(usr.key != M.key && M.client) log_admin("[key_name(usr)] has gibbed [key_name(M)]") message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1) - if (istype(M, /mob/dead/observer)) + if(istype(M, /mob/dead/observer)) gibs(M.loc, M.viruses) return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 96c29b71d7d..789e55939d0 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -975,85 +975,43 @@ note dizziness decrements automatically in the mob's Life() proc. statpanel("Spells","[S.charge_counter]/[S.charge_max]",S) if("holdervar") statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S) -#if 1 -/client/proc/station_explosion_cinematic(var/derp) - if(mob) - var/mob/M = mob - M.loc = null // HACK, but whatever, this works - if (M.client&&M.hud_used)//They may some times not have a hud, apparently. - var/obj/screen/boom = M.hud_used.station_explosion - M.client.screen += boom - if(ticker) - switch(ticker.mode.name) - if("nuclear emergency") - flick("start_nuke", boom) - if("AI malfunction") - flick("start_malf", boom) - else - boom.icon_state = "start" - sleep(40) - M << sound('explosionfar.ogg') - boom.icon_state = "end" - if(!derp) flick("explode", boom) - else flick("explode2", boom) - sleep(40) - if(ticker) - switch(ticker.mode.name) - if("nuclear emergency") - if(!derp) boom.icon_state = "loss_nuke" - else boom.icon_state = "loss_nuke2" - if("malfunction") - boom.icon_state = "loss_malf" - if("blob") - return//Nothin here yet and the general one does not fit. - else - boom.icon_state = "loss_general" -#elif -/client/proc/station_explosion_cinematic(var/derp) - if(!mob) - return - var/mob/M = mob - M.loc = null // HACK, but whatever, this works +/client/proc/station_explosion_cinematic(var/station_missed) + if(!mob || !ticker) return + if(!mob.client || !mob.hud_used || !ticker.mode) return +// M.loc = null this might make it act weird but fuck putting them in nullspace, it causes issues. + var/obj/screen/boom = mob.hud_used.station_explosion + if(!istype(boom)) return - if(!M.hud_used) - return + mob.client.screen += boom + + switch(ticker.mode.name) + if("nuclear emergency") + flick("start_nuke", boom) + if("AI malfunction") + flick("start_malf", boom) + else + boom.icon_state = "start" - var/obj/screen/boom = M.hud_used.station_explosion - screen += boom - if(ticker) - switch(ticker.mode.name) - if("nuclear emergency") - flick("start_nuke", boom) - if("AI malfunction") - flick("start_malf", boom) - else - boom.icon_state = "start" sleep(40) - M << sound('explosionfar.ogg') + mob << sound('explosionfar.ogg') boom.icon_state = "end" - if(!derp) - flick("explode", boom) - else - flick("explode2", boom) + if(!station_missed) flick("explode", boom) + else flick("explode2", boom) sleep(40) - if(ticker) - switch(ticker.mode.name) - if("nuclear emergency") - if (!derp) - boom.icon_state = "loss_nuke" - else - boom.icon_state = "loss_nuke2" - if("AI malfunction") - boom.icon_state = "loss_malf" - else - boom.icon_state = "loss_general" -#endif - - - + switch(ticker.mode.name) + if("nuclear emergency") + if(!station_missed) boom.icon_state = "loss_nuke" + else boom.icon_state = "loss_nuke2" + if("malfunction") + boom.icon_state = "loss_malf" + if("blob") + return//Nothin here yet and the general one does not fit. + else + boom.icon_state = "loss_general" + return // facing verbs diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 75e3eed3cf9..c657ec114c0 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -1,8 +1,6 @@ var/global/list/uneatable = list( /turf/space, - /obj/effect, /obj/effect/overlay, - /obj/effect/rune, /mob/aiEye )