From 3ae7acf8f22fa75723eef53beb60ddd6b9edc324 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Tue, 12 Jun 2012 04:45:38 +0000 Subject: [PATCH] Committed for Sieve: Fixed an error in door_assembly.dm regarding glass doors not getting sprites. Cleaned up astroid floor code. -Bombing astroid floors (sand) will now 'dig' up sand. TK users no longer get shocked while bashing grilles using TK. - Range check on grille shocking. Fixes Issue 419. Added to the lighting checks for Plantmen. They should no longer starve on the shuttle. Fixes Issue 471. Bombs now affect people inside lockers. Fixes issue 208. - Modified Sieve's original change so that the contents of the locker get severity+1. Meaning a weaker severity meaning the locker offers some protection. Vending machines and mass driver buttons now leave fingerprints. Fixing issue 542. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3800 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/machinery/door_control.dm | 2 ++ code/game/machinery/vending.dm | 2 ++ code/game/objects/closets.dm | 16 +++++------ code/game/objects/door_assembly.dm | 2 +- code/game/objects/grille.dm | 2 ++ code/modules/mining/mine_turfs.dm | 28 +++++++++++--------- code/modules/mob/living/carbon/human/life.dm | 2 ++ 7 files changed, 31 insertions(+), 23 deletions(-) diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index a7ea1f255dd..25b9a8afb6d 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -38,6 +38,7 @@ use_power(5) icon_state = "doorctrl1" + add_fingerprint(user) if(normaldoorcontrol) for(var/obj/machinery/door/airlock/D in range(range)) @@ -117,6 +118,7 @@ return if(active) return + add_fingerprint(user) use_power(5) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 1a16ff3b0c2..cd560dd3bd3 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -322,6 +322,7 @@ To combat this, I changed the window name. -- Doohl /obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob) + add_fingerprint(user) if (istype(W, /obj/item/weapon/card/emag)) src.emagged = 1 user << "You short out the ID lock on [src]" @@ -359,6 +360,7 @@ To combat this, I changed the window name. -- Doohl return attack_hand(user) /obj/machinery/vending/attack_hand(mob/user as mob) + add_fingerprint(user) if(stat & (BROKEN|NOPOWER)) return user.machine = src diff --git a/code/game/objects/closets.dm b/code/game/objects/closets.dm index f9f267621f6..15a97161fa5 100644 --- a/code/game/objects/closets.dm +++ b/code/game/objects/closets.dm @@ -20,9 +20,6 @@ for(var/obj/item/I in src) I.loc = src.loc - for(var/obj/mecha/working/ripley/deathripley/I in src) - I.loc = src.loc - for(var/mob/M in src) M.loc = src.loc if(M.client) @@ -57,9 +54,6 @@ if(!I.anchored) I.loc = src - for(var/obj/mecha/working/ripley/deathripley/I in src.loc) - I.loc = src - for(var/mob/M in src.loc) if(istype (M, /mob/dead/observer)) continue @@ -89,21 +83,21 @@ /obj/structure/closet/ex_act(severity) switch(severity) if(1) - for(var/atom/movable/A as mob|obj in src) + for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion A.loc = src.loc - ex_act(severity) + A.ex_act(severity++) del(src) if(2) if(prob(50)) for (var/atom/movable/A as mob|obj in src) A.loc = src.loc - ex_act(severity) + A.ex_act(severity++) del(src) if(3) if(prob(5)) for(var/atom/movable/A as mob|obj in src) A.loc = src.loc - ex_act(severity) + A.ex_act(severity++) del(src) /obj/structure/closet/bullet_act(var/obj/item/projectile/Proj) @@ -125,6 +119,8 @@ /obj/structure/closet/meteorhit(obj/O as obj) if(O.icon_state == "flaming") + for(var/mob/M in src) + M.meteorhit(O) src.dump_contents() del(src) diff --git a/code/game/objects/door_assembly.dm b/code/game/objects/door_assembly.dm index 358ea6720dd..784b7172374 100644 --- a/code/game/objects/door_assembly.dm +++ b/code/game/objects/door_assembly.dm @@ -364,7 +364,7 @@ obj/structure/door_assembly src.mineral = "glass" src.name = "Near finished Window Airlock Assembly" src.airlock_type = /obj/machinery/door/airlock/glass - src.base_icon_state = "door_as_glass" //this will be applied to the icon_state with the correct state number at the proc's end. + src.base_icon_state = "door_as_g" //this will be applied to the icon_state with the correct state number at the proc's end. if(/obj/item/stack/sheet/gold) if(G.amount>=2) playsound(src.loc, 'Crowbar.ogg', 100, 1) diff --git a/code/game/objects/grille.dm b/code/game/objects/grille.dm index 34edd895973..7317a0c9495 100644 --- a/code/game/objects/grille.dm +++ b/code/game/objects/grille.dm @@ -199,6 +199,8 @@ return 0 if(!prob(prb)) return 0 + if(!in_range(src, usr))//To prevent TK and mech users from getting shocked + return 0 var/turf/T = get_turf(src) var/obj/structure/cable/C = T.get_cable_node() if(C) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 17e40de2800..64d01082761 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -289,6 +289,14 @@ updateMineralOverlays() /turf/simulated/floor/plating/airless/asteroid/ex_act(severity) + switch(severity) + if(3.0) + return + if(2.0) + if (prob(70)) + src.gets_dug() + if(1.0) + src.gets_dug() return /turf/simulated/floor/plating/airless/asteroid/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -301,7 +309,7 @@ if (!( istype(T, /turf) )) return - if (dug == 1) + if (dug) user << "\red This area has already been dug" return @@ -312,9 +320,6 @@ if ((user.loc == T && user.equipped() == W)) user << "\blue You dug a hole." gets_dug() - dug = 1 - icon_plating = "asteroid_dug" - icon_state = "asteroid_dug" else ..(W,user) if ((istype(W,/obj/item/weapon/pickaxe/drill))) @@ -322,7 +327,7 @@ if (!( istype(T, /turf) )) return - if (dug == 1) + if (dug) user << "\red This area has already been dug" return @@ -333,9 +338,6 @@ if ((user.loc == T && user.equipped() == W)) user << "\blue You dug a hole." gets_dug() - dug = 1 - icon_plating = "asteroid_dug" - icon_state = "asteroid_dug" else ..(W,user) @@ -344,7 +346,7 @@ if (!( istype(T, /turf) )) return - if (dug == 1) + if (dug) user << "\red This area has already been dug" return @@ -355,20 +357,22 @@ if ((user.loc == T && user.equipped() == W)) user << "\blue You dug a hole." gets_dug() - dug = 1 - icon_plating = "asteroid_dug" - icon_state = "asteroid_dug" else ..(W,user) return /turf/simulated/floor/plating/airless/asteroid/proc/gets_dug() + if(dug) + return new/obj/item/weapon/ore/glass(src) new/obj/item/weapon/ore/glass(src) new/obj/item/weapon/ore/glass(src) new/obj/item/weapon/ore/glass(src) new/obj/item/weapon/ore/glass(src) + dug = 1 + icon_plating = "asteroid_dug" + icon_state = "asteroid_dug" return /turf/simulated/floor/plating/airless/asteroid/proc/updateMineralOverlays() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5e78eab0774..2a480317b68 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -691,6 +691,8 @@ var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing if(istype(loc,/turf)) //else, there's considered to be no light light_amount = min(10,loc:sd_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights + if(istype(loc,/turf/simulated/shuttle))//Now not only will potatomen not starve on the shuttle, they will actually be fed + light_amount = 5 if(nutrition < 500) //so they can't store nutrition to survive without light forever nutrition += light_amount if(light_amount > 0) //if there's enough light, heal