-Metroids will now feed when 'content' (But not as quickly), meaning they will evolve and reproduce properly

Fixes Issue 765
-It is now possible to weld secure lockers shut
-Lockers now have a welded overlay (Expect in some cases, such as cabinets)
Thanks to Pete for the sprite

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4459 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
sieve32@gmail.com
2012-08-17 04:22:53 +00:00
parent f3996dfc5e
commit 626cb74704
9 changed files with 140 additions and 4 deletions
+61
View File
@@ -29,6 +29,13 @@
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
/obj/structure/closet/cabinet/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
/obj/effect/spresent
name = "strange present"
desc = "It's a ... present?"
@@ -59,6 +66,12 @@
icon_closed = "firecloset"
icon_opened = "fireclosetopen"
/obj/structure/closet/firecloset/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/hydrant //wall mounted fire closet
name = "fire-safety closet"
desc = "It's a storage unit for fire-fighting supplies."
@@ -79,6 +92,12 @@
density = 0
wall_mounted = 1
/obj/structure/closet/medical_wall/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/toolcloset
name = "tool closet"
desc = "It's a storage unit for tools."
@@ -138,6 +157,12 @@
icon_closed = "coffin"
icon_opened = "coffin_open"
/obj/structure/closet/coffin/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/bombcloset
name = "\improper EOD closet"
desc = "It's a storage unit for explosion-protective suits."
@@ -376,6 +401,18 @@
wall_mounted = 1
req_access = list(access_medical)
/obj/structure/closet/secure_closet/medical_wall/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/personal
desc = "It's a secure locker for personell. The first card swiped gains control."
name = "personal closet"
@@ -388,6 +425,18 @@
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/personal/patient
name = "patient's closet"
@@ -405,6 +454,18 @@
//too small to put a man in
large = 0
/obj/structure/closet/secure_closet/wall/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/crate/critter
name = "critter crate"
desc = "A crate which can sustain life for a while."
+5
View File
@@ -82,3 +82,8 @@
del(src)
return
/obj/structure/closet/bodybag/update_icon()
if(!opened)
icon_state = icon_closed
else
icon_state = icon_opened
+10
View File
@@ -176,6 +176,7 @@
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
src.welded =! src.welded
src.update_icon()
for(var/mob/M in viewers(src))
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
else
@@ -240,3 +241,12 @@
src.attack_hand(usr)
else
usr << "<span class='warning'>This mob type can't use this verb.</span>"
/obj/structure/closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays = null
if(!opened)
icon_state = icon_closed
if(welded)
overlays += "welded"
else
icon_state = icon_opened
+12
View File
@@ -1,5 +1,17 @@
/obj/structure/closet/secure_closet/freezer
/obj/structure/closet/secure_closet/freezer/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/freezer/kitchen
name = "Kitchen Cabinet"
req_access = list(access_kitchen)
+12
View File
@@ -23,3 +23,15 @@
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
new /obj/item/weapon/reagent_containers/food/drinks/beer( src )
return
/obj/structure/closet/secure_closet/bar/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
@@ -68,7 +68,17 @@
for(var/mob/O in viewers(user, 3))
O.show_message("<span class='warning'>The locker has been broken by [user] with an electromagnetic card!</span>", 1, "You hear a faint electrical spark.", 2)
else
togglelock(user)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
src.welded =! src.welded
src.update_icon()
for(var/mob/M in viewers(src))
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
else
togglelock(user)
/obj/structure/closet/secure_closet/relaymove(mob/user as mob)
if(user.stat)
@@ -121,4 +131,16 @@
if (!opened)
togglelock(usr)
else
usr << "<span class='warning'>This mob type can't use this verb.</span>"
usr << "<span class='warning'>This mob type can't use this verb.</span>"
/obj/structure/closet/secure_closet/update_icon()//Putting the welded stuff in updateicon() so it's easy to overwrite for special cases (Fridges, cabinets, and whatnot)
overlays = null
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
if(welded)
overlays += "welded"
else
icon_state = icon_opened
+11 -1
View File
@@ -187,7 +187,17 @@
new /obj/item/weapon/storage/box/evidence(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()
if(broken)
icon_state = icon_broken
else
if(!opened)
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
else
icon_state = icon_opened
/obj/structure/closet/secure_closet/injection
name = "Lethal Injections"
@@ -65,7 +65,7 @@
starving = 1
else
switch(nutrition)
if(150 to 800) hungry = 1
if(150 to 900) hungry = 1
if(0 to 149) starving = 1
AIproc = 1
while(AIproc && stat != 2 && (attacked > 0 || starving || hungry || rabid || Victim))
@@ -408,12 +408,16 @@
var/starving = 0 // determines if the metroid is starving-hungry
if(istype(src, /mob/living/carbon/metroid/adult)) // 1200 max nutrition
switch(nutrition)
if(601 to 900)
if(prob(25)) hungry = 1//Ensures they continue eating, but aren't as aggressive at the same time
if(301 to 600) hungry = 1
if(0 to 300)
starving = 1
else
switch(nutrition) // 1000 max nutrition
if(501 to 700)
if(prob(25)) hungry = 1
if(201 to 500) hungry = 1
if(0 to 200) starving = 1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 79 KiB