Files
Polaris/code/game/objects/lamarr.dm
sieve32@gmail.com 459c558898 -Make holodeck eswords a child of obj/item/weapon/holo instead of regular eswords, clumsy check removed as a result, and you can no longer do things like cutting through walls or doors or what have you. (Fixes Issue 665)
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.

r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds

[VGTG]

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-23 00:48:51 +00:00

97 lines
2.1 KiB
Plaintext

/obj/structure/lamarr
name = "Lab Cage"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "labcage1"
desc = "A glass lab container for storing interesting creatures."
density = 1
anchored = 1
unacidable = 1//Dissolving the case would also delete Lamarr
var/health = 30
var/occupied = 1
var/destroyed = 0
/obj/structure/lamarr/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
if (2)
if (prob(50))
src.health -= 15
src.healthcheck()
if (3)
if (prob(50))
src.health -= 5
src.healthcheck()
/obj/structure/lamarr/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
src.healthcheck()
return
/obj/structure/lamarr/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
/obj/structure/lamarr/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
Break()
del(src)
/obj/structure/lamarr/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)
Break()
else
playsound(src.loc, 'Glasshit.ogg', 75, 1)
return
/obj/structure/lamarr/update_icon()
if(src.destroyed)
src.icon_state = "labcageb[src.occupied]"
else
src.icon_state = "labcage[src.occupied]"
return
/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob)
src.health -= W.force
src.healthcheck()
..()
return
/obj/structure/lamarr/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/structure/lamarr/attack_hand(mob/user as mob)
if (src.destroyed)
return
else
usr << text("\blue You kick the lab cage.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [] kicks the lab cage.", usr)
src.health -= 2
healthcheck()
return
/obj/structure/lamarr/proc/Break()
if(occupied)
var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger( src.loc )
A.sterile = 1
A.name = "Lamarr"
occupied = 0
update_icon()
return