more work
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
//hyperstation 13 nail polish
|
||||
|
||||
/obj/item/nailpolish
|
||||
name = "nail polish"
|
||||
desc = "Paint with a fine brush to do your nails, or someone elses."
|
||||
icon = 'hyperstation/icons/obj/cosmetic.dmi'
|
||||
icon_state = "nailcap"
|
||||
item_state = "nailpolish"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/paint = "black"
|
||||
price = 5
|
||||
var/mutable_appearance/bottle //show the colour on the bottle.
|
||||
|
||||
/obj/item/nailpolish/red
|
||||
name = "red nail polish"
|
||||
paint = "red"
|
||||
|
||||
/obj/item/nailpolish/blue
|
||||
name = "blue nail polish"
|
||||
paint = "blue"
|
||||
|
||||
/obj/item/nailpolish/aqua
|
||||
name = "cyan nail polish"
|
||||
paint = "aqua"
|
||||
|
||||
/obj/item/nailpolish/black
|
||||
name = "black nail polish"
|
||||
paint = "black"
|
||||
|
||||
/obj/item/nailpolish/white
|
||||
name = "white nail polish"
|
||||
paint = "white"
|
||||
|
||||
/obj/item/nailpolish/navy
|
||||
name = "navy nail polish"
|
||||
paint = "navy"
|
||||
|
||||
/obj/item/nailpolish/yellow
|
||||
name = "yellow nail polish"
|
||||
paint = "yellow"
|
||||
|
||||
/obj/item/nailpolish/purple
|
||||
name = "purple nail polish"
|
||||
paint = "purple"
|
||||
|
||||
/obj/item/nailpolish/Initialize(mapload)
|
||||
. = ..()
|
||||
bottle = mutable_appearance('hyperstation/icons/obj/cosmetic.dmi', "nailpolish")
|
||||
bottle.color = paint
|
||||
add_overlay(bottle)
|
||||
|
||||
|
||||
/obj/item/nailpolish/attack(mob/M, mob/user)
|
||||
if(!ismob(M))
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.nail_style) //to stop stacking bugs
|
||||
to_chat(user, "<span class='warning'>Remove the old nail polish first!</span>")
|
||||
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does [user.p_their()] nails with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment to apply \the [src]. Perfect!</span>")
|
||||
H.nail_style = "nails"
|
||||
H.nail_color = paint
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to do [H]'s nails with \the [src].</span>", \
|
||||
"<span class='notice'>You begin to apply \the [src] on [H]'s nails...</span>")
|
||||
if(do_after(user, 20, target = H))
|
||||
user.visible_message("[user] does [H]'s nails with \the [src].", \
|
||||
"<span class='notice'>You apply \the [src] on [H]'s nails.</span>")
|
||||
H.nail_style = "nails"
|
||||
H.nail_color = paint
|
||||
H.update_body()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Where are the nail on that?</span>")
|
||||
@@ -0,0 +1,44 @@
|
||||
/obj/item/storage/backpack/gigantic
|
||||
name = "enormous backpack"
|
||||
desc = "An absolutely massive backpack for particularly large crewmen."
|
||||
icon_state = "explorerpack"
|
||||
item_state = "explorerpack"
|
||||
|
||||
/obj/item/storage/backpack/gigantic/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.allow_big_nesting = TRUE
|
||||
STR.max_combined_w_class = 35
|
||||
STR.max_w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/storage/backpack/gigantic/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning, bypass_equip_delay_self)
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(M.size_multiplier >= 2.0)
|
||||
return ..()
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/item/storage/backpack/gigantic/proc/fallOff(mob/living/wearer)
|
||||
wearer.dropItemToGround(src, TRUE)
|
||||
playsound(src.loc, 'sound/items/handling/cloth_drop.ogg', 50, TRUE)
|
||||
playsound(src.loc, 'sound/items/handling/toolbelt_drop.ogg', 50, TRUE)
|
||||
wearer.visible_message("<span class='warning'>The [src.name] slips off [wearer]'s now too-small body and falls to the ground!'</span>", "<span class='warning'>The [src.name] slips off your now too-small body and falls to the ground!'</span>")
|
||||
|
||||
/obj/item/storage/backpack/gigantic/equipped(mob/equipper, slot)
|
||||
. = ..()
|
||||
if(slot ==ITEM_SLOT_BACK)
|
||||
RegisterSignal(equipper, COMSIG_MOBSIZE_CHANGED,PROC_REF(fallOff))
|
||||
else
|
||||
UnregisterSignal(equipper, COMSIG_MOBSIZE_CHANGED)
|
||||
|
||||
|
||||
/obj/item/storage/backpack/gigantic/dropped(mob/user, silent)
|
||||
UnregisterSignal(user, COMSIG_MOBSIZE_CHANGED)
|
||||
|
||||
|
||||
/obj/item/storage/backpack/gigantic/satchel
|
||||
name = "enormous satchel"
|
||||
desc = "An absolutely massive satchel for particularly large crewmen."
|
||||
icon_state = "satchel-explorer"
|
||||
item_state = "securitypack"
|
||||
@@ -0,0 +1,162 @@
|
||||
//ported from virgo
|
||||
|
||||
/obj/structure/railing
|
||||
name = "railing"
|
||||
desc = "A railing to stop people from falling"
|
||||
|
||||
icon = 'hyperstation/icons/obj/railings.dmi'
|
||||
var/icon_modifier = "grey_"
|
||||
icon_state = "grey_railing0"
|
||||
|
||||
density = FALSE
|
||||
layer = 4
|
||||
anchored = TRUE
|
||||
flags_1 = ON_BORDER_1
|
||||
max_integrity = 250
|
||||
var/heat_resistance = 800
|
||||
var/health = 70
|
||||
var/maxhealth = 70
|
||||
|
||||
|
||||
resistance_flags = ACID_PROOF
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
CanAtmosPass = ATMOS_PASS_PROC
|
||||
var/real_explosion_block //ignore this, just use explosion_block
|
||||
var/breaksound = "shatter"
|
||||
var/hitsound = 'sound/effects/Glasshit.ogg'
|
||||
rad_insulation = RAD_VERY_LIGHT_INSULATION
|
||||
rad_flags = RAD_PROTECT_CONTENTS
|
||||
var/check = 0
|
||||
var/static/list/freepass = typecacheof(list(
|
||||
/obj/singularity,
|
||||
/obj/effect/projectile,
|
||||
/obj/effect/portal,
|
||||
/obj/effect/abstract,
|
||||
/obj/effect/hotspot,
|
||||
/obj/effect/landmark,
|
||||
/obj/effect/temp_visual,
|
||||
/obj/effect/light_emitter/tendril,
|
||||
/obj/effect/collapse,
|
||||
/obj/effect/particle_effect/ion_trails,
|
||||
/obj/effect/dummy/phased_mob,
|
||||
/obj/effect/immovablerod,
|
||||
/obj/effect/crystalline_reentry
|
||||
)) //Gotta make sure certain things can phase through it otherwise the railings also block them.
|
||||
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSGLASS) || is_type_in_typecache(mover, freepass))
|
||||
return TRUE
|
||||
if(get_dir(loc, target) == dir)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/CheckExit(atom/movable/O, turf/target)
|
||||
if(istype(O) && (O.pass_flags & PASSGLASS) || is_type_in_typecache(O, freepass))
|
||||
return TRUE
|
||||
if(get_dir(O.loc, target) == dir)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/Initialize(mapload)
|
||||
. = ..()
|
||||
if(src.anchored)
|
||||
update_icon(0)
|
||||
|
||||
/obj/structure/railing/proc/NeighborsCheck(var/UpdateNeighbors = 1)
|
||||
check = 0
|
||||
//if (!anchored) return
|
||||
var/Rturn = turn(src.dir, -90)
|
||||
var/Lturn = turn(src.dir, 90)
|
||||
|
||||
for(var/obj/structure/railing/R in src.loc)
|
||||
if ((R.dir == Lturn) && R.anchored)
|
||||
check |= 32
|
||||
if (UpdateNeighbors)
|
||||
R.update_icon(0)
|
||||
if ((R.dir == Rturn) && R.anchored)
|
||||
check |= 2
|
||||
if (UpdateNeighbors)
|
||||
R.update_icon(0)
|
||||
|
||||
for (var/obj/structure/railing/R in get_step(src, Lturn))
|
||||
if ((R.dir == src.dir) && R.anchored)
|
||||
check |= 16
|
||||
if (UpdateNeighbors)
|
||||
R.update_icon(0)
|
||||
for (var/obj/structure/railing/R in get_step(src, Rturn))
|
||||
if ((R.dir == src.dir) && R.anchored)
|
||||
check |= 1
|
||||
if (UpdateNeighbors)
|
||||
R.update_icon(0)
|
||||
|
||||
for (var/obj/structure/railing/R in get_step(src, (Lturn + src.dir)))
|
||||
if ((R.dir == Rturn) && R.anchored)
|
||||
check |= 64
|
||||
if (UpdateNeighbors)
|
||||
R.update_icon(0)
|
||||
for (var/obj/structure/railing/R in get_step(src, (Rturn + src.dir)))
|
||||
if ((R.dir == Lturn) && R.anchored)
|
||||
check |= 4
|
||||
if (UpdateNeighbors)
|
||||
R.update_icon(0)
|
||||
|
||||
/obj/structure/railing/update_icon(var/UpdateNeighgors = 1)
|
||||
NeighborsCheck(UpdateNeighgors)
|
||||
overlays.Cut()
|
||||
if (!check || !anchored)//|| !anchored
|
||||
icon_state = "[icon_modifier]railing0"
|
||||
else
|
||||
icon_state = "[icon_modifier]railing1"
|
||||
if (check & 32)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]corneroverlay")
|
||||
if ((check & 16) || !(check & 32) || (check & 64))
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]frontoverlay_l")
|
||||
if (!(check & 2) || (check & 1) || (check & 4))
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]frontoverlay_r")
|
||||
if(check & 4)
|
||||
switch (src.dir)
|
||||
if (NORTH)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = 32)
|
||||
if (SOUTH)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_x = -32)
|
||||
if (EAST)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = -32)
|
||||
if (WEST)
|
||||
overlays += image ('hyperstation/icons/obj/railings.dmi', src, "[icon_modifier]mcorneroverlay", pixel_y = 32)
|
||||
|
||||
/obj/structure/railing/examine(mob/user)
|
||||
. = ..()
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
. += "<span class='warning'>It looks severely damaged!</span>"
|
||||
if(0.25 to 0.5)
|
||||
. += "<span class='warning'>It looks damaged!</span>"
|
||||
if(0.5 to 1.0)
|
||||
. += "<span class='notice'>It has a few scrapes and dents.</span>"
|
||||
|
||||
/obj/structure/railing/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
visible_message("<span class='warning'>\The [src] breaks down!</span>")
|
||||
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
|
||||
new /obj/item/stack/rods(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/railing/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(!isliving(user))
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
|
||||
if(!do_after(user, 20))
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
|
||||
@@ -0,0 +1,11 @@
|
||||
/obj/structure/chair/bench
|
||||
name = "wooden bench"
|
||||
icon_state = "bench_middle"
|
||||
icon = 'hyperstation/icons/obj/bench.dmi'
|
||||
buildstackamount = 1
|
||||
buildstacktype = /obj/item/stack/sheet/mineral/wood
|
||||
|
||||
/obj/structure/chair/bench/left
|
||||
icon_state = "bench_left"
|
||||
/obj/structure/chair/bench/right
|
||||
icon_state = "bench_right"
|
||||
@@ -0,0 +1,144 @@
|
||||
//Duo malfunctioning cryostasis sleepers: Spawns in big makeshift shelters in lavaland.
|
||||
/obj/effect/mob_spawn/human/duohermit
|
||||
name = "malfunctioning cryostasis sleeper"
|
||||
desc = "A humming sleeper with a silhouetted occupant inside. Its stasis function is broken and it's likely being used as a bed."
|
||||
mob_name = "a stranded hermit"
|
||||
job_description = "Lavaland Hermit"
|
||||
icon = 'icons/obj/lavaland/spawners.dmi'
|
||||
icon_state = "cryostasis_sleeper"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
short_desc = "You are lost."
|
||||
flavour_text = "You and another have been stranded in this planet for quite some time now. Each day you barely scrape by, and between the terrible \
|
||||
conditions of your makeshift shelter, the hostile creatures, and the ash drakes swooping down from the cloudless skies, all you can wish for is the feel of soft grass between your toes and \
|
||||
the fresh air of Earth. These thoughts are dispelled by yet another recollection of how you and your friend got here... "
|
||||
assignedrole = "Hermit"
|
||||
mirrorcanloadappearance = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/duohermit/Initialize(mapload)
|
||||
. = ..()
|
||||
var/arrpee = rand(1,3)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
flavour_text += "you were an intern at a rather odd deep space facility. You weren't quite sure how things worked or what they were doing there, but it was your first day on the \
|
||||
job. A day that was abruptly interrupted by gunfire and alarms. Luckily enough, your handy crowbar skills managed to get you to an escape pod before it was too late.</b>"
|
||||
outfit.uniform = /obj/item/clothing/under/assistantformal
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
if(2)
|
||||
flavour_text += "you were a volunteer test subject for a state of the art deep space facility. You didn't care much about who you were working with, but in the end, the paycheck \
|
||||
was really, really good. To this day, you're not quite sure which sort of prototype implants were used on you, as you seem to remember little but the headache that struck you once \
|
||||
the escape pod finally hit the ground and your seatbelt failed to keep you buckled.</b>"
|
||||
outfit.uniform = /obj/item/clothing/under/rank/scientist
|
||||
outfit.suit = /obj/item/clothing/suit/toggle/labcoat
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
if(3)
|
||||
flavour_text += "you were a doctor at a state of the art deep space facility. For who exactly you were conducting research for, not even you are quite sure. Only that the paycheck \
|
||||
at the end of the month was good enough. In the end, when said facility was attacked by Nanotransen, you and another were the only ones to have made it out alive. Or so it seemed.</b>"
|
||||
outfit.uniform = /obj/item/clothing/under/rank/medical
|
||||
outfit.suit = /obj/item/clothing/suit/toggle/labcoat
|
||||
outfit.back = /obj/item/storage/backpack/medic
|
||||
outfit.shoes = /obj/item/clothing/shoes/sneakers/black
|
||||
|
||||
/obj/effect/mob_spawn/human/duohermit/Destroy()
|
||||
new/obj/structure/fluff/empty_cryostasis_sleeper(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/duohermit/special(mob/living/carbon/human/new_spawn)
|
||||
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT)
|
||||
|
||||
//Exiles: Stranded exiles that have been left in Snowdin. Can be easily adapted for other roles as well.
|
||||
/obj/effect/mob_spawn/human/exiled
|
||||
name = "used bed"
|
||||
desc = "Still warm."
|
||||
mob_name = "exiled"
|
||||
job_description = "Exiles"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "bed"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
short_desc = "You've been left behind."
|
||||
flavour_text = "As the last escape shuttle left the sector, you were left for dead, stranded in a cold hell where you make do, until hopefully someone finds you. \
|
||||
Every day, you pause and recollect your memories from before it all happened... "
|
||||
assignedrole = "Arctic Exile"
|
||||
mirrorcanloadappearance = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/exiled/Initialize(mapload)
|
||||
. = ..()
|
||||
var/arrpee = rand(1,1)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
flavour_text += "You were a lowly engineer, hired by GATO to make sure the turbines from their mining operation remained functional. \
|
||||
You remember the day the mining team descended for the very last time into the depths of the shafts, only to never return. \
|
||||
The agonizing screams from whatever now haunts those mines still brings a shiver down your spine."
|
||||
outfit.uniform = /obj/item/clothing/under/assistantformal
|
||||
outfit.suit = /obj/item/clothing/suit/hooded/wintercoat
|
||||
outfit.shoes = /obj/item/clothing/shoes/winterboots
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
|
||||
/obj/effect/mob_spawn/human/exiled/Destroy()
|
||||
new/obj/structure/bed(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/exiled/special(mob/living/carbon/human/new_spawn)
|
||||
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT)
|
||||
|
||||
//Villagers: Once a group of servants that worshiped their 'Gods-Kings', but now finally free after their overlords have abandoned the planet.
|
||||
|
||||
/obj/effect/mob_spawn/human/villager
|
||||
name = "used bed"
|
||||
desc = "Still warm."
|
||||
mob_name = "villager"
|
||||
job_description = "Villagers"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "bed"
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
mob_species = /datum/species/human
|
||||
short_desc = "You're finally free."
|
||||
flavour_text = "After the God-Kings have abandoned the land, your people are finally free from their oppression. \
|
||||
Still, the reasons for their departure are a mystery, and now your people need to work together to survive in this world."
|
||||
assignedrole = "Free villager"
|
||||
mirrorcanloadappearance = TRUE
|
||||
|
||||
/obj/effect/mob_spawn/human/villager/Initialize(mapload)
|
||||
. = ..()
|
||||
var/arrpee = rand(1,3)
|
||||
switch(arrpee)
|
||||
if(1)
|
||||
flavour_text += "You were a guard, serving your gods to keep control of you own people. \
|
||||
Now that they left, you work to defend the village."
|
||||
outfit.head = /obj/item/clothing/head/pharaoh
|
||||
outfit.uniform = /obj/item/clothing/under/tunic
|
||||
outfit.shoes = /obj/item/clothing/shoes/sandal
|
||||
outfit.back = /obj/item/storage/backpack/satchel/leather
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
if(2)
|
||||
flavour_text += "You were a farmer, working extensively for years in the field to feed your people. \
|
||||
The work hasn't changed much since the departure of the gods..."
|
||||
outfit.head = /obj/item/clothing/head/rice_hat
|
||||
outfit.uniform = /obj/item/clothing/under/tunic
|
||||
outfit.shoes = /obj/item/clothing/shoes/sandal
|
||||
outfit.back = /obj/item/storage/backpack/satchel/leather
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
if(3)
|
||||
flavour_text += "You were a servant, doing any necessary work that was thrown at you. \
|
||||
At least it gave you experience in a bit of everything, which can be useful in these new times."
|
||||
outfit.uniform = /obj/item/clothing/under/mummy
|
||||
outfit.uniform = /obj/item/clothing/under/tunic
|
||||
outfit.shoes = /obj/item/clothing/shoes/sandal
|
||||
outfit.back = /obj/item/storage/backpack/satchel/leather
|
||||
outfit.implants = list(/obj/item/implant/exile) //Made it so they cannot simply exit through the gateway at will.
|
||||
|
||||
/obj/effect/mob_spawn/human/villager/Destroy()
|
||||
new/obj/structure/bed(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/villager/special(mob/living/carbon/human/new_spawn)
|
||||
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT)
|
||||
@@ -0,0 +1,120 @@
|
||||
#define SAUNA_H2O_TEMP T20C + 20
|
||||
#define SAUNA_LOG_FUEL 150
|
||||
#define SAUNA_PAPER_FUEL 5
|
||||
#define SAUNA_MAXIMUM_FUEL 3000
|
||||
#define SAUNA_WATER_PER_WATER_UNIT 5
|
||||
|
||||
/obj/structure/sauna_oven
|
||||
name = "sauna oven"
|
||||
desc = "A modest sauna oven with rocks. Add some fuel, pour some water and enjoy the moment."
|
||||
icon = 'hyperstation/icons/obj/structures/sauna_oven.dmi'
|
||||
icon_state = "sauna_oven"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/lit = FALSE
|
||||
var/fuel_amount = 0
|
||||
var/water_amount = 0
|
||||
|
||||
/obj/structure/sauna_oven/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>The rocks are [water_amount ? "moist" : "dry"].</span>"
|
||||
. += "<span class='notice'>There's [fuel_amount ? "some fuel" : "no fuel"] in the oven.</span>"
|
||||
|
||||
/obj/structure/sauna_oven/Destroy()
|
||||
if(lit)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/sauna_oven/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(lit)
|
||||
lit = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
user.visible_message("<span class='notice'>[user] turns on [src].</span>", "<span class='notice'>You turn on [src].</span>")
|
||||
else if (fuel_amount)
|
||||
lit = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
user.visible_message("<span class='notice'>[user] turns off [src].</span>", "<span class='notice'>You turn off [src].</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sauna_oven/update_overlays()
|
||||
. = ..()
|
||||
if(lit)
|
||||
. += "sauna_oven_on_overlay"
|
||||
|
||||
/obj/structure/sauna_oven/update_icon()
|
||||
..()
|
||||
icon_state = "[lit ? "sauna_oven_on" : initial(icon_state)]"
|
||||
|
||||
/obj/structure/sauna_oven/attackby(obj/item/T, mob/user)
|
||||
if(T.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You begin to deconstruct [src].</span>")
|
||||
if(T.use_tool(src, user, 60, volume=50))
|
||||
to_chat(user, "<span class='notice'>You successfully deconstructed [src].</span>")
|
||||
new /obj/item/stack/sheet/mineral/wood(get_turf(src), 30)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
else if(istype(T, /obj/item/reagent_containers))
|
||||
var/obj/item/reagent_containers/reagent_container = T
|
||||
if(!reagent_container.is_open_container())
|
||||
return ..()
|
||||
if(reagent_container.reagents.has_reagent(/datum/reagent/water))
|
||||
reagent_container.reagents.remove_reagent(/datum/reagent/water, 5)
|
||||
user.visible_message("<span class='notice'>[user] pours some \
|
||||
water into [src].</span>", "<span class='notice'>You pour \
|
||||
some water to [src].</span>")
|
||||
water_amount += 5 * SAUNA_WATER_PER_WATER_UNIT
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's no water in [reagent_container]</span>")
|
||||
return FALSE
|
||||
|
||||
else if(istype(T, /obj/item/stack/sheet/mineral/wood))
|
||||
var/obj/item/stack/sheet/mineral/wood/wood = T
|
||||
if(fuel_amount > SAUNA_MAXIMUM_FUEL)
|
||||
to_chat(user, "<span class='warning'>You can't fit any more of [T] in [src]!</span>")
|
||||
return FALSE
|
||||
fuel_amount += SAUNA_LOG_FUEL * wood.amount
|
||||
wood.use(wood.amount)
|
||||
user.visible_message("<span class='notice'>[user] tosses some \
|
||||
wood into [src].</span>", "<span class='notice'>You add \
|
||||
some fuel to [src].</span>")
|
||||
return TRUE
|
||||
else if(istype(T, /obj/item/paper_bin))
|
||||
var/obj/item/paper_bin/paper_bin = T
|
||||
user.visible_message("<span class='notice'>[user] throws [T] into \
|
||||
[src].</span>", "<span class='notice'>You add [T] to [src].\
|
||||
</span>")
|
||||
fuel_amount += SAUNA_PAPER_FUEL * paper_bin.total_paper
|
||||
qdel(paper_bin)
|
||||
return TRUE
|
||||
else if(istype(T, /obj/item/paper))
|
||||
user.visible_message("<span class='notice'>[user] throws [T] into \
|
||||
[src].</span>", "<span class='notice'>You throw [T] into [src].\
|
||||
</span>")
|
||||
fuel_amount += SAUNA_PAPER_FUEL
|
||||
qdel(T)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/structure/sauna_oven/process()
|
||||
if(water_amount)
|
||||
water_amount--
|
||||
var/turf/pos = get_turf(src)
|
||||
if(pos)
|
||||
pos.atmos_spawn_air("water_vapor=10;TEMP=[SAUNA_H2O_TEMP]")
|
||||
fuel_amount--
|
||||
if(fuel_amount <= 0)
|
||||
lit = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
#undef SAUNA_H2O_TEMP
|
||||
#undef SAUNA_LOG_FUEL
|
||||
#undef SAUNA_PAPER_FUEL
|
||||
#undef SAUNA_MAXIMUM_FUEL
|
||||
#undef SAUNA_WATER_PER_WATER_UNIT
|
||||
Reference in New Issue
Block a user