diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 4daea616359..7ee56066db5 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -195,8 +195,8 @@
spark_system.start()
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
- visible_message("\blue The glass door was sliced open by []!", user)
- flick(text("[]spark", src.base_state), src)
+ visible_message("\blue The glass door was sliced open by [user]!")
+ flick("[src.base_state]spark", src)
sleep(6)
open()
return 1
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index efff7ba6811..fc61c7ea018 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -465,7 +465,7 @@
src.log_append_to_last("Armor saved.")
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
src.occupant_message("\blue The [user]'s attack is stopped by the armor.")
- visible_message("\blue The [user] rebounds off [src.name]'s armor!", 1)
+ visible_message("\blue The [user] rebounds off [src.name]'s armor!")
user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
return
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 425fd06558f..5996319945d 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -1,192 +1,183 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
/obj/structure/grille
- desc = "A piece of metal with evenly spaced gridlike holes in it. Blocks large object but lets small items, gas, or energy beams through. Strangely enough these grilles also lets meteors pass through them, whether they be small or huge station breaking death stones."
+ desc = "A flimsy lattice of metal rods, with screws to secure it to the floor."
name = "grille"
icon = 'icons/obj/structures.dmi'
icon_state = "grille"
density = 1
- anchored = 1.0
+ anchored = 1
flags = FPRINT | CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
+ explosion_resistance = 5
var/health = 10
var/destroyed = 0
- explosion_resistance = 5
+
/obj/structure/grille/ex_act(severity)
- switch(severity)
- if(1.0)
- del(src)
- return
- if(2.0)
- if(prob(50))
- del(src)
- return
- if(3.0)
- if(prob(25))
- src.health -= 11
- healthcheck()
- return
+ del(src)
/obj/structure/grille/blob_act()
del(src)
- return
+
+/obj/structure/grille/meteorhit(var/obj/M)
+ del(src)
+
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
-/obj/structure/grille/meteorhit(var/obj/M)
- if (M.icon_state == "flaming")
- src.health -= 2
- healthcheck()
- return
-
-
-/obj/structure/grille/attack_hand(var/mob/user)
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user.name] kicks the [src.name].", \
- "You kick the [src.name].", \
- "You hear a noise")
- if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
- src.health -= 5
- else if(!shock(user, 70))
- src.health -= 3
- healthcheck()
- return
-
-
-/obj/structure/grille/attack_paw(var/mob/user)
+/obj/structure/grille/attack_paw(mob/user as mob)
attack_hand(user)
+/obj/structure/grille/attack_hand(mob/user as mob)
+ playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
+ user.visible_message("[user] kicks [src].", \
+ "You kick [src].", \
+ "You hear twisting metal.")
-/obj/structure/grille/attack_alien(var/mob/user)
- if (istype(usr, /mob/living/carbon/alien/larva)) return
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user.name] mangles the [src.name].", \
- "You mangle the [src.name].", \
- "You hear a noise")
- if(!shock(usr, 70))
- src.health -= 5
+ if(shock(user, 70))
+ return
+ if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
+ health -= 5
+ else
+ health -= 3
+ healthcheck()
+
+/obj/structure/grille/attack_alien(mob/user as mob)
+ if(istype(user, /mob/living/carbon/alien/larva)) return
+
+ playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
+ user.visible_message("[user] mangles [src].", \
+ "You mangle [src].", \
+ "You hear twisting metal.")
+
+ if(!shock(user, 70))
+ health -= 5
healthcheck()
return
-/obj/structure/grille/attack_metroid(var/mob/user)
- if(!istype(usr, /mob/living/carbon/metroid/adult)) return
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user.name] smashes against the [src.name].", \
- "You smash against the [src.name].", \
- "You hear a noise")
- src.health -= rand(2,3)
+/obj/structure/grille/attack_metroid(mob/user as mob)
+ if(!istype(user, /mob/living/carbon/metroid/adult)) return
+
+ playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
+ user.visible_message("[user] smashes against [src].", \
+ "You smash against [src].", \
+ "You hear twisting metal.")
+
+ health -= rand(2,3)
healthcheck()
return
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
- M.visible_message("[M.name] smashes against the [src.name].", \
- "You smash against the [src.name].", \
- "You hear a noise")
- src.health -= M.melee_damage_upper
+
+ playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
+ M.visible_message("[M] smashes against [src].", \
+ "You smash against [src].", \
+ "You hear twisting metal.")
+
+ health -= M.melee_damage_upper
healthcheck()
return
+
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
else
- if (istype(mover, /obj/item/projectile))
+ if(istype(mover, /obj/item/projectile))
return prob(30)
else
- return !src.density
+ return !density
-/obj/structure/grille/attackby(obj/item/weapon/W, mob/user)
+/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
if(!shock(user, 100))
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
- src.health = 0
- if(!destroyed)
- src.health = -100
- else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
+ playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
+ new /obj/item/stack/rods(loc)
+ del(src)
+ else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
- src.anchored = !( src.anchored )
- user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
- for(var/mob/O in oviewers())
- O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
+ playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
+ anchored = !anchored
+ user.visible_message("[user] [anchored ? "fastens" : "unfastens"] the grille.", \
+ "You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.")
return
+
+//window placing begin
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
var/dir_to_set = 1
- if(src.loc == usr.loc)
- dir_to_set = usr.dir
+ if(loc == user.loc)
+ dir_to_set = user.dir
else
- if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
- if( src.x == usr.x )
- if( src.y > usr.y )
+ if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
+ if( x == user.x )
+ if( y > user.y )
dir_to_set = 2
else
dir_to_set = 1
- else if( src.y == usr.y )
- if( src.x > usr.x )
+ else if( y == user.y )
+ if( x > user.x )
dir_to_set = 8
else
dir_to_set = 4
else
- usr << "\red You can't reach there.."
+ user << "You can't reach."
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
- for(var/obj/structure/window/WINDOW in src.loc)
+ for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)
- usr << "\red There is already a window facing this way there."
+ user << "There is already a window facing this way there."
return
- usr << "\blue You start placing the window"
+ user << "You start placing the window."
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
- for(var/obj/structure/window/WINDOW in src.loc)
+ for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
- usr << "\red There is already a window facing this way there."
+ user << "There is already a window facing this way there."
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
- WD = new/obj/structure/window(src.loc,1) //reinforced window
+ WD = new/obj/structure/window(loc,1) //reinforced window
else
- WD = new/obj/structure/window(src.loc,0) //normal window
+ WD = new/obj/structure/window(loc,0) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
- usr << "\blue You place the [WD] on the [src]"
+ user << "You place the [WD] on [src]."
return
+//window placing end
+
else if(istype(W, /obj/item/weapon/shard))
- src.health -= W.force * 0.1
+ health -= W.force * 0.1
else if(!shock(user, 70))
- playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
+ playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
- src.health -= W.force
+ health -= W.force
if("brute")
- src.health -= W.force * 0.1
- src.healthcheck()
+ health -= W.force * 0.1
+ healthcheck()
..()
return
/obj/structure/grille/proc/healthcheck()
- if (src.health <= 0)
- if (!( src.destroyed ))
- src.icon_state = "brokengrille"
- src.density = 0
- src.destroyed = 1
- new /obj/item/stack/rods( src.loc )
+ if(health <= 0)
+ if(!destroyed)
+ icon_state = "brokengrille"
+ density = 0
+ destroyed = 1
+ new /obj/item/stack/rods(loc)
else
- if (src.health <= -10.0)
- new /obj/item/stack/rods( src.loc )
- //SN src = null
+ if(health <= -6)
+ new /obj/item/stack/rods(loc)
del(src)
return
return
@@ -194,17 +185,17 @@
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
-/obj/structure/grille/proc/shock(mob/user, prb)
+/obj/structure/grille/proc/shock(mob/user as mob, prb)
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
return 0
if(!prob(prb))
return 0
- if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
+ if(!in_range(src, user))//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)
- if (electrocute_mob(user, C, src))
+ if(electrocute_mob(user, C, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
@@ -216,6 +207,6 @@
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(exposed_temperature > T0C + 1500)
- src.health -= 1
+ health -= 1
healthcheck()
..()
\ No newline at end of file
diff --git a/icons/misc/static.dmi b/icons/misc/static.dmi
new file mode 100644
index 00000000000..ae9b6f401aa
Binary files /dev/null and b/icons/misc/static.dmi differ