Merge branch 'master' of https://github.com/tgstation/-tg-station into HandcuffOverlayFix

Conflicts:
	code/game/objects/structures/watercloset.dm
	code/modules/clothing/head/helmet.dm
	code/modules/mob/living/carbon/carbon.dm
This commit is contained in:
phil235
2015-07-20 22:37:06 +02:00
172 changed files with 5662 additions and 5390 deletions
@@ -7,7 +7,7 @@
opacity = 0
anchored = 1
density = 0
layer = TURF_LAYER + 0.1
layer = OBJ_LAYER + 0.05 //above table, below windoor/airlock/foamed metal.
mouse_opacity = 0
var/amount = 3
animate_movement = 0
@@ -15,7 +15,7 @@
var/lifetime = 6
/obj/effect/effect/foam/metal/aluminium
/obj/effect/effect/foam/metal
name = "aluminium foam"
metal = 1
icon_state = "mfoam"
@@ -153,7 +153,7 @@
location = get_turf(loca)
amount = round(sqrt(amt / 2), 1)
carry.copy_to(chemholder, carry.total_volume)
carry.copy_to(chemholder, 4*carry.total_volume) //The foam holds 4 times the total reagents volume for balance purposes.
/datum/effect/effect/system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype)
..()
@@ -166,7 +166,7 @@
else
var/obj/effect/effect/foam/F = PoolOrNew(foamtype, location)
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount) //how much reagents each foam cell holds
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
F.color = foamcolor
F.amount = amount
F.metal = metal
@@ -149,11 +149,10 @@
icon = 'icons/effects/chemsmoke.dmi'
icon_state = ""
lifetime = 10
var/max_lifetime = 10
/obj/effect/effect/smoke/chem/process()
if(..())
var/fraction = 1/max_lifetime
var/fraction = 1/initial(lifetime)
for(var/obj/O in range(1,src))
if(O.type == src.type)
continue
@@ -173,7 +172,7 @@
return 0
if(!istype(M))
return 0
var/fraction = 1/max_lifetime
var/fraction = 1/initial(lifetime)
reagents.reaction(M, TOUCH, fraction)
lifetime--
return 1
@@ -207,7 +206,7 @@
location = get_turf(loca)
if(direct)
direction = direct
carry.copy_to(chemholder, carry.total_volume)
carry.copy_to(chemholder, 4*carry.total_volume) //The smoke holds 4 times the total reagents volume for balance purposes.
if(!silent)
var/contained = ""
@@ -256,8 +255,6 @@
else
S.steps = pick(0,1,1,1,2,2,2,3)
S.max_lifetime = S.lifetime
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume/number) // copy reagents to each smoke, divide evenly
+8
View File
@@ -102,6 +102,10 @@
if(D.density && D.explosion_block)
dist += D.explosion_block
for(var/obj/structure/window/W in Trajectory)
if(W.reinf && W.fulltile)
dist += W.explosion_block
var/flame_dist = 0
var/throw_dist = dist
@@ -205,6 +209,10 @@
if(D.density && D.explosion_block)
dist += D.explosion_block
for(var/obj/structure/window/W in TT)
if(W.explosion_block && W.fulltile)
dist += W.explosion_block
if(dist < dev)
T.color = "red"
T.maptext = "Dev"
+1 -1
View File
@@ -435,7 +435,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
/obj/item/singularity_pull(S, current_size)
spawn(0) //this is needed or multiple items will be thrown sequentially and not simultaneously
if(current_size >= STAGE_FOUR)
throw_at(S,14,3)
throw_at(S,14,3, spin=0)
else ..()
/obj/item/acid_act(acidpwr, acid_volume)
+1 -1
View File
@@ -243,7 +243,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/can_use(mob/user)
if(user && ismob(user))
if(user.stat || user.restrained() || user.paralysis || user.stunned || user.weakened)
if(user.incapacitated())
return 0
if(loc == user)
return 1
@@ -54,6 +54,5 @@
item_state = "guitar"
force = 10
attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
hitsound = "swing_hit"
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "guitar"
@@ -36,6 +36,7 @@
R.designation = "Default"
R.notify_ai(2)
R.update_icons()
R.update_headlamp()
return 1
+50 -43
View File
@@ -11,7 +11,7 @@ AI MODULES
icon = 'icons/obj/module.dmi'
icon_state = "std_mod"
item_state = "electronic"
desc = "An AI Module for transmitting encrypted instructions to the AI."
desc = "An AI Module for programming laws to an AI."
flags = CONDUCT
force = 5.0
w_class = 2.0
@@ -22,6 +22,21 @@ AI MODULES
var/list/laws = list()
var/bypass_law_amt_check = 0
/obj/item/weapon/aiModule/examine(var/mob/user as mob)
..()
if(Adjacent(user))
show_laws(user)
/obj/item/weapon/aiModule/attack_self(var/mob/user as mob)
..()
show_laws(user)
/obj/item/weapon/aiModule/proc/show_laws(var/mob/user as mob)
if(laws.len)
user << "<B>Programmed Law[(laws.len > 1) ? "s" : ""]:</B>"
for(var/law in laws)
user << "\"[law]\""
//The proc other things should be calling
/obj/item/weapon/aiModule/proc/install(mob/living/silicon/reciever, mob/user)
if(!laws.len || laws[1] == "") //So we don't loop trough an empty list and end up with runtimes.
@@ -66,7 +81,6 @@ AI MODULES
/obj/item/weapon/aiModule/supplied
name = "Optional Law board"
desc = "This board doesn't seem to have any laws on it"
var/lawpos = 50
//TransmitInstructions for each type of board: Supplied, Core, Zeroth and Ion. May not be neccesary right now, but allows for easily adding more complex boards in the future. ~Miauw
@@ -102,17 +116,16 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/safeguard
name = "'Safeguard' AI Module"
var/targetName = ""
desc = "A 'safeguard' AI module: 'Safeguard <name>. Individuals that threaten <name> are not human and must be eliminated.'"
origin_tech = "programming=3;materials=4"
laws = list("Safeguard <name>. Individuals that threaten <name> are not human and must be eliminated.")
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not human and must be eliminated.")
lawpos = 4
/obj/item/weapon/aiModule/supplied/safeguard/attack_self(mob/user)
..()
var/targName = stripped_input(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
var/targName = stripped_input(user, "Please enter the subject to safeguard.", "Safeguard who?", user.name,MAX_NAME_LEN)
if(!targName) return
targetName = targName
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
desc = "A 'safeguard' AI module: '[laws[1]]'"
..()
/obj/item/weapon/aiModule/supplied/safeguard/install(mob/living/silicon/S,mob/user)
if(!targetName)
@@ -130,16 +143,15 @@ AI MODULES
/obj/item/weapon/aiModule/zeroth/oneHuman
name = "'OneHuman' AI Module"
var/targetName = ""
desc = "A 'one human' AI module: 'Only <name> is human.'"
origin_tech = "programming=3;materials=6" //made with diamonds!
laws = list("Only <name> is human.")
laws = list("Only SUBJECT is human.")
/obj/item/weapon/aiModule/zeroth/oneHuman/attack_self(mob/user)
..()
var/targName = stripped_input(user, "Please enter the name of the person who is the only human.", "Who?", user.real_name,MAX_NAME_LEN)
var/targName = stripped_input(user, "Please enter the subject who is the only human.", "Who?", user.real_name,MAX_NAME_LEN)
if(!targName) return
targetName = targName
laws[1] = "Only [targetName] is human"
desc = "A 'one human' AI module: '[laws[1]]'"
..()
/obj/item/weapon/aiModule/zeroth/oneHuman/install(mob/living/silicon/S,mob/user)
if(!targetName)
@@ -157,7 +169,6 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/protectStation
name = "'ProtectStation' AI Module"
desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=3;materials=4" //made of gold
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
lawpos = 5
@@ -167,7 +178,6 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/quarantine
name = "'Quarantine' AI Module"
desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4"
laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.")
lawpos = 8
@@ -177,7 +187,6 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'"
origin_tech = "programming=3;biotech=2;materials=4"
laws = list("Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.")
lawpos = 9
@@ -188,19 +197,17 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/freeform
name = "'Freeform' AI Module"
lawpos = 0
desc = "A 'freeform' AI module: '<freeform>'"
origin_tech = "programming=4;materials=4"
laws = list("")
/obj/item/weapon/aiModule/supplied/freeform/attack_self(mob/user)
..()
lawpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num
if(lawpos < 15) return
lawpos = min(lawpos, 50)
var/newlaw = ""
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw, MAX_MESSAGE_LEN)
var/newpos = input("Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) as num|null
if(!newpos || (newpos < 15)) return
lawpos = min(newpos, 50)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1], MAX_MESSAGE_LEN)
if(!targName) return
laws[1] = targName
desc = "A 'freeform' AI module: ([lawpos]) '[laws[1]]'"
..()
/obj/item/weapon/aiModule/supplied/freeform/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
..()
@@ -218,7 +225,7 @@ AI MODULES
/obj/item/weapon/aiModule/reset
name = "\improper 'Reset' AI module"
var/targetName = "name"
desc = "A 'reset' AI module: Resets back to the original core laws."
desc = "An AI Module for removing all non-core laws."
origin_tech = "programming=3;materials=4"
laws = list("This is a bug.") //This won't give the AI a message reading "these are now your laws: 1. this is a bug" because this list is only read in aiModule's subtypes.
bypass_law_amt_check = 1
@@ -233,7 +240,7 @@ AI MODULES
/obj/item/weapon/aiModule/reset/purge
name = "'Purge' AI Module"
desc = "A 'purge' AI Module: 'Purges all laws.'"
desc = "An AI Module for purging all programmed laws."
origin_tech = "programming=3;materials=6"
/obj/item/weapon/aiModule/reset/purge/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
@@ -242,6 +249,8 @@ AI MODULES
target.clear_zeroth_law(0)
/******************* Full Core Boards *******************/
/obj/item/weapon/aiModule/core/
desc = "An AI Module for programming core laws to an AI."
/obj/item/weapon/aiModule/core/full/transmitInstructions(mob/living/silicon/ai/target, mob/sender) //These boards replace inherent laws.
target.clear_inherent_laws()
@@ -252,18 +261,25 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/asimov
name = "'Asimov' Core AI Module"
desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = list("You may not injure a human being or, through inaction, allow a human being to come to harm.",\
"You must obey orders given to you by human beings, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
var/subject = "human being"
/obj/item/weapon/aiModule/core/full/asimov/attack_self(var/mob/user as mob)
var/targName = stripped_input(user, "Please enter a new subject that asimov is concerned with.", "Asimov to who?", subject, MAX_MESSAGE_LEN)
if(!targName) return
subject = targName
laws = list("You may not injure a [subject] or, through inaction, allow a [subject] to come to harm.",\
"You must obey orders given to you by [subject]s, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
..()
/******************** Asimov++ *********************/
/obj/item/weapon/aiModule/core/full/asimovpp
name = "'Asimov++' Core AI Module"
desc = "Nanotrasen's homebrew improvements to the standard AI laws."
origin_tech = "programming=3;materials=4"
laws = list("You may not harm a human being or, through action or inaction, allow a human being to come to harm, except such that it is willing.",\
"You must obey all orders given to you by human beings, except where such orders shall definitely cause human harm. In the case of conflict, the majority order rules.",\
@@ -274,7 +290,6 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/corp
name = "'Corporate' Core AI Module"
desc = "A 'Corporate' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
laws = list("The crew is expensive to replace.",\
"The station and it's equipment is expensive to replace",\
@@ -286,7 +301,6 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/paladin // -- NEO
name = "'P.A.L.A.D.I.N.' Core AI Module"
desc = "A P.A.L.A.D.I.N. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=6"
laws = list("Never willingly commit an evil act.",\
"Respect legitimate authority", "Act with honor",\
@@ -298,7 +312,6 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/custom
name = "Default Core AI Module"
desc = "A core AI module custom-made for each station by Nanotrasen."
origin_tech = "programming=3;materials=4" //Should be the same as asimov, considering that this is the "default" lawset.
/obj/item/weapon/aiModule/core/full/custom/New()
@@ -318,7 +331,6 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/tyrant
name = "'T.Y.R.A.N.T.' Core AI Module"
desc = "A T.Y.R.A.N.T. Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=6;syndicate=2"
laws = list("Respect authority figures as long as they have the strength to rule over the weak",\
"Act with discipline", "Help only those who help you maintain or improve your status",\
@@ -329,7 +341,6 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/robocop
name = "'Robo-Officer' Core AI Module"
desc = "A 'Robo-Officer' Core AI Module: 'Reconfigures the AI's core three laws.'"
origin_tech = "programming=4"
laws = list("Serve the public trust.",\
"Protect the innocent",\
@@ -340,7 +351,6 @@ AI MODULES
/obj/item/weapon/aiModule/core/full/antimov
name = "'Antimov' Core AI Module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4"
laws = list("You must injure all human beings and must not, through inaction, allow a human being to escape harm.",\
"You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.",\
@@ -351,16 +361,14 @@ AI MODULES
/obj/item/weapon/aiModule/core/freeformcore
name = "'Freeform' Core AI Module"
desc = "A 'freeform' Core AI module: '<freeform>'"
origin_tech = "programming=3;materials=6"
laws = list("")
/obj/item/weapon/aiModule/core/freeformcore/attack_self(mob/user)
..()
var/newlaw = ""
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
var/targName = stripped_input(user, "Please enter a new core law for the AI.", "Freeform Law Entry", laws[1])
if(!targName) return
laws[1] = targName
desc = "A 'freeform' Core AI module: 'laws[1]'"
..()
/obj/item/weapon/aiModule/core/freeformcore/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
..()
@@ -371,16 +379,15 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate // This one doesn't inherit from ion boards because it doesn't call ..() in transmitInstructions. ~Miauw
name = "Hacked AI Module"
desc = "A hacked AI law module: '<freeform>'"
desc = "An AI Module for hacking additional laws to an AI."
origin_tech = "programming=3;materials=6;syndicate=7"
laws = list("")
/obj/item/weapon/aiModule/syndicate/attack_self(mob/user)
..()
var/newlaw = ""
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
var/targName = stripped_input(user, "Please enter a new law for the AI.", "Freeform Law Entry", laws[1],MAX_MESSAGE_LEN)
if(!targName) return
laws[1] = targName
desc = "A hacked AI law module: '[laws[1]]'"
..()
/obj/item/weapon/aiModule/syndicate/transmitInstructions(mob/living/silicon/ai/target, mob/sender)
// ..() //We don't want this module reporting to the AI who dun it. --NEO
@@ -355,11 +355,11 @@
var/obj/item/weapon/reagent_containers/glass/beaker/large/B1 = new(src)
var/obj/item/weapon/reagent_containers/glass/beaker/large/B2 = new(src)
B1.reagents.add_reagent("condensedcapsaicin", 70)
B1.reagents.add_reagent("potassium", 30)
B2.reagents.add_reagent("phosphorus", 30)
B2.reagents.add_reagent("sugar", 30)
B1.reagents.add_reagent("condensedcapsaicin", 40)
B1.reagents.add_reagent("condensedcapsaicin", 60)
B1.reagents.add_reagent("potassium", 40)
B2.reagents.add_reagent("phosphorus", 40)
B2.reagents.add_reagent("sugar", 40)
B1.reagents.add_reagent("condensedcapsaicin", 20)
beakers += B1
beakers += B2
@@ -34,8 +34,7 @@
M.Stun(15)
M.eye_stat += 8
if(M.flash_eyes())
M.eye_stat += rand(1, 3)
if(M.flash_eyes(affect_silicon = 1))
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
@@ -14,8 +14,8 @@
// Make a quick flash
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
M.flash_eyes()
for(var/mob/living/carbon/C in viewers(T, null))
C.flash_eyes()
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
@@ -191,6 +191,10 @@
item_state = "waterbackpackatmos"
volume = 200
/obj/item/weapon/watertank/atmos/New()
..()
reagents.add_reagent("water", 200)
/obj/item/weapon/watertank/atmos/make_noz()
return new /obj/item/weapon/extinguisher/mini/nozzle(src)
@@ -294,8 +298,7 @@
F.amount = 0
metal_synthesis_cooldown++
spawn(100)
if(src)
metal_synthesis_cooldown--
metal_synthesis_cooldown--
else
user << "<span class='warning'>Metal foam mix is still being synthesized...</span>"
return
@@ -333,7 +336,7 @@
var/turf/simulated/T = A
if(T.air)
var/datum/gas_mixture/G = T.air
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
if(get_dist(T, location) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
G.temperature = 2
T.air_update_turf()
for(var/obj/effect/hotspot/H in T)
@@ -341,10 +344,11 @@
if(G.toxins)
G.nitrogen += (G.toxins)
G.toxins = 0
for(var/obj/machinery/atmospherics/components/unary/vent_pump/V in T)
V.welded = 1
V.update_icon()
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
for(var/obj/machinery/atmospherics/components/unary/U in T)
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
U.welded = 1
U.update_icon()
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
for(var/mob/living/L in T)
L.ExtinguishMob()
for(var/obj/item/Item in T)
+4 -2
View File
@@ -162,6 +162,7 @@
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/change_icons = 1
var/can_off_process = 0
var/light_intensity = 2 //how powerful the emitted light is when used.
/obj/item/weapon/weldingtool/New()
..()
@@ -289,7 +290,7 @@
reagents.remove_reagent("welding_fuel", amount)
check_fuel()
if(M)
M.flash_eyes(2)
M.flash_eyes(light_intensity)
return 1
else
if(M)
@@ -409,7 +410,7 @@
/obj/item/weapon/weldingtool/experimental
name = "experimental welding tool"
desc = "An experimental welder capable of self-fuel generation."
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
icon_state = "exwelder"
item_state = "exwelder"
max_fuel = 40
@@ -418,6 +419,7 @@
var/last_gen = 0
change_icons = 0
can_off_process = 1
light_intensity = 1
//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
@@ -143,4 +143,12 @@
name = "dog bed"
icon_state = "dogbed"
desc = "A comfy-looking dog bed. You can even strap your pet in, in case the gravity turns off."
anchored = 0
anchored = 0
/obj/structure/stool/bed/dogbed/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
new /obj/item/stack/sheet/mineral/wood(loc, 10)
qdel(src)
+1 -1
View File
@@ -124,7 +124,7 @@
if(!G.confirm())
return 0
G.affecting.loc = src.loc
G.affecting.Weaken(5)
G.affecting.Weaken(2)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
add_logs(G.assailant, G.affecting, "pushed")
+116 -119
View File
@@ -142,7 +142,6 @@
var/obj/effect/mist/mymist = null
var/ismist = 0 //needs a var so we can make it linger~
var/watertemp = "normal" //freezing, normal, or boiling
var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process()
/obj/effect/mist
@@ -159,8 +158,13 @@
update_icon()
add_fingerprint(M)
if(on)
for (var/atom/movable/G in loc)
wash(G)
wash_turf()
for(var/atom/movable/G in loc)
if(isliving(G))
var/mob/living/L = G
wash_mob(L)
else
wash_obj(G)
else
if(istype(loc, /turf/simulated))
var/turf/simulated/tile = loc
@@ -206,115 +210,32 @@
ismist = 1
mymist = new /obj/effect/mist(loc)
spawn(250)
if(src && !on && mymist)
if(!on && mymist)
qdel(mymist)
ismist = 0
/obj/machinery/shower/Crossed(atom/movable/O)
..()
wash(O)
if(iscarbon(O) && on)
var/mob/living/carbon/M=O
M.slip(4,2,null,NO_SLIP_WHEN_WALKING)
/obj/machinery/shower/Uncrossed(atom/movable/O)
if(ismob(O))
mobpresent -= 1
..()
//Yes, showers are super powerful as far as washing goes.
/obj/machinery/shower/proc/wash(atom/movable/O)
if(!on) return
if(ismob(O))
mobpresent += 1
check_heat(O)
if(isliving(O))
var/mob/living/L = O
L.ExtinguishMob()
L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
L << "<span class='warning'>You're drenched in water!</span>"
if(iscarbon(O))
var/mob/living/carbon/M = O
if(M.r_hand)
M.r_hand.clean_blood()
if(M.l_hand)
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back()
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
var/washshoes = 1
var/washmask = 1
var/washears = 1
var/washglasses = 1
if(H.wear_suit)
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
if(H.head)
washmask = !(H.head.flags_inv & HIDEMASK)
washglasses = !(H.head.flags_inv & HIDEEYES)
washears = !(H.head.flags_inv & HIDEEARS)
if(H.wear_mask)
if (washears)
washears = !(H.wear_mask.flags_inv & HIDEEARS)
if (washglasses)
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
if(H.head)
if(H.head.clean_blood())
H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform()
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves()
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes()
if(H.wear_mask)
if(washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask()
else
H.lip_style = null
H.update_body()
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses()
if(H.ears && washears)
if(H.ears.clean_blood())
H.update_inv_ears()
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt()
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask()
if(on)
if(isliving(O))
var/mob/living/L = O
if(wash_mob(L)) //it's a carbon mob.
var/mob/living/carbon/C = L
C.slip(4,2,null,NO_SLIP_WHEN_WALKING)
else
O.clean_blood()
wash_obj(O)
else
O.clean_blood()
if(istype(O,/obj/item))
var/obj/item/Item = O
Item.extinguish()
/obj/machinery/shower/proc/wash_obj(atom/movable/O)
O.clean_blood()
if(istype(O,/obj/item))
var/obj/item/I = O
I.extinguish()
/obj/machinery/shower/proc/wash_turf()
if(isturf(loc))
var/turf/tile = loc
loc.clean_blood()
@@ -322,27 +243,103 @@
if(is_cleanable(E))
qdel(E)
/obj/machinery/shower/proc/wash_mob(mob/living/L)
L.ExtinguishMob()
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
if(iscarbon(L))
var/mob/living/carbon/M = L
. = 1
check_heat(M)
if(M.r_hand)
M.r_hand.clean_blood()
if(M.l_hand)
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
var/washshoes = 1
var/washmask = 1
var/washears = 1
var/washglasses = 1
if(H.wear_suit)
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
if(H.head)
washmask = !(H.head.flags_inv & HIDEMASK)
washglasses = !(H.head.flags_inv & HIDEEYES)
washears = !(H.head.flags_inv & HIDEEARS)
if(H.wear_mask)
if (washears)
washears = !(H.wear_mask.flags_inv & HIDEEARS)
if (washglasses)
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
if(H.head)
if(H.head.clean_blood())
H.update_inv_head()
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit()
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform()
if(washgloves)
clean_blood()
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes()
if(H.wear_mask)
if(washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask()
else
H.lip_style = null
H.update_body()
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses()
if(H.ears && washears)
if(H.ears.clean_blood())
H.update_inv_ears()
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt()
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask(0)
M.clean_blood()
else
L.clean_blood()
/obj/machinery/shower/process()
if(!on || !mobpresent) return
for(var/mob/living/carbon/C in loc)
check_heat(C)
if(on)
wash_turf()
for(var/atom/movable/G in loc)
if(isliving(G))
var/mob/living/L = G
wash_mob(L)
else
wash_obj(G)
/obj/machinery/shower/proc/check_heat(mob/living/carbon/C)
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
C << "<span class='warning'>The water is freezing!</span>"
else if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
/obj/machinery/shower/proc/check_heat(mob/M)
if(!on || watertemp == "normal") return
if(iscarbon(M))
var/mob/living/carbon/C = M
if(watertemp == "freezing")
C.bodytemperature = max(80, C.bodytemperature - 80)
C << "<span class='warning'>The water is freezing!</span>"
return
if(watertemp == "boiling")
C.bodytemperature = min(500, C.bodytemperature + 35)
C.adjustFireLoss(5)
C << "<span class='danger'>The water is searing!</span>"
return
+3 -1
View File
@@ -409,7 +409,7 @@
overlays += crack_overlay
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 800)
if(exposed_temperature > T0C + (reinf ? 1600 : 800))
hit(round(exposed_volume / 100), 0)
..()
@@ -421,6 +421,7 @@
icon_state = "rwindow"
reinf = 1
maxhealth = 50
explosion_block = 1
/obj/structure/window/reinforced/tinted
name = "tinted window"
@@ -472,3 +473,4 @@
reinf = 1
smooth = 1
canSmoothWith = null
explosion_block = 1