mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-09 14:15:59 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync-2018-02-23
# Conflicts: # code/game/jobs/job_controller.dm # code/game/machinery/oxygen_pump.dm # code/game/objects/items/weapons/storage/firstaid.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/modules/mob/new_player/new_player.dm # code/modules/organs/internal/eyes.dm # html/changelogs/.all_changelog.yml # maps/southern_cross/southern_cross-1.dmm # vorestation.dme
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
var/next_fuel_consumption = 0 // world.time of when next item in fuel list gets eatten to sustain the fire.
|
||||
var/grill = FALSE
|
||||
var/material/material
|
||||
var/set_temperature = T0C + 30 //K
|
||||
var/heating_power = 80000
|
||||
|
||||
/obj/structure/bonfire/New(newloc, material_name)
|
||||
..(newloc)
|
||||
@@ -186,9 +188,9 @@
|
||||
if(burning)
|
||||
var/state
|
||||
switch(get_fuel_amount())
|
||||
if(0 to 4)
|
||||
if(0 to 4.5)
|
||||
state = "bonfire_warm"
|
||||
if(5 to 10)
|
||||
if(4.6 to 10)
|
||||
state = "bonfire_hot"
|
||||
var/image/I = image(icon, state)
|
||||
I.appearance_flags = RESET_COLOR
|
||||
@@ -223,6 +225,23 @@
|
||||
if(!grill)
|
||||
burn()
|
||||
|
||||
if(burning)
|
||||
var/W = get_fuel_amount()
|
||||
if(W >= 5)
|
||||
var/datum/gas_mixture/env = loc.return_air()
|
||||
if(env && abs(env.temperature - set_temperature) > 0.1)
|
||||
var/transfer_moles = 0.25 * env.total_moles
|
||||
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
||||
|
||||
if(removed)
|
||||
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
|
||||
if(heat_transfer > 0)
|
||||
heat_transfer = min(heat_transfer , heating_power)
|
||||
|
||||
removed.add_thermal_energy(heat_transfer)
|
||||
|
||||
env.merge(removed)
|
||||
|
||||
/obj/structure/bonfire/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
ignite()
|
||||
|
||||
@@ -235,4 +254,163 @@
|
||||
M.pixel_y += 13
|
||||
else // Just unbuckled someone
|
||||
M.pixel_y -= 13
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireplace //more like a space heater than a bonfire. A cozier alternative to both.
|
||||
name = "fireplace"
|
||||
desc = "The sound of the crackling hearth reminds you of home."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "fireplace"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
var/burning = FALSE
|
||||
var/next_fuel_consumption = 0
|
||||
var/set_temperature = T0C + 20 //K
|
||||
var/heating_power = 40000
|
||||
|
||||
/obj/structure/fireplace/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/material/wood) || istype(W, /obj/item/stack/material/log) )
|
||||
add_fuel(W, user)
|
||||
|
||||
else if(W.is_hot())
|
||||
ignite()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/fireplace/attack_hand(mob/user)
|
||||
if(get_fuel_amount())
|
||||
remove_fuel(user)
|
||||
|
||||
/obj/structure/fireplace/proc/get_fuel_amount()
|
||||
var/F = 0
|
||||
for(var/A in contents)
|
||||
if(istype(A, /obj/item/stack/material/wood))
|
||||
F += 0.5
|
||||
if(istype(A, /obj/item/stack/material/log))
|
||||
F += 1.0
|
||||
return F
|
||||
|
||||
/obj/structure/fireplace/proc/remove_fuel(mob/user)
|
||||
if(get_fuel_amount())
|
||||
var/atom/movable/AM = pop(contents)
|
||||
AM.forceMove(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>You take \the [AM] out of \the [src] before it has a chance to burn away.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/structure/fireplace/proc/add_fuel(atom/movable/new_fuel, mob/user)
|
||||
if(get_fuel_amount() >= 10)
|
||||
to_chat(user, "<span class='warning'>\The [src] already has enough fuel!</span>")
|
||||
return FALSE
|
||||
if(istype(new_fuel, /obj/item/stack/material/wood) || istype(new_fuel, /obj/item/stack/material/log) )
|
||||
var/obj/item/stack/F = new_fuel
|
||||
var/obj/item/stack/S = F.split(1)
|
||||
if(S)
|
||||
S.forceMove(src)
|
||||
to_chat(user, "<span class='warning'>You add \the [new_fuel] to \the [src].</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs raw wood to burn, \a [new_fuel] won't work.</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/structure/fireplace/proc/consume_fuel(var/obj/item/stack/consumed_fuel)
|
||||
if(!istype(consumed_fuel))
|
||||
qdel(consumed_fuel) // Don't know, don't care.
|
||||
return FALSE
|
||||
|
||||
if(istype(consumed_fuel, /obj/item/stack/material/log))
|
||||
next_fuel_consumption = world.time + 2 MINUTES
|
||||
qdel(consumed_fuel)
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
else if(istype(consumed_fuel, /obj/item/stack/material/wood)) // One log makes two planks of wood.
|
||||
next_fuel_consumption = world.time + 1 MINUTE
|
||||
qdel(consumed_fuel)
|
||||
update_icon()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/fireplace/proc/check_oxygen()
|
||||
var/datum/gas_mixture/G = loc.return_air()
|
||||
if(G.gas["oxygen"] < 1)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/fireplace/proc/extinguish()
|
||||
if(burning)
|
||||
burning = FALSE
|
||||
update_icon()
|
||||
processing_objects -= src
|
||||
visible_message("<span class='notice'>\The [src] stops burning.</span>")
|
||||
|
||||
/obj/structure/fireplace/proc/ignite()
|
||||
if(!burning && get_fuel_amount())
|
||||
burning = TRUE
|
||||
update_icon()
|
||||
processing_objects += src
|
||||
visible_message("<span class='warning'>\The [src] starts burning!</span>")
|
||||
|
||||
/obj/structure/fireplace/proc/burn()
|
||||
var/turf/current_location = get_turf(src)
|
||||
current_location.hotspot_expose(1000, 500)
|
||||
for(var/A in current_location)
|
||||
if(A == src)
|
||||
continue
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
O.fire_act(null, 1000, 500)
|
||||
|
||||
/obj/structure/fireplace/update_icon()
|
||||
overlays.Cut()
|
||||
if(burning)
|
||||
var/state
|
||||
switch(get_fuel_amount())
|
||||
if(0 to 3.5)
|
||||
state = "fireplace_warm"
|
||||
if(3.6 to 6.5)
|
||||
state = "fireplace_hot"
|
||||
if(6.6 to 10)
|
||||
state = "fireplace_intense" //don't need to throw a corpse inside to make it burn hotter.
|
||||
var/image/I = image(icon, state)
|
||||
I.appearance_flags = RESET_COLOR
|
||||
overlays += I
|
||||
|
||||
var/light_strength = max(get_fuel_amount() / 2, 2)
|
||||
set_light(light_strength, light_strength, "#FF9933")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/fireplace/process()
|
||||
if(!check_oxygen())
|
||||
extinguish()
|
||||
return
|
||||
if(world.time >= next_fuel_consumption)
|
||||
if(!consume_fuel(pop(contents)))
|
||||
extinguish()
|
||||
return
|
||||
|
||||
if(burning)
|
||||
var/W = get_fuel_amount()
|
||||
if(W >= 5)
|
||||
var/datum/gas_mixture/env = loc.return_air()
|
||||
if(env && abs(env.temperature - set_temperature) > 0.1)
|
||||
var/transfer_moles = 0.25 * env.total_moles
|
||||
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
||||
|
||||
if(removed)
|
||||
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
|
||||
if(heat_transfer > 0)
|
||||
heat_transfer = min(heat_transfer , heating_power)
|
||||
|
||||
removed.add_thermal_energy(heat_transfer)
|
||||
|
||||
env.merge(removed)
|
||||
|
||||
/obj/structure/fireplace/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
ignite()
|
||||
|
||||
/obj/structure/fireplace/water_act(amount)
|
||||
if(prob(amount * 10))
|
||||
extinguish()
|
||||
@@ -85,7 +85,7 @@
|
||||
new /obj/item/weapon/storage/backpack/industrial(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel/eng(src)
|
||||
new /obj/item/device/radio/headset/headset_cargo(src)
|
||||
new /obj/item/device/radio/headset/headset_mine(src)
|
||||
new /obj/item/clothing/under/rank/miner(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/shoes/black(src)
|
||||
|
||||
@@ -103,12 +103,13 @@
|
||||
if(prob(50))
|
||||
new /obj/item/weapon/storage/backpack/dufflebag/sec(src)
|
||||
new /obj/item/clothing/head/helmet/HoS(src)
|
||||
new /obj/item/clothing/head/helmet/HoS/hat(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hos(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hoscoat/jensen(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hoscoat(src)
|
||||
new /obj/item/clothing/head/helmet/HoS/dermal(src)
|
||||
new /obj/item/clothing/head/helmet/dermal(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos/alt(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
@@ -182,7 +183,9 @@
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/suit/storage/vest/wardencoat(src)
|
||||
new /obj/item/clothing/suit/storage/vest/wardencoat/alt(src)
|
||||
new /obj/item/clothing/head/helmet/dermal(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden/hat(src)
|
||||
new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/device/radio/headset/headset_sec/alt(src)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hoscoat/jensen(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hoscoat(src)
|
||||
new /obj/item/clothing/head/helmet/HoS/dermal(src)
|
||||
new /obj/item/clothing/head/helmet/dermal(src)
|
||||
new /obj/item/weapon/cartridge/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos/alt(src)
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
return ..()
|
||||
|
||||
if(is_stump)
|
||||
if(istype(W,/obj/item/weapon/shovel))
|
||||
if(do_after(user, 5 SECONDS))
|
||||
visible_message("<span class='notice'>\The [user] digs up \the [src] stump with \the [W].</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W]!</span>")
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/icon_state_opened = null // Icon to switch to when 'used'.
|
||||
var/used = FALSE
|
||||
var/busy = FALSE // Don't spam ghosts by spamclicking.
|
||||
var/needscharger //For drone pods that want their pod to turn into a charger.
|
||||
|
||||
// Call this to get a ghost volunteer.
|
||||
/obj/structure/ghost_pod/proc/trigger()
|
||||
@@ -22,8 +23,10 @@
|
||||
if(winner.len)
|
||||
var/mob/observer/dead/D = winner[1]
|
||||
create_occupant(D)
|
||||
new /obj/machinery/recharge_station/ghost_pod_recharger(src.loc)
|
||||
del(src)
|
||||
icon_state = icon_state_opened
|
||||
if(needscharger)
|
||||
new /obj/machinery/recharge_station/ghost_pod_recharger(src.loc)
|
||||
del(src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
density = TRUE
|
||||
ghost_query_type = /datum/ghost_query/lost_drone
|
||||
confirm_before_open = TRUE
|
||||
needscharger = TRUE
|
||||
|
||||
/obj/structure/ghost_pod/manual/lost_drone/trigger()
|
||||
..()
|
||||
@@ -45,6 +46,7 @@
|
||||
icon_state_opened = "borg_pod_opened"
|
||||
density = TRUE
|
||||
ghost_query_type = /datum/ghost_query/gravekeeper_drone
|
||||
needscharger = TRUE
|
||||
|
||||
/obj/structure/ghost_pod/automatic/gravekeeper_drone/create_occupant(var/mob/M)
|
||||
density = FALSE
|
||||
@@ -58,4 +60,30 @@
|
||||
R.ckey = M.ckey
|
||||
visible_message("<span class='warning'>As \the [src] opens, the eyes of the robot flicker as it is activated.</span>")
|
||||
R.Namepick()
|
||||
..()
|
||||
|
||||
/obj/structure/ghost_pod/manual/corgi
|
||||
name = "glowing rune"
|
||||
desc = "This rune slowly lights up and goes dim in a repeating pattern, like a slow heartbeat. It's almost as if it's calling out to you to touch it..."
|
||||
description_info = "This will summon some manner of creature through quite dubious means. The creature will be controlled by a player."
|
||||
icon_state = "corgirune"
|
||||
icon_state_opened = "corgirune-inert"
|
||||
density = TRUE
|
||||
ghost_query_type = /datum/ghost_query/corgi_rune
|
||||
confirm_before_open = TRUE
|
||||
|
||||
/obj/structure/ghost_pod/manual/corgi/trigger()
|
||||
..()
|
||||
visible_message("<span class='warning'>\The [usr] places their hand on the rune!</span>")
|
||||
log_and_message_admins("is attempting to summon a corgi.")
|
||||
|
||||
/obj/structure/ghost_pod/manual/corgi/create_occupant(var/mob/M)
|
||||
density = FALSE
|
||||
var/mob/living/simple_animal/corgi/R = new(get_turf(src))
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(R)
|
||||
to_chat(M, "<span class='notice'>You are a <b>Corgi</b>! Woof!</span>")
|
||||
R.ckey = M.ckey
|
||||
visible_message("<span class='warning'>With a bright flash of light, \the [src] disappears, and in its place stands a small corgi.</span>")
|
||||
log_and_message_admins("successfully touched \a [src] and summoned a corgi.")
|
||||
..()
|
||||
@@ -294,6 +294,21 @@
|
||||
if(is_fulltile())
|
||||
mats.amount = 4
|
||||
qdel(src)
|
||||
else if(iscoil(W) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.use(1))
|
||||
playsound(src.loc, 'sound/effects/sparks1.ogg', 75, 1)
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] begins to wire \the [src] for electrochromic tinting.</span>", \
|
||||
"<span class='notice'>You begin to wire \the [src] for electrochromic tinting.</span>", \
|
||||
"You hear sparks.")
|
||||
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
|
||||
P.health = health
|
||||
P.state = state
|
||||
P.anchored = anchored
|
||||
qdel(src)
|
||||
else if(istype(W,/obj/item/frame) && anchored)
|
||||
var/obj/item/frame/F = W
|
||||
F.try_build(src)
|
||||
@@ -551,6 +566,28 @@
|
||||
desc = "Adjusts its tint with voltage. Might take a few good hits to shatter it."
|
||||
var/id
|
||||
|
||||
/obj/structure/window/reinforced/polarized/full
|
||||
dir = SOUTHWEST
|
||||
icon_state = "fwindow"
|
||||
maxhealth = 80
|
||||
|
||||
/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(ismultitool(W) && !anchored) // Only allow programming if unanchored!
|
||||
var/obj/item/device/multitool/MT = W
|
||||
// First check if they have a windowtint button buffered
|
||||
if(istype(MT.connectable, /obj/machinery/button/windowtint))
|
||||
var/obj/machinery/button/windowtint/buffered_button = MT.connectable
|
||||
src.id = buffered_button.id
|
||||
to_chat(user, "<span class='notice'>\The [src] is linked to \the [buffered_button].</span>")
|
||||
return TRUE
|
||||
// Otherwise fall back to asking them
|
||||
var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN)
|
||||
if (!t && user.get_active_hand() != W && in_range(src, user))
|
||||
src.id = t
|
||||
to_chat(user, "<span class='notice'>The new ID of \the [src] is [id]</span>")
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/structure/window/reinforced/polarized/proc/toggle()
|
||||
if(opacity)
|
||||
animate(src, color="#FFFFFF", time=5)
|
||||
@@ -593,3 +630,20 @@
|
||||
|
||||
/obj/machinery/button/windowtint/update_icon()
|
||||
icon_state = "light[active]"
|
||||
|
||||
/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(ismultitool(W))
|
||||
var/obj/item/device/multitool/MT = W
|
||||
if(!id)
|
||||
// If no ID is set yet (newly built button?) let them select an ID for first-time use!
|
||||
var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN)
|
||||
if (t && user.get_active_hand() != W && in_range(src, user))
|
||||
src.id = t
|
||||
to_chat(user, "<span class='notice'>The new ID of \the [src] is [id]</span>")
|
||||
if(id)
|
||||
// It already has an ID (or they just set one), buffer it for copying to windows.
|
||||
to_chat(user, "<span class='notice'>You store \the [src] in \the [MT]'s buffer!</span>")
|
||||
MT.connectable = src
|
||||
MT.update_icon()
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user