mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge branch 'dev' into ofChemistryAndStuff
Conflicts: code/datums/recipe.dm code/game/machinery/bots/farmbot.dm code/game/machinery/bots/medbot.dm code/game/mecha/equipment/tools/tools.dm code/game/objects/effects/chem/chemsmoke.dm code/game/objects/effects/effect_system.dm code/game/objects/items/toys.dm code/game/objects/items/weapons/extinguisher.dm code/game/objects/items/weapons/mop.dm code/modules/mob/living/carbon/human/human.dm code/modules/organs/organ_internal.dm code/modules/reagents/Chemistry-Holder.dm code/modules/reagents/Chemistry-Reagents.dm code/modules/reagents/Chemistry-Recipes.dm code/modules/reagents/reagent_containers/food/snacks.dm code/modules/reagents/reagent_containers/pill.dm code/modules/reagents/reagent_containers/spray.dm maps/exodus-1.dmm
This commit is contained in:
@@ -146,30 +146,33 @@
|
||||
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
|
||||
A.ex_act(severity++)
|
||||
del(src)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
for (var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.ex_act(severity++)
|
||||
del(src)
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.ex_act(severity++)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/proc/damage(var/damage)
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
for(var/atom/movable/A in src)
|
||||
A.loc = src.loc
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
damage(Proj.damage)
|
||||
|
||||
return
|
||||
|
||||
@@ -178,14 +181,14 @@
|
||||
if(prob(75))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/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)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(src.opened)
|
||||
@@ -202,7 +205,7 @@
|
||||
new /obj/item/stack/sheet/metal(src.loc)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -249,6 +252,10 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/closet/attack_ai(mob/user)
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Robots can open/close it, but not the AI.
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/closet/relaymove(mob/user as mob)
|
||||
if(user.stat || !isturf(src.loc))
|
||||
return
|
||||
@@ -306,5 +313,5 @@
|
||||
return
|
||||
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
|
||||
dump_contents()
|
||||
spawn(1) del(src)
|
||||
spawn(1) qdel(src)
|
||||
return 1
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
user << "\red Unwield the axe first."
|
||||
return
|
||||
fireaxe = O
|
||||
user.drop_item(O)
|
||||
user.remove_from_mob(O)
|
||||
src.contents += O
|
||||
user << "\blue You place the fire axe back in the [src.name]."
|
||||
update_icon()
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
/obj/structure/closet/l3closet/general/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/general( src )
|
||||
new /obj/item/clothing/head/bio_hood/general( src )
|
||||
@@ -30,6 +31,7 @@
|
||||
|
||||
/obj/structure/closet/l3closet/virology/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/virology( src )
|
||||
new /obj/item/clothing/head/bio_hood/virology( src )
|
||||
@@ -44,6 +46,7 @@
|
||||
|
||||
/obj/structure/closet/l3closet/security/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/security( src )
|
||||
new /obj/item/clothing/head/bio_hood/security( src )
|
||||
@@ -56,6 +59,7 @@
|
||||
|
||||
/obj/structure/closet/l3closet/janitor/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/janitor( src )
|
||||
new /obj/item/clothing/head/bio_hood/janitor( src )
|
||||
@@ -68,6 +72,7 @@
|
||||
|
||||
/obj/structure/closet/l3closet/scientist/New()
|
||||
..()
|
||||
qdel(contents)
|
||||
contents = list()
|
||||
new /obj/item/clothing/suit/bio_suit/scientist( src )
|
||||
new /obj/item/clothing/head/bio_hood/scientist( src )
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
New()
|
||||
..()
|
||||
for(var/i = 0, i < 6, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/flour(src)
|
||||
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
|
||||
for(var/i = 0, i < 3, i++)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src)
|
||||
|
||||
@@ -24,5 +24,6 @@
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/wirecutters/clippers(src)
|
||||
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
|
||||
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
|
||||
return
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
spawn(4)
|
||||
// Not really the best way to do this, but it's better than "contents = list()"!
|
||||
for(var/atom/movable/AM in contents)
|
||||
del(AM)
|
||||
qdel(AM)
|
||||
new /obj/item/clothing/under/color/white( src )
|
||||
new /obj/item/clothing/shoes/white( src )
|
||||
return
|
||||
@@ -55,7 +55,7 @@
|
||||
spawn(4)
|
||||
// Not really the best way to do this, but it's better than "contents = list()"!
|
||||
for(var/atom/movable/AM in contents)
|
||||
del(AM)
|
||||
qdel(AM)
|
||||
new /obj/item/weapon/storage/backpack/satchel/withwallet( src )
|
||||
new /obj/item/device/radio/headset( src )
|
||||
return
|
||||
|
||||
133
code/game/objects/structures/crates_lockers/closets/statue.dm
Normal file
133
code/game/objects/structures/crates_lockers/closets/statue.dm
Normal file
@@ -0,0 +1,133 @@
|
||||
/obj/structure/closet/statue
|
||||
name = "statue"
|
||||
desc = "An incredibly lifelike marble carving"
|
||||
icon = 'icons/obj/statue.dmi'
|
||||
icon_state = "human_male"
|
||||
density = 1
|
||||
anchored = 1
|
||||
health = 0 //destroying the statue kills the mob within
|
||||
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
|
||||
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
|
||||
var/intialBrute = 0
|
||||
var/intialOxy = 0
|
||||
var/timer = 240 //eventually the person will be freed
|
||||
|
||||
/obj/structure/closet/statue/New(loc, var/mob/living/L)
|
||||
if(L && (ishuman(L) || L.isMonkey() || iscorgi(L)))
|
||||
if(L.buckled)
|
||||
L.buckled = 0
|
||||
L.anchored = 0
|
||||
if(L.client)
|
||||
L.client.perspective = EYE_PERSPECTIVE
|
||||
L.client.eye = src
|
||||
L.loc = src
|
||||
L.sdisabilities |= MUTE
|
||||
health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
|
||||
intialTox = L.getToxLoss()
|
||||
intialFire = L.getFireLoss()
|
||||
intialBrute = L.getBruteLoss()
|
||||
intialOxy = L.getOxyLoss()
|
||||
if(ishuman(L))
|
||||
name = "statue of [L.name]"
|
||||
if(L.gender == "female")
|
||||
icon_state = "human_female"
|
||||
else if(L.isMonkey())
|
||||
name = "statue of a monkey"
|
||||
icon_state = "monkey"
|
||||
else if(iscorgi(L))
|
||||
name = "statue of a corgi"
|
||||
icon_state = "corgi"
|
||||
desc = "If it takes forever, I will wait for you..."
|
||||
|
||||
if(health == 0) //meaning if the statue didn't find a valid target
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
processing_objects.Add(src)
|
||||
..()
|
||||
|
||||
/obj/structure/closet/statue/process()
|
||||
timer--
|
||||
for(var/mob/living/M in src) //Go-go gadget stasis field
|
||||
M.setToxLoss(intialTox)
|
||||
M.adjustFireLoss(intialFire - M.getFireLoss())
|
||||
M.adjustBruteLoss(intialBrute - M.getBruteLoss())
|
||||
M.setOxyLoss(intialOxy)
|
||||
if (timer <= 0)
|
||||
dump_contents()
|
||||
processing_objects.Remove(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/statue/dump_contents()
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
|
||||
for(var/mob/living/M in src)
|
||||
M.loc = src.loc
|
||||
M.sdisabilities &= ~MUTE
|
||||
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
/obj/structure/closet/statue/open()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/close()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/toggle()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
if(health <= 0)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/attack_generic(var/mob/user, damage, attacktext, environment_smash)
|
||||
if(damage && environment_smash)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/blob_act()
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/meteorhit(obj/O as obj)
|
||||
if(O.icon_state == "flaming")
|
||||
for(var/mob/M in src)
|
||||
M.meteorhit(O)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
||||
health -= I.force
|
||||
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
|
||||
if(health <= 0)
|
||||
for(var/mob/M in src)
|
||||
shatter(M)
|
||||
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/relaymove()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/attack_hand()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/verb_toggleopen()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/proc/shatter(mob/user as mob)
|
||||
if (user)
|
||||
user.dust()
|
||||
dump_contents()
|
||||
visible_message("<span class='warning'>[src] shatters!.</span>")
|
||||
qdel(src)
|
||||
@@ -56,12 +56,12 @@
|
||||
|
||||
// teehee - Ah, tg coders...
|
||||
if ("delete")
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
//If you want to re-add fire, just add "fire" = 15 to the pick list.
|
||||
/*if ("fire")
|
||||
new /obj/structure/closet/firecloset(src.loc)
|
||||
del(src)*/
|
||||
qdel(src)*/
|
||||
|
||||
/obj/structure/closet/emcloset/legacy/New()
|
||||
..()
|
||||
|
||||
@@ -105,18 +105,18 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/obj/O in src.contents)
|
||||
del(O)
|
||||
del(src)
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
for(var/obj/O in src.contents)
|
||||
if(prob(50))
|
||||
del(O)
|
||||
del(src)
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
|
||||
"<span class='notice'>You pry open \the [src].</span>", \
|
||||
"<span class='notice'>You hear splitting wood.</span>")
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user