Bay Merge 05NOV2014

Known errors:

* A set of errors tied to updating the fire overlays.
* A single error related to a dischephency between new and old slime
code
* A set of errors related to the recharging of stun batons
* A single error due to old machinery code coming from your grav
generator file
* A single error error from your space cooler code, due to old
atmopsherics code
* A playerpanel warning
* An error tied to extinguishing and old atmos code.
This commit is contained in:
skull132
2014-11-05 23:58:05 +02:00
parent b7174a5099
commit 3c04d7199d
535 changed files with 29846 additions and 17593 deletions
+12
View File
@@ -10,3 +10,15 @@
//on = 0
//brightness_on = 4 //uncomment these when the lighting fixes get in
return
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/card = I
if(access_bar in card.GetAccess())
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Pink Flamingo", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead Bay", "The Damn Wall", "The Cavern", "Cindi Kate", "The Orchard", "The Saucy Clown", "The Clowns Head")
if(sign_type == null)
return
else
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
src.ChangeSign(sign_type)
user << "You change the barsign."
@@ -100,7 +100,7 @@
break
if(istype (M, /mob/dead/observer))
continue
if(M.buckled)
if(M.buckled || M.pinned.len)
continue
if(M.client)
@@ -120,8 +120,7 @@
return 1
/obj/structure/closet/proc/toggle(mob/user as mob)
. = src.opened ? src.close() : src.open()
if(!.)
if(!(src.opened ? src.close() : src.open()))
user << "<span class='notice'>It won't budge!</span>"
return
@@ -25,10 +25,10 @@
if(istype(O, /obj/item/device/multitool))
user << "\red Resetting circuitry..."
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
sleep(50) // Sleeping time~
src.locked = 0
user << "\blue You disable the locking modules."
update_icon()
if(do_after(user, 20))
src.locked = 0
user << "<span class = 'caution'> You disable the locking modules.</span>"
update_icon()
return
else if(istype(O, /obj/item/weapon))
var/obj/item/weapon/W = O
@@ -87,6 +87,9 @@
src.locked = 1
user << "\blue You re-enable the locking modules."
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20))
src.locked = 1
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
return
else
localopened = !localopened
@@ -7,6 +7,7 @@
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
climbable = 1
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
@@ -36,6 +37,9 @@
O.loc = get_turf(src)
icon_state = icon_opened
src.opened = 1
if(climbable)
structure_shaken()
return 1
/obj/structure/closet/crate/close()
@@ -319,12 +323,7 @@
var/datum/gas_mixture/gas = (..())
if(!gas) return null
var/datum/gas_mixture/newgas = new/datum/gas_mixture()
newgas.oxygen = gas.oxygen
newgas.carbon_dioxide = gas.carbon_dioxide
newgas.nitrogen = gas.nitrogen
newgas.toxins = gas.toxins
newgas.volume = gas.volume
newgas.temperature = gas.temperature
newgas.copy_from(gas)
if(newgas.temperature <= target_temp) return
if((newgas.temperature - cooling_power) > target_temp)
@@ -268,9 +268,13 @@ obj/structure/door_assembly
path = text2path("/obj/machinery/door/airlock[glass_type]")
else
path = text2path("/obj/machinery/door/airlock[airlock_type]")
var/obj/machinery/door/airlock/door = new path(src.loc)
door.assembly_type = type
door.electronics = src.electronics
if (istype(electronics, /obj/item/weapon/airlock_electronics/secure))
door.randomize_wires()
if(src.electronics.one_access)
door.req_access = null
door.req_one_access = src.electronics.conf_access
+20 -6
View File
@@ -25,8 +25,7 @@
if(do_after(user,40))
if(!src) return
user << "\blue You dissasembled the girder!"
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
dismantle()
else if(!anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "\blue Now securing the girder"
@@ -40,13 +39,11 @@
if(do_after(user,30))
if(!src) return
user << "\blue You slice apart the girder!"
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "\blue You drill through the girder!"
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
dismantle()
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 && istype(src,/obj/structure/girder/reinforced))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
@@ -166,6 +163,23 @@
else
..()
proc/dismantle()
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
attack_hand(mob/user as mob)
if (HULK in user.mutations)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
dismantle()
return
return ..()
attack_animal(mob/living/simple_animal/user)
if(user.wall_smash)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
dismantle()
return
return ..()
blob_act()
if(prob(40))
+3 -1
View File
@@ -58,7 +58,9 @@
return
/obj/structure/grille/attack_slime(mob/user as mob)
if(!istype(user, /mob/living/carbon/slime/adult)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
+3 -1
View File
@@ -103,7 +103,9 @@
attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15))
@@ -206,15 +206,9 @@
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = temperature/10
target_tile.assume_gas("toxins", toxinsToDeduce, 200+T0C)
napalm.toxins = toxinsToDeduce
napalm.temperature = 200+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= toxinsToDeduce/100
+3 -1
View File
@@ -105,7 +105,9 @@
/obj/structure/mirror/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
@@ -12,10 +12,10 @@
desc = "This is used to lie in, sleep in or strap on."
icon_state = "bed"
var/mob/living/buckled_mob
var/movable = 0
var/movable = 0 // For mobility checks
/obj/structure/stool/bed/psych
name = "psych bed"
name = "psychiatrists couch"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
@@ -36,6 +36,9 @@
manual_unbuckle(user)
return
/obj/structure/stool/bed/proc/handle_rotation()
return
/obj/structure/stool/bed/MouseDrop(atom/over_object)
return
@@ -44,15 +47,21 @@
buckle_mob(M, user)
return
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) // Called after somebody buckled / unbuckled
return
/obj/structure/stool/bed/proc/unbuckle()
if(buckled_mob)
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
buckled_mob.buckled = null
buckled_mob.anchored = initial(buckled_mob.anchored)
buckled_mob.update_canmove()
if(!buckled_mob.mob_has_gravity(buckled_mob.loc))
buckled_mob.float(1)
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
@@ -70,12 +79,14 @@
"You hear metal clanking")
unbuckle()
src.add_fingerprint(user)
return
return 1
return 0
/obj/structure/stool/bed/proc/buckle_mob(mob/M as mob, mob/user as mob)
if (!ticker)
user << "You can't buckle anyone in before the game starts."
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || M.pinned.len || istype(user, /mob/living/silicon/pai) )
return
if (istype(M, /mob/living/carbon/slime))
@@ -102,6 +113,7 @@
M.float(0)
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return
/*
@@ -113,6 +125,18 @@
icon_state = "down"
anchored = 0
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
if(buckled_mob)
manual_unbuckle()
else
visible_message("[user] collapses \the [src.name].")
new/obj/item/roller(get_turf(src))
spawn(0)
del(src)
return
..()
/obj/item/roller
name = "roller bed"
desc = "A collapsed roller bed that can be carried around."
@@ -120,11 +144,47 @@
icon_state = "folded"
w_class = 4.0 // Can't be put in backpacks. Oh well.
attack_self(mob/user)
/obj/item/roller/attack_self(mob/user)
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
del(src)
/obj/item/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
var/obj/item/roller_holder/RH = W
if(!RH.held)
user << "\blue You collect the roller bed."
src.loc = RH
RH.held = src
return
..()
/obj/item/roller_holder
name = "roller bed rack"
desc = "A rack for carrying a collapsed roller bed."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "folded"
var/obj/item/roller/held
/obj/item/roller_holder/New()
..()
held = new /obj/item/roller(src)
/obj/item/roller_holder/attack_self(mob/user as mob)
if(!held)
user << "\blue The rack is empty."
return
user << "\blue You deploy the roller bed."
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
del(held)
held = null
/obj/structure/stool/bed/roller/Move()
..()
if(buckled_mob)
@@ -39,7 +39,7 @@
rotate()
return
/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
/obj/structure/stool/bed/chair/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
@@ -95,24 +95,40 @@
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
armrest.layer = MOB_LAYER + 0.1
return ..()
/obj/structure/stool/bed/chair/comfy/afterbuckle()
if(buckled_mob)
overlays += armrest
else
overlays -= armrest
/obj/structure/stool/bed/chair/comfy/brown
icon_state = "comfychair_brown"
color = rgb(255,113,0)
/obj/structure/stool/bed/chair/comfy/beige
icon_state = "comfychair_beige"
color = rgb(255,253,195)
/obj/structure/stool/bed/chair/comfy/teal
icon_state = "comfychair_teal"
color = rgb(0,255,255)
/obj/structure/stool/bed/chair/office
anchored = 0
movable = 1
/obj/structure/stool/bed/chair/comfy/black
icon_state = "comfychair_black"
color = rgb(167,164,153)
/obj/structure/stool/bed/chair/comfy/lime
icon_state = "comfychair_lime"
color = rgb(255,251,0)
/obj/structure/stool/bed/chair/office/Move()
..()
@@ -137,18 +153,24 @@
if(propelled)
var/mob/living/occupant = buckled_mob
unbuckle()
occupant.throw_at(A, 3, 2)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
victim.apply_effect(6, STUN, 0)
victim.apply_effect(6, WEAKEN, 0)
victim.apply_effect(6, STUTTER, 0)
victim.take_organ_damage(10)
occupant.visible_message("<span class='danger'>[occupant] clashed into \the [A]!</span>")
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone, blocked)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
/obj/structure/stool/bed/chair/office/light
icon_state = "officechair_white"
@@ -54,12 +54,27 @@
w_class = 5.0
var/obj/structure/stool/origin = null
/obj/item/weapon/stool/proc/deploy(var/mob/user)
if(!origin)
del src
origin.loc = get_turf(src)
if(user)
user.u_equip(src)
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
del src
/obj/item/weapon/stool/dropped(mob/user as mob)
..()
if(istype(loc,/turf/))
deploy(user)
/obj/item/weapon/stool/attack_self(mob/user as mob)
..()
origin.loc = get_turf(src)
user.u_equip(src)
user.visible_message("\blue [user] puts [src] down.", "\blue You put [src] down.")
del src
deploy(user)
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
@@ -147,16 +147,22 @@
else if (propelled)
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, blocked)
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
victim.apply_effect(6, STUN, 0)
victim.apply_effect(6, WEAKEN, 0)
victim.apply_effect(6, STUTTER, 0)
victim.take_organ_damage(10)
def_zone = ran_zone()
blocked = victim.run_armor_check(def_zone, "melee")
victim.apply_effect(6, STUN, blocked)
victim.apply_effect(6, WEAKEN, blocked)
victim.apply_effect(6, STUTTER, blocked)
victim.apply_damage(10, BRUTE, def_zone)
if(pulling)
occupant.visible_message("<span class='danger'>[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!</span>")
+23 -48
View File
@@ -19,9 +19,11 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
climbable = 1
var/parts = /obj/item/weapon/table_parts
var/flipped = 0
var/health = 200
var/health = 100
/obj/structure/table/proc/update_adjacent()
for(var/direction in list(1,2,4,8,5,6,9,10))
@@ -274,7 +276,6 @@
/obj/structure/table/attack_alien(mob/user)
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
destroy()
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
if(user.wall_smash)
@@ -298,6 +299,8 @@
return (check_cover(mover,target))
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(locate(/obj/structure/table) in get_turf(mover))
return 1
if (flipped)
if (get_dir(loc, target) == dir)
return !density
@@ -311,14 +314,14 @@
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
return 1
if (get_turf(P.original) == cover)
var/chance = 30
var/chance = 20
if (ismob(P.original))
var/mob/M = P.original
if (M.lying)
chance += 50 //Lying down lets you catch less bullets
chance += 20 //Lying down lets you catch less bullets
if(flipped)
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
chance += 50
chance += 20
else
return 1 //But only from one side
if(prob(chance))
@@ -343,8 +346,9 @@
return 1
/obj/structure/table/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_hand() != O))
return
return ..()
if(isrobot(user))
return
user.drop_item()
@@ -373,7 +377,7 @@
G.affecting.loc = src.loc
G.affecting.Weaken(5)
visible_message("\red [G.assailant] puts [G.affecting] on \the [src].")
del(W)
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
@@ -414,55 +418,26 @@
return 0
return T.straight_table_check(direction)
/obj/structure/table/verb/can_touch(var/mob/user)
if (!user)
return 0
if (user.stat) //zombie goasts go away
return 0
if (issilicon(user))
user << "<span class='notice'>You need hands for this.</span>"
return 0
return 1
/obj/structure/table/verb/do_climb()
set name = "Climb table"
set desc = "Climbs onto a table."
set category = "Object"
set src in oview(1)
if (!can_touch(usr))
return
usr.visible_message("<span class='warning'>[usr] starts climbing onto \the [src]!</span>")
if(!do_after(usr,50))
return
usr.loc = get_turf(src)
for(var/mob/living/M in get_turf(src))
M.Weaken(5)
if (get_turf(usr) == get_turf(src))
usr.visible_message("<span class='warning'>[usr] climbs onto \the [src]!</span>")
/obj/structure/table/verb/do_flip()
set name = "Flip table"
set desc = "Flips a non-reinforced table"
set category = "Object"
set src in oview(1)
if(ismouse(usr))
return
if (!can_touch(usr))
if (!can_touch(usr) || ismouse(usr))
return
if(!flip(get_cardinal_dir(usr,src)))
usr << "<span class='notice'>It won't budge.</span>"
else
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
for(var/mob/living/M in get_turf(src))
M.Weaken(5)
M << "\red You topple as \the [src] moves under you!"
return
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
if(climbable)
structure_shaken()
return
/obj/structure/table/proc/unflipping_check(var/direction)
for(var/mob/M in oview(src,0))
return 0
@@ -545,7 +520,7 @@
desc = "Do not apply fire to this. Rumour says it burns easily."
icon_state = "wood_table"
parts = /obj/item/weapon/table_parts/wood
health = 100
health = 50
/*
* Reinforced tables
*/
@@ -553,7 +528,7 @@
name = "reinforced table"
desc = "A version of the four legged table. It is stronger."
icon_state = "reinf_table"
health = 400
health = 200
var/status = 2
parts = /obj/item/weapon/table_parts/reinforced
@@ -50,6 +50,8 @@
oxytanks.Add(I)
oxygentanks++
user << "<span class='notice'>You put [I] in [src].</span>"
if(oxygentanks < 5)
update_icon()
else
user << "<span class='notice'>[src] is full.</span>"
updateUsrDialog()
@@ -61,6 +63,8 @@
platanks.Add(I)
plasmatanks++
user << "<span class='notice'>You put [I] in [src].</span>"
if(oxygentanks < 6)
update_icon()
else
user << "<span class='notice'>[src] is full.</span>"
updateUsrDialog()
+1 -1
View File
@@ -49,7 +49,7 @@
user.put_in_hands(pinned_target)
user << "You take the target out of the stake."
else
pinned_target.loc = get_turf_loc(user)
pinned_target.loc = get_turf(user)
user << "You take the target out of the stake."
pinned_target = null
+6 -11
View File
@@ -81,8 +81,7 @@ obj/structure/ex_act(severity)
/obj/structure/transit_tube_pod/New(loc)
..(loc)
air_contents.oxygen = MOLES_O2STANDARD * 2
air_contents.nitrogen = MOLES_N2STANDARD
air_contents.adjust_multi("oxygen", MOLES_O2STANDARD * 2, "nitrogen", MOLES_N2STANDARD)
air_contents.temperature = T20C
// Give auto tubes time to align before trying to start moving
@@ -123,8 +122,8 @@ obj/structure/ex_act(severity)
else if(!pod.moving && pod.dir in directions())
AM.loc = pod
return
/obj/structure/transit_tube/station/attack_hand(mob/user as mob)
if(!pod_moving)
for(var/obj/structure/transit_tube_pod/pod in loc)
@@ -359,11 +358,7 @@ obj/structure/ex_act(severity)
// datum, there might be problems if I don't...
/obj/structure/transit_tube_pod/return_air()
var/datum/gas_mixture/GM = new()
GM.oxygen = air_contents.oxygen
GM.carbon_dioxide = air_contents.carbon_dioxide
GM.nitrogen = air_contents.nitrogen
GM.toxins = air_contents.toxins
GM.temperature = air_contents.temperature
GM.copy_from(air_contents)
return GM
// For now, copying what I found in an unused FEA file (and almost identical in a
@@ -398,8 +393,8 @@ obj/structure/ex_act(severity)
var/transfer_in = max(0.1, 0.5 * (env_pressure - int_pressure) / total_pressure)
var/transfer_out = max(0.1, 0.3 * (int_pressure - env_pressure) / total_pressure)
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles() * transfer_in)
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles() * transfer_out)
var/datum/gas_mixture/from_env = loc.remove_air(environment.total_moles * transfer_in)
var/datum/gas_mixture/from_int = air_contents.remove(air_contents.total_moles * transfer_out)
loc.assume_air(from_int)
air_contents.merge(from_env)
+93 -91
View File
@@ -76,7 +76,7 @@
else
user << "<span class='notice'>You need a tighter grip.</span>"
if(cistern)
if(cistern && !istype(user,/mob/living/silicon/robot)) //STOP PUTTING YOUR MODULES IN THE TOILET.
if(I.w_class > 3)
user << "<span class='notice'>\The [I] does not fit.</span>"
return
@@ -153,7 +153,7 @@
if(I.type == /obj/item/device/analyzer)
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin to adjust the temperature valve with the [I].</span>"
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
if(do_after(user, 50))
switch(watertemp)
if("normal")
@@ -162,7 +162,8 @@
watertemp = "boiling"
if("boiling")
watertemp = "normal"
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust the shower with the [I].</span>")
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
@@ -189,7 +190,7 @@
del(mymist)
ismist = 0
/obj/machinery/shower/HasEntered(atom/movable/O)
/obj/machinery/shower/Crossed(atom/movable/O)
..()
wash(O)
if(ismob(O))
@@ -205,77 +206,76 @@
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
if(!on) return
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've been 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(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(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(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.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.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(0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0)
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0)
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0)
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0)
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask(0)
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
/* if(H.ears && washears)
if(H.ears.clean_blood())
H.update_inv_ears(0)*/
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
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)
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(0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0)
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0)
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0)
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0)
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask(0)
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
H.update_inv_ears(0)
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
H.update_inv_ears(0)
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
H.clean_blood(washshoes)
else
O.clean_blood()
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
O.clean_blood()
if(isturf(loc))
var/turf/tile = loc
@@ -323,47 +323,49 @@
anchored = 1
var/busy = 0 //Something's being washed at the moment
/obj/structure/sink/attack_hand(mob/M as mob)
if(isrobot(M) || isAI(M))
/obj/structure/sink/attack_hand(mob/user as mob)
if (hasorgans(user))
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
if (user.hand)
temp = user:organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
return
if(isrobot(user) || isAI(user))
return
if(!Adjacent(user))
return
if(busy)
M << "\red Someone's already washing here."
user << "\red Someone's already washing here."
return
var/turf/location = M.loc
if(!isturf(location)) return
usr << "\blue You start washing your hands."
busy = 1
sleep(40)
busy = 0
if(M.loc != location) return //Person has moved away from the sink
M.clean_blood()
if(ishuman(M))
M:update_inv_gloves()
if(ishuman(M))
var/mob/living/carbon/human/B = M
if(B.gloves)
var/obj/item/clothing/gloves/C = B.gloves
C.gsr = 0
else
B.gsr = 0
if(!Adjacent(user)) return //Person has moved away from the sink
user.clean_blood()
if(ishuman(user))
user:update_inv_gloves()
for(var/mob/V in viewers(src, null))
V.show_message("\blue [M] washes their hands using \the [src].")
V.show_message("\blue [user] washes their hands using \the [src].")
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
if(busy)
user << "\red Someone's already washing here."
return
if (istype(O, /obj/item/weapon/reagent_containers))
var/obj/item/weapon/reagent_containers/RG = O
var/obj/item/weapon/reagent_containers/RG = O
if (istype(RG) && RG.is_open_container())
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user.visible_message("\blue [user] fills the [RG] using \the [src].","\blue You fill the [RG] using \the [src].")
user.visible_message("\blue [user] fills \the [RG] using \the [src].","\blue You fill \the [RG] using \the [src].")
return
else if (istype(O, /obj/item/weapon/melee/baton))
+5 -2
View File
@@ -162,12 +162,15 @@
/obj/structure/window/attack_slime(mob/user as mob)
if(!isslimeadult(user)) return
var/mob/living/carbon/slime/S = user
if (!S.is_adult)
return
attack_generic(user, rand(10, 15))
/obj/structure/window/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this
if(W.flags & NOBLUDGEON) return
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
@@ -334,7 +337,7 @@
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
if(dir in list(5,6,9,10))
if(dir & (dir - 1))
return 1
return 0