Files
CHOMPStation2/code/game/objects/displaycase.dm
SkyMarshal 7631f9c32c Fixed #460, #456, and #478
Cleanbot autopatrols now
Ghosts can see PDA messages, a PDA will show you the fingerprints if it is complete enough (Security scanner)
Display case can be repaired.
More update_clothing() calls
Disabilities have their own window, now.
Removed the genetics scanner, go use yer penlights!
2012-02-21 18:58:28 -07:00

109 lines
2.6 KiB
Plaintext

/obj/structure/displaycase/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
if (occupied)
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
occupied = 0
del(src)
if (2)
if (prob(50))
src.health -= 15
src.healthcheck()
if (3)
if (prob(50))
src.health -= 5
src.healthcheck()
/obj/structure/displaycase/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
src.healthcheck()
return
/obj/structure/displaycase/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
if (occupied)
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
occupied = 0
del(src)
/obj/structure/displaycase/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
del(src)
/obj/structure/displaycase/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.density = 0
src.destroyed = 1
new /obj/item/weapon/shard( src.loc )
playsound(src, "shatter", 70, 1)
update_icon()
else
playsound(src.loc, 'Glasshit.ogg', 75, 1)
return
/obj/structure/displaycase/update_icon()
if(src.destroyed)
src.icon_state = "glassboxb[src.occupied]"
else
src.icon_state = "glassbox[src.occupied]"
return
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/gun/energy/laser/captain))
if(!src.occupied)
user << "\b You put the [W] back into the display case."
del(W)
src.occupied = 1
update_icon()
return
if(istype(W, /obj/item/stack/sheet/glass))
if(src.occupied && src.destroyed)
var/obj/item/stack/sheet/glass/G = W
user << "\b You repair the display case."
G.amount--
if (G.amount <= 0)
user.update_clothing()
del(G)
src.destroyed = 0
src.density = 1
src.health = 30
update_icon()
return
src.health -= W.force
src.healthcheck()
..()
return
/obj/structure/displaycase/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/displaycase/attack_hand(mob/user as mob)
if (src.destroyed && src.occupied)
new /obj/item/weapon/gun/energy/laser/captain( src.loc )
user << "\b You deactivate the hover field built into the case."
src.occupied = 0
src.add_fingerprint(user)
update_icon()
return
else
usr << text("\blue You kick the display case.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] kicks the display case.", usr)
src.health -= 2
src.add_fingerprint(user)
healthcheck()
return