Merge remote-tracking branch 'upstream/master' into ContextBasedGrab

This commit is contained in:
Tigercat2000
2015-05-01 18:18:08 -07:00
177 changed files with 4178 additions and 5875 deletions
+3
View File
@@ -252,6 +252,9 @@ its easier to just keep the beam vertical.
/atom/proc/blob_act()
return
/atom/proc/fire_act()
return
/atom/proc/emag_act()
return
+3 -1
View File
@@ -534,9 +534,11 @@
"their hair","what to do next","their job","space","amusing things","sad things",
"annoying things","happy things","something incoherent","something they did wrong")
var/thoughts = "thinking about [pick(randomthoughts)]"
if (M.fire_stacks)
if(M.fire_stacks)
pain_condition -= 50
thoughts = "preoccupied with the fire"
if (M.radiation)
pain_condition -= 25
+1
View File
@@ -42,6 +42,7 @@ var/global/datum/controller/gameticker/ticker
/datum/controller/gameticker/proc/pregame()
login_music = pick(\
'sound/music/THUNDERDOME.ogg',\
'sound/music/space.ogg',\
'sound/music/Title1.ogg',\
'sound/music/Title2.ogg',)
+1 -1
View File
@@ -293,7 +293,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
H.vessel.remove_reagent("blood",25)
if(ishuman(src))
var/mob/living/carbon/human/V = src
V.nutrition += blood
V.nutrition = min(450,V.nutrition+(blood/2))
src.mind.vampire.draining = null
src << "\blue You stop draining [H.name] of blood."
+10 -10
View File
@@ -33,7 +33,7 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/atmospherics/unary/cold_sink/freezer/RefreshParts()
var/H
var/T
@@ -58,7 +58,7 @@
if (istype(I, /obj/item/weapon/wrench))
if(!panel_open)
user << "<span class='notice'>Open the maintenance panel first.</span>"
return
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
dir = pick(WEST,EAST,SOUTH,NORTH)
var/node_connect = dir
@@ -88,7 +88,7 @@
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob)
if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
return
return
src.ui_interact(user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
@@ -98,13 +98,13 @@
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["gasTemperatureCelsius"] = round(air_contents.temperature - T0C,1)
if(air_contents.total_moles == 0 && air_contents.temperature == 0)
if(air_contents.total_moles() == 0 && air_contents.temperature == 0)
data["gasTemperatureCelsius"] = 0
data["minGasTemperature"] = round(min_temperature)
data["maxGasTemperature"] = round(T20C)
data["targetGasTemperature"] = round(current_temperature)
data["targetGasTemperatureCelsius"] = round(current_temperature - T0C,1)
var/temp_class = "good"
if (air_contents.temperature > (T0C - 20))
temp_class = "bad"
@@ -175,7 +175,7 @@
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/cable_coil(src, 1)
RefreshParts()
/obj/machinery/atmospherics/unary/heat_reservoir/heater/upgraded/New()
..()
var/obj/item/weapon/circuitboard/thermomachine/H = new /obj/item/weapon/circuitboard/thermomachine(null)
@@ -215,7 +215,7 @@
if (istype(I, /obj/item/weapon/wrench))
if(!panel_open)
user << "<span class='notice'>Open the maintenance panel first.</span>"
return
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
dir = pick(WEST,EAST,SOUTH,NORTH)
var/node_connect = dir
@@ -245,7 +245,7 @@
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_hand(mob/user as mob)
if(panel_open)
user << "<span class='notice'>Close the maintenance panel first.</span>"
return
return
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
@@ -255,13 +255,13 @@
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["gasTemperatureCelsius"] = round(air_contents.temperature - T0C,1)
if(air_contents.total_moles == 0 && air_contents.temperature == 0)
if(air_contents.total_moles() == 0 && air_contents.temperature == 0)
data["gasTemperatureCelsius"] = 0
data["minGasTemperature"] = round(T20C)
data["maxGasTemperature"] = round(T20C+max_temperature)
data["targetGasTemperature"] = round(current_temperature)
data["targetGasTemperatureCelsius"] = round(current_temperature - T0C,1)
var/temp_class = "normal"
if (air_contents.temperature > (T20C+40))
temp_class = "bad"
+18 -9
View File
@@ -202,7 +202,7 @@
if(target_temperature < T0C + MIN_TEMPERATURE)
target_temperature = T0C + MIN_TEMPERATURE
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles)
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles())
var/heat_capacity = gas.heat_capacity()
var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
@@ -1099,7 +1099,7 @@ FIRE ALARM
else
icon_state = "fire0"
/obj/machinery/firealarm/fire_act(datum/gas_mixture/air, temperature, volume)
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
if(src.detecting)
if(temperature > T0C+200)
src.alarm() // added check of detector status here
@@ -1130,17 +1130,26 @@ FIRE ALARM
if(wiresexposed)
switch(buildstage)
if(2)
if (istype(W, /obj/item/device/multitool))
if(istype(W, /obj/item/device/multitool))
src.detecting = !( src.detecting )
if (src.detecting)
user.visible_message("\red [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
else
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
else if(istype(W, /obj/item/weapon/wirecutters)) // cutting the wires out
user << "<span class='warning'>You cut the wires!</span>"
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil()
new_coil.amount = 5
new_coil.loc = user.loc
buildstage = 1
update_icon()
if(1)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/coil = W
if(coil.amount < 5)
user << "You need more cable for this!"
user << "<span class='warning'>You cut the wires!</span>"
return
coil.amount -= 5
@@ -1148,11 +1157,11 @@ FIRE ALARM
del(coil)
buildstage = 2
user << "You wire \the [src]!"
user << "<span class='notice'>You wire \the [src]!</span>"
update_icon()
else if(istype(W, /obj/item/weapon/crowbar))
user << "You pry out the circuit!"
user << "<span class='warning'>You pry out the circuit!</span>"
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
spawn(20)
var/obj/item/weapon/firealarm_electronics/circuit = new /obj/item/weapon/firealarm_electronics()
@@ -1161,13 +1170,13 @@ FIRE ALARM
update_icon()
if(0)
if(istype(W, /obj/item/weapon/firealarm_electronics))
user << "You insert the circuit!"
user << "<span class='notice'>You insert the circuit!</span>"
del(W)
buildstage = 1
update_icon()
else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!"
user << "<span class='warning'>You remove the fire alarm assembly from the wall!</span>"
new /obj/item/mounted/frame/firealarm(get_turf(user))
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
del(src)
@@ -1191,7 +1200,7 @@ FIRE ALARM
src.updateDialog()
last_process = world.timeofday
if(locate(/obj/fire) in loc)
if(locate(/obj/effect/hotspot) in loc)
alarm()
return
+33 -37
View File
@@ -34,7 +34,7 @@
list("name" = "\[Air\]", "icon" = "grey-c-2"),
list("name" = "\[CAUTION\]", "icon" = "yellow-c-2")
)
possibledecals = list( //var that stores all possible decals, used by ui
list("name" = "Low temperature canister", "icon" = "cold"),
list("name" = "High temperature canister", "icon" = "hot"),
@@ -50,24 +50,24 @@ var/datum/canister_icons/canister_icon_container = new()
density = 1
var/health = 100.0
flags = CONDUCT
var/menu = 0
//used by nanoui: 0 = main menu, 1 = relabel
var/valve_open = 0
var/release_pressure = ONE_ATMOSPHERE
var/list/_color //variable that stores colours
var/list/decals //list that stores the decals
//lists for check_change()
var/list/oldcolor
var/list/olddecals
//passed to the ui to render the color lists
var/list/colorcontainer
var/list/possibledecals
var/can_label = 1
var/filled = 0.5
pressure_resistance = 7*ONE_ATMOSPHERE
@@ -77,7 +77,7 @@ var/datum/canister_icons/canister_icon_container = new()
var/release_log = ""
var/busy = 0
var/update_flag = 0
New()
..()
_color = list(
@@ -90,7 +90,7 @@ var/datum/canister_icons/canister_icon_container = new()
colorcontainer = new /list(4)
possibledecals = new /list(3)
update_icon()
/obj/machinery/portable_atmospherics/canister/proc/init_data_vars()
//passed to the ui to render the color lists
colorcontainer = list(
@@ -111,7 +111,7 @@ var/datum/canister_icons/canister_icon_container = new()
"name" = "Quaternary color",
)
)
//var/anycolor used by the nanoUI, 0: no color applied. 1: color applied
for(var/C in colorcontainer)
if(C == "prim") continue
@@ -121,9 +121,9 @@ var/datum/canister_icons/canister_icon_container = new()
else
L.Add(list("anycolor" = 1))
colorcontainer[C] = L
possibledecals = new /list(3)
var/i
var/list/L = canister_icon_container.possibledecals
for(i=1;i<=L.len;i++)
@@ -153,11 +153,11 @@ var/datum/canister_icons/canister_icon_container = new()
if(list2params(oldcolor) != list2params(_color))
update_flag |= 64
oldcolor = _color.Copy()
if(list2params(olddecals) != list2params(decals))
update_flag |= 128
olddecals = decals.Copy()
if(update_flag == old_flag)
return 1
else
@@ -188,12 +188,12 @@ update_flag
return
overlays.Cut()
for(var/C in _color)
if(C == "prim") continue
if(_color[C] == "none") continue
overlays.Add(_color[C])
for(var/D in decals)
if(decals[D])
overlays.Add("decal-" + D)
@@ -210,12 +210,12 @@ update_flag
overlays += "can-o2"
else if(update_flag & 32)
overlays += "can-o3"
update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go.
return
//template modification exploit prevention, used in Topic()
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
if (checkColor == "prim" || checkColor == "all")
for(var/list/L in canister_icon_container.possiblemaincolor)
if (L["icon"] == inputVar)
@@ -240,7 +240,7 @@ update_flag
return 1
return 0
/obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > temperature_resistance)
health -= 5
healthcheck()
@@ -294,15 +294,16 @@ update_flag
environment.merge(removed)
else
loc.assume_air(removed)
air_update_turf()
src.update_icon()
if(air_contents.return_pressure() < 1)
can_label = 1
else
can_label = 0
if(air_contents.temperature > PLASMA_FLASHPOINT)
air_contents.zburn()
src.updateDialog()
return
/obj/machinery/portable_atmospherics/canister/return_air()
@@ -389,7 +390,7 @@ update_flag
return
init_data_vars() //set up var/colorcontainer and var/possibledecals
// this is the data which will be sent to the ui
var/data[0]
data["name"] = name
@@ -421,7 +422,7 @@ update_flag
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
//Disregard these, avoid cluttering up the VV window
colorcontainer = new /list(4)
possibledecals = new /list(3)
@@ -436,7 +437,7 @@ update_flag
usr << browse(null, "window=canister")
onclose(usr, "canister")
return
if (href_list["choice"] == "menu")
menu = text2num(href_list["mode_target"])
@@ -467,7 +468,7 @@ update_flag
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
else
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
if (href_list["rename"])
if (can_label)
var/T = sanitize(copytext(input("Choose canister label", "Name", name) as text|null,1,MAX_NAME_LEN))
@@ -497,11 +498,11 @@ update_flag
_color["quart"] = "none"
else if (is_a_color(href_list["icon"],"quart"))
_color["quart"] = href_list["icon"]
if (href_list["choice"] == "decals")
if (is_a_decal(href_list["icon"]))
decals[href_list["icon"]] = (decals[href_list["icon"]] == 0)
src.add_fingerprint(usr)
update_icon()
@@ -540,11 +541,10 @@ update_flag
/obj/machinery/portable_atmospherics/canister/toxins/New()
..()
_color["prim"] = "orange"
decals["plasma"] = 1
src.air_contents.toxins = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
return 1
@@ -554,18 +554,17 @@ update_flag
_color["prim"] = "blue"
src.air_contents.oxygen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
..()
_color["prim"] = "redws"
var/datum/gas/sleeping_agent/trace_gas = new
air_contents.trace_gases += trace_gas
trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
return 1
@@ -591,17 +590,15 @@ update_flag
_color["prim"] = "red"
src.air_contents.nitrogen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
..()
_color["prim"] = "black"
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
return 1
@@ -609,11 +606,10 @@ update_flag
/obj/machinery/portable_atmospherics/canister/air/New()
..()
_color["prim"] = "grey"
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.update_values()
src.update_icon()
return 1
+2
View File
@@ -66,6 +66,7 @@
environment.merge(removed)
else
loc.assume_air(removed)
air_update_turf()
else
var/pressure_delta = target_pressure - air_contents.return_pressure()
//Can not have a pressure delta that would cause environment pressure > tank pressure
@@ -80,6 +81,7 @@
removed = environment.remove(transfer_moles)
else
removed = loc.remove_air(transfer_moles)
air_update_turf()
air_contents.merge(removed)
//src.update_icon()
+2 -4
View File
@@ -20,10 +20,8 @@
if (istype(zvent_conn))
//both floors have simulated turfs, share()
var/turf/simulated/myturf = loc
var/datum/gas_mixture/conn_air = zturf_conn.zone.air //TODO: pop culture reference
var/datum/gas_mixture/conn_air = zturf_conn.air //TODO: pop culture reference
var/datum/gas_mixture/my_air = myturf.air
if (istype(conn_air) && istype(my_air))
// if (!my_air.compare(conn_air))
// myturf.reset_delay()
// zturf_conn.reset_delay()
my_air.share(conn_air)
air_update_turf()
+1 -1
View File
@@ -400,7 +400,7 @@
expel_gas = air_contents.remove(remove_amount)
expel_gas.temperature = T20C // Lets expel hot gas and see if that helps people not die as they are removed
loc.assume_air(expel_gas)
update_nearby_tiles()
air_update_turf(1)
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
if(!( occupant ))
+16 -30
View File
@@ -232,37 +232,27 @@
return
/obj/machinery/door/airlock/plasma
name = "Plasma Airlock"
name = "plasma airlock"
desc = "No way this can end badly."
icon = 'icons/obj/doors/Doorplasma.dmi'
mineral = "plasma"
autoignition_temperature = 300
/obj/machinery/door/airlock/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
PlasmaBurn(exposed_temperature)
/obj/machinery/door/airlock/plasma/ignite(temperature)
PlasmaBurn(temperature)
/obj/machinery/door/airlock/plasma/proc/ignite(exposed_temperature)
if(exposed_temperature > 300)
PlasmaBurn(exposed_temperature)
/obj/machinery/door/airlock/plasma/proc/PlasmaBurn(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
// if(target_tile.parent && target_tile.parent.group_processing) // THESE PROBABLY DO SOMETHING IMPORTANT BUT I DON'T KNOW HOW TO FIX IT - Erthilo
// target_tile.parent.suspend_group_processing()
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = 35
napalm.toxins = toxinsToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
del (F)
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
D.ignite(temperature/4)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
new/obj/structure/door_assembly( src.loc )
del (src)
/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~
return 0
/obj/machinery/door/airlock/clown
name = "Bananium Airlock"
icon = 'icons/obj/doors/Doorbananium.dmi'
@@ -918,10 +908,9 @@ About the new airlock wires panel:
// Do nothing
else
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
for(var/turf/turf in locs)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis)
killthis.ex_act(2)//Smashin windows
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
if(killthis)
killthis.ex_act(2)//Smashin windows
if(density)
return 1
@@ -937,14 +926,11 @@ About the new airlock wires panel:
if(visible && !glass)
SetOpacity(1)
operating = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(locate(/mob/living) in get_turf(src))
open()
//I shall not add a check every x ticks if a door has closed over some fire.
var/obj/fire/fire = locate() in loc
if(fire)
del fire
return
/obj/machinery/door/airlock/proc/lock(var/forced=0)
+23 -20
View File
@@ -33,7 +33,6 @@
. = ..()
if(density)
layer = closed_layer
update_heat_protection(get_turf(src))
else
layer = open_layer
@@ -46,14 +45,16 @@
bound_width = world.icon_size
bound_height = width * world.icon_size
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
update_freelok_sight()
airlocks += src
return
/obj/machinery/door/Destroy()
density = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
airlocks -= src
..()
return
@@ -95,11 +96,13 @@
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return !block_air_zones
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
/obj/machinery/door/CanAtmosPass()
return !density
//used in the AStar algorithm to determinate if the turf the door is on is passable
/obj/machinery/door/proc/CanAStarPass(var/obj/item/weapon/card/id/ID)
@@ -107,9 +110,9 @@
/obj/machinery/door/proc/bumpopen(mob/user as mob)
if(operating) return
if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit
// if(user.last_airflow > world.time) //Fakkit //remind me to figure out the linda equiv
// if(user.last_airflow > world.time - zas_settings.Get("airflow_delay")) //Fakkit
return
// return
src.add_fingerprint(user)
if(!src.requiresID())
user = null
@@ -240,7 +243,8 @@
update_icon()
SetOpacity(0)
operating = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(autoclose && normalspeed)
spawn(150)
@@ -267,12 +271,13 @@
if(visible && !glass)
SetOpacity(1) //caaaaarn!
operating = 0
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
//I shall not add a check every x ticks if a door has closed over some fire.
var/obj/fire/fire = locate() in loc
var/obj/effect/hotspot/fire = locate() in loc
if(fire)
del fire
qdel(fire)
return
/obj/machinery/door/proc/crush()
@@ -296,14 +301,6 @@
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
if(istype(source))
if(src.density && (src.opacity || src.heat_proof))
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
else
source.thermal_conductivity = initial(source.thermal_conductivity)
/obj/machinery/door/proc/autoclose()
var/obj/machinery/door/airlock/A = src
if(!A.density && !A.operating && !A.locked && !A.welded && A.autoclose)
@@ -311,7 +308,10 @@
return
/obj/machinery/door/Move(new_loc, new_dir)
update_nearby_tiles()
var/turf/T = loc
..()
move_update_air(T)
. = ..()
if(width > 1)
if(dir in list(EAST, WEST))
@@ -321,7 +321,10 @@
bound_width = world.icon_size
bound_height = width * world.icon_size
update_nearby_tiles()
/obj/machinery/door/BlockSuperconductivity()
if(opacity || heat_proof)
return 1
return 0
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
+78 -266
View File
@@ -1,85 +1,23 @@
/var/const/OPEN = 1
/var/const/CLOSED = 2
/proc/convert_k2c(var/temp)
return ((temp - T0C)) // * 1.8) + 32
/proc/convert_c2k(var/temp)
return ((temp + T0C)) // * 1.8) + 32
/proc/getCardinalAirInfo(var/turf/loc, var/list/stats=list("temperature"))
var/list/temps = new/list(4)
for(var/dir in cardinal)
var/direction
switch(dir)
if(NORTH)
direction = 1
if(SOUTH)
direction = 2
if(EAST)
direction = 3
if(WEST)
direction = 4
var/turf/simulated/T=get_turf(get_step(loc,dir))
var/list/rstats = new /list(stats.len)
if(T && istype(T) && T.zone)
var/datum/gas_mixture/environment = T.return_air()
for(var/i=1;i<=stats.len;i++)
if(stats[i] == "pressure")
rstats[i] = environment.return_pressure()
else
rstats[i] = environment.vars[stats[i]]
else if(istype(T, /turf/simulated))
rstats = null // Exclude zone (wall, door, etc).
else if(istype(T, /turf))
// Should still work. (/turf/return_air())
var/datum/gas_mixture/environment = T.return_air()
for(var/i=1;i<=stats.len;i++)
if(stats[i] == "pressure")
continue
else
rstats[i] = environment.vars[stats[i]]
temps[direction] = rstats
return temps
#define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa
#define FIREDOOR_MAX_TEMP 50 // Celsius
#define FIREDOOR_MIN_TEMP 0
// Bitflags
#define FIREDOOR_ALERT_HOT 1
#define FIREDOOR_ALERT_COLD 2
// Not used #define FIREDOOR_ALERT_LOWPRESS 4
/obj/machinery/door/firedoor
name = "\improper Emergency Shutter"
desc = "Emergency air-tight shutter, capable of sealing off breached areas."
icon = 'icons/obj/doors/DoorHazard.dmi'
name = "Firelock"
desc = "Apply crowbar"
icon = 'icons/obj/doors/Doorfireglass.dmi'
icon_state = "door_open"
req_one_access = list(access_atmospherics, access_engine)
opacity = 0
density = 0
heat_proof = 1
glass = 1
power_channel = ENVIRON
//These are frequenly used with windows, so make sure zones can pass.
//Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it.
block_air_zones = 0
var/list/areas_added
var/blocked = 0
var/lockdown = 0 // When the door has detected a problem, it locks.
var/pdiff_alert = 0
var/pdiff = 0
var/nextstate = null
var/net_id
var/list/areas_added
var/list/users_to_open
var/list/tile_info[4]
var/list/dir_alerts[4] // 4 dirs, bitflags
// MUST be in same order as FIREDOOR_ALERT_*
var/list/ALERT_STATES=list(
"hot",
"cold"
)
var/logged_users
/obj/machinery/door/firedoor/New()
. = ..()
@@ -88,6 +26,7 @@
spawn(1)
del src
return .
var/area/A = get_area(src)
ASSERT(istype(A))
@@ -106,66 +45,16 @@
A.all_doors.Remove(src)
. = ..()
/obj/machinery/door/firedoor/examine()
set src in view()
. = ..()
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
usr << "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
usr << "<b>Sensor readings:</b>"
for(var/index = 1; index <= tile_info.len; index++)
var/o = "&nbsp;&nbsp;"
switch(index)
if(1)
o += "NORTH: "
if(2)
o += "SOUTH: "
if(3)
o += "EAST: "
if(4)
o += "WEST: "
if(tile_info[index] == null)
o += "<span class='warning'>DATA UNAVAILABLE</span>"
usr << o
continue
var/celsius = convert_k2c(tile_info[index][1])
var/pressure = tile_info[index][2]
if(dir_alerts[index] & (FIREDOOR_ALERT_HOT|FIREDOOR_ALERT_COLD))
o += "<span class='warning'>"
else
o += "<span style='color:blue'>"
o += "[celsius] Celsius</span> "
o += "<span style='color:blue'>"
o += "[pressure] kPa</span></li>"
usr << o
if( islist(users_to_open) && users_to_open.len)
var/users_to_open_string = users_to_open[1]
if(users_to_open.len >= 2)
for(var/i = 2 to users_to_open.len)
users_to_open_string += ", [users_to_open[i]]"
usr << "These people have opened \the [src] during an alert: [users_to_open_string]."
/obj/machinery/door/firedoor/Bumped(atom/AM)
if(p_open || operating)
return
if(!density)
return ..()
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if (mecha.occupant)
var/mob/M = mecha.occupant
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent popup message spam.
M.last_bumped = world.time
attack_hand(M)
if(p_open || operating) return
if(!density) return ..()
return 0
/obj/machinery/door/firedoor/power_change()
if(powered(ENVIRON))
if(powered(power_channel))
stat &= ~NOPOWER
latetoggle()
else
stat |= NOPOWER
return
@@ -177,6 +66,7 @@
add_fingerprint(user)
if(operating)
return//Already doing something.
if(istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0, user))
@@ -198,24 +88,21 @@
if( istype(C, /obj/item/weapon/crowbar) || ( istype(C,/obj/item/weapon/twohanded/fireaxe) && C:wielded == 1 ) )
if(operating)
return
if( blocked )
if(blocked)
user.visible_message("\red \The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
"You hear someone struggle and metal straining.")
if( stat & (BROKEN|NOPOWER) || !density || !alarmed )
if(stat & (BROKEN|NOPOWER) || !density || !alarmed)
user.visible_message("\red \The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\
"You hear metal strain, and a door [density ? "open" : "close"].")
else if( allowed(user) )
else if(allowed(user))
user.visible_message("\blue \The [user] lifts \the [src] with \a [C].",\
"\The [src] scans your ID, and obediently opens as you apply your [C].",\
"You hear metal move, and a door [density ? "open" : "close"].")
else if(lockdown)
user.visible_message("\blue \The [user] pries at \the [src] with \a [C], but \the [src] resists being opened.",\
"\red You pry at \the [src], but it actively resists your efforts. Maybe use your ID, perhaps?",\
"You hear someone struggling and metal straining")
return
if(density)
spawn(0)
open()
@@ -223,6 +110,7 @@
spawn(0)
close()
return
var/access_granted = 0
var/users_name
if(!istype(C, /obj)) //If someone hit it with their hand. We need to see if they are allowed.
@@ -233,7 +121,7 @@
else
users_name = "Unknown"
if( ishuman(user) && !stat && ( istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda) ) )
if(ishuman(user) && !stat && (istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda)))
var/obj/item/weapon/card/id/ID = C
if( istype(C, /obj/item/device/pda) )
@@ -248,31 +136,26 @@
if(check_access(ID))
access_granted = 1
var/answer = "Yes"
var/answer = alert(user, "Are you sure you want to [density ? "open" : "close"] \the [src]?","\The [src] confirmation","Yes","No")
if(answer == "No")
return
if(user.stat || user.stunned || user.weakened || user.paralysis || get_dist(src, user) > 1)
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
return
if(alarmed && density && lockdown && !access_granted/* && !( users_name in users_to_open ) */)
// Too many shitters on /vg/ for the honor system to work.
if(alarmed && density && !access_granted)
user << "<span class='warning'>Access denied. Please wait for authorities to arrive, or for the alert to clear.</span>"
return
// End anti-shitter system
/*
user.visible_message("\red \The [src] opens for \the [user]",\
"\The [src] opens after you acknowledge the consequences.",\
"You hear a beep, and a door opening.")
*/
else
user.visible_message("\blue \The [src] [density ? "open" : "close"]s for \the [user].",\
"\The [src] [density ? "open" : "close"]s.",\
"You hear a beep, and a door opening.")
// Accountability!
if(!users_to_open)
users_to_open = list()
users_to_open += users_name
if(!logged_users)
logged_users = list()
logged_users += users_name
var/needs_to_close = 0
if(density)
@@ -290,8 +173,8 @@
nextstate = CLOSED
/obj/machinery/door/firedoor/attack_ai(mob/user as mob)
if(operating)
return //Already doing something.
if(operating || stat & NOPOWER)
return //Already doing something or depowered.
if(blocked)
user << "\red \The [src] is welded solid!"
@@ -325,49 +208,38 @@
if(alarmed)
nextstate = CLOSED
// CHECK PRESSURE
/obj/machinery/door/firedoor/process()
..()
/obj/machinery/door/firedoor/do_animate(animation)
switch(animation)
if("opening")
flick("door_opening", src)
if("closing")
flick("door_closing", src)
return
/obj/machinery/door/firedoor/update_icon()
overlays.Cut()
if(density)
var/changed = 0
lockdown=0
// Pressure alerts
pdiff = getOPressureDifferential(src.loc)
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
lockdown = 1
if(!pdiff_alert)
pdiff_alert = 1
changed = 1 // update_icon()
else
if(pdiff_alert)
pdiff_alert = 0
changed = 1 // update_icon()
icon_state = "door_closed"
if(blocked)
overlays += "welded"
else
icon_state = "door_open"
if(blocked)
overlays += "welded_open"
return
tile_info = getCardinalAirInfo(src.loc,list("temperature","pressure"))
var/old_alerts = dir_alerts
for(var/index = 1; index <= 4; index++)
var/list/tileinfo=tile_info[index]
if(tileinfo==null)
continue // Bad data.
var/celsius = convert_k2c(tileinfo[1])
/obj/machinery/door/firedoor/open()
..()
latetoggle()
return
var/alerts=0
// Temperatures
if(celsius >= FIREDOOR_MAX_TEMP)
alerts |= FIREDOOR_ALERT_HOT
lockdown = 1
else if(celsius <= FIREDOOR_MIN_TEMP)
alerts |= FIREDOOR_ALERT_COLD
lockdown = 1
dir_alerts[index]=alerts
if(dir_alerts != old_alerts)
changed = 1
if(changed)
update_icon()
/obj/machinery/door/firedoor/close()
..()
if(locate(/mob/living) in get_turf(src))
open()
return
latetoggle()
return
/obj/machinery/door/firedoor/proc/latetoggle()
if(operating || stat & NOPOWER || !nextstate)
@@ -381,90 +253,30 @@
close()
return
/obj/machinery/door/firedoor/close()
..()
latetoggle()
layer = 3.1
/obj/machinery/door/firedoor/open()
..()
latetoggle()
layer = 2.6
/obj/machinery/door/firedoor/update_icon()
overlays = 0
if(density)
icon_state = "door_closed"
if(blocked)
overlays += "welded"
if(pdiff_alert)
overlays += "palert"
if(dir_alerts)
for(var/d=1;d<=4;d++)
var/cdir = cardinal[d]
// Loop while i = [1, 3], incrementing each loop
for(var/i=1;i<=ALERT_STATES.len;i++) //
if(dir_alerts[d] & (1<<(i-1))) // Check to see if dir_alerts[d] has the i-1th bit set.
overlays += new /icon(icon,"alert_[ALERT_STATES[i]]",dir=cdir)
else
icon_state = "door_open"
if(blocked)
overlays += "welded_open"
return
/obj/machinery/door/firedoor/do_animate(animation)
switch(animation)
if("opening")
flick("door_opening", src)
if("closing")
flick("door_closing", src)
return
/obj/machinery/door/firedoor/border_only
//These are playing merry hell on ZAS. Sorry fellas :(
/*
icon = 'icons/obj/doors/edge_Doorfire.dmi'
glass = 1 //There is a glass window so you can see through the door
//This is needed due to BYOND limitations in controlling visibility
heat_proof = 1
air_properties_vary_with_direction = 1
flags = ON_BORDER
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
if(air_group) return 0
return !density
else
return 1
CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir)
return !density
else
return 1
update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/destination = get_step(source,dir)
update_heat_protection(loc)
if(istype(source)) air_master.tiles_to_update += source
if(istype(destination)) air_master.tiles_to_update += destination
/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
if(air_group) return 0
return !density
else
return 1
*/
/obj/machinery/door/firedoor/multi_tile
icon = 'icons/obj/doors/DoorHazard2x1.dmi'
width = 2
/obj/machinery/door/firedoor/border_only/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir)
return !density
else
return 1
/obj/machinery/door/firedoor/multi_tile/triple
icon = 'icons/obj/doors/DoorHazard3x1.dmi'
width = 3
/obj/machinery/door/firedoor/border_only/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
return 1
+20 -10
View File
@@ -53,7 +53,8 @@
sleep(5)
src.density = 0
sleep(5)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -69,7 +70,8 @@
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.SetOpacity(initial(opacity))
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(5)
crush()
src.density = 1
@@ -147,7 +149,8 @@
f3.density = 0
f3.SetOpacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -173,7 +176,8 @@
if (src.visible)
src.SetOpacity(1)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
@@ -201,7 +205,8 @@
f4.density = 0
f4.SetOpacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -229,7 +234,8 @@
if (src.visible)
src.SetOpacity(1)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
@@ -304,7 +310,8 @@
f3.density = 0
f3.SetOpacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -330,7 +337,8 @@
if (src.visible)
src.SetOpacity(1)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
@@ -358,7 +366,8 @@
f4.density = 0
f4.SetOpacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -386,7 +395,8 @@
if (src.visible)
src.SetOpacity(1)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
+5 -3
View File
@@ -7,7 +7,7 @@
/obj/machinery/door/poddoor/shutters/New()
..()
layer = 3.1
/obj/machinery/door/poddoor/shutters/preopen
icon_state = "shutter0"
density = 0
@@ -41,7 +41,8 @@
sleep(10)
density = 0
SetOpacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
operating = 0
@@ -59,7 +60,8 @@
density = 1
if(visible)
SetOpacity(1)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
operating = 0
+10 -2
View File
@@ -81,6 +81,12 @@
else
return 1
/obj/machinery/door/window/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
return 1
//used in the AStar algorithm to determinate if the turf the door is on is passable
/obj/machinery/door/window/CanAStarPass(var/obj/item/weapon/card/id/ID, var/to_dir)
return !density || (dir != to_dir) || check_access(ID)
@@ -113,7 +119,8 @@
src.density = 0
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -136,7 +143,8 @@
src.density = 1
// if(src.visible)
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
+6 -5
View File
@@ -230,11 +230,11 @@
open = 0
if(!unwrenched && !circuit_removed)
src.stat &= ~MAINT
user << "You open the [src]'s maintenance panel."
user << "You close \the [src]'s maintenance panel."
else
open = 1
src.stat |= MAINT
user << "You close the [src]'s maintenance panel."
user << "You open \the [src]'s maintenance panel."
if(istype(I,/obj/item/weapon/crowbar))
if(open)
user << "\blue You begin to pry out the [src]'s circuits."
@@ -257,6 +257,7 @@
return
else
..(I,user)
if(istype(I,/obj/item/weapon/circuitboard/programmable))
if(!open)
user << "You have to open the machine first!"
@@ -553,9 +554,9 @@
origin_tech = "engineering=3;programming=6"
frame_desc = "Requires 2 Manipulators, 1 Scanning Module, 1 Cable."
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/manipulator" = 2,
"/obj/item/stack/cable_coil" = 1)
/obj/item/weapon/stock_parts/scanning_module = 1,
/obj/item/weapon/stock_parts/manipulator = 2,
/obj/item/stack/cable_coil = 1)
//Customization of the machine
var/datum/cargoprofile/default = new/datum/cargoprofile()
+10 -2
View File
@@ -13,18 +13,26 @@
/obj/machinery/shield/New()
src.dir = pick(1,2,3,4)
..()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
/obj/machinery/shield/Destroy()
opacity = 0
density = 0
update_nearby_tiles()
air_update_turf(1)
..()
/obj/machinery/shield/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group)
if(!height || air_group) return 0
else return ..()
/obj/machinery/shield/CanAtmosPass(var/turf/T)
return !density
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(!istype(W)) return
+1
View File
@@ -189,6 +189,7 @@
//world << "now at [removed.temperature]"
env.merge(removed)
air_update_turf()
//world << "turf now at [env.temperature]"
-4
View File
@@ -871,14 +871,10 @@
sleep(10)
if(helmet)
if(radiation_level > 2)
helmet.decontaminate()
if(radiation_level > 1)
helmet.clean_blood()
if(suit)
if(radiation_level > 2)
suit.decontaminate()
if(radiation_level > 1)
suit.clean_blood()
+3 -17
View File
@@ -788,16 +788,16 @@
/obj/machinery/vending/snack
name = "Getmore Chocolate Corp"
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!;Now featuring Discount Dan's food line!"
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
icon_state = "snack"
products = list(/obj/item/weapon/reagent_containers/food/snacks/candy/candybar = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6,/obj/item/weapon/reagent_containers/food/drinks/dansoup/random = 20,/obj/item/weapon/reagent_containers/food/snacks/danburrito/random = 20)
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6)
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6)
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy/candybar = 20,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 30,
/obj/item/weapon/reagent_containers/food/snacks/chips =25,/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 30,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 20,
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 30,/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 25,/obj/item/weapon/reagent_containers/food/drinks/dansoup/random = 10,/obj/item/weapon/reagent_containers/food/snacks/danburrito/random = 12)
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 30,/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 25)
refill_canister = /obj/item/weapon/vending_refill/snack
/obj/machinery/vending/snack/New()
@@ -845,20 +845,6 @@
component_parts += new /obj/item/weapon/vending_refill/cola(0)
component_parts += new /obj/item/weapon/vending_refill/cola(0)
//New Cola Machine
/obj/machinery/vending/soda
name = "Donk Co. Cola"
desc = "A cola vendor provided by Donk Company, Inc."
icon_state = "soda"
product_slogans = "Donk Co. Cola: Refreshing, delicious, and robust!"
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
products = list(/obj/item/weapon/reagent_containers/food/drinks/cans/robust = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/pubber = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grifeo = 10,
/obj/item/weapon/reagent_containers/food/drinks/cans/grones = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/runoff = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/horror = 10,
/obj/item/weapon/reagent_containers/food/drinks/cans/orangeaid = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/limeaid = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/decirprevo = 10)
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cans/robust = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/pubber = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/grifeo = 35,
/obj/item/weapon/reagent_containers/food/drinks/cans/grones = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/runoff = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/horror = 35,
/obj/item/weapon/reagent_containers/food/drinks/cans/orangeaid = 50, /obj/item/weapon/reagent_containers/food/drinks/cans/limeaid = 50, /obj/item/weapon/reagent_containers/food/drinks/cans/decirprevo = 60)
//This one's from bay12
/obj/machinery/vending/cart
-3
View File
@@ -44,9 +44,6 @@
for(var/atom/A in contents)
A.clean_blood()
for(var/obj/item/I in contents)
I.decontaminate()
//Tanning!
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
var/obj/item/stack/sheet/wetleather/WL = new(src)
+1 -1
View File
@@ -668,7 +668,7 @@
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
return
/obj/mecha/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature>src.max_temperature)
src.log_message("Exposed to dangerous temperature.",1)
src.take_damage(5,"fire")
+4 -2
View File
@@ -35,7 +35,9 @@
..()
/obj/structure/alien/resin/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/alien/resin/wall
name = "resin wall"
@@ -229,7 +231,7 @@
del(src)
/obj/structure/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
@@ -387,7 +389,7 @@
del(src) //Remove the egg after it has been hit after bursting.
/obj/structure/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
health -= 5
healthcheck()
+1 -4
View File
@@ -118,10 +118,7 @@
..()
var/turf/simulated/T = get_turf(src)
if(istype(T))
var/datum/gas_mixture/payload = new
payload.toxins = 60
T.zone.air.merge(payload)
T.hotspot_expose(1000, CELL_VOLUME)
T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 3)
/////////////////////
+11 -6
View File
@@ -171,7 +171,6 @@ steam.start() -- spawns the effect
..()
playsound(src.loc, "sparks", 100, 1)
var/turf/T = loc
if (istype(T, /turf))
T.hotspot_expose(1000, 100)
spawn (100)
@@ -953,7 +952,7 @@ steam.start() -- spawns the effect
// foam disolves when heated
// except metal foams
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/effect/effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!metal && prob(max(0, exposed_temperature - 475)))
flick("[icon_state]-disolve", src)
@@ -1040,16 +1039,19 @@ steam.start() -- spawns the effect
New()
..()
update_nearby_tiles(1)
air_update_turf(1)
Destroy()
density = 0
update_nearby_tiles(1)
air_update_turf(1)
..()
Move()
var/turf/T = loc
..()
move_update_air(T)
proc/updateicon()
if(metal == 1)
icon_state = "metalfoam"
@@ -1109,6 +1111,9 @@ steam.start() -- spawns the effect
if(air_group) return 0
return !density
CanAtmosPass()
return !density
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?
+1 -1
View File
@@ -156,7 +156,7 @@
else
return
/obj/effect/glowshroom/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/effect/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
endurance -= 5
CheckEndurance()
+2 -25
View File
@@ -46,35 +46,12 @@
del(src)
/obj/effect/mine/proc/triggern2o(obj)
//example: n2o triggerproc
//note: im lazy
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
var/datum/gas_mixture/payload = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 30
payload += trace_gas
target.zone.air.merge(payload)
atmos_spawn_air(SPAWN_N2O, 360)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerplasma(obj)
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
var/datum/gas_mixture/payload = new
payload.toxins = 30
target.zone.air.merge(payload)
target.hotspot_expose(1000, CELL_VOLUME)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 360)
spawn(0)
del(src)
@@ -110,11 +110,15 @@
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
var/btype = 0 // 0=radio, 1=prox, 2=time
var/btemp1 = 1500
var/btemp2 = 1000 // tank temperatures
timer
btype = 2
syndicate
btemp1 = 150
btemp2 = 20
proximity
btype = 1
@@ -136,14 +140,8 @@
PT.master = V
OT.master = V
PT.air_contents.temperature = PLASMA_FLASHPOINT
PT.air_contents.toxins = 12
PT.air_contents.carbon_dioxide = 8
PT.air_contents.update_values()
OT.air_contents.temperature = PLASMA_FLASHPOINT
OT.air_contents.oxygen = 20
OT.air_contents.update_values()
PT.air_contents.temperature = btemp1 + T0C
OT.air_contents.temperature = btemp2 + T0C
var/obj/item/device/assembly/S
+1 -1
View File
@@ -47,7 +47,7 @@
if(health <= 0)
qdel(src)
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/effect/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
+1 -1
View File
@@ -39,5 +39,5 @@
// Make space carp
var/mob/living/simple_animal/hostile/carp/C = new /mob/living/simple_animal/hostile/carp(get_turf(src))
// Make carp non-hostile to user, yes this means
C.faction |= "\ref[owner]"
C.faction |= list("syndicate", "\ref[owner]")
qdel(src)
+4 -4
View File
@@ -1223,10 +1223,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (istype(A, /obj/machinery/atmospherics/pipe/tank))
var/obj/icon = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [A]"
var/obj/machinery/atmospherics/pipe/tank/T = A
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [src] on \icon[icon] [T]"
var/pressure = T.parent.air.return_pressure()
var/total_moles = T.parent.air.total_moles()
@@ -1424,4 +1424,4 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/JFLOG(message as text)
if (config)
log_pda("[JFLOG_DescribeSelf()] >>> [message]")
log_pda("[JFLOG_DescribeSelf()] >>> [message]")
+1 -1
View File
@@ -38,7 +38,7 @@
/obj/item/latexballon/bullet_act()
burst()
/obj/item/latexballon/fire_act(datum/gas_mixture/air, temperature, volume)
/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume)
if(temperature > T0C+100)
burst()
return
+42 -1
View File
@@ -9,6 +9,9 @@
var/tape_type = /obj/item/tape
var/icon_base
var/list/image/hazard_overlays
var/list/tape_roll_applications = list()
/obj/item/tape
name = "tape"
icon = 'icons/policetape.dmi'
@@ -16,6 +19,24 @@
density = 1
var/icon_base
/obj/item/tape/New()
..()
if(!hazard_overlays)
hazard_overlays = list()
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
/obj/item/taperoll/New() //just using tape is not enough to guarantee the overlays are genned
..()
if(!hazard_overlays)
hazard_overlays = list()
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
/obj/item/taperoll/police
name = "police tape"
desc = "A roll of police tape used to block off crime scenes from the public."
@@ -97,7 +118,10 @@
usr << "\blue You finish placing the [src]." //Git Test
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
if (proximity && istype(A, /obj/machinery/door/airlock))
if (!proximity)
return
if(istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
P.loc = locate(T.x,T.y,T.z)
@@ -105,6 +129,23 @@
P.layer = 3.2
user << "\blue You finish placing the [src]."
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
var/turf/F = A
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
var/icon/hazard_overlay = hazard_overlays["[direction]"]
if(tape_roll_applications[F] == null)
tape_roll_applications[F] = 0
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
F.overlays -= hazard_overlay
tape_roll_applications[F] &= ~direction
else
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
F.overlays |= hazard_overlay
tape_roll_applications[F] |= direction
return
/obj/item/tape/Bumped(M as mob)
if(src.allowed(M))
var/turf/T = get_turf(src)
@@ -30,7 +30,7 @@
icon_state = "sheet-glass"
g_amt = 0
created_window = /obj/structure/window/basic
/obj/item/stack/sheet/glass/full/New()
..()
amount = 50
@@ -106,6 +106,7 @@
W.ini_dir = W.dir
W.state = 0
W.anchored = 0
W.air_update_turf(1)
src.use(1)
if("Full Window")
if(!src) return 1
@@ -119,6 +120,7 @@
var/obj/structure/window/W = new full_window( user.loc, 0 )
W.state = 0
W.anchored = 0
W.air_update_turf(1)
src.use(2)
return 0
@@ -117,7 +117,7 @@
//Step two - washing..... it's actually in washing machine code.
//Step three - drying
/obj/item/stack/sheet/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/item/stack/sheet/wetleather/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(exposed_temperature >= drying_threshold_temperature)
wetness--
@@ -25,6 +25,10 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
+1 -1
View File
@@ -6,7 +6,7 @@
icon = 'icons/obj/trash.dmi'
w_class = 1.0
desc = "This is rubbish."
autoignition_temperature = AUTOIGNITION_PAPER
raisins
name = "4no raisins"
icon_state= "4no_raisins"
+1 -1
View File
@@ -156,7 +156,7 @@ RCD
if(do_after(user, 50))
if(!useResource(20, user)) return 0
activate()
del(A)
qdel(A)
return 1
return 0
return 0
@@ -34,7 +34,7 @@
m_amt = 0
max_water = 30
sprite_name = "miniFE"
/obj/item/weapon/extinguisher/examine()
set src in usr
@@ -160,6 +160,7 @@
if(isliving(atm)) //For extinguishing mobs on fire
var/mob/living/M = atm
M.ExtinguishMob()
if(W.loc == my_target) break
sleep(2)
@@ -168,4 +169,3 @@
step(user, user.inertia_dir)
else
return ..()
@@ -189,8 +189,8 @@
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
operating = 1
for(var/turf/T in turflist)
if(T.density || istype(T, /turf/space))
for(var/turf/simulated/T in turflist)
if(!T.air)
break
if(!previousturf && length(turflist)>1)
previousturf = get_turf(src)
@@ -210,17 +210,16 @@
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
//air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
air_transfer.toxins = 0
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05)
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
target.assume_air(air_transfer)
//Burn it based on transfered gas
//target.hotspot_expose(part4.air_contents.temperature*2,300)
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
//location.hotspot_expose(1000,500,1)
air_master.add_to_active(target, 0)
return
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new /obj/item/weapon/weldingtool(src)
@@ -8,8 +8,6 @@
var/mob/affecting = null
var/deity_name = "Christ"
autoignition_temperature = 522 // Kelvin
suicide_act(mob/user)
viewers(user) << "<span class='warning'><b>[user] stares into [src.name] and attempts to trascend understanding of the universe!</b></span>"
return (user.dust())
@@ -20,8 +18,6 @@
desc = "To be applied to the head repeatedly."
icon_state ="bible"
autoignition_temperature = 0 // Not actually paper
/obj/item/weapon/storage/bible/booze/New()
..()
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
@@ -26,9 +26,6 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
autoignition_temperature = 522 // Kelvin
/obj/item/weapon/storage/box/large
name = "large box"
desc = "You could build a fort with this."
@@ -39,8 +36,6 @@
storage_slots = 21
max_combined_w_class = 42 // 21*2
autoignition_temperature = 530 // Kelvin
/obj/item/weapon/storage/box/survival
New()
..()
@@ -80,9 +80,8 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/oxygen
name = "Jetpack (Oxygen)"
@@ -92,9 +91,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/oxygen/harness
name = "jet harness (oxygen)"
@@ -113,9 +110,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/carbondioxide
name = "Jetpack (Carbon Dioxide)"
@@ -128,9 +123,7 @@
..()
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
//src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust(0,(6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
examine()
set src in usr
@@ -19,8 +19,7 @@
New()
..()
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -59,9 +58,6 @@
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
src.air_contents.trace_gases += trace_gas
//
air_contents.update_values()
return
/*
@@ -85,12 +81,8 @@
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
//
src.air_contents.update_values()
return
/*
* Plasma
*/
@@ -101,15 +93,13 @@
flags = CONDUCT
slot_flags = null //they have no straps!
/obj/item/weapon/tank/plasma/New()
..()
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
@@ -152,9 +142,6 @@
New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
@@ -182,7 +169,6 @@
New()
..()
src.air_contents.oxygen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
src.air_contents.update_values()
return
/*
@@ -199,8 +185,6 @@
..()
src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
/obj/item/weapon/tank/nitrogen/examine()
@@ -224,7 +208,4 @@
..()
src.air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
src.air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
//
src.air_contents.update_values()
return
@@ -357,8 +357,8 @@
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
G.temperature = 2
update_nearby_tiles()
var/hotspot = (locate(/obj/fire) in T)
air_update_turf()
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/CT = 10
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
-1
View File
@@ -267,7 +267,6 @@
var/turf/location = get_turf(user)
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
if(isliving(O))
var/mob/living/L = O
L.IgniteMob()
+3 -3
View File
@@ -178,14 +178,14 @@ obj/item/weapon/twohanded/
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window))
var/pdiff=performWallPressureCheck(A.loc)
/* var/pdiff=performWallPressureCheck(A.loc)
if(pdiff>0)
message_admins("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(A.loc)]!")
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")*///TODO: Figure out how the hell to remake this proc
var/obj/structure/window/W = A
W.destroy()
else
del(A)
qdel(A)
/*
+16
View File
@@ -2,6 +2,7 @@
icon = 'icons/obj/barsigns.dmi'
icon_state = "empty"
anchored = 1
var/nopick = 0
New()
ChangeSign(pick("magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thecavern", "cindikate", "theorchard", "lv426", "zocalo", "4theemprah", "ishimura", "tardis", "quarks", "tenforward", "thepranicngpony", "vault13", "solaris", "thehive", "cantina", "theouterspess", "milliways42", "thetimeofeve", "spaceasshole", "dwarffortress", "thebark", "thedrunkcarp", "theharmbaton", "thenest", "officerbeersky", "thesingulo"))
return
@@ -10,3 +11,18 @@
//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(nopick)
return
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("Off", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead bay", "The Cavern", "Cindi Kate", "The Orchard", "LV 426", "Zocalo", "4 The Emprah", "Ishimura", "Tardis", "Quarks", "Ten Forward", "The Pranicng Pony", "Vault 13", "Solaris", "The Hive", "Cantina", "The Outer Spess", "Milliways 42", "The Time Of Eve", "Space Asshole", "Dwarf Fortress", "The Bark", "The Drunk Carp", "The Harm Baton", "The Nest", "Officer Beersky", "The Singulo", "On")
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."
@@ -105,6 +105,10 @@
new /obj/item/weapon/storage/backpack/cultpack (src)
new /obj/item/weapon/storage/fancy/candle_box(src)
new /obj/item/weapon/storage/fancy/candle_box(src)
new /obj/item/clothing/gloves/ring/silver(src)
new /obj/item/clothing/gloves/ring/silver(src)
new /obj/item/clothing/gloves/ring/gold(src)
new /obj/item/clothing/gloves/ring/gold(src)
return
+16 -4
View File
@@ -1,14 +1,17 @@
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
/obj/structure/curtain
icon = 'icons/obj/curtain.dmi'
name = "curtain"
icon_state = "closed"
layer = MOB_LAYER + 0.1
layer = SHOWER_CLOSED_LAYER
opacity = 1
density = 0
/obj/structure/curtain/open
icon_state = "open"
layer = OBJ_LAYER
layer = SHOWER_OPEN_LAYER
opacity = 0
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
@@ -27,10 +30,10 @@
opacity = !opacity
if(opacity)
icon_state = "closed"
layer = MOB_LAYER + 0.1
layer = SHOWER_CLOSED_LAYER
else
icon_state = "open"
layer = OBJ_LAYER
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/black
name = "black curtain"
@@ -45,3 +48,12 @@
name = "shower curtain"
color = "#ACD1E9"
alpha = 200
/obj/structure/curtain/open/shower/engineering
color = "#FFA500"
/obj/structure/curtain/open/shower/security
color = "#AA0000"
#undef SHOWER_OPEN_LAYER
#undef SHOWER_CLOSED_LAYER
+15 -67
View File
@@ -6,68 +6,6 @@
// Also affects admin alerts.
#define FALSEDOOR_MAX_PRESSURE_DIFF 25.0
/**
* Gets the highest and lowest pressures from the tiles in cardinal directions
* around us, then checks the difference.
*/
/proc/getOPressureDifferential(var/turf/loc)
var/minp=16777216;
var/maxp=0;
for(var/dir in cardinal)
var/turf/simulated/T=get_turf(get_step(loc,dir))
var/cp=0
if(T && istype(T) && T.zone)
var/datum/gas_mixture/environment = T.return_air()
cp = environment.return_pressure()
else
if(istype(T,/turf/simulated))
continue
if(cp<minp)minp=cp
if(cp>maxp)maxp=cp
return abs(minp-maxp)
// Checks pressure here vs. around us.
/proc/performFalseWallPressureCheck(var/turf/loc)
var/turf/simulated/lT=loc
if(!istype(lT) || !lT.zone)
return 0
var/datum/gas_mixture/myenv=lT.return_air()
var/pressure=myenv.return_pressure()
for(var/dir in cardinal)
var/turf/simulated/T=get_turf(get_step(loc,dir))
if(T && istype(T) && T.zone)
var/datum/gas_mixture/environment = T.return_air()
var/pdiff = abs(pressure - environment.return_pressure())
if(pdiff > FALSEDOOR_MAX_PRESSURE_DIFF)
return pdiff
return 0
/proc/performWallPressureCheck(var/turf/loc)
var/pdiff = getOPressureDifferential(loc)
if(pdiff > FALSEDOOR_MAX_PRESSURE_DIFF)
return pdiff
return 0
/client/proc/pdiff()
set name = "Get PDiff"
set category = "Debug"
if(!mob || !holder)
return
var/turf/T = mob.loc
if (!( istype(T, /turf) ))
return
var/pdiff = getOPressureDifferential(T)
var/fwpcheck=performFalseWallPressureCheck(T)
var/wpcheck=performWallPressureCheck(T)
src << "Pressure Differential (cardinals): [pdiff]"
src << "FWPCheck: [fwpcheck]"
src << "WPCheck: [wpcheck]"
/obj/structure/falsewall
name = "wall"
desc = "A huge chunk of metal used to seperate rooms."
@@ -97,7 +35,7 @@
for(var/obj/structure/falsewall/W in range(temploc,1))
W.relativewall()
..()
/obj/structure/falsewall/relativewall()
if(!density)
@@ -140,7 +78,7 @@
SetOpacity(1)
update_icon()
opening = 0
/obj/structure/falsewall/proc/do_the_flick()
if(density)
flick("[walltype]fwall_opening", src)
@@ -154,7 +92,7 @@
relativewall()
else
icon_state = "[walltype]fwall_open"
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
var/turf/T = get_turf(src)
if(!walltype || walltype == "metal")
@@ -257,7 +195,7 @@
junction |= get_dir(src,W)
icon_state = "rwall[junction]"
return
/*
* Uranium Falsewalls
*/
@@ -321,7 +259,17 @@
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = ""
mineral = "plasma"
walltype = "plasma"
walltype = "plasma"
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
playsound(src, 'sound/items/Welder.ogg', 100, 1)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 400)
new /obj/structure/girder/displaced(loc)
qdel(src)
/obj/structure/falsewall/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
burnbabyburn()
//-----------wtf?-----------start
/obj/structure/falsewall/clown
@@ -10,18 +10,6 @@
return 1
return 0
/obj/structure/window/full/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
if(!loc) return 0
var/turf/simulated/source = get_turf(src)
if(istype(source))
air_master.tiles_to_update |= source
for(var/dir in cardinal)
var/turf/simulated/target = get_step(source,dir)
if(istype(target)) air_master.tiles_to_update |= target
return 1
/obj/structure/window/full/is_fulltile()
return 1
+16 -37
View File
@@ -71,17 +71,10 @@
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
if(!anchored)
if(S.amount < 2) return
var/pdiff=performWallPressureCheck(src.loc)
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
message_admins("Attempted false wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
log_admin("Attempted false wall made by [user.real_name] (user.ckey) at [loc] had a pressure difference of [pdiff]!")
return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
@@ -99,17 +92,10 @@
if(/obj/item/stack/sheet/plasteel)
if(!anchored)
if(S.amount < 2) return
var/pdiff=performWallPressureCheck(src.loc)
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/reinforced (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
message_admins("Attempted false rwall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
log_admin("Attempted false rwall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
new /obj/structure/falsewall/reinforced (src.loc)
del(src)
else
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
if(S.amount < 1) return ..()
@@ -139,18 +125,11 @@
var/M = S.sheettype
if(!anchored)
if(S.amount < 2) return
var/pdiff=performWallPressureCheck(src.loc)
if(!pdiff)
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
var/F = text2path("/obj/structure/falsewall/[M]")
new F (src.loc)
del(src)
else
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
message_admins("Attempted false [M] wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
log_admin("Attempted false [M] wall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
return
S.use(2)
user << "\blue You create a false wall! Push on it to open or close the passage."
var/F = text2path("/obj/structure/falsewall/[M]")
new F (src.loc)
del(src)
else
if(S.amount < 2) return ..()
user << "\blue Now adding plating..."
@@ -187,7 +166,7 @@
if(health <= 0)
new /obj/item/stack/sheet/metal(get_turf(src))
del(src)
if(istype(Proj ,/obj/item/projectile/beam/pulse))
src.ex_act(2)
..()
@@ -248,7 +227,7 @@
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
user << "\blue You drill through the girder!"
dismantle()
/obj/structure/cultgirder/proc/dismantle()
new /obj/effect/decal/remains/human(get_turf(src))
qdel(src)
@@ -256,7 +235,7 @@
/obj/structure/cultgirder/blob_act()
if(prob(40))
dismantle()
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
health -= Proj.damage
..()
+1 -1
View File
@@ -258,7 +258,7 @@
return 0
return 0
/obj/structure/grille/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(exposed_temperature > T0C + 1500)
health -= 1
+3 -3
View File
@@ -28,10 +28,10 @@
New(location)
..()
update_nearby_tiles(need_rebuild=1)
air_update_turf()
Del()
update_nearby_tiles()
air_update_turf()
..()
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -217,7 +217,7 @@
Close()
else
Open()
update_nearby_tiles()
air_update_turf()
proc/Open()
isSwitchingStates = 1
+17 -22
View File
@@ -20,12 +20,17 @@
..()
icon_state = mineralType
name = "[mineralType] door"
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
Destroy()
update_nearby_tiles()
air_update_turf(1)
..()
Move()
var/turf/T = loc
..()
move_update_air(T)
Bumped(atom/user)
..()
if(!state)
@@ -51,6 +56,9 @@
return !opacity
return !density
CanAtmosPass()
return !density
proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
@@ -82,7 +90,7 @@
state = 1
update_icon()
isSwitchingStates = 0
update_nearby_tiles()
air_update_turf()
proc/Close()
isSwitchingStates = 1
@@ -94,7 +102,7 @@
state = 0
update_icon()
isSwitchingStates = 0
update_nearby_tiles()
air_update_turf()
update_icon()
if(state)
@@ -187,34 +195,21 @@
/obj/structure/mineral_door/transparent/plasma
mineralType = "plasma"
/*
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
TemperatureAct(100)
..()
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
proc/TemperatureAct(temperature)
for(var/turf/simulated/floor/target_tile in range(2,loc))
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = temperature/10
napalm.toxins = toxinsToDeduce
napalm.temperature = 200+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
hardness -= toxinsToDeduce/100
CheckHardness()
*/
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
hardness = 0
CheckHardness()
/obj/structure/mineral_door/transparent/diamond
mineralType = "diamond"
@@ -54,13 +54,20 @@
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()
var/M = buckled_mob
buckled_mob = null
afterbuckle(M)
return
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
@@ -110,6 +117,7 @@
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
afterbuckle(M)
return
/*
@@ -73,7 +73,6 @@
// Chair types
/obj/structure/stool/bed/chair/wood
autoignition_temperature = AUTOIGNITION_WOOD
// TODO: Special ash subtype that looks like charred chair legs
/obj/structure/stool/bed/chair/wood/normal
@@ -97,26 +96,53 @@
/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(141,70,0)
/obj/structure/stool/bed/chair/comfy/beige
icon_state = "comfychair_beige"
/obj/structure/stool/bed/chair/comfy/red
color = rgb(218,2,10)
/obj/structure/stool/bed/chair/comfy/teal
icon_state = "comfychair_teal"
color = rgb(0,234,250)
/obj/structure/stool/bed/chair/comfy/black
color = rgb(60,60,60)
/obj/structure/stool/bed/chair/comfy/green
color = rgb(1,196,8)
/obj/structure/stool/bed/chair/comfy/purp
color = rgb(112,2,176)
/obj/structure/stool/bed/chair/comfy/blue
color = rgb(2,9,210)
/obj/structure/stool/bed/chair/comfy/beige
color = rgb(255,253,195)
/obj/structure/stool/bed/chair/comfy/lime
color = rgb(255,251,0)
/obj/structure/stool/bed/chair/office
anchored = 0
movable = 1
/obj/structure/stool/bed/chair/comfy/black
icon_state = "comfychair_black"
/obj/structure/stool/bed/chair/comfy/lime
icon_state = "comfychair_lime"
/obj/structure/stool/bed/chair/office/Move()
..()
if(buckled_mob)
@@ -166,7 +192,7 @@
name = "old ratty sofa"
icon_state = "sofamiddle"
anchored = 1
density = 1
/obj/structure/stool/bed/chair/sofa/left
icon_state = "sofaend_left"
/obj/structure/stool/bed/chair/sofa/right
@@ -561,7 +561,6 @@
icon_state = "wood_table"
parts = /obj/item/weapon/table_parts/wood
health = 50
autoignition_temperature = AUTOIGNITION_WOOD // TODO: Special ash subtype that looks like charred table legs.
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
@@ -30,20 +30,32 @@ obj/structure/windoor_assembly
obj/structure/windoor_assembly/New(dir=NORTH)
..()
src.ini_dir = src.dir
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
obj/structure/windoor_assembly/Destroy()
density = 0
update_nearby_tiles()
air_update_turf(1)
..()
/obj/structure/windoor_assembly/Move()
var/turf/T = loc
..()
move_update_air(T)
/obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0)
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
if(air_group) return 0
return !density
else
return 1
/obj/structure/windoor_assembly/CanAtmosPass(var/turf/T)
if(get_dir(loc, T) == dir)
return !density
else
return 1
+34 -64
View File
@@ -60,13 +60,9 @@ var/global/wcColored
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
update_nearby_icons()
air_update_turf(1)
..()
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!")
log_admin("Window destroyed by ([Proj.firer.ckey]) via \an [Proj]! pdiff = [pdiff] at [loc]!")
destroy()
return
@@ -118,11 +114,7 @@ var/global/wcColored
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
var/mob/M=null
if(ismob(AM))
tforce = 40
M=AM
else if(isobj(AM))
if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
@@ -132,23 +124,7 @@ var/global/wcColored
anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
if(M)
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [M.real_name] ([M.ckey])!")
else
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!")
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [AM]!")
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
if(M)
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [M.real_name] ([M.ckey])!")
else
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!")
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [AM]!")
destroy()
@@ -156,10 +132,6 @@ var/global/wcColored
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by hulk [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!")
destroy()
else if (usr.a_intent == "harm")
user.changeNext_move(CLICK_CD_MELEE)
@@ -185,9 +157,6 @@ var/global/wcColored
health -= damage
if(health <= 0)
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window destroyed by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
destroy()
else //for nicer text~
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
@@ -255,21 +224,11 @@ var/global/wcColored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
if(!anchored)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
if(!anchored)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
@@ -297,7 +256,7 @@ var/global/wcColored
user << "<span class='notice'>You have disassembled the window.</span>"
disassembled = 1
density = 0
update_nearby_tiles()
air_update_turf(1)
update_nearby_icons()
del(src)
else
@@ -308,10 +267,6 @@ var/global/wcColored
anchored = 0
update_nearby_icons()
step(src, get_dir(user, src))
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
else
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
@@ -328,9 +283,6 @@ var/global/wcColored
if(sound_effect)
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
if(health <= 0)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
msg_admin_attack("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!")
destroy()
return
@@ -344,10 +296,9 @@ var/global/wcColored
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 90)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
ini_dir = dir
return
@@ -361,10 +312,9 @@ var/global/wcColored
usr << "It is fastened to the floor therefore you can't rotate it!"
return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 270)
// updateSilicate()
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
ini_dir = dir
return
@@ -389,24 +339,23 @@ var/global/wcColored
ini_dir = dir
if(!color && !istype(src,/obj/structure/window/plasmabasic) && !istype(src,/obj/structure/window/plasmareinforced))
color = color_windows(src)
update_nearby_tiles(need_rebuild=1)
air_update_turf(1)
update_nearby_icons()
return
/obj/structure/window/Destroy()
density = 0
update_nearby_tiles()
air_update_turf(1)
if(loc && !disassembled)
playsound(get_turf(src), "shatter", 70, 1)
update_nearby_icons()
..()
/obj/structure/window/Move()
update_nearby_tiles(need_rebuild=1)
var/turf/T = loc
..()
dir = ini_dir
update_nearby_tiles(need_rebuild=1)
move_update_air(T)
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
@@ -414,7 +363,14 @@ var/global/wcColored
return 1
return 0
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/CanAtmosPass(turf/T)
if(get_dir(loc, T) == dir)
return !density
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
return !density
return 1
//This proc is used to update the icons of nearby windows.
/obj/structure/window/proc/update_nearby_icons()
if(!loc) return 0
update_icon()
@@ -425,7 +381,7 @@ var/global/wcColored
/obj/structure/window/update_icon()
return
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 800)
hit(round(exposed_volume / 100), 0)
..()
@@ -447,15 +403,23 @@ var/global/wcColored
/obj/structure/window/plasmabasic/New(Loc,re=0)
..()
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
air_update_turf()
update_nearby_icons()
return
/obj/structure/window/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 32000)
hit(round(exposed_volume / 1000), 0)
..()
/obj/structure/window/plasmabasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > T0C + 32000)
hit(round(exposed_volume / 1000), 0)
..()
/obj/structure/window/plasmabasic/BlockSuperconductivity()
return 1
/obj/structure/window/plasmareinforced
name = "reinforced plasma window"
desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
@@ -470,13 +434,19 @@ var/global/wcColored
/obj/structure/window/plasmareinforced/New(Loc,re=0)
..()
ini_dir = dir
update_nearby_tiles(need_rebuild=1)
air_update_turf()
update_nearby_icons()
return
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
/obj/structure/window/plasmareinforced/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
/obj/structure/window/plasmareinforced/BlockSuperconductivity()
return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK
/obj/structure/window/reinforced
name = "reinforced window"
desc = "It looks rather strong. Might take a few good hits to shatter it."
+3
View File
@@ -14,6 +14,9 @@
if(!height || air_group) return 0
else return ..()
CanAtmosPass(turf/T)
return !density
/obj/structure/shuttle/engine
name = "engine"
density = 1
+4 -1
View File
@@ -15,6 +15,9 @@
..()
levelupdate()
/turf/simulated/proc/burn_tile()
return
/turf/simulated/proc/MakeSlippery(var/wet_setting = 1) // 1 = Water, 2 = Lube
if(wet >= wet_setting)
return
@@ -157,7 +160,7 @@
else
M.inertia_dir = 0
return
else if(!istype(M, /mob/living/carbon/metroid) || (M:species.bodyflags & FEET_NOSLIP))
else if(!istype(M, /mob/living/carbon/slime) || (M:species.bodyflags & FEET_NOSLIP))
if (M.m_intent == "run" && prob(30))
M.stop_pulling()
step(M, M.dir)
+1 -10
View File
@@ -44,15 +44,6 @@ var/list/wood_icons = list("wood","wood-broken")
else
icon_regular_floor = icon_state
/turf/simulated/floor/ignite(var/temperature)
on_fire=1
visible_message("\The [src] bursts into flame!")
overlays += image(fire_dmi,fire_sprite)
spawn(rand(fire_time_min,fire_time_max) SECONDS)
if(!on_fire)
return
burn_tile()
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
// if (!( locate(/obj/machinery/mass_driver, src) ))
@@ -302,7 +293,7 @@ turf/simulated/floor/proc/update_icon()
src.icon_state = "sand[pick("1","2","3")]"
broken = 1
/turf/simulated/floor/proc/burn_tile()
/turf/simulated/floor/burn_tile()
if(istype(src,/turf/simulated/floor/engine)) return
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
if(broken || burnt) return
+11 -11
View File
@@ -74,14 +74,14 @@
/turf/simulated/floor/engine/n20
New()
. = ..()
//var/datum/gas_mixture/adding = new
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
air.trace_gases += trace_gas
trace_gas.moles = 70000
air.oxygen = 0
air.nitrogen = 0
air.update_values()
trace_gas.moles = 2000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
@@ -120,7 +120,7 @@
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
/turf/simulated/floor/greengrid/airless
icon_state = "gcircuit"
name = "airless floor"
@@ -154,7 +154,7 @@
name = "plating"
icon = 'icons/turf/floors.dmi'
icon_state = "plating"
/turf/simulated/shuttle/plating/vox //Vox skipjack plating
oxygen = 0
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
@@ -162,7 +162,7 @@
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
icon_state = "floor4"
/turf/simulated/shuttle/floor4/vox //Vox skipjack floors
name = "skipjack floor"
oxygen = 0
@@ -235,10 +235,10 @@
name = "snow"
icon = 'icons/turf/snow.dmi'
icon_state = "snow"
/turf/simulated/floor/plating/snow/ex_act(severity)
return
/turf/simulated/floor/snow
name = "snow"
icon = 'icons/turf/snow.dmi'
-20
View File
@@ -317,10 +317,6 @@
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
src.dismantle_wall(1)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) broke a rotting wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
return
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
@@ -374,10 +370,6 @@
if( user.loc == T && user.get_active_hand() == WT )
user << "<span class='notice'>You remove the outer plating.</span>"
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) dismanted a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
log_admin("[user.real_name] ([user.ckey]) dismanted a wall with a pdiff of [pdiff] at [loc]!")
dismantle_wall()
return
else
@@ -397,10 +389,6 @@
if( user.loc == T && user.get_active_hand() == W )
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) dismantled with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
log_admin("[user.real_name] ([user.ckey]) dismantled with a pdiff of [pdiff] at [loc]!")
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
return
@@ -418,10 +406,6 @@
if( user.loc == T && user.get_active_hand() == W )
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
dismantle_wall()
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) drilled a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
log_admin("[user.real_name] ([user.ckey]) drilled a wall with a pdiff of [pdiff] at [loc]!")
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
return
@@ -443,10 +427,6 @@
playsound(src, "sparks", 50, 1)
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
dismantle_wall(1)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff)
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) sliced up a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
log_admin("[user.real_name] ([user.ckey]) sliced up a wall with a pdiff of [pdiff] at [loc]!")
for(var/mob/O in viewers(user, 5))
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart and sparks flying.</span>", 2)
return
+6 -24
View File
@@ -78,47 +78,29 @@
/turf/simulated/wall/mineral/plasma
name = "plasma wall"
desc = "A wall with plasma plating. This is definitely a bad idea."
desc = "A wall with plasma plating. This is definately a bad idea."
icon_state = "plasma0"
walltype = "plasma"
mineral = "plasma"
thermal_conductivity = 0.04
/turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
ignite(is_hot(W))
return
..()
/turf/simulated/wall/mineral/plasma/proc/PlasmaBurn(temperature)
var/pdiff=performWallPressureCheck(src.loc)
if(pdiff>0)
message_admins("Plasma wall with pdiff [pdiff] at [formatJumpTo(loc)] just caught fire!")
spawn(2)
new /obj/structure/girder(src)
src.ChangeTurf(/turf/simulated/floor)
for(var/turf/simulated/floor/target_tile in range(0,src))
/*if(target_tile.parent && target_tile.parent.group_processing)
target_tile.parent.suspend_group_processing()*/
var/datum/gas_mixture/napalm = new
var/toxinsToDeduce = 20
napalm.toxins = toxinsToDeduce
napalm.temperature = 400+T0C
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(temperature, 400)
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
var/turf/T = get_turf(F)
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
del (F)
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
D.ignite(temperature/4)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 400)
/turf/simulated/wall/mineral/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
/turf/simulated/wall/mineral/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
if(exposed_temperature > 300)
PlasmaBurn(exposed_temperature)
/turf/simulated/wall/mineral/plasma/ignite(exposed_temperature)
/turf/simulated/wall/mineral/plasma/proc/ignite(exposed_temperature)
if(exposed_temperature > 300)
PlasmaBurn(exposed_temperature)
+57 -99
View File
@@ -36,6 +36,16 @@
return
return
// Adds the adjacent turfs to the current atmos processing
/turf/Destroy()
if(air_master)
for(var/direction in cardinal)
if(atmos_adjacent_turfs & direction)
var/turf/simulated/T = get_step(src, direction)
if(istype(T))
air_master.add_to_active(T)
..()
/turf/ex_act(severity)
return 0
@@ -213,117 +223,65 @@
del L
//Creates a new turf
/turf/proc/ChangeTurf(var/turf/N)
if (!N)
return
/turf/proc/ChangeTurf(var/path)
if(!path) return
if(path == type) return src
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/old_opacity = opacity
//world << "Replacing [src.type] with [N]"
if(air_master)
air_master.remove_from_active(src)
if(connections) connections.erase_all()
var/turf/W = new path(src)
if(istype(src,/turf/simulated))
//Yeah, we're just going to rebuild the whole thing.
//Despite this being called a bunch during explosions,
//the zone will only really do heavy lifting once.
var/turf/simulated/S = src
if(S.zone) S.zone.rebuild()
if(istype(W, /turf/simulated))
W:Assimilate_Air()
W.RemoveLattice()
if(ispath(N, /turf/simulated/floor))
//if the old turf had a zone, connect the new turf to it as well - Cael
//Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf.
//if(zone)
// zone.RemoveTurf(src)
// if(!zone.CheckStatus())
// zone.SetStatus(ZONE_ACTIVE)
W.lighting_lumcount += old_lumcount
if(old_lumcount != W.lighting_lumcount) //light levels of the turf have changed. We need to shift it to another lighting-subarea
W.lighting_changed = 1
lighting_controller.changed_turfs += W
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
//W.Assimilate_Air()
if(old_opacity != W.opacity) //opacity has changed. Need to update surrounding lights
if(W.lighting_lumcount) //unless we're being illuminated, don't bother (may be buggy, hard to test)
W.UpdateAffectingLights()
W.lighting_lumcount += old_lumcount
if(old_lumcount != W.lighting_lumcount)
W.lighting_changed = 1
lighting_controller.changed_turfs += W
W.levelupdate()
W.CalculateAdjacentTurfs()
return W
if(old_opacity != W.opacity) //opacity has changed. Need to update surrounding lights
if(W.lighting_lumcount) //unless we're being illuminated, don't bother (may be buggy, hard to test)
W.UpdateAffectingLights()
if (istype(W,/turf/simulated/floor))
W.RemoveLattice()
if(air_master)
air_master.mark_for_update(src)
W.levelupdate()
return W
else
//if(zone)
// zone.RemoveTurf(src)
// if(!zone.CheckStatus())
// zone.SetStatus(ZONE_ACTIVE)
var/turf/W = new N( locate(src.x, src.y, src.z) )
W.lighting_lumcount += old_lumcount
if(old_lumcount != W.lighting_lumcount)
W.lighting_changed = 1
lighting_controller.changed_turfs += W
if(air_master)
air_master.mark_for_update(src)
W.levelupdate()
return W
/*
//////Assimilate Air//////
/turf/simulated/proc/Assimilate_Air()
var/aoxy = 0//Holders to assimilate air from nearby turfs
var/anitro = 0
var/aco = 0
var/atox = 0
var/atemp = 0
var/turf_count = 0
if(air)
var/aoxy = 0//Holders to assimilate air from nearby turfs
var/anitro = 0
var/aco = 0
var/atox = 0
var/atemp = 0
var/turf_count = 0
for(var/direction in cardinal)//Only use cardinals to cut down on lag
var/turf/T = get_step(src,direction)
if(istype(T,/turf/space))//Counted as no air
turf_count++//Considered a valid turf for air calcs
continue
else if(istype(T,/turf/simulated/floor))
var/turf/simulated/S = T
if(S.air)//Add the air's contents to the holders
aoxy += S.air.oxygen
anitro += S.air.nitrogen
aco += S.air.carbon_dioxide
atox += S.air.toxins
atemp += S.air.temperature
turf_count ++
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro/max(turf_count,1))
air.carbon_dioxide = (aco/max(turf_count,1))
air.toxins = (atox/max(turf_count,1))
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
air.update_values()
for(var/direction in cardinal)//Only use cardinals to cut down on lag
var/turf/T = get_step(src,direction)
if(istype(T,/turf/space))//Counted as no air
turf_count++//Considered a valid turf for air calcs
continue
else if(istype(T,/turf/simulated/floor))
var/turf/simulated/S = T
if(S.air)//Add the air's contents to the holders
aoxy += S.air.oxygen
anitro += S.air.nitrogen
aco += S.air.carbon_dioxide
atox += S.air.toxins
atemp += S.air.temperature
turf_count ++
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro/max(turf_count,1))
air.carbon_dioxide = (aco/max(turf_count,1))
air.toxins = (atox/max(turf_count,1))
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
if(air_master)
air_master.add_to_active(src)
//cael - duplicate the averaged values across adjacent turfs to enforce a seamless atmos change
for(var/direction in cardinal)//Only use cardinals to cut down on lag
var/turf/T = get_step(src,direction)
if(istype(T,/turf/space))//Counted as no air
continue
else if(istype(T,/turf/simulated/floor))
var/turf/simulated/S = T
if(S.air)//Add the air's contents to the holders
S.air.oxygen = air.oxygen
S.air.nitrogen = air.nitrogen
S.air.carbon_dioxide = air.carbon_dioxide
S.air.toxins = air.toxins
S.air.temperature = air.temperature
S.air.update_values()
*/
/turf/proc/ReplaceWithLattice()
src.ChangeTurf(/turf/space)
new /obj/structure/lattice( locate(src.x, src.y, src.z) )