mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Another small chunk of reorganizing objects.
I've cleared out most of the .dm files in code/game/objects/ and put it into appropriate files/folders. The stuff I've left is stuff I believe may conflict with carn's work and some code for stuff that does not have a home yet. TODO: - Files that were left in code/game/objects that may conflict with carns work - Go through all the files in all the subfolders of code/game/objects. - Move all the defines from /defines/ to their proper spots Not much right? git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4520 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
/obj/effect/alien/acid/proc/tick()
|
||||
ticks += 1
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] sizzles and begins to melt under the bubbling mess of acid!</B>", 1)
|
||||
if(prob(ticks*10))
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] collapses under its own weight into a puddle of goop and undigested debris!</B>", 1)
|
||||
// if(target.occupant) //I tried to fix mechas-with-humans-getting-deleted. Made them unacidable for now.
|
||||
// target.ex_act(1)
|
||||
del(target)
|
||||
del(src)
|
||||
return
|
||||
spawn(rand(200, 600)) tick()
|
||||
@@ -1,54 +0,0 @@
|
||||
/obj/effect/alien
|
||||
name = "alien thing"
|
||||
desc = "theres something alien about this"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
// unacidable = 1 //Aliens won't ment their own.
|
||||
|
||||
/obj/effect/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of slimy growth."
|
||||
icon_state = "resin"
|
||||
|
||||
density = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
var/health = 50
|
||||
//var/mob/living/affecting = null
|
||||
|
||||
wall
|
||||
name = "resin wall"
|
||||
desc = "Purple slime solidified into a wall."
|
||||
icon_state = "resinwall" //same as resin, but consistency ho!
|
||||
|
||||
membrane
|
||||
name = "resin membrane"
|
||||
desc = "Purple slime just thin enough to let light pass through."
|
||||
icon_state = "resinmembrane"
|
||||
opacity = 0
|
||||
health = 20
|
||||
|
||||
/obj/effect/alien/weeds
|
||||
name = "weeds"
|
||||
desc = "Weird purple weeds."
|
||||
icon_state = "weeds"
|
||||
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/health = 50
|
||||
|
||||
node
|
||||
icon_state = "weednode"
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
|
||||
/obj/effect/alien/acid
|
||||
name = "acid"
|
||||
desc = "Burbling corrossive stuff. I wouldn't want to touch it."
|
||||
icon_state = "acid"
|
||||
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
|
||||
var/obj/target
|
||||
var/ticks = 0
|
||||
@@ -1,103 +0,0 @@
|
||||
/var/const //for the status var
|
||||
BURST = 0
|
||||
GROWING = 1
|
||||
GROWN = 2
|
||||
|
||||
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
|
||||
MAX_GROWTH_TIME = 3000
|
||||
|
||||
/obj/effect/alien/egg
|
||||
desc = "It looks like a weird egg"
|
||||
name = "egg"
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
var/health = 100
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
|
||||
New()
|
||||
if(aliens_allowed)
|
||||
..()
|
||||
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
else
|
||||
del(src)
|
||||
|
||||
attack_paw(user as mob)
|
||||
if(isalien(user))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
user << "\red The child is already gone."
|
||||
return
|
||||
if(GROWING)
|
||||
user << "\red The child is not developed yet."
|
||||
return
|
||||
if(GROWN)
|
||||
user << "\red You retrieve the child."
|
||||
loc.contents += GetFacehugger()//need to write the code for giving it to the alien later
|
||||
Burst()
|
||||
return
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(user as mob)
|
||||
user << "It feels slimy."
|
||||
return
|
||||
|
||||
proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
|
||||
proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
return
|
||||
|
||||
proc/Burst() //drops and kills the hugger if any is remaining
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
|
||||
if(child)
|
||||
loc.contents += child
|
||||
child.Die()
|
||||
|
||||
icon_state = "egg_hatched"
|
||||
status = BURST
|
||||
return
|
||||
|
||||
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(health <= 0)
|
||||
return
|
||||
if(W.attack_verb.len)
|
||||
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
src.health -= damage
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/effect/alien/egg/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
Burst()
|
||||
|
||||
/obj/effect/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
@@ -1,166 +0,0 @@
|
||||
// Resin walls improved. /N
|
||||
|
||||
/obj/effect/alien/resin/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
/* if(affecting)
|
||||
var/mob/living/carbon/M = affecting
|
||||
contents.Remove(affecting)
|
||||
if(ishuman(M))
|
||||
M.verbs += /mob/living/carbon/human/verb/suicide
|
||||
else
|
||||
M.verbs += /mob/living/carbon/monkey/verb/suicide
|
||||
M.loc = loc
|
||||
M.paralysis += 10
|
||||
for(var/mob/O in viewers(src, 3))
|
||||
O.show_message(text("A body appeared from the dead resin!"), 1, text("You hear faint moaning somewhere about you."), 2)*/
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
health-=50
|
||||
if(2.0)
|
||||
health-=50
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
health-=50
|
||||
else
|
||||
health-=25
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/blob_act()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/meteorhit()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/hitby(AM as mob|obj)
|
||||
..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 10
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_hand()
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << "\blue You easily destroy the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] destroys the [name]!", 1)
|
||||
health = 0
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
/obj/effect/alien/resin/attack_alien()
|
||||
if (islarva(usr))//Safety check for larva. /N
|
||||
return
|
||||
usr << "\green You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the resin!", 1)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health -= rand(10, 20)
|
||||
if(health <= 0)
|
||||
usr << "\green You slice the [name] to pieces."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] slices the [name] apart!", 1)
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
|
||||
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
|
||||
if(!affecting)
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src
|
||||
G.affecting.paralysis = 10
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
|
||||
affecting=G.affecting
|
||||
del(W)
|
||||
spawn(0)
|
||||
process()
|
||||
else
|
||||
user << "\red This wall is already occupied."
|
||||
return */
|
||||
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
///obj/effect/alien/resin/process() //Buggy and irrelevant now that you're able to just make nice little infection chambers - Urist
|
||||
/*if(affecting)
|
||||
var/mob/living/carbon/M = affecting
|
||||
var/check = 0
|
||||
if(ishuman(affecting))//So they do not suicide and kill the babby.
|
||||
M.verbs -= /mob/living/carbon/human/verb/suicide
|
||||
else
|
||||
check = 1
|
||||
M.verbs -= /mob/living/carbon/monkey/verb/suicide
|
||||
|
||||
contents.Add(affecting)
|
||||
|
||||
while(!isnull(M)&&!isnull(src))//While M and wall exist
|
||||
if(prob(90)&& HULK in M.mutations)//If they're the Hulk, they're getting out.
|
||||
M << "You smash your way to freedom!"
|
||||
break
|
||||
if(prob(30))//Let's people know that someone is trapped in the resin wall.
|
||||
M << "\green You feel a strange sense of calm as a flesh-like substance seems to completely envelop you."
|
||||
for(var/mob/O in viewers(src, 3))
|
||||
O.show_message(text("There appears to be a person stuck inside a resin wall nearby."), 1, text("You hear faint moaning somewhere about you."), 2)
|
||||
if(prob(5))//MAYBE they are able to crawl out on their own. Not likely...
|
||||
M << "You are able to crawl your way through the sticky mass, and out to freedom. But for how long?"
|
||||
break
|
||||
M.paralysis = 10//Set theis paralysis to 10 so they cannot act.
|
||||
sleep(50)//To cut down on processing time
|
||||
|
||||
if(!isnull(src))
|
||||
affecting = null
|
||||
|
||||
if(!isnull(M))//As long as they still exist.
|
||||
if(!check)//And now they can suicide again, even if they are already dead in case they get revived.
|
||||
M.verbs += /mob/living/carbon/human/verb/suicide
|
||||
else
|
||||
M.verbs += /mob/living/carbon/monkey/verb/suicide
|
||||
for(var/mob/O in viewers(src, 3))
|
||||
O.show_message(text("A body appeared from the dead resin!"), 1, text("You hear faint moaning somewhere about you."), 2)
|
||||
else
|
||||
for(var/mob/O in viewers(src, 3))
|
||||
O.show_message(text("\red An alien larva bursts from the resin wall!"), 1, text("\red You hear a high, alien screech nearby!"), 2)*/
|
||||
// return
|
||||
|
||||
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
@@ -1,108 +0,0 @@
|
||||
#define NODERANGE 3
|
||||
|
||||
/obj/effect/alien/weeds/New()
|
||||
..()
|
||||
if(istype(loc, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
spawn(rand(150,300))
|
||||
if(src)
|
||||
Life()
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..()
|
||||
sd_SetLuminosity(NODERANGE)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
set background = 1
|
||||
var/turf/U = get_turf(src)
|
||||
/*
|
||||
if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
Alien plants should do something if theres a lot of poison
|
||||
if(U.poison> 200000)
|
||||
health -= round(U.poison/200000)
|
||||
update()
|
||||
return
|
||||
*/
|
||||
if (istype(U, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
|
||||
direction_loop:
|
||||
for(var/dirn in cardinal)
|
||||
var/turf/T = get_step(src, dirn)
|
||||
|
||||
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
|
||||
continue
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
continue direction_loop
|
||||
|
||||
new /obj/effect/alien/weeds(T)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/weeds/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/*/obj/effect/alien/weeds/burn(fi_amount)
|
||||
if (fi_amount > 18000)
|
||||
spawn( 0 )
|
||||
del(src)
|
||||
return
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
#undef NODRANGE
|
||||
@@ -371,32 +371,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
if(hidden_uplink)
|
||||
hidden_uplink.trigger(user)
|
||||
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink"
|
||||
desc = "Summon things."
|
||||
var/activation_emote = "chuckle"
|
||||
|
||||
/obj/item/weapon/implant/uplink/New()
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 5
|
||||
..()
|
||||
return
|
||||
|
||||
// Moved the Uplink Implant here
|
||||
|
||||
/obj/item/weapon/implant/uplink/implanted(mob/source)
|
||||
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/uplink/trigger(emote, mob/source as mob)
|
||||
if(hidden_uplink && usr == source) // Let's not have another people activate our uplink
|
||||
hidden_uplink.check_trigger(source, emote, activation_emote)
|
||||
return
|
||||
|
||||
/obj/item/device/radio/headset/uplink
|
||||
traitor_frequency = 1445
|
||||
|
||||
@@ -0,0 +1,421 @@
|
||||
/* Alien Effects!
|
||||
* Contains:
|
||||
* effect/alien
|
||||
* Resin
|
||||
* Weeds
|
||||
* Acid
|
||||
* Egg
|
||||
*/
|
||||
|
||||
/*
|
||||
* effect/alien
|
||||
*/
|
||||
/obj/effect/alien
|
||||
name = "alien thing"
|
||||
desc = "theres something alien about this"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
// unacidable = 1 //Aliens won't ment their own.
|
||||
|
||||
|
||||
/*
|
||||
* Resin
|
||||
*/
|
||||
/obj/effect/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of slimy growth."
|
||||
icon_state = "resin"
|
||||
|
||||
density = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
var/health = 50
|
||||
//var/mob/living/affecting = null
|
||||
|
||||
wall
|
||||
name = "resin wall"
|
||||
desc = "Purple slime solidified into a wall."
|
||||
icon_state = "resinwall" //same as resin, but consistency ho!
|
||||
|
||||
membrane
|
||||
name = "resin membrane"
|
||||
desc = "Purple slime just thin enough to let light pass through."
|
||||
icon_state = "resinmembrane"
|
||||
opacity = 0
|
||||
health = 20
|
||||
|
||||
/obj/effect/alien/resin/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
health-=50
|
||||
if(2.0)
|
||||
health-=50
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
health-=50
|
||||
else
|
||||
health-=25
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/blob_act()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/meteorhit()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/hitby(AM as mob|obj)
|
||||
..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 10
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_hand()
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << "\blue You easily destroy the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] destroys the [name]!", 1)
|
||||
health = 0
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
/obj/effect/alien/resin/attack_alien()
|
||||
if (islarva(usr))//Safety check for larva. /N
|
||||
return
|
||||
usr << "\green You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the resin!", 1)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health -= rand(10, 20)
|
||||
if(health <= 0)
|
||||
usr << "\green You slice the [name] to pieces."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] slices the [name] apart!", 1)
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
|
||||
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
|
||||
if(!affecting)
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src
|
||||
G.affecting.paralysis = 10
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
|
||||
affecting=G.affecting
|
||||
del(W)
|
||||
spawn(0)
|
||||
process()
|
||||
else
|
||||
user << "\red This wall is already occupied."
|
||||
return */
|
||||
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
/*
|
||||
* Weeds
|
||||
*/
|
||||
#define NODERANGE 3
|
||||
|
||||
/obj/effect/alien/weeds
|
||||
name = "weeds"
|
||||
desc = "Weird purple weeds."
|
||||
icon_state = "weeds"
|
||||
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/health = 50
|
||||
|
||||
node
|
||||
icon_state = "weednode"
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
|
||||
/obj/effect/alien/weeds/New()
|
||||
..()
|
||||
if(istype(loc, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
spawn(rand(150,300))
|
||||
if(src)
|
||||
Life()
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..()
|
||||
sd_SetLuminosity(NODERANGE)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
set background = 1
|
||||
var/turf/U = get_turf(src)
|
||||
/*
|
||||
if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
Alien plants should do something if theres a lot of poison
|
||||
if(U.poison> 200000)
|
||||
health -= round(U.poison/200000)
|
||||
update()
|
||||
return
|
||||
*/
|
||||
if (istype(U, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
|
||||
direction_loop:
|
||||
for(var/dirn in cardinal)
|
||||
var/turf/T = get_step(src, dirn)
|
||||
|
||||
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
|
||||
continue
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
continue direction_loop
|
||||
|
||||
new /obj/effect/alien/weeds(T)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/weeds/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/*/obj/effect/alien/weeds/burn(fi_amount)
|
||||
if (fi_amount > 18000)
|
||||
spawn( 0 )
|
||||
del(src)
|
||||
return
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
#undef NODERANGE
|
||||
|
||||
|
||||
/*
|
||||
* Acid
|
||||
*/
|
||||
/obj/effect/alien/acid
|
||||
name = "acid"
|
||||
desc = "Burbling corrossive stuff. I wouldn't want to touch it."
|
||||
icon_state = "acid"
|
||||
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
|
||||
var/obj/target
|
||||
var/ticks = 0
|
||||
|
||||
/obj/effect/alien/acid/proc/tick()
|
||||
ticks += 1
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] sizzles and begins to melt under the bubbling mess of acid!</B>", 1)
|
||||
if(prob(ticks*10))
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] collapses under its own weight into a puddle of goop and undigested debris!</B>", 1)
|
||||
// if(target.occupant) //I tried to fix mechas-with-humans-getting-deleted. Made them unacidable for now.
|
||||
// target.ex_act(1)
|
||||
del(target)
|
||||
del(src)
|
||||
return
|
||||
spawn(rand(200, 600)) tick()
|
||||
|
||||
/*
|
||||
* Egg
|
||||
*/
|
||||
/var/const //for the status var
|
||||
BURST = 0
|
||||
GROWING = 1
|
||||
GROWN = 2
|
||||
|
||||
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
|
||||
MAX_GROWTH_TIME = 3000
|
||||
|
||||
/obj/effect/alien/egg
|
||||
desc = "It looks like a weird egg"
|
||||
name = "egg"
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
var/health = 100
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
|
||||
New()
|
||||
if(aliens_allowed)
|
||||
..()
|
||||
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
else
|
||||
del(src)
|
||||
|
||||
attack_paw(user as mob)
|
||||
if(isalien(user))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
user << "\red The child is already gone."
|
||||
return
|
||||
if(GROWING)
|
||||
user << "\red The child is not developed yet."
|
||||
return
|
||||
if(GROWN)
|
||||
user << "\red You retrieve the child."
|
||||
loc.contents += GetFacehugger()//need to write the code for giving it to the alien later
|
||||
Burst()
|
||||
return
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(user as mob)
|
||||
user << "It feels slimy."
|
||||
return
|
||||
|
||||
proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
|
||||
proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
return
|
||||
|
||||
proc/Burst() //drops and kills the hugger if any is remaining
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
|
||||
if(child)
|
||||
loc.contents += child
|
||||
child.Die()
|
||||
|
||||
icon_state = "egg_hatched"
|
||||
status = BURST
|
||||
return
|
||||
|
||||
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(health <= 0)
|
||||
return
|
||||
if(W.attack_verb.len)
|
||||
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
src.health -= damage
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/effect/alien/egg/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
Burst()
|
||||
|
||||
/obj/effect/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
@@ -0,0 +1,85 @@
|
||||
/obj/effect/mine/New()
|
||||
icon_state = "uglyminearmed"
|
||||
|
||||
/obj/effect/mine/HasEntered(AM as mob|obj)
|
||||
Bumped(AM)
|
||||
|
||||
/obj/effect/mine/Bumped(mob/M as mob|obj)
|
||||
|
||||
if(triggered) return
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
|
||||
for(var/mob/O in viewers(world.view, src.loc))
|
||||
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
|
||||
triggered = 1
|
||||
call(src,triggerproc)(M)
|
||||
|
||||
/obj/effect/mine/proc/triggerrad(obj)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
obj:radiation += 50
|
||||
randmutb(obj)
|
||||
domutcheck(obj,null)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerstun(obj)
|
||||
if(ismob(obj))
|
||||
var/mob/M = obj
|
||||
M.Stun(30)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggern2o(obj)
|
||||
//example: n2o triggerproc
|
||||
//note: im lazy
|
||||
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
trace_gas.moles = 30
|
||||
payload += trace_gas
|
||||
|
||||
target.air.merge(payload)
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerplasma(obj)
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
|
||||
payload.toxins = 30
|
||||
|
||||
target.air.merge(payload)
|
||||
|
||||
target.hotspot_expose(1000, CELL_VOLUME)
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerkick(obj)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(obj:client)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/explode(obj)
|
||||
explosion(loc, 0, 1, 2, 3)
|
||||
spawn(0)
|
||||
del(src)
|
||||
@@ -1,5 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
//Moving this here for now.. it might end up in modules/mob/ later
|
||||
|
||||
var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone
|
||||
var/const/MAX_IMPREGNATION_TIME = 150
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/obj/item/weapon/implant/uplink
|
||||
name = "uplink"
|
||||
desc = "Summon things."
|
||||
var/activation_emote = "chuckle"
|
||||
|
||||
/obj/item/weapon/implant/uplink/New()
|
||||
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 5
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/uplink/implanted(mob/source)
|
||||
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
|
||||
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
|
||||
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/implant/uplink/trigger(emote, mob/source as mob)
|
||||
if(hidden_uplink && usr == source) // Let's not have another people activate our uplink
|
||||
hidden_uplink.check_trigger(source, emote, activation_emote)
|
||||
return
|
||||
@@ -0,0 +1,94 @@
|
||||
/obj/item/weapon/mousetrap/examine()
|
||||
set src in oview(12)
|
||||
..()
|
||||
if(armed)
|
||||
usr << "\red It looks like it's armed."
|
||||
|
||||
/obj/item/weapon/mousetrap/proc/triggered(mob/target as mob, var/type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/datum/organ/external/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_organ(pick("l_leg", "r_leg"))
|
||||
H.Weaken(3)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_organ(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
if(affecting.take_damage(1, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
src.visible_message("\red <b>SPLAT!</b>")
|
||||
M.splat()
|
||||
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
icon_state = "mousetrap"
|
||||
armed = 0
|
||||
/*
|
||||
else if (ismouse(target))
|
||||
target.adjustBruteLoss(100)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/mousetrap/attack_self(mob/living/user as mob)
|
||||
if(!armed)
|
||||
icon_state = "mousetraparmed"
|
||||
user << "\blue You arm the mousetrap."
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(( (user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
which_hand = "r_hand"
|
||||
src.triggered(user, which_hand)
|
||||
user << "\red <B>You accidentally trigger the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == user)
|
||||
continue
|
||||
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
|
||||
return
|
||||
user << "\blue You disarm the mousetrap."
|
||||
armed = !armed
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/weapon/mousetrap/attack_hand(mob/living/user as mob)
|
||||
if(armed)
|
||||
if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
which_hand = "r_hand"
|
||||
src.triggered(user, which_hand)
|
||||
user << "\red <B>You accidentally trigger the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == user)
|
||||
continue
|
||||
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mousetrap/HasEntered(AM as mob|obj)
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
src.triggered(H)
|
||||
H << "\red <B>You accidentally step on the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("\red <B>[H] accidentally steps on the mousetrap.</B>", 1)
|
||||
if(ismouse(AM))
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mousetrap/hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>The mousetrap is triggered by [A].</B>", 1)
|
||||
src.triggered(null)
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
BANHAMMER
|
||||
SWORD
|
||||
BLADE
|
||||
AXE
|
||||
@@ -7,8 +8,10 @@ CLASSIC BATON
|
||||
ENERGY SHIELD (where else should i even put this)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//BANHAMMER
|
||||
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
|
||||
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
|
||||
|
||||
// SWORD
|
||||
/obj/item/weapon/melee/energy/sword/IsShield()
|
||||
|
||||
@@ -1,61 +1,3 @@
|
||||
|
||||
// TARGET STAKE
|
||||
// TARGET
|
||||
// Basically they are for the firing range
|
||||
/obj/structure/target_stake
|
||||
name = "target stake"
|
||||
desc = "A thin platform with negatively-magnetized wheels."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
Move()
|
||||
..()
|
||||
// Move the pinned target along with the stake
|
||||
if(pinned_target in view(3, src))
|
||||
pinned_target.loc = loc
|
||||
|
||||
else // Sanity check: if the pinned target can't be found in immediate view
|
||||
pinned_target = null
|
||||
density = 1
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(pinned_target)
|
||||
return // get rid of that pinned target first!
|
||||
|
||||
if(istype(W, /obj/item/target))
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.drop_item(src)
|
||||
W.loc = loc
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
user << "You slide the target into the stake."
|
||||
return
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
// taking pinned targets off!
|
||||
if(pinned_target)
|
||||
density = 1
|
||||
pinned_target.density = 0
|
||||
pinned_target.layer = OBJ_LAYER
|
||||
|
||||
pinned_target.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(pinned_target)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
pinned_target.loc = get_turf_loc(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
pinned_target = null
|
||||
|
||||
|
||||
|
||||
// Targets, the things that actually get shot!
|
||||
/obj/item/target
|
||||
name = "shooting target"
|
||||
@@ -236,14 +178,4 @@
|
||||
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
|
||||
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
|
||||
|
||||
Target.bulletholes.Add(src)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Target.bulletholes.Add(src)
|
||||
@@ -0,0 +1,52 @@
|
||||
// Basically they are for the firing range
|
||||
/obj/structure/target_stake
|
||||
name = "target stake"
|
||||
desc = "A thin platform with negatively-magnetized wheels."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
Move()
|
||||
..()
|
||||
// Move the pinned target along with the stake
|
||||
if(pinned_target in view(3, src))
|
||||
pinned_target.loc = loc
|
||||
|
||||
else // Sanity check: if the pinned target can't be found in immediate view
|
||||
pinned_target = null
|
||||
density = 1
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
// Putting objects on the stake. Most importantly, targets
|
||||
if(pinned_target)
|
||||
return // get rid of that pinned target first!
|
||||
|
||||
if(istype(W, /obj/item/target))
|
||||
density = 0
|
||||
W.density = 1
|
||||
user.drop_item(src)
|
||||
W.loc = loc
|
||||
W.layer = 3.1
|
||||
pinned_target = W
|
||||
user << "You slide the target into the stake."
|
||||
return
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
// taking pinned targets off!
|
||||
if(pinned_target)
|
||||
density = 1
|
||||
pinned_target.density = 0
|
||||
pinned_target.layer = OBJ_LAYER
|
||||
|
||||
pinned_target.loc = user.loc
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
user.put_in_hands(pinned_target)
|
||||
user << "You take the target out of the stake."
|
||||
else
|
||||
pinned_target.loc = get_turf_loc(user)
|
||||
user << "You take the target out of the stake."
|
||||
|
||||
pinned_target = null
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
/obj/item/weapon/tank/oxygen
|
||||
name = "Gas Tank (Oxygen)"
|
||||
desc = "A tank of oxygen"
|
||||
icon_state = "oxygen"
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 10)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/oxygen/yellow
|
||||
name = "Gas Tank (Oxygen)"
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
icon_state = "oxygen_f"
|
||||
|
||||
|
||||
/obj/item/weapon/tank/oxygen/red
|
||||
name = "Gas Tank (Oxygen)"
|
||||
desc = "A tank of oxygen, this one is red."
|
||||
icon_state = "oxygen_fr"
|
||||
@@ -0,0 +1,151 @@
|
||||
/* Types of tanks!
|
||||
* Contains:
|
||||
* Oxygen
|
||||
* Anesthetic
|
||||
* Air
|
||||
* Plasma
|
||||
*/
|
||||
|
||||
/*
|
||||
* Oxygen
|
||||
*/
|
||||
/obj/item/weapon/tank/oxygen
|
||||
name = "Gas Tank (Oxygen)"
|
||||
desc = "A tank of oxygen"
|
||||
icon_state = "oxygen"
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 10)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/oxygen/yellow
|
||||
name = "Gas Tank (Oxygen)"
|
||||
desc = "A tank of oxygen, this one is yellow."
|
||||
icon_state = "oxygen_f"
|
||||
|
||||
/obj/item/weapon/tank/oxygen/red
|
||||
name = "Gas Tank (Oxygen)"
|
||||
desc = "A tank of oxygen, this one is red."
|
||||
icon_state = "oxygen_fr"
|
||||
|
||||
|
||||
/*
|
||||
* Anesthetic
|
||||
*/
|
||||
/obj/item/weapon/tank/anesthetic
|
||||
name = "Gas Tank (Sleeping Agent)"
|
||||
desc = "A N2O/O2 gas mix"
|
||||
icon_state = "anesthetic"
|
||||
item_state = "an_tank"
|
||||
|
||||
/obj/item/weapon/tank/anesthetic/New()
|
||||
..()
|
||||
|
||||
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
|
||||
var/datum/gas/sleeping_agent/trace_gas = new()
|
||||
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
|
||||
src.air_contents.trace_gases += trace_gas
|
||||
return
|
||||
|
||||
/*
|
||||
* Air
|
||||
*/
|
||||
/obj/item/weapon/tank/air
|
||||
name = "Gas Tank (Air Mix)"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "oxygen"
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 1 && loc==usr)
|
||||
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
|
||||
usr << sound('sound/effects/alert.ogg')
|
||||
|
||||
/obj/item/weapon/tank/air/New()
|
||||
..()
|
||||
|
||||
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/weapon/tank/plasma
|
||||
name = "Gas Tank (BIOHAZARD)"
|
||||
desc = "Contains dangerous plasma. Do not inhale."
|
||||
icon_state = "plasma"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = null //they have no straps!
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasma/New()
|
||||
..()
|
||||
|
||||
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasma/proc/release()
|
||||
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
|
||||
|
||||
loc.assume_air(removed)
|
||||
|
||||
/obj/item/weapon/tank/plasma/proc/ignite()
|
||||
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6
|
||||
var/strength = 1
|
||||
|
||||
var/turf/ground_zero = get_turf(loc)
|
||||
loc = null
|
||||
|
||||
if(air_contents.temperature > (T0C + 400))
|
||||
strength = fuel_moles/15
|
||||
|
||||
explosion(ground_zero, strength, strength*2, strength*3, strength*4)
|
||||
|
||||
else if(air_contents.temperature > (T0C + 250))
|
||||
strength = fuel_moles/20
|
||||
|
||||
explosion(ground_zero, 0, strength, strength*2, strength*3)
|
||||
|
||||
else if(air_contents.temperature > (T0C + 100))
|
||||
strength = fuel_moles/25
|
||||
|
||||
explosion(ground_zero, 0, 0, strength, strength*3)
|
||||
|
||||
else
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
if(src.master)
|
||||
del(src.master)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (istype(W, /obj/item/weapon/flamethrower))
|
||||
var/obj/item/weapon/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank)) return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
user.before_take_item(src)
|
||||
src.loc = F
|
||||
return
|
||||
@@ -1,10 +1,6 @@
|
||||
|
||||
/obj/item/weapon/tank
|
||||
name = "tank"
|
||||
icon = 'icons/obj/tank.dmi'
|
||||
|
||||
var/datum/gas_mixture/air_contents = null
|
||||
var/distribute_pressure = ONE_ATMOSPHERE
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
@@ -14,37 +10,58 @@
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 4
|
||||
|
||||
var/datum/gas_mixture/air_contents = null
|
||||
var/distribute_pressure = ONE_ATMOSPHERE
|
||||
var/integrity = 3
|
||||
var/volume = 70
|
||||
|
||||
/obj/item/weapon/tank/New()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/anesthetic
|
||||
name = "Gas Tank (Sleeping Agent)"
|
||||
desc = "A N2O/O2 gas mix"
|
||||
icon_state = "anesthetic"
|
||||
item_state = "an_tank"
|
||||
src.air_contents = new /datum/gas_mixture()
|
||||
src.air_contents.volume = volume //liters
|
||||
src.air_contents.temperature = T20C
|
||||
|
||||
processing_objects.Add(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/air
|
||||
name = "Gas Tank (Air Mix)"
|
||||
desc = "Mixed anyone?"
|
||||
icon_state = "oxygen"
|
||||
/obj/item/weapon/tank/Del()
|
||||
if(air_contents)
|
||||
del(air_contents)
|
||||
|
||||
processing_objects.Remove(src)
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 1 && loc==usr)
|
||||
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
|
||||
usr << sound('sound/effects/alert.ogg')
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/examine()
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if (!in_range(src, usr))
|
||||
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/plasma
|
||||
name = "Gas Tank (BIOHAZARD)"
|
||||
desc = "Contains dangerous plasma. Do not inhale."
|
||||
icon_state = "plasma"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = null //they have no straps!
|
||||
var/celsius_temperature = src.air_contents.temperature-T0C
|
||||
var/descriptive
|
||||
|
||||
if (celsius_temperature < 20)
|
||||
descriptive = "cold"
|
||||
else if (celsius_temperature < 40)
|
||||
descriptive = "room temperature"
|
||||
else if (celsius_temperature < 80)
|
||||
descriptive = "lukewarm"
|
||||
else if (celsius_temperature < 100)
|
||||
descriptive = "warm"
|
||||
else if (celsius_temperature < 300)
|
||||
descriptive = "hot"
|
||||
else
|
||||
descriptive = "furiously hot"
|
||||
|
||||
usr << "\blue \The \icon[icon][src] feels [descriptive]"
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/blob_act()
|
||||
if(prob(50))
|
||||
@@ -57,6 +74,47 @@
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
|
||||
|
||||
for (var/mob/O in viewers(user, null))
|
||||
O << "\red [user] has used [W] on \icon[icon] [src]"
|
||||
|
||||
var/pressure = air_contents.return_pressure()
|
||||
|
||||
var/total_moles = air_contents.total_moles()
|
||||
|
||||
user << "\blue Results of analysis of \icon[icon]"
|
||||
if (total_moles>0)
|
||||
var/o2_concentration = air_contents.oxygen/total_moles
|
||||
var/n2_concentration = air_contents.nitrogen/total_moles
|
||||
var/co2_concentration = air_contents.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = air_contents.toxins/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
|
||||
user << "\blue Pressure: [round(pressure,0.1)] kPa"
|
||||
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
|
||||
user << "\blue Oxygen: [round(o2_concentration*100)]%"
|
||||
user << "\blue CO2: [round(co2_concentration*100)]%"
|
||||
user << "\blue Plasma: [round(plasma_concentration*100)]%"
|
||||
if(unknown_concentration>0.01)
|
||||
user << "\red Unknown: [round(unknown_concentration*100)]%"
|
||||
user << "\blue Temperature: [round(air_contents.temperature-T0C)]°C"
|
||||
else
|
||||
user << "\blue Tank is empty!"
|
||||
src.add_fingerprint(user)
|
||||
else if (istype(W,/obj/item/latexballon))
|
||||
var/obj/item/latexballon/LB = W
|
||||
LB.blow(src)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/attack_self(mob/user as mob)
|
||||
if (!(src.air_contents))
|
||||
return
|
||||
@@ -120,243 +178,79 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank
|
||||
remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
return_air()
|
||||
return air_contents
|
||||
/obj/item/weapon/tank/remove_air(amount)
|
||||
return air_contents.remove(amount)
|
||||
|
||||
assume_air(datum/gas_mixture/giver)
|
||||
air_contents.merge(giver)
|
||||
/obj/item/weapon/tank/return_air()
|
||||
return air_contents
|
||||
|
||||
check_status()
|
||||
return 1
|
||||
/obj/item/weapon/tank/assume_air(datum/gas_mixture/giver)
|
||||
air_contents.merge(giver)
|
||||
|
||||
proc/remove_air_volume(volume_to_return)
|
||||
if(!air_contents)
|
||||
return null
|
||||
check_status()
|
||||
return 1
|
||||
|
||||
var/tank_pressure = air_contents.return_pressure()
|
||||
if(tank_pressure < distribute_pressure)
|
||||
distribute_pressure = tank_pressure
|
||||
/obj/item/weapon/tank/proc/remove_air_volume(volume_to_return)
|
||||
if(!air_contents)
|
||||
return null
|
||||
|
||||
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
var/tank_pressure = air_contents.return_pressure()
|
||||
if(tank_pressure < distribute_pressure)
|
||||
distribute_pressure = tank_pressure
|
||||
|
||||
return remove_air(moles_needed)
|
||||
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
process()
|
||||
//Allow for reactions
|
||||
return remove_air(moles_needed)
|
||||
|
||||
/obj/item/weapon/tank/process()
|
||||
//Allow for reactions
|
||||
air_contents.react()
|
||||
check_status()
|
||||
|
||||
|
||||
/obj/item/weapon/tank/proc/check_status()
|
||||
//Handle exploding, leaking, and rupturing of the tank
|
||||
|
||||
if(!air_contents)
|
||||
return 0
|
||||
|
||||
var/pressure = air_contents.return_pressure()
|
||||
if(pressure > TANK_FRAGMENT_PRESSURE)
|
||||
if(!istype(src.loc,/obj/item/device/transfer_valve))
|
||||
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
|
||||
//Give the gas a chance to build up more pressure through reacting
|
||||
air_contents.react()
|
||||
air_contents.react()
|
||||
air_contents.react()
|
||||
pressure = air_contents.return_pressure()
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
|
||||
var/turf/epicenter = get_turf(loc)
|
||||
|
||||
check_status()
|
||||
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
|
||||
|
||||
var/integrity = 3
|
||||
proc/check_status()
|
||||
//Handle exploding, leaking, and rupturing of the tank
|
||||
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
|
||||
del(src)
|
||||
|
||||
if(!air_contents)
|
||||
return 0
|
||||
|
||||
var/pressure = air_contents.return_pressure()
|
||||
if(pressure > TANK_FRAGMENT_PRESSURE)
|
||||
if(!istype(src.loc,/obj/item/device/transfer_valve))
|
||||
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
|
||||
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
|
||||
//Give the gas a chance to build up more pressure through reacting
|
||||
air_contents.react()
|
||||
air_contents.react()
|
||||
air_contents.react()
|
||||
pressure = air_contents.return_pressure()
|
||||
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
|
||||
var/turf/epicenter = get_turf(loc)
|
||||
|
||||
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
|
||||
|
||||
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
|
||||
else if(pressure > TANK_RUPTURE_PRESSURE)
|
||||
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
|
||||
if(integrity <= 0)
|
||||
loc.assume_air(air_contents)
|
||||
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
|
||||
del(src)
|
||||
|
||||
else if(pressure > TANK_RUPTURE_PRESSURE)
|
||||
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
|
||||
if(integrity <= 0)
|
||||
loc.assume_air(air_contents)
|
||||
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
|
||||
del(src)
|
||||
else
|
||||
integrity--
|
||||
|
||||
else if(pressure > TANK_LEAK_PRESSURE)
|
||||
//world << "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"
|
||||
if(integrity <= 0)
|
||||
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
|
||||
loc.assume_air(leaked_gas)
|
||||
else
|
||||
integrity--
|
||||
|
||||
else if(integrity < 3)
|
||||
integrity++
|
||||
|
||||
|
||||
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
|
||||
|
||||
for (var/mob/O in viewers(user, null))
|
||||
O << "\red [user] has used [W] on \icon[icon] [src]"
|
||||
|
||||
var/pressure = air_contents.return_pressure()
|
||||
|
||||
var/total_moles = air_contents.total_moles()
|
||||
|
||||
user << "\blue Results of analysis of \icon[icon]"
|
||||
if (total_moles>0)
|
||||
var/o2_concentration = air_contents.oxygen/total_moles
|
||||
var/n2_concentration = air_contents.nitrogen/total_moles
|
||||
var/co2_concentration = air_contents.carbon_dioxide/total_moles
|
||||
var/plasma_concentration = air_contents.toxins/total_moles
|
||||
|
||||
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
|
||||
|
||||
user << "\blue Pressure: [round(pressure,0.1)] kPa"
|
||||
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
|
||||
user << "\blue Oxygen: [round(o2_concentration*100)]%"
|
||||
user << "\blue CO2: [round(co2_concentration*100)]%"
|
||||
user << "\blue Plasma: [round(plasma_concentration*100)]%"
|
||||
if(unknown_concentration>0.01)
|
||||
user << "\red Unknown: [round(unknown_concentration*100)]%"
|
||||
user << "\blue Temperature: [round(air_contents.temperature-T0C)]°C"
|
||||
else
|
||||
user << "\blue Tank is empty!"
|
||||
src.add_fingerprint(user)
|
||||
else if (istype(W,/obj/item/latexballon))
|
||||
var/obj/item/latexballon/LB = W
|
||||
LB.blow(src)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
integrity--
|
||||
|
||||
/obj/item/weapon/tank/New()
|
||||
..()
|
||||
else if(pressure > TANK_LEAK_PRESSURE)
|
||||
//world << "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"
|
||||
if(integrity <= 0)
|
||||
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
|
||||
loc.assume_air(leaked_gas)
|
||||
else
|
||||
integrity--
|
||||
|
||||
src.air_contents = new /datum/gas_mixture()
|
||||
src.air_contents.volume = volume //liters
|
||||
src.air_contents.temperature = T20C
|
||||
|
||||
processing_objects.Add(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/Del()
|
||||
if(air_contents)
|
||||
del(air_contents)
|
||||
|
||||
processing_objects.Remove(src)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/tank/examine()
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if (!in_range(src, usr))
|
||||
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
|
||||
return
|
||||
|
||||
var/celsius_temperature = src.air_contents.temperature-T0C
|
||||
var/descriptive
|
||||
|
||||
if (celsius_temperature < 20)
|
||||
descriptive = "cold"
|
||||
else if (celsius_temperature < 40)
|
||||
descriptive = "room temperature"
|
||||
else if (celsius_temperature < 80)
|
||||
descriptive = "lukewarm"
|
||||
else if (celsius_temperature < 100)
|
||||
descriptive = "warm"
|
||||
else if (celsius_temperature < 300)
|
||||
descriptive = "hot"
|
||||
else
|
||||
descriptive = "furiously hot"
|
||||
|
||||
usr << "\blue \The \icon[icon][src] feels [descriptive]"
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/air/New()
|
||||
..()
|
||||
|
||||
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/anesthetic/New()
|
||||
..()
|
||||
|
||||
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
|
||||
var/datum/gas/sleeping_agent/trace_gas = new()
|
||||
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
|
||||
src.air_contents.trace_gases += trace_gas
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/plasma/New()
|
||||
..()
|
||||
|
||||
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasma/proc/release()
|
||||
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
|
||||
|
||||
loc.assume_air(removed)
|
||||
|
||||
/obj/item/weapon/tank/plasma/proc/ignite()
|
||||
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6
|
||||
var/strength = 1
|
||||
|
||||
var/turf/ground_zero = get_turf(loc)
|
||||
loc = null
|
||||
|
||||
if(air_contents.temperature > (T0C + 400))
|
||||
strength = fuel_moles/15
|
||||
|
||||
explosion(ground_zero, strength, strength*2, strength*3, strength*4)
|
||||
|
||||
else if(air_contents.temperature > (T0C + 250))
|
||||
strength = fuel_moles/20
|
||||
|
||||
explosion(ground_zero, 0, strength, strength*2, strength*3)
|
||||
|
||||
else if(air_contents.temperature > (T0C + 100))
|
||||
strength = fuel_moles/25
|
||||
|
||||
explosion(ground_zero, 0, 0, strength, strength*3)
|
||||
|
||||
else
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
if(src.master)
|
||||
del(src.master)
|
||||
del(src)
|
||||
|
||||
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
..()
|
||||
// PantsNote: More flamethrower assembly code. WOO!
|
||||
if (istype(W, /obj/item/weapon/flamethrower))
|
||||
var/obj/item/weapon/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank)) return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
user.before_take_item(src)
|
||||
src.loc = F
|
||||
return
|
||||
else if(integrity < 3)
|
||||
integrity++
|
||||
@@ -1,301 +0,0 @@
|
||||
/obj/machinery/washing_machine
|
||||
name = "Washing Machine"
|
||||
icon = 'icons/obj/machines/washing_machine.dmi'
|
||||
icon_state = "wm_10"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/state = 1
|
||||
//1 = empty, open door
|
||||
//2 = empty, closed door
|
||||
//3 = full, open door
|
||||
//4 = full, closed door
|
||||
//5 = running
|
||||
//6 = blood, open door
|
||||
//7 = blood, closed door
|
||||
//8 = blood, running
|
||||
var/panel = 0
|
||||
//0 = closed
|
||||
//1 = open
|
||||
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
|
||||
//0 = not hacked
|
||||
//1 = hacked
|
||||
var/gibs_ready = 0
|
||||
var/obj/crayon
|
||||
|
||||
/obj/machinery/washing_machine/verb/start()
|
||||
set name = "Start Washing"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if( state != 4 )
|
||||
usr << "The washing machine cannot run in this state."
|
||||
return
|
||||
|
||||
if( locate(/mob,contents) )
|
||||
state = 8
|
||||
else
|
||||
state = 5
|
||||
update_icon()
|
||||
sleep(200)
|
||||
for(var/atom/A in contents)
|
||||
A.clean_blood()
|
||||
|
||||
//Tanning!
|
||||
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
|
||||
var/obj/item/stack/sheet/wetleather/WL = new(src)
|
||||
WL.amount = HH.amount
|
||||
del(HH)
|
||||
|
||||
|
||||
if(crayon)
|
||||
var/color
|
||||
if(istype(crayon,/obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/CR = crayon
|
||||
color = CR.colourName
|
||||
else if(istype(crayon,/obj/item/weapon/stamp))
|
||||
var/obj/item/weapon/stamp/ST = crayon
|
||||
color = ST.color
|
||||
|
||||
if(color)
|
||||
var/new_jumpsuit_icon_state = ""
|
||||
var/new_jumpsuit_item_state = ""
|
||||
var/new_jumpsuit_name = ""
|
||||
var/new_glove_icon_state = ""
|
||||
var/new_glove_item_state = ""
|
||||
var/new_glove_name = ""
|
||||
var/new_shoe_icon_state = ""
|
||||
var/new_shoe_name = ""
|
||||
var/new_sheet_icon_state = ""
|
||||
var/new_sheet_name = ""
|
||||
var/new_softcap_icon_state = ""
|
||||
var/new_softcap_name = ""
|
||||
var/new_desc = "The colors are a bit dodgy."
|
||||
for(var/T in typesof(/obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/J = new T
|
||||
//world << "DEBUG: [color] == [J.color]"
|
||||
if(color == J.color)
|
||||
new_jumpsuit_icon_state = J.icon_state
|
||||
new_jumpsuit_item_state = J.item_state
|
||||
new_jumpsuit_name = J.name
|
||||
del(J)
|
||||
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
|
||||
break
|
||||
del(J)
|
||||
for(var/T in typesof(/obj/item/clothing/gloves))
|
||||
var/obj/item/clothing/gloves/G = new T
|
||||
//world << "DEBUG: [color] == [J.color]"
|
||||
if(color == G.color)
|
||||
new_glove_icon_state = G.icon_state
|
||||
new_glove_item_state = G.item_state
|
||||
new_glove_name = G.name
|
||||
del(G)
|
||||
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
|
||||
break
|
||||
del(G)
|
||||
for(var/T in typesof(/obj/item/clothing/shoes))
|
||||
var/obj/item/clothing/shoes/S = new T
|
||||
//world << "DEBUG: [color] == [J.color]"
|
||||
if(color == S.color)
|
||||
new_shoe_icon_state = S.icon_state
|
||||
new_shoe_name = S.name
|
||||
del(S)
|
||||
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
|
||||
break
|
||||
del(S)
|
||||
for(var/T in typesof(/obj/item/weapon/bedsheet))
|
||||
var/obj/item/weapon/bedsheet/B = new T
|
||||
//world << "DEBUG: [color] == [J.color]"
|
||||
if(color == B.color)
|
||||
new_sheet_icon_state = B.icon_state
|
||||
new_sheet_name = B.name
|
||||
del(B)
|
||||
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
|
||||
break
|
||||
del(B)
|
||||
for(var/T in typesof(/obj/item/clothing/head/soft))
|
||||
var/obj/item/clothing/head/soft/H = new T
|
||||
//world << "DEBUG: [color] == [J.color]"
|
||||
if(color == H.color)
|
||||
new_softcap_icon_state = H.icon_state
|
||||
new_softcap_name = H.name
|
||||
del(H)
|
||||
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
|
||||
break
|
||||
del(H)
|
||||
if(new_jumpsuit_icon_state && new_jumpsuit_item_state && new_jumpsuit_name)
|
||||
for(var/obj/item/clothing/under/J in contents)
|
||||
//world << "DEBUG: YUP! FOUND IT!"
|
||||
J.item_state = new_jumpsuit_item_state
|
||||
J.icon_state = new_jumpsuit_icon_state
|
||||
J.color = color
|
||||
J.name = new_jumpsuit_name
|
||||
J.desc = new_desc
|
||||
if(new_glove_icon_state && new_glove_item_state && new_glove_name)
|
||||
for(var/obj/item/clothing/gloves/G in contents)
|
||||
//world << "DEBUG: YUP! FOUND IT!"
|
||||
G.item_state = new_glove_item_state
|
||||
G.icon_state = new_glove_icon_state
|
||||
G.color = color
|
||||
G.name = new_glove_name
|
||||
G.desc = new_desc
|
||||
if(new_shoe_icon_state && new_shoe_name)
|
||||
for(var/obj/item/clothing/shoes/S in contents)
|
||||
//world << "DEBUG: YUP! FOUND IT!"
|
||||
S.icon_state = new_shoe_icon_state
|
||||
S.color = color
|
||||
S.name = new_shoe_name
|
||||
S.desc = new_desc
|
||||
if(new_sheet_icon_state && new_sheet_name)
|
||||
for(var/obj/item/weapon/bedsheet/B in contents)
|
||||
//world << "DEBUG: YUP! FOUND IT!"
|
||||
B.icon_state = new_sheet_icon_state
|
||||
B.color = color
|
||||
B.name = new_sheet_name
|
||||
B.desc = new_desc
|
||||
if(new_softcap_icon_state && new_softcap_name)
|
||||
for(var/obj/item/clothing/head/soft/H in contents)
|
||||
//world << "DEBUG: YUP! FOUND IT!"
|
||||
H.icon_state = new_softcap_icon_state
|
||||
H.color = color
|
||||
H.name = new_softcap_name
|
||||
H.desc = new_desc
|
||||
del(crayon)
|
||||
crayon = null
|
||||
|
||||
|
||||
if( locate(/mob,contents) )
|
||||
state = 7
|
||||
gibs_ready = 1
|
||||
else
|
||||
state = 4
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/washing_machine/verb/climb_out()
|
||||
set name = "Climb out"
|
||||
set category = "Object"
|
||||
set src in usr.loc
|
||||
|
||||
sleep(20)
|
||||
if(state in list(1,3,6) )
|
||||
usr.loc = src.loc
|
||||
|
||||
|
||||
/obj/machinery/washing_machine/update_icon()
|
||||
icon_state = "wm_[state][panel]"
|
||||
|
||||
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/*if(istype(W,/obj/item/weapon/screwdriver))
|
||||
panel = !panel
|
||||
user << "\blue you [panel ? "open" : "close"] the [src]'s maintenance panel"*/
|
||||
if(istype(W,/obj/item/toy/crayon) ||istype(W,/obj/item/weapon/stamp))
|
||||
if( state in list( 1, 3, 6 ) )
|
||||
if(!crayon)
|
||||
user.drop_item()
|
||||
crayon = W
|
||||
crayon.loc = src
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/weapon/grab))
|
||||
if( (state == 1) && hacked)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(ishuman(G.assailant) && iscorgi(G.affecting))
|
||||
G.affecting.loc = src
|
||||
del(G)
|
||||
state = 3
|
||||
else
|
||||
..()
|
||||
else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \
|
||||
istype(W,/obj/item/clothing/under) || \
|
||||
istype(W,/obj/item/clothing/mask) || \
|
||||
istype(W,/obj/item/clothing/head) || \
|
||||
istype(W,/obj/item/clothing/gloves) || \
|
||||
istype(W,/obj/item/clothing/shoes) || \
|
||||
istype(W,/obj/item/clothing/suit) || \
|
||||
istype(W,/obj/item/weapon/bedsheet))
|
||||
|
||||
//YES, it's hardcoded... saves a var/can_be_washed for every single clothing item.
|
||||
if ( istype(W,/obj/item/clothing/suit/space ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/suit/syndicatefake ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
// if ( istype(W,/obj/item/clothing/suit/powered ) )
|
||||
// user << "This item does not fit."
|
||||
// return
|
||||
if ( istype(W,/obj/item/clothing/suit/cyborg_suit ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/suit/bomb_suit ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/suit/armor ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/suit/armor ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/mask/gas ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/mask/cigarette ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
if ( istype(W,/obj/item/clothing/head/syndicatefake ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
// if ( istype(W,/obj/item/clothing/head/powered ) )
|
||||
// user << "This item does not fit."
|
||||
// return
|
||||
if ( istype(W,/obj/item/clothing/head/helmet ) )
|
||||
user << "This item does not fit."
|
||||
return
|
||||
|
||||
if(contents.len < 5)
|
||||
if ( state in list(1, 3) )
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
state = 3
|
||||
else
|
||||
user << "\blue You can't put the item in right now."
|
||||
else
|
||||
user << "\blue The washing machine is full."
|
||||
else
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/washing_machine/attack_hand(mob/user as mob)
|
||||
switch(state)
|
||||
if(1)
|
||||
state = 2
|
||||
if(2)
|
||||
state = 1
|
||||
for(var/atom/movable/O in contents)
|
||||
O.loc = src.loc
|
||||
if(3)
|
||||
state = 4
|
||||
if(4)
|
||||
state = 3
|
||||
for(var/atom/movable/O in contents)
|
||||
O.loc = src.loc
|
||||
crayon = null
|
||||
state = 1
|
||||
if(5)
|
||||
user << "\red The [src] is busy."
|
||||
if(6)
|
||||
state = 7
|
||||
if(7)
|
||||
if(gibs_ready)
|
||||
gibs_ready = 0
|
||||
if(locate(/mob,contents))
|
||||
var/mob/M = locate(/mob,contents)
|
||||
M.gib()
|
||||
for(var/atom/movable/O in contents)
|
||||
O.loc = src.loc
|
||||
crayon = null
|
||||
state = 1
|
||||
|
||||
|
||||
update_icon()
|
||||
@@ -1,95 +1,4 @@
|
||||
//Banhammer deserves to be the first thing here
|
||||
|
||||
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
|
||||
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
|
||||
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
|
||||
|
||||
/obj/effect/mine/proc/triggerrad(obj)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
obj:radiation += 50
|
||||
randmutb(obj)
|
||||
domutcheck(obj,null)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerstun(obj)
|
||||
if(ismob(obj))
|
||||
var/mob/M = obj
|
||||
M.Stun(30)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggern2o(obj)
|
||||
//example: n2o triggerproc
|
||||
//note: im lazy
|
||||
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
trace_gas.moles = 30
|
||||
payload += trace_gas
|
||||
|
||||
target.air.merge(payload)
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerplasma(obj)
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
|
||||
payload.toxins = 30
|
||||
|
||||
target.air.merge(payload)
|
||||
|
||||
target.hotspot_expose(1000, CELL_VOLUME)
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerkick(obj)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(obj:client)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/explode(obj)
|
||||
explosion(loc, 0, 1, 2, 3)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/effect/mine/HasEntered(AM as mob|obj)
|
||||
Bumped(AM)
|
||||
|
||||
/obj/effect/mine/Bumped(mob/M as mob|obj)
|
||||
|
||||
if(triggered) return
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
|
||||
for(var/mob/O in viewers(world.view, src.loc))
|
||||
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
|
||||
triggered = 1
|
||||
call(src,triggerproc)(M)
|
||||
|
||||
/obj/effect/mine/New()
|
||||
icon_state = "uglyminearmed"
|
||||
//TODO: Move these into atom_procs.dm after carn's finished with it, otherwise it'll conflict - Nodrak
|
||||
|
||||
/atom/proc/ex_act()
|
||||
return
|
||||
@@ -114,99 +23,4 @@
|
||||
if (I)
|
||||
I.hit()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/mousetrap/examine()
|
||||
set src in oview(12)
|
||||
..()
|
||||
if(armed)
|
||||
usr << "\red It looks like it's armed."
|
||||
|
||||
/obj/item/weapon/mousetrap/proc/triggered(mob/target as mob, var/type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/datum/organ/external/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_organ(pick("l_leg", "r_leg"))
|
||||
H.Weaken(3)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_organ(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
if(affecting.take_damage(1, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
src.visible_message("\red <b>SPLAT!</b>")
|
||||
M.splat()
|
||||
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
icon_state = "mousetrap"
|
||||
armed = 0
|
||||
/*
|
||||
else if (ismouse(target))
|
||||
target.adjustBruteLoss(100)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/mousetrap/attack_self(mob/living/user as mob)
|
||||
if(!armed)
|
||||
icon_state = "mousetraparmed"
|
||||
user << "\blue You arm the mousetrap."
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(( (user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
which_hand = "r_hand"
|
||||
src.triggered(user, which_hand)
|
||||
user << "\red <B>You accidentally trigger the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == user)
|
||||
continue
|
||||
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
|
||||
return
|
||||
user << "\blue You disarm the mousetrap."
|
||||
armed = !armed
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/weapon/mousetrap/attack_hand(mob/living/user as mob)
|
||||
if(armed)
|
||||
if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!user.hand)
|
||||
which_hand = "r_hand"
|
||||
src.triggered(user, which_hand)
|
||||
user << "\red <B>You accidentally trigger the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(user, null))
|
||||
if(O == user)
|
||||
continue
|
||||
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mousetrap/HasEntered(AM as mob|obj)
|
||||
if(armed)
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
src.triggered(H)
|
||||
H << "\red <B>You accidentally step on the mousetrap!</B>"
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("\red <B>[H] accidentally steps on the mousetrap.</B>", 1)
|
||||
if(ismouse(AM))
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/mousetrap/hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>The mousetrap is triggered by [A].</B>", 1)
|
||||
src.triggered(null)
|
||||
return
|
||||
Reference in New Issue
Block a user