mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 11:07:46 +01:00
Merge remote-tracking branch 'Upstream/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#### Brief description of the issue
|
||||
#### Brief description of the bug
|
||||
|
||||
|
||||
#### What you expected to happen
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
GLOBAL_LIST_EMPTY(shutoff_valves)
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff
|
||||
icon = 'icons/atmos/clamp.dmi'
|
||||
icon_state = "map_vclamp0"
|
||||
pipe_state = "vclamp"
|
||||
|
||||
name = "automatic shutoff valve"
|
||||
desc = "An automatic valve with control circuitry and pipe integrity sensor, capable of automatically isolating damaged segments of the pipe network."
|
||||
var/close_on_leaks = TRUE // If false it will be always open
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/update_icon()
|
||||
icon_state = "vclamp[open]"
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/examine(var/mob/user)
|
||||
..()
|
||||
to_chat(user, "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"].")
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/Initialize()
|
||||
. = ..()
|
||||
open()
|
||||
GLOB.shutoff_valves += src
|
||||
hide(1)
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/Destroy()
|
||||
GLOB.shutoff_valves -= src
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/attack_hand(var/mob/user)
|
||||
src.add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
close_on_leaks = !close_on_leaks
|
||||
to_chat(user, "You [close_on_leaks ? "enable" : "disable"] the automatic shutoff circuit.")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/valve/shutoff/process()
|
||||
..()
|
||||
|
||||
if (!network_node1 || !network_node2)
|
||||
if(open)
|
||||
close()
|
||||
return
|
||||
|
||||
if (!close_on_leaks)
|
||||
if (!open)
|
||||
open()
|
||||
return
|
||||
|
||||
if (network_node1.leaks.len || network_node2.leaks.len)
|
||||
if (open)
|
||||
close()
|
||||
else if (!open)
|
||||
open()
|
||||
@@ -1,4 +1,4 @@
|
||||
//Basically a one way passive valve. If the pressure inside is greater than the environment then gas will flow passively,
|
||||
//Basically a one way passive valve. If the pressure inside is greater than the environment then gas will flow passively,
|
||||
//but it does not permit gas to flow back from the environment into the injector. Can be turned off to prevent any gas flow.
|
||||
//When it receives the "inject" signal, it will try to pump it's entire contents into the environment regardless of pressure, using power.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
use_power = 0
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
power_rating = 15000 //15000 W ~ 20 HP
|
||||
|
||||
|
||||
var/injecting = 0
|
||||
|
||||
var/volume_rate = 50 //flow rate limit
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/New()
|
||||
..()
|
||||
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //Give it a small reservoir for injecting. Also allows it to have a higher flow rate limit than vent pumps, to differentiate injectors a bit more.
|
||||
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //Give it a small reservoir for injecting. Also allows it to have a higher flow rate limit than vent pumps, to differentiate injectors a bit more.
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/Destroy()
|
||||
unregister_radio(src, frequency)
|
||||
@@ -60,21 +60,21 @@
|
||||
|
||||
if((stat & (NOPOWER|BROKEN)) || !use_power)
|
||||
return
|
||||
|
||||
|
||||
var/power_draw = -1
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
|
||||
if(environment && air_contents.temperature > 0)
|
||||
var/transfer_moles = (volume_rate/air_contents.volume)*air_contents.total_moles //apply flow rate limit
|
||||
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
|
||||
|
||||
|
||||
if (power_draw >= 0)
|
||||
last_power_draw = power_draw
|
||||
use_power(power_draw)
|
||||
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/proc/inject()
|
||||
@@ -84,7 +84,7 @@
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
if (!environment)
|
||||
return 0
|
||||
|
||||
|
||||
injecting = 1
|
||||
|
||||
if(air_contents.temperature > 0)
|
||||
@@ -155,4 +155,23 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/hide(var/i)
|
||||
update_underlays()
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attack_hand(mob/user as mob)
|
||||
to_chat(user, "<span class='notice'>You toggle \the [src].</span>")
|
||||
injecting = !injecting
|
||||
use_power = injecting
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if (!W.is_wrench())
|
||||
return ..()
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40 * W.toolspeed))
|
||||
user.visible_message( \
|
||||
"<span class='notice'>\The [user] unfastens \the [src].</span>", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"You hear a ratchet.")
|
||||
deconstruct()
|
||||
|
||||
@@ -8,76 +8,83 @@ var/global/list/datum/pipe_network/pipe_networks = list() // TODO - Move into SS
|
||||
var/list/datum/pipeline/line_members = list()
|
||||
//membership roster to go through for updates and what not
|
||||
|
||||
var/list/leaks = list()
|
||||
|
||||
var/update = 1
|
||||
//var/datum/gas_mixture/air_transient = null
|
||||
|
||||
Destroy()
|
||||
STOP_PROCESSING_PIPENET(src)
|
||||
for(var/datum/pipeline/line_member in line_members)
|
||||
line_member.network = null
|
||||
for(var/obj/machinery/atmospherics/normal_member in normal_members)
|
||||
normal_member.reassign_network(src, null)
|
||||
gases.Cut() // Do not qdel the gases, we don't own them
|
||||
return ..()
|
||||
/datum/pipe_network/Destroy()
|
||||
STOP_PROCESSING_PIPENET(src)
|
||||
for(var/datum/pipeline/line_member in line_members)
|
||||
line_member.network = null
|
||||
for(var/obj/machinery/atmospherics/normal_member in normal_members)
|
||||
normal_member.reassign_network(src, null)
|
||||
gases.Cut() // Do not qdel the gases, we don't own them
|
||||
leaks.Cut()
|
||||
return ..()
|
||||
|
||||
process()
|
||||
//Equalize gases amongst pipe if called for
|
||||
if(update)
|
||||
update = 0
|
||||
reconcile_air() //equalize_gases(gases)
|
||||
/datum/pipe_network/process()
|
||||
//Equalize gases amongst pipe if called for
|
||||
if(update)
|
||||
update = 0
|
||||
reconcile_air() //equalize_gases(gases)
|
||||
|
||||
//Give pipelines their process call for pressure checking and what not. Have to remove pressure checks for the time being as pipes dont radiate heat - Mport
|
||||
//for(var/datum/pipeline/line_member in line_members)
|
||||
// line_member.process()
|
||||
listclearnulls(leaks) // Let's not have forever-seals.
|
||||
|
||||
proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
|
||||
//Purpose: Generate membership roster
|
||||
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
|
||||
//Give pipelines their process call for pressure checking and what not. Have to remove pressure checks for the time being as pipes dont radiate heat - Mport
|
||||
//for(var/datum/pipeline/line_member in line_members)
|
||||
// line_member.process()
|
||||
|
||||
if(!start_normal)
|
||||
qdel(src)
|
||||
return
|
||||
/datum/pipe_network/proc/build_network(obj/machinery/atmospherics/start_normal, obj/machinery/atmospherics/reference)
|
||||
//Purpose: Generate membership roster
|
||||
//Notes: Assuming that members will add themselves to appropriate roster in network_expand()
|
||||
|
||||
start_normal.network_expand(src, reference)
|
||||
if(!start_normal)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
update_network_gases()
|
||||
start_normal.network_expand(src, reference)
|
||||
|
||||
if((normal_members.len>0)||(line_members.len>0))
|
||||
START_PROCESSING_PIPENET(src)
|
||||
else
|
||||
qdel(src)
|
||||
update_network_gases()
|
||||
|
||||
proc/merge(datum/pipe_network/giver)
|
||||
if(giver==src) return 0
|
||||
if((normal_members.len>0)||(line_members.len>0))
|
||||
START_PROCESSING_PIPENET(src)
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
normal_members |= giver.normal_members
|
||||
/datum/pipe_network/proc/merge(datum/pipe_network/giver)
|
||||
if(giver==src) return 0
|
||||
|
||||
line_members |= giver.line_members
|
||||
normal_members |= giver.normal_members
|
||||
|
||||
for(var/obj/machinery/atmospherics/normal_member in giver.normal_members)
|
||||
normal_member.reassign_network(giver, src)
|
||||
line_members |= giver.line_members
|
||||
|
||||
for(var/datum/pipeline/line_member in giver.line_members)
|
||||
line_member.network = src
|
||||
leaks |= giver.leaks
|
||||
|
||||
update_network_gases()
|
||||
return 1
|
||||
for(var/obj/machinery/atmospherics/normal_member in giver.normal_members)
|
||||
normal_member.reassign_network(giver, src)
|
||||
|
||||
proc/update_network_gases()
|
||||
//Go through membership roster and make sure gases is up to date
|
||||
for(var/datum/pipeline/line_member in giver.line_members)
|
||||
line_member.network = src
|
||||
|
||||
gases = list()
|
||||
volume = 0
|
||||
update_network_gases()
|
||||
return 1
|
||||
|
||||
for(var/obj/machinery/atmospherics/normal_member in normal_members)
|
||||
var/result = normal_member.return_network_air(src)
|
||||
if(result) gases += result
|
||||
/datum/pipe_network/proc/update_network_gases()
|
||||
//Go through membership roster and make sure gases is up to date
|
||||
|
||||
for(var/datum/pipeline/line_member in line_members)
|
||||
gases += line_member.air
|
||||
gases = list()
|
||||
volume = 0
|
||||
|
||||
for(var/datum/gas_mixture/air in gases)
|
||||
volume += air.volume
|
||||
for(var/obj/machinery/atmospherics/normal_member in normal_members)
|
||||
var/result = normal_member.return_network_air(src)
|
||||
if(result) gases += result
|
||||
|
||||
proc/reconcile_air()
|
||||
equalize_gases(gases)
|
||||
for(var/datum/pipeline/line_member in line_members)
|
||||
gases += line_member.air
|
||||
|
||||
for(var/datum/gas_mixture/air in gases)
|
||||
volume += air.volume
|
||||
|
||||
/datum/pipe_network/proc/reconcile_air()
|
||||
equalize_gases(gases)
|
||||
|
||||
+176
-161
@@ -1,219 +1,234 @@
|
||||
|
||||
datum/pipeline
|
||||
/datum/pipeline
|
||||
var/datum/gas_mixture/air
|
||||
|
||||
var/list/obj/machinery/atmospherics/pipe/members
|
||||
var/list/obj/machinery/atmospherics/pipe/edges //Used for building networks
|
||||
|
||||
// Nodes that are leaking. Used for A.S. Valves.
|
||||
var/list/leaks = list()
|
||||
|
||||
var/datum/pipe_network/network
|
||||
|
||||
var/alert_pressure = 0
|
||||
|
||||
Destroy()
|
||||
QDEL_NULL(network)
|
||||
/datum/pipeline/Destroy()
|
||||
QDEL_NULL(network)
|
||||
|
||||
if(air && air.volume)
|
||||
temporarily_store_air()
|
||||
for(var/obj/machinery/atmospherics/pipe/P in members)
|
||||
P.parent = null
|
||||
members = null
|
||||
edges = null
|
||||
. = ..()
|
||||
if(air && air.volume)
|
||||
temporarily_store_air()
|
||||
for(var/obj/machinery/atmospherics/pipe/P in members)
|
||||
P.parent = null
|
||||
members = null
|
||||
edges = null
|
||||
leaks = null
|
||||
. = ..()
|
||||
|
||||
process()//This use to be called called from the pipe networks
|
||||
|
||||
//Check to see if pressure is within acceptable limits
|
||||
var/pressure = air.return_pressure()
|
||||
if(pressure > alert_pressure)
|
||||
for(var/obj/machinery/atmospherics/pipe/member in members)
|
||||
if(!member.check_pressure(pressure))
|
||||
break //Only delete 1 pipe per process
|
||||
|
||||
proc/temporarily_store_air()
|
||||
//Update individual gas_mixtures by volume ratio
|
||||
/datum/pipeline/process()//This use to be called called from the pipe networks
|
||||
|
||||
//Check to see if pressure is within acceptable limits
|
||||
var/pressure = air.return_pressure()
|
||||
if(pressure > alert_pressure)
|
||||
for(var/obj/machinery/atmospherics/pipe/member in members)
|
||||
member.air_temporary = new
|
||||
member.air_temporary.copy_from(air)
|
||||
member.air_temporary.volume = member.volume
|
||||
member.air_temporary.multiply(member.volume / air.volume)
|
||||
if(!member.check_pressure(pressure))
|
||||
break //Only delete 1 pipe per process
|
||||
|
||||
proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
|
||||
/datum/pipeline/proc/temporarily_store_air()
|
||||
//Update individual gas_mixtures by volume ratio
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/member in members)
|
||||
member.air_temporary = new
|
||||
member.air_temporary.copy_from(air)
|
||||
member.air_temporary.volume = member.volume
|
||||
member.air_temporary.multiply(member.volume / air.volume)
|
||||
|
||||
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
|
||||
air = new
|
||||
|
||||
var/list/possible_expansions = list(base)
|
||||
members = list(base)
|
||||
edges = list()
|
||||
|
||||
var/volume = base.volume
|
||||
base.parent = src
|
||||
alert_pressure = base.alert_pressure
|
||||
|
||||
if(base.air_temporary)
|
||||
air = base.air_temporary
|
||||
base.air_temporary = null
|
||||
else
|
||||
air = new
|
||||
|
||||
var/list/possible_expansions = list(base)
|
||||
members = list(base)
|
||||
edges = list()
|
||||
if(base.leaking)
|
||||
leaks |= base
|
||||
|
||||
var/volume = base.volume
|
||||
base.parent = src
|
||||
alert_pressure = base.alert_pressure
|
||||
while(possible_expansions.len>0)
|
||||
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
|
||||
|
||||
if(base.air_temporary)
|
||||
air = base.air_temporary
|
||||
base.air_temporary = null
|
||||
else
|
||||
air = new
|
||||
var/list/result = borderline.pipeline_expansion()
|
||||
var/edge_check = result.len
|
||||
|
||||
while(possible_expansions.len>0)
|
||||
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
|
||||
if(result.len>0)
|
||||
for(var/obj/machinery/atmospherics/pipe/item in result)
|
||||
|
||||
var/list/result = borderline.pipeline_expansion()
|
||||
var/edge_check = result.len
|
||||
if(item.in_stasis)
|
||||
continue
|
||||
|
||||
if(result.len>0)
|
||||
for(var/obj/machinery/atmospherics/pipe/item in result)
|
||||
if(!members.Find(item))
|
||||
members += item
|
||||
possible_expansions += item
|
||||
if(!members.Find(item))
|
||||
members += item
|
||||
possible_expansions += item
|
||||
|
||||
volume += item.volume
|
||||
item.parent = src
|
||||
volume += item.volume
|
||||
item.parent = src
|
||||
|
||||
alert_pressure = min(alert_pressure, item.alert_pressure)
|
||||
alert_pressure = min(alert_pressure, item.alert_pressure)
|
||||
|
||||
if(item.air_temporary)
|
||||
air.merge(item.air_temporary)
|
||||
if(item.air_temporary)
|
||||
air.merge(item.air_temporary)
|
||||
|
||||
edge_check--
|
||||
if(item.leaking)
|
||||
leaks |= item
|
||||
|
||||
if(edge_check>0)
|
||||
edges += borderline
|
||||
edge_check--
|
||||
|
||||
possible_expansions -= borderline
|
||||
if(edge_check>0)
|
||||
edges += borderline
|
||||
|
||||
air.volume = volume
|
||||
possible_expansions -= borderline
|
||||
|
||||
proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
air.volume = volume
|
||||
|
||||
if(new_network.line_members.Find(src))
|
||||
return 0
|
||||
/datum/pipeline/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
|
||||
new_network.line_members += src
|
||||
if(new_network.line_members.Find(src))
|
||||
return 0
|
||||
|
||||
network = new_network
|
||||
new_network.line_members += src
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/edge in edges)
|
||||
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
|
||||
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
|
||||
result.network_expand(new_network, edge)
|
||||
network = new_network
|
||||
network.leaks |= leaks
|
||||
|
||||
return 1
|
||||
for(var/obj/machinery/atmospherics/pipe/edge in edges)
|
||||
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
|
||||
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
|
||||
result.network_expand(new_network, edge)
|
||||
|
||||
proc/return_network(obj/machinery/atmospherics/reference)
|
||||
if(!network)
|
||||
network = new /datum/pipe_network()
|
||||
network.build_network(src, null)
|
||||
//technically passing these parameters should not be allowed
|
||||
//however pipe_network.build_network(..) and pipeline.network_extend(...)
|
||||
// were setup to properly handle this case
|
||||
return 1
|
||||
|
||||
return network
|
||||
/datum/pipeline/proc/return_network(obj/machinery/atmospherics/reference)
|
||||
if(!network)
|
||||
network = new /datum/pipe_network()
|
||||
network.build_network(src, null)
|
||||
//technically passing these parameters should not be allowed
|
||||
//however pipe_network.build_network(..) and pipeline.network_extend(...)
|
||||
// were setup to properly handle this case
|
||||
|
||||
proc/mingle_with_turf(turf/simulated/target, mingle_volume)
|
||||
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
|
||||
air_sample.volume = mingle_volume
|
||||
return network
|
||||
|
||||
if(istype(target) && target.zone)
|
||||
//Have to consider preservation of group statuses
|
||||
var/datum/gas_mixture/turf_copy = new
|
||||
var/datum/gas_mixture/turf_original = new
|
||||
/datum/pipeline/proc/mingle_with_turf(turf/simulated/target, mingle_volume)
|
||||
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
|
||||
air_sample.volume = mingle_volume
|
||||
|
||||
turf_copy.copy_from(target.zone.air)
|
||||
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
|
||||
turf_original.copy_from(turf_copy)
|
||||
if(istype(target) && target.zone)
|
||||
//Have to consider preservation of group statuses
|
||||
var/datum/gas_mixture/turf_copy = new
|
||||
var/datum/gas_mixture/turf_original = new
|
||||
|
||||
equalize_gases(list(air_sample, turf_copy))
|
||||
air.merge(air_sample)
|
||||
turf_copy.copy_from(target.zone.air)
|
||||
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
|
||||
turf_original.copy_from(turf_copy)
|
||||
|
||||
equalize_gases(list(air_sample, turf_copy))
|
||||
air.merge(air_sample)
|
||||
|
||||
|
||||
target.zone.air.remove(turf_original.total_moles)
|
||||
target.zone.air.merge(turf_copy)
|
||||
target.zone.air.remove(turf_original.total_moles)
|
||||
target.zone.air.merge(turf_copy)
|
||||
|
||||
else
|
||||
var/datum/gas_mixture/turf_air = target.return_air()
|
||||
else
|
||||
var/datum/gas_mixture/turf_air = target.return_air()
|
||||
|
||||
equalize_gases(list(air_sample, turf_air))
|
||||
air.merge(air_sample)
|
||||
//turf_air already modified by equalize_gases()
|
||||
equalize_gases(list(air_sample, turf_air))
|
||||
air.merge(air_sample)
|
||||
//turf_air already modified by equalize_gases()
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
|
||||
var/total_heat_capacity = air.heat_capacity()
|
||||
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
|
||||
/datum/pipeline/proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
|
||||
var/total_heat_capacity = air.heat_capacity()
|
||||
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
|
||||
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/modeled_location = target
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/modeled_location = target
|
||||
|
||||
if(modeled_location.blocks_air)
|
||||
if(modeled_location.blocks_air)
|
||||
|
||||
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/delta_temperature = air.temperature - modeled_location.temperature
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
modeled_location.temperature += heat/modeled_location.heat_capacity
|
||||
|
||||
else
|
||||
var/delta_temperature = 0
|
||||
var/sharer_heat_capacity = 0
|
||||
|
||||
if(modeled_location.zone)
|
||||
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
|
||||
else
|
||||
delta_temperature = (air.temperature - modeled_location.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.air.heat_capacity()
|
||||
|
||||
var/self_temperature_delta = 0
|
||||
var/sharer_temperature_delta = 0
|
||||
|
||||
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
|
||||
|
||||
self_temperature_delta = -heat/total_heat_capacity
|
||||
sharer_temperature_delta = heat/sharer_heat_capacity
|
||||
else
|
||||
return 1
|
||||
|
||||
air.temperature += self_temperature_delta
|
||||
|
||||
if(modeled_location.zone)
|
||||
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
|
||||
else
|
||||
modeled_location.air.temperature += sharer_temperature_delta
|
||||
|
||||
|
||||
else
|
||||
if((target.heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/delta_temperature = air.temperature - target.temperature
|
||||
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/delta_temperature = air.temperature - modeled_location.temperature
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
||||
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
if(network)
|
||||
network.update = 1
|
||||
modeled_location.temperature += heat/modeled_location.heat_capacity
|
||||
|
||||
//surface must be the surface area in m^2
|
||||
proc/radiate_heat_to_space(surface, thermal_conductivity)
|
||||
var/gas_density = air.total_moles/air.volume
|
||||
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio
|
||||
else
|
||||
var/delta_temperature = 0
|
||||
var/sharer_heat_capacity = 0
|
||||
|
||||
// We only get heat from the star on the exposed surface area.
|
||||
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
|
||||
var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * thermal_conductivity
|
||||
if(modeled_location.zone)
|
||||
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
|
||||
else
|
||||
delta_temperature = (air.temperature - modeled_location.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.air.heat_capacity()
|
||||
|
||||
// Previously, the temperature would enter equilibrium at 26C or 294K.
|
||||
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
|
||||
// It currently should stabilise at 129.6K or -143.6C
|
||||
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
|
||||
var/self_temperature_delta = 0
|
||||
var/sharer_temperature_delta = 0
|
||||
|
||||
air.add_thermal_energy(heat_gain)
|
||||
if(network)
|
||||
network.update = 1
|
||||
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
|
||||
|
||||
self_temperature_delta = -heat/total_heat_capacity
|
||||
sharer_temperature_delta = heat/sharer_heat_capacity
|
||||
else
|
||||
return 1
|
||||
|
||||
air.temperature += self_temperature_delta
|
||||
|
||||
if(modeled_location.zone)
|
||||
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
|
||||
else
|
||||
modeled_location.air.temperature += sharer_temperature_delta
|
||||
|
||||
|
||||
else
|
||||
if((target.heat_capacity>0) && (partial_heat_capacity>0))
|
||||
var/delta_temperature = air.temperature - target.temperature
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
//surface must be the surface area in m^2
|
||||
/datum/pipeline/proc/radiate_heat_to_space(surface, thermal_conductivity)
|
||||
var/gas_density = air.total_moles/air.volume
|
||||
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio
|
||||
|
||||
// We only get heat from the star on the exposed surface area.
|
||||
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
|
||||
var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * thermal_conductivity
|
||||
|
||||
// Previously, the temperature would enter equilibrium at 26C or 294K.
|
||||
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
|
||||
// It currently should stabilise at 129.6K or -143.6C
|
||||
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
|
||||
|
||||
air.add_thermal_energy(heat_gain)
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
@@ -67,8 +67,22 @@
|
||||
return
|
||||
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/set_leaking(var/new_leaking) // They already process, no need for manual processing toggles.
|
||||
if(new_leaking && !leaking)
|
||||
leaking = TRUE
|
||||
if(parent)
|
||||
parent.leaks |= src
|
||||
if(parent.network)
|
||||
parent.network.leaks |= src
|
||||
else if (!new_leaking && leaking)
|
||||
leaking = FALSE
|
||||
if(parent)
|
||||
parent.leaks -= src
|
||||
if(parent.network)
|
||||
parent.network.leaks -= src
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
|
||||
if(!parent)
|
||||
@@ -180,4 +194,5 @@
|
||||
return
|
||||
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
return
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/set_leaking(var/new_leaking)
|
||||
return //Nope
|
||||
@@ -68,9 +68,24 @@
|
||||
node3 = null
|
||||
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/handle_leaking()
|
||||
if(node1 && node2 && node3)
|
||||
set_leaking(FALSE)
|
||||
else
|
||||
set_leaking(TRUE)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/process()
|
||||
if(!parent)
|
||||
..()
|
||||
else if(leaking)
|
||||
parent.mingle_with_turf(loc, volume)
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
@@ -154,6 +169,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible
|
||||
icon_state = "map"
|
||||
|
||||
@@ -66,9 +66,24 @@
|
||||
node4 = null
|
||||
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/handle_leaking()
|
||||
if(node1 && node2 && node3 && node4)
|
||||
set_leaking(FALSE)
|
||||
else
|
||||
set_leaking(TRUE)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/process()
|
||||
if(!parent)
|
||||
..()
|
||||
else if(leaking)
|
||||
parent.mingle_with_turf(loc, volume)
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/change_color(var/new_color)
|
||||
..()
|
||||
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
|
||||
@@ -156,6 +171,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
||||
icon_state = "map_4way"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
var/datum/gas_mixture/air_temporary // used when reconstructing a pipeline that broke
|
||||
var/datum/pipeline/parent
|
||||
var/volume = 0
|
||||
var/leaking = FALSE // Do not set directly, use set_leaking(TRUE/FALSE)
|
||||
|
||||
layer = PIPES_LAYER
|
||||
use_power = 0
|
||||
@@ -13,6 +14,7 @@
|
||||
pipe_flags = 0 // Does not have PIPING_DEFAULT_LAYER_ONLY flag.
|
||||
|
||||
var/alert_pressure = 80*ONE_ATMOSPHERE
|
||||
var/in_stasis = FALSE
|
||||
//minimum pressure before check_pressure(...) should be called
|
||||
|
||||
can_buckle = 1
|
||||
@@ -30,6 +32,31 @@
|
||||
/obj/machinery/atmospherics/pipe/hides_under_flooring()
|
||||
return level != 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/set_leaking(var/new_leaking)
|
||||
if(new_leaking && !leaking)
|
||||
if(!speed_process)
|
||||
START_MACHINE_PROCESSING(src)
|
||||
else
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
leaking = TRUE
|
||||
if(parent)
|
||||
parent.leaks |= src
|
||||
if(parent.network)
|
||||
parent.network.leaks |= src
|
||||
else if (!new_leaking && leaking)
|
||||
if(!speed_process)
|
||||
STOP_MACHINE_PROCESSING(src)
|
||||
else
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
leaking = FALSE
|
||||
if(parent)
|
||||
parent.leaks -= src
|
||||
if(parent.network)
|
||||
parent.network.leaks -= src
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/handle_leaking() // Used specifically to update leaking status on different pipes.
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/pipe/proc/pipeline_expansion()
|
||||
return null
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
/obj/machinery/atmospherics/pipe/set_leaking(var/new_leaking)
|
||||
return // N O P E
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Simple Pipes - Just a tube, maybe bent
|
||||
//
|
||||
//
|
||||
/obj/machinery/atmospherics/pipe/simple
|
||||
icon = 'icons/atmos/pipes.dmi'
|
||||
icon_state = ""
|
||||
@@ -34,6 +34,14 @@
|
||||
icon = null
|
||||
alpha = 255
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/process()
|
||||
if(!parent)
|
||||
..()
|
||||
else if(leaking)
|
||||
parent.mingle_with_turf(loc, volume)
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/check_pressure(pressure)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
@@ -147,6 +155,7 @@
|
||||
var/turf/T = loc
|
||||
if(level == 1 && !T.is_plating()) hide(1)
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
@@ -160,9 +169,16 @@
|
||||
node2 = null
|
||||
|
||||
update_icon()
|
||||
handle_leaking()
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/handle_leaking()
|
||||
if(node1 && node2)
|
||||
set_leaking(FALSE)
|
||||
else
|
||||
set_leaking(TRUE)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
construction_type = /obj/item/pipe/binary
|
||||
pipe_state = "universal"
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0)
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0) // Doesn't leak. It's a special pipe.
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define DM_FLAG_NUMBING 0x1
|
||||
#define DM_FLAG_STRIPPING 0x2
|
||||
#define DM_FLAG_LEAVEREMAINS 0x4
|
||||
#define DM_FLAG_THICKBELLY 0x8
|
||||
|
||||
//Item related modes
|
||||
#define IM_HOLD "Hold"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define HALLOSS "halloss"
|
||||
#define ELECTROCUTE "electrocute"
|
||||
#define BIOACID "bioacid"
|
||||
#define SEARING "searing"
|
||||
|
||||
#define CUT "cut"
|
||||
#define BRUISE "bruise"
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
#define MAT_LEAD "lead"
|
||||
#define MAT_SUPERMATTER "supermatter"
|
||||
#define MAT_METALHYDROGEN "mhydrogen"
|
||||
#define MAT_OSMIUM "osmium"
|
||||
|
||||
#define SHARD_SHARD "shard"
|
||||
#define SHARD_SHRAPNEL "shrapnel"
|
||||
@@ -347,10 +348,12 @@ var/global/list/##LIST_NAME = list();\
|
||||
#define RCD_MAX_CAPACITY 30 * RCD_SHEETS_PER_MATTER_UNIT
|
||||
|
||||
// Radiation 'levels'. Used for the geiger counter, for visuals and sound. They are in different files so this goes here.
|
||||
#define RAD_LEVEL_LOW 0.01 // Around the level at which radiation starts to become harmful
|
||||
#define RAD_LEVEL_MODERATE 10
|
||||
#define RAD_LEVEL_LOW 0.5 // Around the level at which radiation starts to become harmful
|
||||
#define RAD_LEVEL_MODERATE 5
|
||||
#define RAD_LEVEL_HIGH 25
|
||||
#define RAD_LEVEL_VERY_HIGH 50
|
||||
#define RAD_LEVEL_VERY_HIGH 75
|
||||
|
||||
#define RADIATION_THRESHOLD_CUTOFF 0.1 // Radiation will not affect a tile when below this value.
|
||||
|
||||
//https://secure.byond.com/docs/ref/info.html#/atom/var/mouse_opacity
|
||||
#define MOUSE_OPACITY_TRANSPARENT 0
|
||||
|
||||
@@ -210,13 +210,17 @@
|
||||
#define O_GBLADDER "gas bladder"
|
||||
#define O_POLYP "polyp segment"
|
||||
#define O_ANCHOR "anchoring ligament"
|
||||
#define O_REGBRUTE "pneumoregenitor"
|
||||
#define O_REGBURN "thermoregenitor"
|
||||
#define O_REGOXY "respiroregenitor"
|
||||
#define O_REGTOX "toxoregenitor"
|
||||
#define O_ACID "acid gland"
|
||||
#define O_EGG "egg sac"
|
||||
#define O_RESIN "resin spinner"
|
||||
#define O_AREJECT "immune hub"
|
||||
#define O_VENTC "morphoplastic node"
|
||||
#define O_VRLINK "virtual node"
|
||||
#define O_ALL list(O_STANDARD, O_MOUTH, O_CELL, O_PLASMA, O_HIVE, O_NUTRIENT, O_STRATA, O_RESPONSE, O_GBLADDER, O_POLYP, O_ANCHOR, O_ACID, O_EGG, O_RESIN, O_AREJECT, O_VENTC, O_VRLINK)
|
||||
#define O_ALL list(O_STANDARD, O_MOUTH, O_CELL, O_PLASMA, O_HIVE, O_NUTRIENT, O_STRATA, O_RESPONSE, O_GBLADDER, O_POLYP, O_ANCHOR, O_REGBRUTE, O_REGBURN, O_REGOXY, O_REGTOX, O_ACID, O_EGG, O_RESIN, O_AREJECT, O_VENTC, O_VRLINK)
|
||||
|
||||
// External organs, aka limbs
|
||||
#define BP_L_FOOT "l_foot"
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
#define CHANNEL_AMBIENCE 1018
|
||||
#define CHANNEL_BUZZ 1017
|
||||
#define CHANNEL_BICYCLE 1016
|
||||
#define CHANNEL_PREYLOOP 1015 //VORESTATION ADD - Fancy Sound Loop channel
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1015
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1014 //VORESTATION EDIT - Fancy Sound Loop channel from 1015
|
||||
|
||||
#define SOUND_MINIMUM_PRESSURE 10
|
||||
#define FALLOFF_SOUNDS 0.5
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define SPECIES_WHITELIST_SELECTABLE 0x20 // Can select and customize, but not join as
|
||||
|
||||
#define LANGUAGE_SLAVIC "Pan-Slavic"
|
||||
#define LANGUAGE_BIRDSONG "Birdsong"
|
||||
#define LANGUAGE_SAGARU "Sagaru"
|
||||
#define LANGUAGE_CANILUNZT "Canilunzt"
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
#define ARCHAEO_ALIEN_ITEM 36
|
||||
#define ARCHAEO_ALIEN_BOAT 37
|
||||
#define ARCHAEO_IMPERION_CIRCUIT 38
|
||||
#define MAX_ARCHAEO 38
|
||||
#define ARCHAEO_TELECUBE 39
|
||||
#define MAX_ARCHAEO 39
|
||||
|
||||
#define DIGSITE_GARDEN 1
|
||||
#define DIGSITE_ANIMAL 2
|
||||
|
||||
@@ -5,3 +5,4 @@ GLOBAL_LIST_EMPTY(stealthminID)
|
||||
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
|
||||
GLOBAL_LIST_EMPTY(clients)
|
||||
GLOBAL_LIST_EMPTY(players_by_zlevel)
|
||||
GLOBAL_LIST_EMPTY(round_text_log)
|
||||
|
||||
@@ -11,6 +11,8 @@ var/global/list/positive_traits = list() // Positive custom species traits, inde
|
||||
var/global/list/traits_costs = list() // Just path = cost list, saves time in char setup
|
||||
var/global/list/all_traits = list() // All of 'em at once (same instances)
|
||||
|
||||
var/global/list/sensorpreflist = list("Off", "Binary", "Vitals", "Tracking", "No Preference") //TFF 5/8/19 - Suit Sensors global list
|
||||
|
||||
var/global/list/custom_species_bases = list() // Species that can be used for a Custom Species icon base
|
||||
|
||||
//stores numeric player size options indexed by name
|
||||
@@ -40,40 +42,8 @@ var/global/list/item_vore_blacklist = list(
|
||||
/obj/item/weapon/disk/nuclear,
|
||||
/obj/item/clothing/suit/storage/hooded/wintercoat/roiz)
|
||||
|
||||
var/global/list/digestion_sounds = list(
|
||||
'sound/vore/digest1.ogg',
|
||||
'sound/vore/digest2.ogg',
|
||||
'sound/vore/digest3.ogg',
|
||||
'sound/vore/digest4.ogg',
|
||||
'sound/vore/digest5.ogg',
|
||||
'sound/vore/digest6.ogg',
|
||||
'sound/vore/digest7.ogg',
|
||||
'sound/vore/digest8.ogg',
|
||||
'sound/vore/digest9.ogg',
|
||||
'sound/vore/digest10.ogg',
|
||||
'sound/vore/digest11.ogg',
|
||||
'sound/vore/digest12.ogg')
|
||||
|
||||
var/global/list/death_sounds = list(
|
||||
'sound/vore/death1.ogg',
|
||||
'sound/vore/death2.ogg',
|
||||
'sound/vore/death3.ogg',
|
||||
'sound/vore/death4.ogg',
|
||||
'sound/vore/death5.ogg',
|
||||
'sound/vore/death6.ogg',
|
||||
'sound/vore/death7.ogg',
|
||||
'sound/vore/death8.ogg',
|
||||
'sound/vore/death9.ogg',
|
||||
'sound/vore/death10.ogg')
|
||||
|
||||
var/global/list/hunger_sounds = list(
|
||||
'sound/vore/growl1.ogg',
|
||||
'sound/vore/growl2.ogg',
|
||||
'sound/vore/growl3.ogg',
|
||||
'sound/vore/growl4.ogg',
|
||||
'sound/vore/growl5.ogg')
|
||||
|
||||
var/global/list/vore_sounds = list(
|
||||
//Classic Vore sounds
|
||||
var/global/list/classic_vore_sounds = list(
|
||||
"Gulp" = 'sound/vore/gulp.ogg',
|
||||
"Insert" = 'sound/vore/insert.ogg',
|
||||
"Insertion1" = 'sound/vore/insertion1.ogg',
|
||||
@@ -84,15 +54,55 @@ var/global/list/vore_sounds = list(
|
||||
"Squish2" = 'sound/vore/squish2.ogg',
|
||||
"Squish3" = 'sound/vore/squish3.ogg',
|
||||
"Squish4" = 'sound/vore/squish4.ogg',
|
||||
"Rustle (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"None" = null)
|
||||
|
||||
var/global/list/struggle_sounds = list(
|
||||
"Squish1" = 'sound/vore/squish1.ogg',
|
||||
"Squish2" = 'sound/vore/squish2.ogg',
|
||||
"Squish3" = 'sound/vore/squish3.ogg',
|
||||
"Squish4" = 'sound/vore/squish4.ogg')
|
||||
var/global/list/classic_release_sounds = list(
|
||||
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"Splatter" = 'sound/effects/splat.ogg',
|
||||
"None" = null
|
||||
)
|
||||
|
||||
//Poojy's Fancy Sounds
|
||||
var/global/list/fancy_vore_sounds = list(
|
||||
"Gulp" = 'sound/vore/sunesound/pred/swallow_01.ogg',
|
||||
"Swallow" = 'sound/vore/sunesound/pred/swallow_02.ogg',
|
||||
"Insertion1" = 'sound/vore/sunesound/pred/insertion_01.ogg',
|
||||
"Insertion2" = 'sound/vore/sunesound/pred/insertion_02.ogg',
|
||||
"Tauric Swallow" = 'sound/vore/sunesound/pred/taurswallow.ogg',
|
||||
"Stomach Move" = 'sound/vore/sunesound/pred/stomachmove.ogg',
|
||||
"Schlorp" = 'sound/vore/sunesound/pred/schlorp.ogg',
|
||||
"Squish1" = 'sound/vore/sunesound/pred/squish_01.ogg',
|
||||
"Squish2" = 'sound/vore/sunesound/pred/squish_02.ogg',
|
||||
"Squish3" = 'sound/vore/sunesound/pred/squish_03.ogg',
|
||||
"Squish4" = 'sound/vore/sunesound/pred/squish_04.ogg',
|
||||
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"None" = null
|
||||
)
|
||||
|
||||
var/global/list/fancy_release_sounds = list(
|
||||
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"Stomach Move" = 'sound/vore/sunesound/pred/stomachmove.ogg',
|
||||
"Pred Escape" = 'sound/vore/sunesound/pred/escape.ogg',
|
||||
"Splatter" = 'sound/effects/splat.ogg',
|
||||
"None" = null
|
||||
)
|
||||
|
||||
var/global/list/global_vore_egg_types = list(
|
||||
"Unathi" = UNATHI_EGG,
|
||||
@@ -122,6 +132,7 @@ var/global/list/tf_vore_egg_types = list(
|
||||
|
||||
var/global/list/edible_trash = list(/obj/item/broken_device,
|
||||
/obj/item/clothing/accessory/collar, //TFF 10/7/19 - add option to nom collars,
|
||||
/obj/item/device/communicator, //TFF 19/9/19 - add option to nom communicators and commwatches,
|
||||
/obj/item/clothing/mask,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/clothing/gloves,
|
||||
|
||||
@@ -42,4 +42,18 @@
|
||||
for(var/x_pixel = 1 to I.Width())
|
||||
if (I.GetPixel(x_pixel, y_pixel))
|
||||
return y_pixel - 1
|
||||
return null
|
||||
return null
|
||||
|
||||
//Standard behaviour is to cut pixels from the main icon that are covered by pixels from the mask icon unless passed mask_ready, see below.
|
||||
/proc/get_icon_difference(var/icon/main, var/icon/mask, var/mask_ready)
|
||||
/*You should skip prep if the mask is already sprited properly. This significantly improves performance by eliminating most of the realtime icon work.
|
||||
e.g. A 'ready' mask is a mask where the part you want cut out is missing (no pixels, 0 alpha) from the sprite, and everything else is solid white.*/
|
||||
|
||||
if(istype(main) && istype(mask))
|
||||
if(!mask_ready) //Prep the mask if we're using a regular old sprite and not a special-made mask.
|
||||
mask.Blend(rgb(255,255,255), ICON_SUBTRACT) //Make all pixels on the mask as black as possible.
|
||||
mask.Opaque(rgb(255,255,255)) //Make the transparent pixels (background) white.
|
||||
mask.BecomeAlphaMask() //Make all the black pixels vanish (fully transparent), leaving only the white background pixels.
|
||||
|
||||
main.AddAlphaMask(mask) //Make the pixels in the main icon that are in the transparent zone of the mask icon also vanish (fully transparent).
|
||||
return main
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
|
||||
/proc/log_access_in(client/new_client)
|
||||
if (config.log_access)
|
||||
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
|
||||
WRITE_LOG(diary, "ACCESS IN: [message]")
|
||||
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
|
||||
WRITE_LOG(diary, "ACCESS IN: [message]") //VOREStation Edit
|
||||
|
||||
/proc/log_access_out(mob/last_mob)
|
||||
if (config.log_access)
|
||||
@@ -73,26 +73,46 @@
|
||||
if (config.log_say)
|
||||
WRITE_LOG(diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
//Log the message to in-game dialogue logs, as well.
|
||||
if(speaker.client)
|
||||
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:#32cd32\">[text]</span>"
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:#32cd32\">[text]</span>"
|
||||
|
||||
/proc/log_ooc(text, client/user)
|
||||
if (config.log_ooc)
|
||||
WRITE_LOG(diary, "OOC: [user.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[user]</b>) <u>OOC:</u> - <span style=\"color:blue\"><b>[text]</b></span>"
|
||||
|
||||
/proc/log_aooc(text, client/user)
|
||||
if (config.log_ooc)
|
||||
WRITE_LOG(diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[user]</b>) <u>AOOC:</u> - <span style=\"color:red\"><b>[text]</b></span>"
|
||||
|
||||
/proc/log_looc(text, client/user)
|
||||
if (config.log_ooc)
|
||||
WRITE_LOG(diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[user]</b>) <u>LOOC:</u> - <span style=\"color:orange\"><b>[text]</b></span>"
|
||||
|
||||
/proc/log_whisper(text, mob/speaker)
|
||||
if (config.log_whisper)
|
||||
WRITE_LOG(diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
if(speaker.client)
|
||||
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:gray\"><i>[text]</i></span>"
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:gray\"><i>[text]</i></span>"
|
||||
|
||||
|
||||
/proc/log_emote(text, mob/speaker)
|
||||
if (config.log_emote)
|
||||
WRITE_LOG(diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
if(speaker.client)
|
||||
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>EMOTE:</u> - <span style=\"color:#CCBADC\">[text]</span>"
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>EMOTE:</u> - <span style=\"color:#CCBADC\">[text]</span>"
|
||||
|
||||
/proc/log_attack(attacker, defender, message)
|
||||
if (config.log_attack)
|
||||
WRITE_LOG(diary, "ATTACK: [attacker] against [defender]: [message]")
|
||||
@@ -113,6 +133,10 @@
|
||||
if (config.log_say)
|
||||
WRITE_LOG(diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>DEADSAY:</u> - <span style=\"color:green\">[text]</span>"
|
||||
GLOB.round_text_log += "<font size=1><span style=\"color:#7e668c\"><b>([time_stamp()])</b> (<b>[src]/[speaker.client]</b>) <u>DEADSAY:</u> - [text]</span></font>"
|
||||
|
||||
|
||||
/proc/log_ghostemote(text, mob/speaker)
|
||||
if (config.log_emote)
|
||||
WRITE_LOG(diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
@@ -125,6 +149,10 @@
|
||||
if (config.log_pda)
|
||||
WRITE_LOG(diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]")
|
||||
|
||||
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>MSG:</u> - <span style=\"color:[COLOR_GREEN]\">[text]</span>"
|
||||
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>MSG:</u> - <span style=\"color:[COLOR_GREEN]\">[text]</span>"
|
||||
|
||||
|
||||
/proc/log_to_dd(text)
|
||||
world.log << text //this comes before the config check because it can't possibly runtime
|
||||
if(config.log_world_output)
|
||||
@@ -222,7 +250,7 @@
|
||||
|
||||
if(include_link && is_special_character(M) && highlight_special_characters)
|
||||
name = "<font color='#FFA500'>[name]</font>" //Orange
|
||||
|
||||
|
||||
. += "/([name])"
|
||||
|
||||
return .
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
|
||||
// 0 .. 9
|
||||
if(48 to 57) //Numbers
|
||||
if(!last_char_group) continue //suppress at start of string
|
||||
if(!allow_numbers) continue // If allow_numbers is 0, then don't do this.
|
||||
output += ascii2text(ascii_char)
|
||||
number_of_alphanumeric++
|
||||
|
||||
@@ -114,6 +114,19 @@
|
||||
trigger_aiming(TARGET_CAN_CLICK)
|
||||
return 1
|
||||
|
||||
// VOREStation Addition Start: inbelly item interaction
|
||||
if(isbelly(loc) && (loc == A.loc))
|
||||
if(W)
|
||||
var/resolved = W.resolve_attackby(A,src)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A, src, 1, params) // 1: clicking something Adjacent
|
||||
else
|
||||
if(ismob(A)) // No instant mob attacking
|
||||
setClickCooldown(get_attack_speed())
|
||||
UnarmedAttack(A, 1)
|
||||
return
|
||||
// VOREStation Addition End
|
||||
|
||||
if(!isturf(loc)) // This is going to stop you from telekinesing from inside a closet, but I don't shed many tears for that
|
||||
return
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
/atom/proc/attack_generic(mob/user as mob)
|
||||
return 0
|
||||
|
||||
/atom/proc/take_damage(var/damage)
|
||||
return 0
|
||||
|
||||
/*
|
||||
Humans:
|
||||
Adds an exception for gloves, to allow special glove types like the ninja ones.
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
var/datum/controller/process/planet/planet_controller = null
|
||||
|
||||
/datum/controller/process/planet
|
||||
var/list/planets = list()
|
||||
var/list/z_to_planet = list()
|
||||
|
||||
/datum/controller/process/planet/setup()
|
||||
name = "planet controller"
|
||||
planet_controller = src
|
||||
schedule_interval = 1 MINUTE
|
||||
start_delay = 20 SECONDS
|
||||
|
||||
var/list/planet_datums = typesof(/datum/planet) - /datum/planet
|
||||
for(var/P in planet_datums)
|
||||
var/datum/planet/NP = new P()
|
||||
planets.Add(NP)
|
||||
|
||||
allocateTurfs()
|
||||
|
||||
/datum/controller/process/planet/proc/allocateTurfs()
|
||||
for(var/turf/simulated/OT in outdoor_turfs)
|
||||
for(var/datum/planet/P in planets)
|
||||
if(OT.z in P.expected_z_levels)
|
||||
P.planet_floors |= OT
|
||||
OT.vis_contents |= P.weather_holder.visuals
|
||||
break
|
||||
outdoor_turfs.Cut() //Why were you in there INCORRECTLY?
|
||||
|
||||
for(var/turf/unsimulated/wall/planetary/PW in planetary_walls)
|
||||
for(var/datum/planet/P in planets)
|
||||
if(PW.type == P.planetary_wall_type)
|
||||
P.planet_walls |= PW
|
||||
break
|
||||
planetary_walls.Cut()
|
||||
|
||||
/datum/controller/process/planet/proc/unallocateTurf(var/turf/T)
|
||||
for(var/planet in planets)
|
||||
var/datum/planet/P = planet
|
||||
if(T.z in P.expected_z_levels)
|
||||
P.planet_floors -= T
|
||||
T.vis_contents -= P.weather_holder.visuals
|
||||
|
||||
/datum/controller/process/planet/doWork()
|
||||
if(outdoor_turfs.len || planetary_walls.len)
|
||||
allocateTurfs()
|
||||
|
||||
for(var/datum/planet/P in planets)
|
||||
P.process(schedule_interval / 10)
|
||||
SCHECK //Your process() really shouldn't take this long...
|
||||
|
||||
//Sun light needs changing
|
||||
if(P.needs_work & PLANET_PROCESS_SUN)
|
||||
P.needs_work &= ~PLANET_PROCESS_SUN
|
||||
// Remove old value from corners
|
||||
var/list/sunlit_corners = P.sunlit_corners
|
||||
var/old_lum_r = -P.sun["lum_r"]
|
||||
var/old_lum_g = -P.sun["lum_g"]
|
||||
var/old_lum_b = -P.sun["lum_b"]
|
||||
if(old_lum_r || old_lum_g || old_lum_b)
|
||||
for(var/C in P.sunlit_corners)
|
||||
var/datum/lighting_corner/LC = C
|
||||
LC.update_lumcount(old_lum_r, old_lum_g, old_lum_b)
|
||||
SCHECK
|
||||
sunlit_corners.Cut()
|
||||
|
||||
// Calculate new values to apply
|
||||
var/new_brightness = P.sun["brightness"]
|
||||
var/new_color = P.sun["color"]
|
||||
var/lum_r = new_brightness * GetRedPart (new_color) / 255
|
||||
var/lum_g = new_brightness * GetGreenPart(new_color) / 255
|
||||
var/lum_b = new_brightness * GetBluePart (new_color) / 255
|
||||
var/static/update_gen = -1 // Used to prevent double-processing corners. Otherwise would happen when looping over adjacent turfs.
|
||||
for(var/I in P.planet_floors)
|
||||
var/turf/simulated/T = I
|
||||
if(!T.lighting_corners_initialised)
|
||||
T.generate_missing_corners()
|
||||
for(var/C in T.get_corners())
|
||||
var/datum/lighting_corner/LC = C
|
||||
if(LC.update_gen != update_gen && LC.active)
|
||||
sunlit_corners += LC
|
||||
LC.update_gen = update_gen
|
||||
LC.update_lumcount(lum_r, lum_g, lum_b)
|
||||
SCHECK
|
||||
update_gen--
|
||||
P.sun["lum_r"] = lum_r
|
||||
P.sun["lum_g"] = lum_g
|
||||
P.sun["lum_b"] = lum_b
|
||||
|
||||
//Temperature needs updating
|
||||
if(P.needs_work & PLANET_PROCESS_TEMP)
|
||||
P.needs_work &= ~PLANET_PROCESS_TEMP
|
||||
//Set new temperatures
|
||||
for(var/W in P.planet_walls)
|
||||
var/turf/unsimulated/wall/planetary/wall = W
|
||||
wall.set_temperature(P.weather_holder.temperature)
|
||||
SCHECK
|
||||
@@ -1,56 +0,0 @@
|
||||
/datum/controller/process/radiation
|
||||
var/repository/radiation/linked = null
|
||||
|
||||
/datum/controller/process/radiation/setup()
|
||||
name = "radiation controller"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
linked = radiation_repository
|
||||
|
||||
/datum/controller/process/radiation/doWork()
|
||||
sources_decay()
|
||||
cache_expires()
|
||||
irradiate_targets()
|
||||
|
||||
// Step 1 - Sources Decay
|
||||
/datum/controller/process/radiation/proc/sources_decay()
|
||||
var/list/sources = linked.sources
|
||||
for(var/thing in sources)
|
||||
var/datum/radiation_source/S = thing
|
||||
if(QDELETED(S))
|
||||
sources.Remove(S)
|
||||
continue
|
||||
if(S.decay)
|
||||
S.update_rad_power(S.rad_power - config.radiation_decay_rate)
|
||||
if(S.rad_power <= config.radiation_lower_limit)
|
||||
sources.Remove(S)
|
||||
SCHECK // This scheck probably just wastes resources, but better safe than sorry in this case.
|
||||
|
||||
// Step 2 - Cache Expires
|
||||
/datum/controller/process/radiation/proc/cache_expires()
|
||||
var/list/resistance_cache = linked.resistance_cache
|
||||
for(var/thing in resistance_cache)
|
||||
var/turf/T = thing
|
||||
if(QDELETED(T))
|
||||
resistance_cache.Remove(T)
|
||||
continue
|
||||
if((length(T.contents) + 1) != resistance_cache[T])
|
||||
resistance_cache.Remove(T) // If its stale REMOVE it! It will get added if its needed.
|
||||
SCHECK
|
||||
|
||||
// Step 3 - Registered irradiatable things are checked for radiation
|
||||
/datum/controller/process/radiation/proc/irradiate_targets()
|
||||
var/list/registered_listeners = living_mob_list // For now just use this. Nothing else is interested anyway.
|
||||
if(length(linked.sources) > 0)
|
||||
for(var/thing in registered_listeners)
|
||||
var/atom/A = thing
|
||||
if(QDELETED(A))
|
||||
continue
|
||||
var/turf/T = get_turf(thing)
|
||||
var/rads = linked.get_rads_at_turf(T)
|
||||
if(rads)
|
||||
A.rad_act(rads)
|
||||
SCHECK
|
||||
|
||||
/datum/controller/process/radiation/statProcess()
|
||||
..()
|
||||
stat(null, "[linked.sources.len] sources, [linked.resistance_cache.len] cached turfs")
|
||||
@@ -1,169 +0,0 @@
|
||||
/var/datum/controller/process/scheduler/scheduler
|
||||
|
||||
/************
|
||||
* Scheduler *
|
||||
************/
|
||||
/datum/controller/process/scheduler
|
||||
var/list/scheduled_tasks
|
||||
|
||||
/datum/controller/process/scheduler/setup()
|
||||
name = "scheduler"
|
||||
schedule_interval = 1 SECOND
|
||||
scheduled_tasks = list()
|
||||
scheduler = src
|
||||
|
||||
/datum/controller/process/scheduler/doWork()
|
||||
var/world_time = world.time
|
||||
for(last_object in scheduled_tasks)
|
||||
var/datum/scheduled_task/scheduled_task = last_object
|
||||
if(world_time < scheduled_task.trigger_time)
|
||||
break // Too early for this one, and therefore too early for all remaining.
|
||||
try
|
||||
unschedule(scheduled_task)
|
||||
scheduled_task.pre_process()
|
||||
scheduled_task.process()
|
||||
scheduled_task.post_process()
|
||||
catch(var/exception/e)
|
||||
catchException(e, last_object)
|
||||
SCHECK
|
||||
|
||||
// We've been restarted, probably due to having a massive list of tasks.
|
||||
// Lets copy over the task list as safely as we can and try to chug thru it...
|
||||
// Note: We won't be informed about tasks being destroyed, but this is the best we can do.
|
||||
/datum/controller/process/scheduler/copyStateFrom(var/datum/controller/process/scheduler/target)
|
||||
scheduled_tasks = list()
|
||||
for(var/datum/scheduled_task/st in target.scheduled_tasks)
|
||||
if(!QDELETED(st) && istype(st))
|
||||
schedule(st)
|
||||
scheduler = src
|
||||
|
||||
// We are being killed. Least we can do is deregister all those events we registered
|
||||
/datum/controller/process/scheduler/onKill()
|
||||
for(var/st in scheduled_tasks)
|
||||
GLOB.destroyed_event.unregister(st, src)
|
||||
|
||||
/datum/controller/process/scheduler/statProcess()
|
||||
..()
|
||||
stat(null, "[scheduled_tasks.len] task\s")
|
||||
|
||||
/datum/controller/process/scheduler/proc/schedule(var/datum/scheduled_task/st)
|
||||
dd_insertObjectList(scheduled_tasks, st)
|
||||
|
||||
/datum/controller/process/scheduler/proc/unschedule(var/datum/scheduled_task/st)
|
||||
scheduled_tasks -= st
|
||||
|
||||
/**********
|
||||
* Helpers *
|
||||
**********/
|
||||
/proc/schedule_task_in(var/in_time, var/procedure, var/list/arguments = list())
|
||||
return schedule_task(world.time + in_time, procedure, arguments)
|
||||
|
||||
/proc/schedule_callback_in(var/in_time, var/datum/callback)
|
||||
return schedule_callback(world.time + in_time, callback)
|
||||
|
||||
/proc/schedule_task_with_source_in(var/in_time, var/source, var/procedure, var/list/arguments = list())
|
||||
return schedule_task_with_source(world.time + in_time, source, procedure, arguments)
|
||||
|
||||
/proc/schedule_task(var/trigger_time, var/procedure, var/list/arguments)
|
||||
var/datum/scheduled_task/st = new/datum/scheduled_task(trigger_time, procedure, arguments, /proc/destroy_scheduled_task, list())
|
||||
scheduler.schedule(st)
|
||||
return st
|
||||
|
||||
/proc/schedule_callback(var/trigger_time, var/datum/callback)
|
||||
var/datum/scheduled_task/callback/st = new/datum/scheduled_task/callback(trigger_time, callback, /proc/destroy_scheduled_task, list())
|
||||
scheduler.schedule(st)
|
||||
return st
|
||||
|
||||
/proc/schedule_task_with_source(var/trigger_time, var/source, var/procedure, var/list/arguments)
|
||||
var/datum/scheduled_task/st = new/datum/scheduled_task/source(trigger_time, source, procedure, arguments, /proc/destroy_scheduled_task, list())
|
||||
scheduler.schedule(st)
|
||||
return st
|
||||
|
||||
/proc/schedule_repeating_task(var/trigger_time, var/repeat_interval, var/procedure, var/list/arguments)
|
||||
var/datum/scheduled_task/st = new/datum/scheduled_task(trigger_time, procedure, arguments, /proc/repeat_scheduled_task, list(repeat_interval))
|
||||
scheduler.schedule(st)
|
||||
return st
|
||||
|
||||
/proc/schedule_repeating_task_with_source(var/trigger_time, var/repeat_interval, var/source, var/procedure, var/list/arguments)
|
||||
var/datum/scheduled_task/st = new/datum/scheduled_task/source(trigger_time, source, procedure, arguments, /proc/repeat_scheduled_task, list(repeat_interval))
|
||||
scheduler.schedule(st)
|
||||
return st
|
||||
|
||||
/*************
|
||||
* Task Datum *
|
||||
*************/
|
||||
/datum/scheduled_task
|
||||
var/trigger_time
|
||||
var/procedure
|
||||
var/list/arguments
|
||||
var/task_after_process
|
||||
var/list/task_after_process_args
|
||||
|
||||
/datum/scheduled_task/New(var/trigger_time, var/procedure, var/list/arguments, var/proc/task_after_process, var/list/task_after_process_args)
|
||||
..()
|
||||
src.trigger_time = trigger_time
|
||||
src.procedure = procedure
|
||||
src.arguments = arguments ? arguments : list()
|
||||
src.task_after_process = task_after_process ? task_after_process : /proc/destroy_scheduled_task
|
||||
src.task_after_process_args = istype(task_after_process_args) ? task_after_process_args : list()
|
||||
task_after_process_args += src
|
||||
|
||||
/datum/scheduled_task/Destroy()
|
||||
scheduler.unschedule(src)
|
||||
procedure = null
|
||||
arguments.Cut()
|
||||
task_after_process = null
|
||||
task_after_process_args.Cut()
|
||||
return ..()
|
||||
|
||||
/datum/scheduled_task/dd_SortValue()
|
||||
return trigger_time
|
||||
|
||||
/datum/scheduled_task/proc/pre_process()
|
||||
task_triggered_event.raise_event(list(src))
|
||||
|
||||
/datum/scheduled_task/proc/process()
|
||||
if(procedure)
|
||||
call(procedure)(arglist(arguments))
|
||||
|
||||
/datum/scheduled_task/proc/post_process()
|
||||
call(task_after_process)(arglist(task_after_process_args))
|
||||
|
||||
// Resets the trigger time, has no effect if the task has already triggered
|
||||
/datum/scheduled_task/proc/trigger_task_in(var/trigger_in)
|
||||
src.trigger_time = world.time + trigger_in
|
||||
|
||||
/datum/scheduled_task/callback
|
||||
var/datum/callback/callback
|
||||
|
||||
/datum/scheduled_task/callback/New(var/trigger_time, var/datum/callback, var/proc/task_after_process, var/list/task_after_process_args)
|
||||
src.callback = callback
|
||||
..(trigger_time = trigger_time, task_after_process = task_after_process, task_after_process_args = task_after_process_args)
|
||||
|
||||
/datum/scheduled_task/callback/process()
|
||||
callback.Invoke()
|
||||
|
||||
/datum/scheduled_task/source
|
||||
var/datum/source
|
||||
|
||||
/datum/scheduled_task/source/New(var/trigger_time, var/datum/source, var/procedure, var/list/arguments, var/proc/task_after_process, var/list/task_after_process_args)
|
||||
src.source = source
|
||||
GLOB.destroyed_event.register(src.source, src, /datum/scheduled_task/source/proc/source_destroyed)
|
||||
..(trigger_time, procedure, arguments, task_after_process, task_after_process_args)
|
||||
|
||||
/datum/scheduled_task/source/Destroy()
|
||||
source = null
|
||||
return ..()
|
||||
|
||||
/datum/scheduled_task/source/process()
|
||||
call(source, procedure)(arglist(arguments))
|
||||
|
||||
/datum/scheduled_task/source/proc/source_destroyed()
|
||||
qdel(src)
|
||||
|
||||
/proc/destroy_scheduled_task(var/datum/scheduled_task/st)
|
||||
qdel(st)
|
||||
|
||||
/proc/repeat_scheduled_task(var/trigger_delay, var/datum/scheduled_task/st)
|
||||
st.trigger_time = world.time + trigger_delay
|
||||
scheduler.schedule(st)
|
||||
@@ -240,9 +240,9 @@ SUBSYSTEM_DEF(garbage)
|
||||
time = TICK_DELTA_TO_MS(tick)/100
|
||||
if (time > highest_del_time)
|
||||
highest_del_time = time
|
||||
if (time > 10)
|
||||
log_game("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete)")
|
||||
message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete).")
|
||||
if (time > 20) //VOREStation Edit
|
||||
log_game("Error: [type]([refID]) took longer than 2 seconds to delete (took [time/10] seconds to delete)") //VOREStation Edit
|
||||
message_admins("Error: [type]([refID]) took longer than 2 seconds to delete (took [time/10] seconds to delete).") //VOREStation Edit
|
||||
postpone(time)
|
||||
|
||||
/datum/controller/subsystem/garbage/proc/HardQueue(datum/D)
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
SUBSYSTEM_DEF(radiation)
|
||||
name = "Radiation"
|
||||
wait = 2 SECONDS
|
||||
flags = SS_NO_INIT
|
||||
|
||||
var/list/sources = list() // all radiation source datums
|
||||
var/list/sources_assoc = list() // Sources indexed by turf for de-duplication.
|
||||
var/list/resistance_cache = list() // Cache of turf's radiation resistance.
|
||||
|
||||
var/tmp/list/current_sources = list()
|
||||
var/tmp/list/current_res_cache = list()
|
||||
var/tmp/list/listeners = list()
|
||||
|
||||
/datum/controller/subsystem/radiation/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
current_sources = sources.Copy()
|
||||
current_res_cache = resistance_cache.Copy()
|
||||
listeners = living_mob_list.Copy()
|
||||
|
||||
while(current_sources.len)
|
||||
var/datum/radiation_source/S = current_sources[current_sources.len]
|
||||
current_sources.len--
|
||||
|
||||
if(QDELETED(S))
|
||||
sources -= S
|
||||
else if(S.decay)
|
||||
S.update_rad_power(S.rad_power - config.radiation_decay_rate)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
while(current_res_cache.len)
|
||||
var/turf/T = current_res_cache[current_res_cache.len]
|
||||
current_res_cache.len--
|
||||
|
||||
if(QDELETED(T))
|
||||
resistance_cache -= T
|
||||
else if((length(T.contents) + 1) != resistance_cache[T])
|
||||
resistance_cache -= T // If its stale REMOVE it! It will get added if its needed.
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
if(!sources.len)
|
||||
listeners.Cut()
|
||||
|
||||
while(listeners.len)
|
||||
var/atom/A = listeners[listeners.len]
|
||||
listeners.len--
|
||||
|
||||
if(!QDELETED(A))
|
||||
var/turf/T = get_turf(A)
|
||||
var/rads = get_rads_at_turf(T)
|
||||
if(rads)
|
||||
A.rad_act(rads)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/radiation/stat_entry()
|
||||
..("S:[sources.len], RC:[resistance_cache.len]")
|
||||
|
||||
// Ray trace from all active radiation sources to T and return the strongest effect.
|
||||
/datum/controller/subsystem/radiation/proc/get_rads_at_turf(var/turf/T)
|
||||
. = 0
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
for(var/value in sources)
|
||||
var/datum/radiation_source/source = value
|
||||
if(source.rad_power < .)
|
||||
continue // Already being affected by a stronger source
|
||||
if(source.source_turf.z != T.z)
|
||||
continue // Radiation is not multi-z
|
||||
if(source.respect_maint)
|
||||
var/area/A = T.loc
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
continue // In shielded area
|
||||
|
||||
var/dist = get_dist(source.source_turf, T)
|
||||
if(dist > source.range)
|
||||
continue // Too far to possibly affect
|
||||
if(source.flat)
|
||||
. = max(., source.rad_power)
|
||||
continue // No need to ray trace for flat field
|
||||
|
||||
// Okay, now ray trace to find resistence!
|
||||
var/turf/origin = source.source_turf
|
||||
var/working = source.rad_power
|
||||
while(origin != T)
|
||||
origin = get_step_towards(origin, T) //Raytracing
|
||||
if(!resistance_cache[origin]) //Only get the resistance if we don't already know it.
|
||||
origin.calc_rad_resistance()
|
||||
if(origin.cached_rad_resistance)
|
||||
working = round((working / (origin.cached_rad_resistance * config.radiation_resistance_multiplier)), 0.1)
|
||||
if((working <= .) || (working <= RADIATION_THRESHOLD_CUTOFF))
|
||||
break // Already affected by a stronger source (or its zero...)
|
||||
. = max((working / (dist ** 2)), .) //Butchered version of the inverse square law. Works for this purpose
|
||||
if(. <= RADIATION_THRESHOLD_CUTOFF)
|
||||
. = 0
|
||||
|
||||
// Add a radiation source instance to the repository. It will override any existing source on the same turf.
|
||||
/datum/controller/subsystem/radiation/proc/add_source(var/datum/radiation_source/S)
|
||||
if(!isturf(S.source_turf))
|
||||
return
|
||||
var/datum/radiation_source/existing = sources_assoc[S.source_turf]
|
||||
if(existing)
|
||||
qdel(existing)
|
||||
sources += S
|
||||
sources_assoc[S.source_turf] = S
|
||||
|
||||
// Creates a temporary radiation source that will decay
|
||||
/datum/controller/subsystem/radiation/proc/radiate(source, power) //Sends out a radiation pulse, taking walls into account
|
||||
if(!(source && power)) //Sanity checking
|
||||
return
|
||||
var/datum/radiation_source/S = new()
|
||||
S.source_turf = get_turf(source)
|
||||
S.update_rad_power(power)
|
||||
add_source(S)
|
||||
|
||||
// Sets the radiation in a range to a constant value.
|
||||
/datum/controller/subsystem/radiation/proc/flat_radiate(source, power, range, var/respect_maint = TRUE) //VOREStation edit; Respect shielded areas by default please.
|
||||
if(!(source && power && range))
|
||||
return
|
||||
var/datum/radiation_source/S = new()
|
||||
S.flat = TRUE
|
||||
S.range = range
|
||||
S.respect_maint = respect_maint
|
||||
S.source_turf = get_turf(source)
|
||||
S.update_rad_power(power)
|
||||
add_source(S)
|
||||
|
||||
// Irradiates a full Z-level. Hacky way of doing it, but not too expensive.
|
||||
/datum/controller/subsystem/radiation/proc/z_radiate(var/atom/source, power, var/respect_maint = TRUE) //VOREStation edit; Respect shielded areas by default please.
|
||||
if(!(power && source))
|
||||
return
|
||||
var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z)
|
||||
flat_radiate(epicentre, power, world.maxx, respect_maint)
|
||||
@@ -105,7 +105,7 @@ SUBSYSTEM_DEF(vote)
|
||||
factor = 1.4
|
||||
choices["Initiate Crew Transfer"] = round(choices["Initiate Crew Transfer"] * factor)
|
||||
world << "<font color='purple'>Crew Transfer Factor: [factor]</font>"
|
||||
greatest_votes = max(choices["Initiate Crew Transfer"], choices["Continue The Round"])
|
||||
greatest_votes = max(choices["Initiate Crew Transfer"], choices["Extend the Shift"]) //VOREStation Edit
|
||||
|
||||
. = list() // Get all options with that many votes and return them in a list
|
||||
if(greatest_votes)
|
||||
@@ -220,8 +220,8 @@ SUBSYSTEM_DEF(vote)
|
||||
if(ticker.current_state <= GAME_STATE_SETTING_UP)
|
||||
initiator_key << "The crew transfer button has been disabled!"
|
||||
return 0
|
||||
question = "End the shift?"
|
||||
choices.Add("Initiate Crew Transfer", "Continue The Round")
|
||||
question = "Your PDA beeps with a message from Central. Would you like an additional hour to finish ongoing projects?" //VOREStation Edit
|
||||
choices.Add("Initiate Crew Transfer", "Extend the Shift") //VOREStation Edit
|
||||
if(VOTE_ADD_ANTAGONIST)
|
||||
if(!config.allow_extra_antags || ticker.current_state >= GAME_STATE_SETTING_UP)
|
||||
return 0
|
||||
|
||||
@@ -32,3 +32,21 @@
|
||||
name = "magazine (.44 rubber)"
|
||||
path =/obj/item/ammo_magazine/m44/rubber
|
||||
hidden = 1
|
||||
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mm
|
||||
name = "SMG magazine (9mm)"
|
||||
path = /obj/item/ammo_magazine/m9mml
|
||||
hidden = 1
|
||||
/* De-coded?
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mmr
|
||||
name = "SMG magazine (9mm rubber)"
|
||||
path = /obj/item/ammo_magazine/m9mml/rubber
|
||||
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mmp
|
||||
name = "SMG magazine (9mm practice)"
|
||||
path = /obj/item/ammo_magazine/m9mml/practice
|
||||
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mmf
|
||||
name = "SMG magazine (9mm flash)"
|
||||
path = /obj/item/ammo_magazine/m9mml/flash
|
||||
*/
|
||||
@@ -0,0 +1,7 @@
|
||||
/datum/category_item/autolathe/engineering/timeclock
|
||||
name = "timeclock electronics"
|
||||
path =/obj/item/weapon/circuitboard/timeclock
|
||||
|
||||
/datum/category_item/autolathe/engineering/id_restorer
|
||||
name = "ID restoration console electronics"
|
||||
path =/obj/item/weapon/circuitboard/id_restorer
|
||||
@@ -117,7 +117,7 @@
|
||||
/datum/ghost_query/lost_drone
|
||||
role_name = "Lost Drone"
|
||||
question = "A lost drone onboard has been discovered by a crewmember and they are attempting to reactivate it. Would you like to play as the drone?"
|
||||
be_special_flag = BE_AI
|
||||
//be_special_flag = BE_AI //VOREStation Removal: Positronic role is never used because intended purpose is unfitting, so remove the check
|
||||
check_bans = list("AI", "Cyborg")
|
||||
cutoff_number = 1
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//wrapper
|
||||
/proc/do_noeffect_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null, local=TRUE)
|
||||
/proc/do_noeffect_teleport(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null, local=FALSE)
|
||||
new /datum/teleport/instant/science/noeffect(arglist(args))
|
||||
return
|
||||
|
||||
|
||||
@@ -44,6 +44,14 @@
|
||||
name = OUTFIT_JOB_NAME("Cook")
|
||||
id_pda_assignment = "Cook"
|
||||
|
||||
// Rykka adds Server Outfit
|
||||
|
||||
/decl/hierarchy/outfit/job/service/server
|
||||
name = OUTFIT_JOB_NAME("Server")
|
||||
uniform = /obj/item/clothing/under/waiter
|
||||
|
||||
// End Outfit addition
|
||||
|
||||
/decl/hierarchy/outfit/job/service/gardener
|
||||
name = OUTFIT_JOB_NAME("Gardener")
|
||||
uniform = /obj/item/clothing/under/rank/hydroponics
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/decl/hierarchy/outfit/military/fleet/pt
|
||||
name = OUTFIT_MILITARY("Fleet PT")
|
||||
uniform = /obj/item/clothing/under/pt/fleet
|
||||
uniform = /obj/item/clothing/under/solgov/pt/fleet
|
||||
shoes = /obj/item/clothing/shoes/black
|
||||
|
||||
/decl/hierarchy/outfit/military/fleet/utility
|
||||
name = OUTFIT_MILITARY("Fleet Utility")
|
||||
uniform = /obj/item/clothing/under/utility/fleet
|
||||
shoes = /obj/item/clothing/shoes/boots/jackboots
|
||||
uniform = /obj/item/clothing/under/solgov/utility/fleet
|
||||
shoes = /obj/item/clothing/shoes/boots/duty
|
||||
|
||||
/decl/hierarchy/outfit/military/fleet/service
|
||||
name = OUTFIT_MILITARY("Fleet Service")
|
||||
uniform = /obj/item/clothing/under/service/fleet
|
||||
uniform = /obj/item/clothing/under/solgov/service/fleet
|
||||
shoes = /obj/item/clothing/shoes/dress/white
|
||||
|
||||
/decl/hierarchy/outfit/military/fleet/dress
|
||||
name = OUTFIT_MILITARY("Fleet Dress")
|
||||
uniform = /obj/item/clothing/under/service/fleet
|
||||
uniform = /obj/item/clothing/under/solgov/service/fleet
|
||||
shoes = /obj/item/clothing/shoes/dress/white
|
||||
suit = /obj/item/clothing/suit/storage/toggle/dress/fleet
|
||||
gloves = /obj/item/clothing/gloves/white
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/decl/hierarchy/outfit/military/marine/pt
|
||||
name = OUTFIT_MILITARY("Marine PT")
|
||||
uniform = /obj/item/clothing/under/pt/marine
|
||||
uniform = /obj/item/clothing/under/solgov/pt/marine
|
||||
shoes = /obj/item/clothing/shoes/black
|
||||
|
||||
/decl/hierarchy/outfit/military/marine/utility
|
||||
name = OUTFIT_MILITARY("Marine Utility")
|
||||
uniform = /obj/item/clothing/under/utility/marine
|
||||
uniform = /obj/item/clothing/under/solgov/utility/marine
|
||||
shoes = /obj/item/clothing/shoes/boots/jungle
|
||||
|
||||
/decl/hierarchy/outfit/military/marine/service
|
||||
name = OUTFIT_MILITARY("Marine Service")
|
||||
uniform = /obj/item/clothing/under/service/marine
|
||||
uniform = /obj/item/clothing/under/solgov/service/marine
|
||||
shoes = /obj/item/clothing/shoes/dress
|
||||
suit = /obj/item/clothing/suit/storage/service/marine
|
||||
|
||||
/decl/hierarchy/outfit/military/marine/dress
|
||||
name = OUTFIT_MILITARY("Marine Dress")
|
||||
uniform = /obj/item/clothing/under/mildress/marine
|
||||
uniform = /obj/item/clothing/under/solgov/mildress/marine
|
||||
shoes = /obj/item/clothing/shoes/dress/white
|
||||
suit = /obj/item/clothing/suit/dress/marine
|
||||
gloves = /obj/item/clothing/gloves/white
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/decl/hierarchy/outfit/military/sifguard/pt
|
||||
name = OUTFIT_MILITARY("SifGuard PT")
|
||||
uniform = /obj/item/clothing/under/pt/sifguard
|
||||
uniform = /obj/item/clothing/under/solgov/pt/sifguard
|
||||
shoes = /obj/item/clothing/shoes/black
|
||||
|
||||
/decl/hierarchy/outfit/military/sifguard/utility
|
||||
name = OUTFIT_MILITARY("SifGuard Utility")
|
||||
uniform = /obj/item/clothing/under/utility/sifguard
|
||||
shoes = /obj/item/clothing/shoes/boots/jackboots
|
||||
uniform = /obj/item/clothing/under/solgov/utility/sifguard
|
||||
shoes = /obj/item/clothing/shoes/boots/tactical
|
||||
|
||||
/decl/hierarchy/outfit/military/sifguard/service
|
||||
name = OUTFIT_MILITARY("SifGuard Service")
|
||||
uniform = /obj/item/clothing/under/utility/sifguard
|
||||
shoes = /obj/item/clothing/shoes/boots/jackboots
|
||||
uniform = /obj/item/clothing/under/solgov/utility/sifguard
|
||||
shoes = /obj/item/clothing/shoes/boots/tactical
|
||||
suit = /obj/item/clothing/suit/storage/service/sifguard
|
||||
|
||||
/decl/hierarchy/outfit/military/sifguard/dress
|
||||
name = OUTFIT_MILITARY("SifGuard Dress")
|
||||
uniform = /obj/item/clothing/under/mildress/sifguard
|
||||
uniform = /obj/item/clothing/under/solgov/mildress/sifguard
|
||||
shoes = /obj/item/clothing/shoes/dress
|
||||
suit = /obj/item/clothing/suit/dress/expedition
|
||||
gloves = /obj/item/clothing/gloves/white
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/decl/hierarchy/outfit/USDF/Marine
|
||||
name = "USDF marine"
|
||||
uniform = /obj/item/clothing/under/utility/marine/green
|
||||
uniform = /obj/item/clothing/under/solgov/utility/marine/green
|
||||
shoes = /obj/item/clothing/shoes/boots/jackboots
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
l_ear = /obj/item/device/radio/headset/centcom
|
||||
@@ -30,7 +30,7 @@
|
||||
head = /obj/item/clothing/head/dress/marine/command/admiral
|
||||
shoes = /obj/item/clothing/shoes/boots/jackboots
|
||||
l_ear = /obj/item/device/radio/headset/centcom
|
||||
uniform = /obj/item/clothing/under/mildress/marine/command
|
||||
uniform = /obj/item/clothing/under/solgov/mildress/marine/command
|
||||
back = /obj/item/weapon/storage/backpack/satchel
|
||||
belt = /obj/item/weapon/gun/projectile/revolver/consul
|
||||
l_pocket = /obj/item/ammo_magazine/s44
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
var/global/repository/radiation/radiation_repository = new()
|
||||
|
||||
/repository/radiation
|
||||
var/list/sources = list() // all radiation source datums
|
||||
var/list/sources_assoc = list() // Sources indexed by turf for de-duplication.
|
||||
var/list/resistance_cache = list() // Cache of turf's radiation resistance.
|
||||
|
||||
// Describes a point source of radiation. Created either in response to a pulse of radiation, or over an irradiated atom.
|
||||
// Sources will decay over time, unless something is renewing their power!
|
||||
/datum/radiation_source
|
||||
var/turf/source_turf // Location of the radiation source.
|
||||
var/rad_power // Strength of the radiation being emitted.
|
||||
var/decay = TRUE // True for automatic decay. False if owner promises to handle it (i.e. supermatter)
|
||||
var/respect_maint = FALSE // True for not affecting RAD_SHIELDED areas.
|
||||
var/flat = FALSE // True for power falloff with distance.
|
||||
var/range // Cached maximum range, used for quick checks against mobs.
|
||||
|
||||
/datum/radiation_source/Destroy()
|
||||
radiation_repository.sources -= src
|
||||
if(radiation_repository.sources_assoc[src.source_turf] == src)
|
||||
radiation_repository.sources_assoc -= src.source_turf
|
||||
src.source_turf = null
|
||||
. = ..()
|
||||
|
||||
/datum/radiation_source/proc/update_rad_power(var/new_power = null)
|
||||
if(new_power == null || new_power == rad_power)
|
||||
return // No change
|
||||
else if(new_power <= 0)
|
||||
qdel(src) // Decayed to nothing
|
||||
else
|
||||
rad_power = new_power
|
||||
if(!flat)
|
||||
range = min(round(sqrt(rad_power / config.radiation_lower_limit)), 31) // R = rad_power / dist**2 - Solve for dist
|
||||
|
||||
// Ray trace from all active radiation sources to T and return the strongest effect.
|
||||
/repository/radiation/proc/get_rads_at_turf(var/turf/T)
|
||||
if(!istype(T)) return 0
|
||||
|
||||
. = 0
|
||||
for(var/value in sources)
|
||||
var/datum/radiation_source/source = value
|
||||
if(source.rad_power < .)
|
||||
continue // Already being affected by a stronger source
|
||||
if(source.source_turf.z != T.z)
|
||||
continue // Radiation is not multi-z
|
||||
var/dist = get_dist(source.source_turf, T)
|
||||
if(dist > source.range)
|
||||
continue // Too far to possibly affect
|
||||
if(source.respect_maint)
|
||||
var/atom/A = T.loc
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
continue // In shielded area
|
||||
if(source.flat)
|
||||
. = max(., source.rad_power)
|
||||
continue // No need to ray trace for flat field
|
||||
|
||||
// Okay, now ray trace to find resistence!
|
||||
var/turf/origin = source.source_turf
|
||||
var/working = source.rad_power
|
||||
while(origin != T)
|
||||
origin = get_step_towards(origin, T) //Raytracing
|
||||
if(!(origin in resistance_cache)) //Only get the resistance if we don't already know it.
|
||||
origin.calc_rad_resistance()
|
||||
working = max((working - (origin.cached_rad_resistance * config.radiation_resistance_multiplier)), 0)
|
||||
if(working <= .)
|
||||
break // Already affected by a stronger source (or its zero...)
|
||||
. = max((working * (1 / (dist ** 2))), .) //Butchered version of the inverse square law. Works for this purpose
|
||||
|
||||
// Add a radiation source instance to the repository. It will override any existing source on the same turf.
|
||||
/repository/radiation/proc/add_source(var/datum/radiation_source/S)
|
||||
if(!isturf(S.source_turf))
|
||||
return
|
||||
var/datum/radiation_source/existing = sources_assoc[S.source_turf]
|
||||
if(existing)
|
||||
qdel(existing)
|
||||
sources += S
|
||||
sources_assoc[S.source_turf] = S
|
||||
|
||||
// Creates a temporary radiation source that will decay
|
||||
/repository/radiation/proc/radiate(source, power) //Sends out a radiation pulse, taking walls into account
|
||||
if(!(source && power)) //Sanity checking
|
||||
return
|
||||
var/datum/radiation_source/S = new()
|
||||
S.source_turf = get_turf(source)
|
||||
S.update_rad_power(power)
|
||||
add_source(S)
|
||||
|
||||
// Sets the radiation in a range to a constant value.
|
||||
/repository/radiation/proc/flat_radiate(source, power, range, var/respect_maint = TRUE) //VOREStation edit; Respect shielded areas by default please.
|
||||
if(!(source && power && range))
|
||||
return
|
||||
var/datum/radiation_source/S = new()
|
||||
S.flat = TRUE
|
||||
S.range = range
|
||||
S.respect_maint = respect_maint
|
||||
S.source_turf = get_turf(source)
|
||||
S.update_rad_power(power)
|
||||
add_source(S)
|
||||
|
||||
// Irradiates a full Z-level. Hacky way of doing it, but not too expensive.
|
||||
/repository/radiation/proc/z_radiate(var/atom/source, power, var/respect_maint = TRUE) //VOREStation edit; Respect shielded areas by default please.
|
||||
if(!(power && source))
|
||||
return
|
||||
var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z)
|
||||
flat_radiate(epicentre, power, world.maxx, respect_maint)
|
||||
|
||||
/turf
|
||||
var/cached_rad_resistance = 0
|
||||
|
||||
/turf/proc/calc_rad_resistance()
|
||||
cached_rad_resistance = 0
|
||||
for(var/obj/O in src.contents)
|
||||
if(O.rad_resistance) //Override
|
||||
cached_rad_resistance += O.rad_resistance
|
||||
|
||||
else if(O.density) //So open doors don't get counted
|
||||
var/material/M = O.get_material()
|
||||
if(!M) continue
|
||||
cached_rad_resistance += M.weight + M.radiation_resistance
|
||||
// Looks like storing the contents length is meant to be a basic check if the cache is stale due to items enter/exiting. Better than nothing so I'm leaving it as is. ~Leshana
|
||||
radiation_repository.resistance_cache[src] = (length(contents) + 1)
|
||||
|
||||
/turf/simulated/wall/calc_rad_resistance()
|
||||
radiation_repository.resistance_cache[src] = (length(contents) + 1)
|
||||
cached_rad_resistance = (density ? material.weight + material.radiation_resistance : 0)
|
||||
|
||||
/obj
|
||||
var/rad_resistance = 0 // Allow overriding rad resistance
|
||||
|
||||
// If people expand the system, this may be useful. Here as a placeholder until then
|
||||
/atom/proc/rad_act(var/severity)
|
||||
return 1
|
||||
|
||||
/mob/living/rad_act(var/severity)
|
||||
if(severity && !isbelly(loc)) //eaten mobs are made immune to radiation //VOREStation Edit Start
|
||||
src.apply_effect(severity, IRRADIATE, src.getarmor(null, "rad"))
|
||||
for(var/atom/I in src)
|
||||
I.rad_act(severity) ///VOREStation Edit End
|
||||
@@ -21,6 +21,20 @@
|
||||
containertype = /obj/structure/closet/crate/engineering
|
||||
containername = "Superconducting Magnetic Coil crate"
|
||||
|
||||
/datum/supply_pack/eng/smescoil/super_capacity
|
||||
name = "Superconducting Capacitance Coil"
|
||||
contains = list(/obj/item/weapon/smes_coil/super_capacity)
|
||||
cost = 90
|
||||
containertype = /obj/structure/closet/crate/engineering
|
||||
containername = "Superconducting Capacitance Coil crate"
|
||||
|
||||
/datum/supply_pack/eng/smescoil/super_io
|
||||
name = "Superconducting Transmission Coil"
|
||||
contains = list(/obj/item/weapon/smes_coil/super_io)
|
||||
cost = 90
|
||||
containertype = /obj/structure/closet/crate/engineering
|
||||
containername = "Superconducting Transmission Coil crate"
|
||||
|
||||
/datum/supply_pack/eng/shield_capacitor
|
||||
name = "Shield Capacitor"
|
||||
contains = list(/obj/machinery/shield_capacitor)
|
||||
@@ -290,4 +304,4 @@
|
||||
cost = 75
|
||||
containername = "Tritium crate"
|
||||
containertype = /obj/structure/closet/crate/engineering
|
||||
contains = list(/obj/fiftyspawner/tritium)
|
||||
contains = list(/obj/fiftyspawner/tritium)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/datum/supply_pack/randomised/hospitality/pizza
|
||||
cost = 50
|
||||
|
||||
/datum/supply_pack/randomised/hospitality/burgers_vr
|
||||
num_contained = 5
|
||||
contains = list(
|
||||
|
||||
@@ -334,4 +334,18 @@
|
||||
contains = list(/obj/item/device/defib_kit = 2)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/medical
|
||||
containername = "Defibrillator crate"
|
||||
containername = "Defibrillator crate"
|
||||
|
||||
/datum/supply_pack/med/distillery
|
||||
name = "Chemical distiller crate"
|
||||
contains = list(/obj/machinery/portable_atmospherics/powered/reagent_distillery = 1)
|
||||
cost = 175
|
||||
containertype = /obj/structure/largecrate
|
||||
containername = "Chemical distiller crate"
|
||||
|
||||
/datum/supply_pack/med/advdistillery
|
||||
name = "Industrial Chemical distiller crate"
|
||||
contains = list(/obj/machinery/portable_atmospherics/powered/reagent_distillery/industrial = 1)
|
||||
cost = 250
|
||||
containertype = /obj/structure/largecrate
|
||||
containername = "Industrial Chemical distiller crate"
|
||||
|
||||
@@ -1,38 +1,50 @@
|
||||
/datum/supply_pack/med/medicalbiosuits
|
||||
contains = list(
|
||||
/obj/item/clothing/head/bio_hood/scientist = 3,
|
||||
/obj/item/clothing/suit/bio_suit/scientist = 3,
|
||||
/obj/item/clothing/suit/bio_suit/virology = 3,
|
||||
/obj/item/clothing/head/bio_hood/virology = 3,
|
||||
/obj/item/clothing/suit/bio_suit/cmo,
|
||||
/obj/item/clothing/head/bio_hood/cmo,
|
||||
/obj/item/clothing/shoes/white = 7,
|
||||
/obj/item/clothing/mask/gas = 7,
|
||||
/obj/item/weapon/tank/oxygen = 7,
|
||||
/obj/item/weapon/storage/box/masks,
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
)
|
||||
cost = 40
|
||||
|
||||
/datum/supply_pack/med/virologybiosuits
|
||||
name = "Virology biohazard gear"
|
||||
contains = list(
|
||||
/obj/item/clothing/suit/bio_suit/virology = 3,
|
||||
/obj/item/clothing/head/bio_hood/virology = 3,
|
||||
/obj/item/clothing/mask/gas = 3,
|
||||
/obj/item/weapon/tank/oxygen = 3,
|
||||
/obj/item/weapon/storage/box/masks,
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
)
|
||||
cost = 40
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Virology biohazard equipment"
|
||||
access = access_medical_equip
|
||||
|
||||
/datum/supply_pack/med/virus
|
||||
name = "Virus sample crate"
|
||||
contains = list(/obj/item/weapon/virusdish/random = 4)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Virus sample crate"
|
||||
access = access_medical_equip
|
||||
/datum/supply_pack/med/medicalbiosuits
|
||||
contains = list(
|
||||
/obj/item/clothing/head/bio_hood/scientist = 3,
|
||||
/obj/item/clothing/suit/bio_suit/scientist = 3,
|
||||
/obj/item/clothing/suit/bio_suit/virology = 3,
|
||||
/obj/item/clothing/head/bio_hood/virology = 3,
|
||||
/obj/item/clothing/suit/bio_suit/cmo,
|
||||
/obj/item/clothing/head/bio_hood/cmo,
|
||||
/obj/item/clothing/shoes/white = 7,
|
||||
/obj/item/clothing/mask/gas = 7,
|
||||
/obj/item/weapon/tank/oxygen = 7,
|
||||
/obj/item/weapon/storage/box/masks,
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
)
|
||||
cost = 40
|
||||
|
||||
/datum/supply_pack/med/virologybiosuits
|
||||
name = "Virology biohazard gear"
|
||||
contains = list(
|
||||
/obj/item/clothing/suit/bio_suit/virology = 3,
|
||||
/obj/item/clothing/head/bio_hood/virology = 3,
|
||||
/obj/item/clothing/mask/gas = 3,
|
||||
/obj/item/weapon/tank/oxygen = 3,
|
||||
/obj/item/weapon/storage/box/masks,
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
)
|
||||
cost = 40
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Virology biohazard equipment"
|
||||
access = access_medical_equip
|
||||
|
||||
/datum/supply_pack/med/virus
|
||||
name = "Virus sample crate"
|
||||
contains = list(/obj/item/weapon/virusdish/random = 4)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Virus sample crate"
|
||||
access = access_medical_equip
|
||||
|
||||
|
||||
/datum/supply_pack/med/bloodpack
|
||||
containertype = /obj/structure/closet/crate/medical/blood
|
||||
|
||||
/datum/supply_pack/med/compactdefib
|
||||
name = "Compact Defibrillator crate"
|
||||
contains = list(/obj/item/device/defib_kit/compact = 1)
|
||||
cost = 90
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Compact Defibrillator crate"
|
||||
access = access_medical_equip
|
||||
|
||||
@@ -143,4 +143,30 @@
|
||||
)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Glucose Hypo Crate"
|
||||
containername = "Glucose Hypo Crate"
|
||||
|
||||
/datum/supply_pack/misc/mre_rations
|
||||
num_contained = 6
|
||||
name = "Emergency - MREs"
|
||||
contains = list(/obj/item/weapon/storage/mre,
|
||||
/obj/item/weapon/storage/mre/menu2,
|
||||
/obj/item/weapon/storage/mre/menu3,
|
||||
/obj/item/weapon/storage/mre/menu4,
|
||||
/obj/item/weapon/storage/mre/menu5,
|
||||
/obj/item/weapon/storage/mre/menu6,
|
||||
/obj/item/weapon/storage/mre/menu7,
|
||||
/obj/item/weapon/storage/mre/menu8,
|
||||
/obj/item/weapon/storage/mre/menu9,
|
||||
/obj/item/weapon/storage/mre/menu10)
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "ready to eat rations"
|
||||
|
||||
/datum/supply_pack/misc/paste_rations
|
||||
name = "Emergency - Paste"
|
||||
contains = list(
|
||||
/obj/item/weapon/storage/mre/menu11 = 2
|
||||
)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "emergency rations"
|
||||
|
||||
@@ -13,24 +13,6 @@
|
||||
containername = "Belt-miner gear crate"
|
||||
access = access_mining
|
||||
|
||||
/datum/supply_pack/misc/rations
|
||||
name = "Emergency rations"
|
||||
contains = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/liquidfood = 4,
|
||||
)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "emergency rations"
|
||||
|
||||
/datum/supply_pack/misc/proteinrations
|
||||
name = "Emergency meat rations"
|
||||
contains = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/liquidprotein = 4,
|
||||
)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/freezer
|
||||
containername = "emergency meat rations"
|
||||
|
||||
/datum/supply_pack/misc/eva_rig
|
||||
name = "eva hardsuit (empty)"
|
||||
contains = list(
|
||||
@@ -43,6 +25,7 @@
|
||||
access_eva,
|
||||
access_explorer,
|
||||
access_pilot)
|
||||
one_access = TRUE
|
||||
|
||||
/datum/supply_pack/misc/mining_rig
|
||||
name = "industrial hardsuit (empty)"
|
||||
@@ -53,4 +36,45 @@
|
||||
containertype = /obj/structure/closet/crate/secure/gear
|
||||
containername = "industrial hardsuit crate"
|
||||
access = list(access_mining,
|
||||
access_eva)
|
||||
access_eva)
|
||||
one_access = TRUE
|
||||
|
||||
/datum/supply_pack/misc/medical_rig
|
||||
name = "medical hardsuit (empty)"
|
||||
contains = list(
|
||||
/obj/item/weapon/rig/medical = 1
|
||||
)
|
||||
cost = 150
|
||||
containertype = /obj/structure/closet/crate/secure/gear
|
||||
containername = "medical hardsuit crate"
|
||||
access = access_medical
|
||||
|
||||
/datum/supply_pack/misc/security_rig
|
||||
name = "hazard hardsuit (empty)"
|
||||
contains = list(
|
||||
/obj/item/weapon/rig/hazard = 1
|
||||
)
|
||||
cost = 150
|
||||
containertype = /obj/structure/closet/crate/secure/gear
|
||||
containername = "hazard hardsuit crate"
|
||||
access = access_armory
|
||||
|
||||
/datum/supply_pack/misc/science_rig
|
||||
name = "ami hardsuit (empty)"
|
||||
contains = list(
|
||||
/obj/item/weapon/rig/hazmat = 1
|
||||
)
|
||||
cost = 150
|
||||
containertype = /obj/structure/closet/crate/secure/gear
|
||||
containername = "ami hardsuit crate"
|
||||
access = access_rd
|
||||
|
||||
/datum/supply_pack/misc/ce_rig
|
||||
name = "advanced voidsuit (empty)"
|
||||
contains = list(
|
||||
/obj/item/weapon/rig/ce = 1
|
||||
)
|
||||
cost = 150
|
||||
containertype = /obj/structure/closet/crate/secure/gear
|
||||
containername = "advanced voidsuit crate"
|
||||
access = access_ce
|
||||
|
||||
@@ -87,4 +87,14 @@
|
||||
contains = list(
|
||||
/obj/item/weapon/storage/box/wormcan,
|
||||
/obj/item/weapon/storage/box/wormcan/deluxe
|
||||
)
|
||||
|
||||
/datum/supply_pack/recreation/ltagturrets
|
||||
name = "Laser Tag Turrets"
|
||||
cost = 40
|
||||
containername = "laser tag turret crate"
|
||||
containertype = /obj/structure/closet/crate
|
||||
contains = list(
|
||||
/obj/machinery/porta_turret/lasertag/blue,
|
||||
/obj/machinery/porta_turret/lasertag/red
|
||||
)
|
||||
@@ -6,6 +6,7 @@
|
||||
access = list(
|
||||
access_security,
|
||||
access_xenobiology)
|
||||
one_access = TRUE
|
||||
|
||||
/datum/supply_pack/security/guardmutant
|
||||
name = "VARMAcorp autoNOMous security solution for hostile environments"
|
||||
@@ -15,6 +16,7 @@
|
||||
access = list(
|
||||
access_security,
|
||||
access_xenobiology)
|
||||
one_access = TRUE
|
||||
*/
|
||||
|
||||
/datum/supply_pack/randomised/security/armor
|
||||
@@ -32,3 +34,23 @@
|
||||
/obj/item/weapon/storage/box/gloves
|
||||
)
|
||||
cost = 40
|
||||
|
||||
/datum/supply_pack/security/trackingimplant
|
||||
name = "Implants - Tracking"
|
||||
contains = list(
|
||||
/obj/item/weapon/storage/box/trackimp = 1
|
||||
)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Tracking implants"
|
||||
access = access_security
|
||||
|
||||
/datum/supply_pack/security/chemicalimplant
|
||||
name = "Implants - Chemical"
|
||||
contains = list(
|
||||
/obj/item/weapon/storage/box/chemimp = 1
|
||||
)
|
||||
cost = 25
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Chemical implants"
|
||||
access = access_security
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "soap"
|
||||
flags = NOCONDUCT
|
||||
w_class = ITEMSIZE_SMALL
|
||||
slot_flags = SLOT_HOLSTER
|
||||
throwforce = 0
|
||||
@@ -395,7 +396,7 @@
|
||||
display_contents_with_number = 1
|
||||
max_w_class = ITEMSIZE_NORMAL
|
||||
max_storage_space = 100
|
||||
|
||||
|
||||
/obj/item/weapon/storage/part_replacer/adv
|
||||
name = "advanced rapid part exchange device"
|
||||
desc = "Special mechanical module made to store, sort, and apply standard machine parts. This one has a greatly upgraded storage capacity"
|
||||
|
||||
@@ -47,8 +47,8 @@ var/datum/antagonist/highlander/highlanders
|
||||
var/obj/item/weapon/card/id/W = new(player)
|
||||
W.name = "[player.real_name]'s ID Card"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_station_access()
|
||||
W.access += get_all_centcom_access()
|
||||
W.access = get_all_station_access().Copy
|
||||
W.access |= get_all_centcom_access()
|
||||
W.assignment = "Highlander"
|
||||
W.registered_name = player.real_name
|
||||
player.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
@@ -2737,4 +2737,4 @@ var/list/the_station_areas = list (
|
||||
icon_state = "yellow"
|
||||
luminosity = 1
|
||||
dynamic_lighting = 0
|
||||
requires_power = 0
|
||||
requires_power = 0
|
||||
@@ -1,121 +1,4 @@
|
||||
/area/crew_quarters/sleep/vistor_room_1
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_2
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_3
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_4
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_5
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_6
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_7
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_8
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_9
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_10
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_11
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/vistor_room_12
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_1
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_2
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_3
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_4
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_5
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_6
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_7
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_8
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_9
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/crew_quarters/sleep/Dorm_10
|
||||
flags = RAD_SHIELDED | BLUE_SHIELDED
|
||||
|
||||
/area/teleporter/departing
|
||||
name = "\improper Long-Range Teleporter"
|
||||
icon_state = "teleporter"
|
||||
music = "signal"
|
||||
|
||||
// Override telescience shielding on some areas
|
||||
/area/security/armoury
|
||||
flags = BLUE_SHIELDED
|
||||
|
||||
/area/security/tactical
|
||||
flags = BLUE_SHIELDED
|
||||
|
||||
/area/security/nuke_storage
|
||||
flags = BLUE_SHIELDED
|
||||
|
||||
/area/supply
|
||||
flags = BLUE_SHIELDED
|
||||
|
||||
// Add rad shielding to maintenance and construction sites
|
||||
/area/vacant
|
||||
flags = RAD_SHIELDED
|
||||
|
||||
/area/maintenance
|
||||
flags = RAD_SHIELDED
|
||||
|
||||
/area/rnd/research_storage //Located entirely in maint under public access, so why not that too
|
||||
flags = RAD_SHIELDED
|
||||
|
||||
// New shuttles
|
||||
/area/shuttle/administration/transit
|
||||
name = "Deep Space (AS)"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/administration/away_mission
|
||||
name = "Away Mission (AS)"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/awaymission/home
|
||||
name = "NSB Adephagia (AM)"
|
||||
icon_state = "shuttle2"
|
||||
|
||||
/area/shuttle/awaymission/warp
|
||||
name = "Deep Space (AM)"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/shuttle/awaymission/away
|
||||
name = "Away Mission (AM)"
|
||||
icon_state = "shuttle2"
|
||||
|
||||
/area/shuttle/awaymission/oldengbase
|
||||
name = "Old Construction Site (AM)"
|
||||
icon_state = "shuttle2"
|
||||
//TFF 28/8/19 - cleanup of areas placement - removes all but rogueminer_vr stuff.
|
||||
|
||||
/area/shuttle/belter/station
|
||||
name = "Belter Shuttle Landed"
|
||||
@@ -162,140 +45,6 @@
|
||||
icon_state = "red2"
|
||||
shuttle_area = /area/shuttle/belter/belt/zone4
|
||||
|
||||
/area/medical/resleeving
|
||||
name = "Resleeving Lab"
|
||||
icon_state = "genetics"
|
||||
|
||||
/area/bigship
|
||||
name = "Bigship"
|
||||
requires_power = 0
|
||||
flags = RAD_SHIELDED
|
||||
sound_env = SMALL_ENCLOSED
|
||||
base_turf = /turf/space
|
||||
icon_state = "red2"
|
||||
|
||||
/area/bigship/teleporter
|
||||
name = "Bigship Teleporter Room"
|
||||
|
||||
//////// Small Cruiser Areas ////////
|
||||
/area/houseboat
|
||||
name = "Small Cruiser"
|
||||
requires_power = 0
|
||||
flags = RAD_SHIELDED
|
||||
base_turf = /turf/space
|
||||
icon_state = "red2"
|
||||
lightswitch = TRUE
|
||||
|
||||
/area/houseboat/holodeck_area
|
||||
name = "Small Cruiser - Holodeck"
|
||||
icon_state = "blue2"
|
||||
|
||||
/area/houseboat/holodeck/off
|
||||
name = "Small Cruiser Holo - Off"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/beach
|
||||
name = "Small Cruiser Holo - Beach"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/snow
|
||||
name = "Small Cruiser Holo - Snow"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/desert
|
||||
name = "Small Cruiser Holo - Desert"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/picnic
|
||||
name = "Small Cruiser Holo - Picnic"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/thunderdome
|
||||
name = "Small Cruiser Holo - Thunderdome"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/basketball
|
||||
name = "Small Cruiser Holo - Basketball"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/gaming
|
||||
name = "Small Cruiser Holo - Gaming Table"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/space
|
||||
name = "Small Cruiser Holo - Space"
|
||||
icon_state = "blue2"
|
||||
/area/houseboat/holodeck/bunking
|
||||
name = "Small Cruiser Holo - Bunking"
|
||||
icon_state = "blue2"
|
||||
|
||||
/area/shuttle/cruiser/cruiser
|
||||
name = "Small Cruiser Shuttle - Cruiser"
|
||||
icon_state = "blue2"
|
||||
base_turf = /turf/simulated/floor/tiled/techfloor
|
||||
/area/shuttle/cruiser/station
|
||||
name = "Small Cruiser Shuttle - Station"
|
||||
icon_state = "blue2"
|
||||
|
||||
|
||||
// Tether Map has this shuttle
|
||||
/area/shuttle/tether/surface
|
||||
name = "Tether Shuttle Landed"
|
||||
icon_state = "shuttle"
|
||||
base_turf = /turf/simulated/floor/reinforced
|
||||
|
||||
/area/shuttle/tether/station
|
||||
name = "Tether Shuttle Dock"
|
||||
icon_state = "shuttle2"
|
||||
|
||||
/area/shuttle/tether/transit
|
||||
name = "Tether Shuttle Transit"
|
||||
icon_state = "shuttle2"
|
||||
|
||||
// rnd (Research and Development)
|
||||
/area/rnd/research/testingrange
|
||||
name = "\improper Weapons Testing Range"
|
||||
icon_state = "firingrange"
|
||||
|
||||
/area/rnd/research/researchdivision
|
||||
name = "\improper Research Division"
|
||||
icon_state = "research"
|
||||
|
||||
/area/rnd/outpost
|
||||
name = "\improper Research Outpost Hallway"
|
||||
icon_state = "research"
|
||||
|
||||
/area/rnd/outpost/airlock
|
||||
name = "\improper Research Outpost Airlock"
|
||||
icon_state = "green"
|
||||
|
||||
/area/rnd/outpost/eva
|
||||
name = "Research Outpost EVA Storage"
|
||||
icon_state = "eva"
|
||||
|
||||
/area/rnd/outpost/chamber
|
||||
name = "\improper Research Outpost Burn Chamber"
|
||||
icon_state = "engine"
|
||||
|
||||
/area/rnd/outpost/atmos
|
||||
name = "Research Outpost Atmospherics"
|
||||
icon_state = "atmos"
|
||||
|
||||
/area/rnd/outpost/storage
|
||||
name = "\improper Research Outpost Gas Storage"
|
||||
icon_state = "toxstorage"
|
||||
|
||||
/area/rnd/outpost/mixing
|
||||
name = "\improper Research Outpost Gas Mixing"
|
||||
icon_state = "toxmix"
|
||||
|
||||
/area/rnd/outpost/heating
|
||||
name = "\improper Research Outpost Gas Heating"
|
||||
icon_state = "toxmix"
|
||||
|
||||
/area/rnd/outpost/testing
|
||||
name = "\improper Research Outpost Testing"
|
||||
icon_state = "toxtest"
|
||||
|
||||
/area/maintenance/substation/outpost
|
||||
name = "Research Outpost Substation"
|
||||
|
||||
/area/engineering/engine_gas
|
||||
name = "\improper Engine Gas Storage"
|
||||
icon_state = "engine_waste"
|
||||
|
||||
/area/chapel/observation
|
||||
name = "\improper Chapel Observation"
|
||||
icon_state = "chapel"
|
||||
@@ -0,0 +1,6 @@
|
||||
/area/shuttle_arrived()
|
||||
.=..()
|
||||
for(var/obj/machinery/telecomms/relay/R in contents)
|
||||
R.reset_z()
|
||||
for(var/obj/machinery/power/apc/A in contents)
|
||||
A.update_area()
|
||||
+2
-1
@@ -388,7 +388,8 @@
|
||||
blood_DNA = list()
|
||||
|
||||
was_bloodied = 1
|
||||
blood_color = "#A10808"
|
||||
if(!blood_color)
|
||||
blood_color = "#A10808"
|
||||
if(istype(M))
|
||||
if (!istype(M.dna, /datum/dna))
|
||||
M.dna = new /datum/dna(null)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/atom/movable
|
||||
layer = OBJ_LAYER
|
||||
appearance_flags = TILE_BOUND|PIXEL_SCALE
|
||||
appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER //VOREStation Edit
|
||||
var/last_move = null
|
||||
var/anchored = 0
|
||||
// var/elevation = 2 - not used anywhere
|
||||
|
||||
@@ -35,6 +35,22 @@
|
||||
/obj/structure/cult/pylon/attackby(obj/item/W as obj, mob/user as mob)
|
||||
attackpylon(user, W.force)
|
||||
|
||||
/obj/structure/cult/pylon/take_damage(var/damage)
|
||||
pylonhit(damage)
|
||||
|
||||
/obj/structure/cult/pylon/bullet_act(var/obj/item/projectile/Proj)
|
||||
pylonhit(Proj.get_structure_damage())
|
||||
|
||||
/obj/structure/cult/pylon/proc/pylonhit(var/damage)
|
||||
if(!isbroken)
|
||||
if(prob(1+ damage * 5))
|
||||
visible_message("<span class='danger'>The pylon shatters!</span>")
|
||||
playsound(get_turf(src), 'sound/effects/Glassbr3.ogg', 75, 1)
|
||||
isbroken = 1
|
||||
density = 0
|
||||
icon_state = "pylon-broken"
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/cult/pylon/proc/attackpylon(mob/user as mob, var/damage)
|
||||
if(!isbroken)
|
||||
if(prob(1+ damage * 5))
|
||||
|
||||
@@ -126,7 +126,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
create_characters() //Create player characters and transfer them.
|
||||
collect_minds()
|
||||
equip_characters()
|
||||
data_core.manifest()
|
||||
//data_core.manifest() //VOREStation Removal
|
||||
|
||||
callHook("roundstart")
|
||||
|
||||
@@ -280,8 +280,13 @@ var/global/datum/controller/gameticker/ticker
|
||||
else if(!player.mind.assigned_role)
|
||||
continue
|
||||
else
|
||||
if (player.create_character()) // VOREStation Edit
|
||||
//VOREStation Edit Start
|
||||
var/mob/living/carbon/human/new_char = player.create_character()
|
||||
if(new_char)
|
||||
qdel(player)
|
||||
if(istype(new_char) && !(new_char.mind.assigned_role=="Cyborg"))
|
||||
data_core.manifest_inject(new_char)
|
||||
//VOREStation Edit End
|
||||
|
||||
|
||||
proc/collect_minds()
|
||||
@@ -299,7 +304,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
if(!player_is_antag(player.mind, only_offstation_roles = 1))
|
||||
job_master.EquipRank(player, player.mind.assigned_role, 0)
|
||||
UpdateFactionList(player)
|
||||
equip_custom_items(player)
|
||||
//equip_custom_items(player) //VOREStation Removal
|
||||
//player.apply_traits() //VOREStation Removal
|
||||
if(captainless)
|
||||
for(var/mob/M in player_list)
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
if(explode)
|
||||
explosion(src.loc, devastation_range = 0, heavy_impact_range = 0, light_impact_range = 4, flash_range = 6, adminlog = 0)
|
||||
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
|
||||
radiation_repository.radiate(src, 50)
|
||||
SSradiation.radiate(src, 50)
|
||||
|
||||
// This meteor fries toasters.
|
||||
/obj/effect/meteor/emp
|
||||
|
||||
@@ -1,54 +1,26 @@
|
||||
//VOREStation Edit - Basically this whole file
|
||||
/datum/job/intern
|
||||
title = "Intern"
|
||||
flag = INTERN
|
||||
department = "Civilian"
|
||||
department_flag = ENGSEC // VOREStation Edit - Ran out of bits
|
||||
faction = "Station"
|
||||
total_positions = -1
|
||||
spawn_positions = -1
|
||||
supervisors = "the staff from the departmen you're interning in"
|
||||
selection_color = "#555555"
|
||||
economic_modifier = 2
|
||||
access = list() //See /datum/job/assistant/get_access()
|
||||
minimal_access = list() //See /datum/job/assistant/get_access()
|
||||
outfit_type = /decl/hierarchy/outfit/job/assistant/intern
|
||||
alt_titles = list("Apprentice Engineer","Medical Intern","Lab Assistant","Security Cadet","Jr. Cargo Tech", "Jr. Explorer") //VOREStation Edit
|
||||
timeoff_factor = 0 //VOREStation Edit - Interns, noh
|
||||
|
||||
//VOREStation Add
|
||||
/datum/job/intern/New()
|
||||
..()
|
||||
if(config)
|
||||
total_positions = config.limit_interns
|
||||
spawn_positions = config.limit_interns
|
||||
//VOREStation Add End
|
||||
|
||||
// VOREStation Add
|
||||
/datum/job/assistant
|
||||
title = USELESS_JOB
|
||||
title = "Assistant"
|
||||
flag = ASSISTANT
|
||||
department = "Civilian"
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = -1
|
||||
spawn_positions = -1
|
||||
supervisors = "nobody! You don't work here"
|
||||
supervisors = "absolutely everyone"
|
||||
selection_color = "#515151"
|
||||
economic_modifier = 1
|
||||
access = list()
|
||||
minimal_access = list()
|
||||
access = list() //See /datum/job/assistant/get_access()
|
||||
minimal_access = list() //See /datum/job/assistant/get_access()
|
||||
outfit_type = /decl/hierarchy/outfit/job/assistant
|
||||
timeoff_factor = 0
|
||||
/datum/job/assistant/New()
|
||||
..()
|
||||
if(config)
|
||||
total_positions = config.limit_visitors
|
||||
spawn_positions = config.limit_visitors
|
||||
/* alt_titles = list(
|
||||
"Technical Assistant",
|
||||
"Medical Intern",
|
||||
"Research Assistant",
|
||||
"Visitor" = /decl/hierarchy/outfit/job/assistant/visitor
|
||||
) */ //VOREStation Removal: no alt-titles for visitors
|
||||
|
||||
/datum/job/assistant/get_access()
|
||||
if(config.assistant_maint)
|
||||
return list(access_maint_tunnels)
|
||||
else
|
||||
return list()
|
||||
//VOREStation Add End
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/datum/job/intern
|
||||
title = "Intern"
|
||||
flag = INTERN
|
||||
department = "Civilian"
|
||||
department_flag = ENGSEC // Ran out of bits
|
||||
faction = "Station"
|
||||
total_positions = -1
|
||||
spawn_positions = -1
|
||||
supervisors = "the staff from the department you're interning in"
|
||||
selection_color = "#555555"
|
||||
economic_modifier = 2
|
||||
access = list() //See /datum/job/intern/get_access()
|
||||
minimal_access = list() //See /datum/job/intern/get_access()
|
||||
outfit_type = /decl/hierarchy/outfit/job/assistant/intern
|
||||
alt_titles = list("Apprentice Engineer","Medical Intern","Lab Assistant","Security Cadet","Jr. Cargo Tech", "Jr. Explorer", "Server" = /decl/hierarchy/outfit/job/service/server)
|
||||
timeoff_factor = 0 // Interns, noh
|
||||
|
||||
/datum/job/intern/New()
|
||||
..()
|
||||
if(config)
|
||||
total_positions = config.limit_interns
|
||||
spawn_positions = config.limit_interns
|
||||
|
||||
/datum/job/intern/get_access()
|
||||
if(config.assistant_maint)
|
||||
return list(access_maint_tunnels)
|
||||
else
|
||||
return list()
|
||||
|
||||
/datum/job/assistant // Visitor
|
||||
title = USELESS_JOB
|
||||
supervisors = "nobody! You don't work here"
|
||||
timeoff_factor = 0
|
||||
|
||||
/datum/job/assistant/New()
|
||||
..()
|
||||
if(config)
|
||||
total_positions = config.limit_visitors
|
||||
spawn_positions = config.limit_visitors
|
||||
|
||||
/datum/job/assistant/get_access()
|
||||
return list()
|
||||
@@ -31,7 +31,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
H.implant_loyalty(src)
|
||||
*/
|
||||
/datum/job/captain/get_access()
|
||||
return get_all_station_access()
|
||||
return get_all_station_access().Copy()
|
||||
|
||||
/datum/job/hop
|
||||
title = "Head of Personnel"
|
||||
@@ -60,13 +60,13 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_hop, access_RC_announce, access_keycard_auth) //, access_gateway) //VOREStation Edit
|
||||
access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_hop, access_RC_announce, access_keycard_auth) //, access_gateway) //VOREStation Edit
|
||||
access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
|
||||
/datum/job/secretary
|
||||
title = "Command Secretary"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/datum/job/captain
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/hop
|
||||
|
||||
disallow_jobhop = TRUE
|
||||
alt_titles = list("Deputy Director", "Crew Resources Officer")
|
||||
|
||||
access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_hop, access_RC_announce, access_keycard_auth)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers,
|
||||
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_maint_tunnels, access_bar, access_janitor, access_construction, access_morgue,
|
||||
access_crematorium, access_kitchen, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_hop, access_RC_announce, access_keycard_auth)
|
||||
|
||||
/datum/job/secretary
|
||||
disallow_jobhop = TRUE
|
||||
@@ -132,8 +132,8 @@
|
||||
department = "Civilian"
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2 // VOREStation Edit. Original number is 1.
|
||||
spawn_positions = 2 // VOREStation Edit. Original number is 1.
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#515151"
|
||||
idtype = /obj/item/weapon/card/id/civilian/librarian
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/datum/job/chef
|
||||
total_positions = 2 //IT TAKES A LOT TO MAKE A STEW
|
||||
spawn_positions = 2 //A PINCH OF SALT AND LAUGHTER, TOO
|
||||
|
||||
/datum/job/cargo_tech
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
|
||||
/datum/job/mining
|
||||
total_positions = 4
|
||||
spawn_positions = 4
|
||||
|
||||
/datum/job/janitor //Lots of janitor substations on station.
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
alt_titles = list("Custodian", "Sanitation Technician", "Maid")
|
||||
|
||||
//TFF 5/9/19 - restore librarian job slot to 2
|
||||
/datum/job/librarian
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
alt_titles = list("Journalist", "Historian", "Writer")
|
||||
|
||||
/datum/job/lawyer
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/datum/job/chief_engineer
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/atmos
|
||||
spawn_positions = 3
|
||||
@@ -0,0 +1,5 @@
|
||||
/datum/job/cmo
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/doctor
|
||||
spawn_positions = 5
|
||||
@@ -15,11 +15,11 @@
|
||||
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network) //VOREStation Edit
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_network)
|
||||
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network) //VOREStation Edit
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_network)
|
||||
alt_titles = list("Research Supervisor")
|
||||
|
||||
minimum_character_age = 25
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/datum/job/rd
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network)
|
||||
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
access_tox_storage, access_teleporter, access_sec_doors,
|
||||
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_eva, access_network)
|
||||
|
||||
/datum/job/scientist
|
||||
alt_titles = list("Xenoarcheologist", "Anomalist", "Phoron Researcher", "Circuit Designer")
|
||||
@@ -14,12 +14,12 @@
|
||||
economic_modifier = 10
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)//VOREStation Edit
|
||||
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
|
||||
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)//VOREStation Edit
|
||||
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
|
||||
minimum_character_age = 25
|
||||
minimal_player_age = 14
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/datum/job/hos
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
|
||||
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory,
|
||||
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
|
||||
access_research, access_engine, access_mining, access_construction, access_mailsorting,
|
||||
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
|
||||
@@ -0,0 +1,3 @@
|
||||
/datum/job/cyborg
|
||||
total_positions = 4 //Along with one able to spawn later in the round.
|
||||
spawn_positions = 3 //Let's have 3 able to spawn in roundstart
|
||||
@@ -37,8 +37,7 @@
|
||||
return 1
|
||||
|
||||
get_access()
|
||||
var/access = get_all_accesses()
|
||||
return access
|
||||
return get_all_accesses().Copy()
|
||||
|
||||
/*/datum/job/centcom_visitor //For Pleasure // You mean for admin abuse... -Ace
|
||||
title = "CentCom Visitor"
|
||||
@@ -1,77 +0,0 @@
|
||||
//Contains all modified jobs for easy access and editing.
|
||||
|
||||
/datum/job/captain
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/hop
|
||||
disallow_jobhop = TRUE
|
||||
alt_titles = list("Deputy Director", "Crew Resources Officer")
|
||||
|
||||
/datum/job/hos
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/chief_engineer
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/cmo
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/rd
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/secretary
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/lawyer
|
||||
disallow_jobhop = TRUE
|
||||
|
||||
/datum/job/doctor
|
||||
total_positions = 5
|
||||
spawn_positions = 5
|
||||
|
||||
/datum/job/janitor //Lots of janitor substations on station.
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
alt_titles = list("Custodian", "Sanitation Technician", "Maid")
|
||||
|
||||
/datum/job/librarian
|
||||
alt_titles = list("Journalist", "Historian", "Writer")
|
||||
|
||||
/datum/job/officer
|
||||
total_positions = 4
|
||||
spawn_positions = 4
|
||||
|
||||
/datum/job/cargo_tech
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
|
||||
/datum/job/psychiatrist
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
|
||||
/datum/job/mining
|
||||
total_positions = 4
|
||||
spawn_positions = 4
|
||||
|
||||
/datum/job/cyborg
|
||||
total_positions = 4 //Along with one able to spawn later in the round.
|
||||
spawn_positions = 3 //Let's have 3 able to spawn in roundstart
|
||||
|
||||
/datum/job/bartender
|
||||
total_positions = 2
|
||||
spawn_positions = 2
|
||||
|
||||
/datum/job/chef
|
||||
total_positions = 2 //IT TAKES A LOT TO MAKE A STEW
|
||||
spawn_positions = 2 //A PINCH OF SALT AND LAUGHTER, TOO
|
||||
|
||||
/datum/job/engineer
|
||||
total_positions = 5
|
||||
spawn_positions = 5
|
||||
|
||||
/datum/job/atmos
|
||||
total_positions = 3
|
||||
spawn_positions = 3
|
||||
|
||||
/datum/job/scientist
|
||||
alt_titles = list("Xenoarcheologist", "Anomalist", "Phoron Researcher", "Circuit Designer")
|
||||
@@ -80,7 +80,7 @@
|
||||
if(C == user)
|
||||
user.visible_message("[user] climbs on \the [src].","You climb on \the [src].")
|
||||
else
|
||||
visible_message("<span class='notice'>\The [C] has been laid on \the [src] by [user].</span>", 3)
|
||||
visible_message("<span class='notice'>\The [C] has been laid on \the [src] by [user].</span>")
|
||||
if(C.client)
|
||||
C.client.perspective = EYE_PERSPECTIVE
|
||||
C.client.eye = src
|
||||
|
||||
@@ -26,11 +26,12 @@
|
||||
for(dir in list(NORTH, EAST, SOUTH, WEST)) // Loop through every direction
|
||||
sleepernew = locate(/obj/machinery/sleeper, get_step(src, dir)) // Try to find a scanner in that direction
|
||||
if(sleepernew)
|
||||
// VOREStation Edit Start
|
||||
sleeper = sleepernew
|
||||
sleepernew.console = src
|
||||
set_dir(get_dir(src, sleepernew))
|
||||
return
|
||||
return
|
||||
break
|
||||
// VOREStation Edit End
|
||||
|
||||
|
||||
/obj/machinery/sleep_console/attack_ai(var/mob/user)
|
||||
return attack_hand(user)
|
||||
@@ -45,7 +46,7 @@
|
||||
to_chat(user, "<span class='notice'>Sleeper not found!</span>")
|
||||
return
|
||||
|
||||
if(sleeper.panel_open)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>Close the maintenance panel first.</span>")
|
||||
return
|
||||
|
||||
@@ -108,6 +109,7 @@
|
||||
else
|
||||
data["beaker"] = -1
|
||||
data["filtering"] = S.filtering
|
||||
data["pump"] = S.pumping
|
||||
|
||||
var/stasis_level_name = "Error!"
|
||||
for(var/N in S.stasis_choices)
|
||||
@@ -142,6 +144,9 @@
|
||||
if(href_list["sleeper_filter"])
|
||||
if(S.filtering != text2num(href_list["sleeper_filter"]))
|
||||
S.toggle_filter()
|
||||
if(href_list["pump"])
|
||||
if(S.pumping != text2num(href_list["pump"]))
|
||||
S.toggle_pump()
|
||||
if(href_list["chemical"] && href_list["amount"])
|
||||
if(S.occupant && S.occupant.stat != DEAD)
|
||||
if(href_list["chemical"] in S.available_chemicals) // Your hacks are bad and you should feel bad
|
||||
@@ -166,6 +171,7 @@
|
||||
var/list/base_chemicals = list("inaprovaline" = "Inaprovaline", "paracetamol" = "Paracetamol", "anti_toxin" = "Dylovene", "dexalin" = "Dexalin")
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/filtering = 0
|
||||
var/pumping = 0
|
||||
var/obj/machinery/sleep_console/console
|
||||
var/stasis_level = 0 //Every 'this' life ticks are applied to the mob (when life_ticks%stasis_level == 1)
|
||||
var/stasis_choices = list("Complete (1%)" = 100, "Deep (10%)" = 10, "Moderate (20%)" = 5, "Light (50%)" = 2, "None (100%)" = 0)
|
||||
@@ -263,6 +269,13 @@
|
||||
else
|
||||
toggle_filter()
|
||||
|
||||
if(pumping > 0)
|
||||
if(beaker)
|
||||
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
|
||||
for(var/datum/reagent/x in occupant.ingested.reagent_list)
|
||||
occupant.ingested.trans_to_obj(beaker, 3)
|
||||
else
|
||||
toggle_pump()
|
||||
|
||||
/obj/machinery/sleeper/update_icon()
|
||||
icon_state = "sleeper_[occupant ? "1" : "0"]"
|
||||
@@ -301,14 +314,12 @@
|
||||
return
|
||||
if(UNCONSCIOUS)
|
||||
to_chat(usr, "<span class='notice'>You struggle through the haze to hit the eject button. This will take a couple of minutes...</span>")
|
||||
sleep(2 MINUTES)
|
||||
if(!src || !usr || !occupant || (occupant != usr)) //Check if someone's released/replaced/bombed him already
|
||||
return
|
||||
go_out()
|
||||
if(do_after(usr, 2 MINUTES, src))
|
||||
go_out()
|
||||
if(CONSCIOUS)
|
||||
go_out()
|
||||
else
|
||||
if(usr.stat != 0)
|
||||
if(usr.stat != CONSCIOUS)
|
||||
return
|
||||
go_out()
|
||||
add_fingerprint(usr)
|
||||
@@ -326,6 +337,9 @@
|
||||
if(filtering)
|
||||
toggle_filter()
|
||||
|
||||
if(pumping)
|
||||
toggle_pump()
|
||||
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
@@ -340,6 +354,12 @@
|
||||
return
|
||||
filtering = !filtering
|
||||
|
||||
/obj/machinery/sleeper/proc/toggle_pump()
|
||||
if(!occupant || !beaker)
|
||||
pumping = 0
|
||||
return
|
||||
pumping = !pumping
|
||||
|
||||
/obj/machinery/sleeper/proc/go_in(var/mob/M, var/mob/user)
|
||||
if(!M)
|
||||
return
|
||||
@@ -370,7 +390,8 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/sleeper/proc/go_out()
|
||||
if(!occupant)
|
||||
if(!occupant || occupant.loc != src)
|
||||
occupant = null // JUST IN CASE
|
||||
return
|
||||
if(occupant.client)
|
||||
occupant.client.eye = occupant.client.mob
|
||||
@@ -387,6 +408,7 @@
|
||||
update_use_power(1)
|
||||
update_icon()
|
||||
toggle_filter()
|
||||
toggle_pump()
|
||||
|
||||
/obj/machinery/sleeper/proc/remove_beaker()
|
||||
if(beaker)
|
||||
|
||||
@@ -448,4 +448,8 @@ update_flag
|
||||
..()
|
||||
src.air_contents.adjust_gas("phoron", MolesForPressure())
|
||||
src.update_icon()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/take_damage(var/damage)
|
||||
src.health -= damage
|
||||
healthcheck()
|
||||
@@ -0,0 +1,154 @@
|
||||
//Good luck. --BlueNexus
|
||||
|
||||
//Static version of the clamp
|
||||
/obj/machinery/clamp
|
||||
name = "stasis clamp"
|
||||
desc = "A magnetic clamp which can halt the flow of gas in a pipe, via a localised stasis field."
|
||||
description_info = "Click-dragging this to yourself while adjacent will attempt to remove it from the pipe."
|
||||
icon = 'icons/atmos/clamp.dmi'
|
||||
icon_state = "pclamp0"
|
||||
anchored = 1.0
|
||||
var/obj/machinery/atmospherics/pipe/simple/target = null
|
||||
var/open = 1
|
||||
|
||||
var/datum/pipe_network/network_node1
|
||||
var/datum/pipe_network/network_node2
|
||||
|
||||
/obj/machinery/clamp/New(loc, var/obj/machinery/atmospherics/pipe/simple/to_attach = null)
|
||||
..()
|
||||
if(istype(to_attach))
|
||||
target = to_attach
|
||||
else
|
||||
target = locate(/obj/machinery/atmospherics/pipe/simple) in loc
|
||||
if(target)
|
||||
update_networks()
|
||||
dir = target.dir
|
||||
return 1
|
||||
|
||||
/obj/machinery/clamp/proc/update_networks()
|
||||
if(!target)
|
||||
return
|
||||
else
|
||||
var/obj/machinery/atmospherics/pipe/node1 = target.node1
|
||||
var/obj/machinery/atmospherics/pipe/node2 = target.node2
|
||||
if(istype(node1))
|
||||
var/datum/pipeline/P1 = node1.parent
|
||||
network_node1 = P1.network
|
||||
if(istype(node2))
|
||||
var/datum/pipeline/P2 = node2.parent
|
||||
network_node2 = P2.network
|
||||
|
||||
/obj/machinery/clamp/attack_hand(var/mob/user)
|
||||
if(!target)
|
||||
return FALSE
|
||||
if(!open)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
to_chat(user, "<span class='notice'>You turn [open ? "off" : "on"] \the [src]</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/clamp/Destroy()
|
||||
if(!open)
|
||||
spawn(-1) open()
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/clamp/proc/open()
|
||||
if(open || !target)
|
||||
return 0
|
||||
|
||||
target.build_network()
|
||||
|
||||
|
||||
if(network_node1&&network_node2)
|
||||
network_node1.merge(network_node2)
|
||||
network_node2 = network_node1
|
||||
|
||||
if(network_node1)
|
||||
network_node1.update = 1
|
||||
else if(network_node2)
|
||||
network_node2.update = 1
|
||||
|
||||
update_networks()
|
||||
|
||||
open = 1
|
||||
icon_state = "pclamp0"
|
||||
target.in_stasis = 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/clamp/proc/close()
|
||||
if(!open)
|
||||
return 0
|
||||
|
||||
qdel(target.parent)
|
||||
|
||||
if(network_node1)
|
||||
qdel(network_node1)
|
||||
if(network_node2)
|
||||
qdel(network_node2)
|
||||
|
||||
var/obj/machinery/atmospherics/pipe/node1 = null
|
||||
var/obj/machinery/atmospherics/pipe/node2 = null
|
||||
|
||||
if(target.node1)
|
||||
target.node1.build_network()
|
||||
node1 = target.node1
|
||||
if(target.node2)
|
||||
target.node2.build_network()
|
||||
node2 = target.node2
|
||||
if(istype(node1) && node1.parent)
|
||||
var/datum/pipeline/P1 = node1.parent
|
||||
P1.build_pipeline(node1)
|
||||
qdel(P1)
|
||||
if(istype(node2) && node2.parent)
|
||||
var/datum/pipeline/P2 = node2.parent
|
||||
P2.build_pipeline(node2)
|
||||
qdel(P2)
|
||||
// P1.build_network()
|
||||
// P2.build_network()
|
||||
|
||||
open = 0
|
||||
icon_state = "pclamp1"
|
||||
target.in_stasis = 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/clamp/MouseDrop(obj/over_object as obj)
|
||||
if(!usr)
|
||||
return
|
||||
|
||||
if(open && over_object == usr && Adjacent(usr))
|
||||
to_chat(usr, "<span class='notice'>You begin to remove \the [src]...</span>")
|
||||
if (do_after(usr, 30, src))
|
||||
to_chat(usr, "<span class='notice'>You have removed \the [src].</span>")
|
||||
var/obj/item/clamp/C = new/obj/item/clamp(src.loc)
|
||||
C.forceMove(usr.loc)
|
||||
if(ishuman(usr))
|
||||
usr.put_in_hands(C)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You can't remove \the [src] while it's active!</span>")
|
||||
|
||||
/obj/item/clamp
|
||||
name = "stasis clamp"
|
||||
desc = "A magnetic clamp which can halt the flow of gas in a pipe, via a localised stasis field."
|
||||
icon = 'icons/atmos/clamp.dmi'
|
||||
icon_state = "pclamp0"
|
||||
origin_tech = list(TECH_ENGINEERING = 4, TECH_MAGNET = 4)
|
||||
|
||||
/obj/item/clamp/afterattack(var/atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if (istype(A, /obj/machinery/atmospherics/pipe/simple))
|
||||
to_chat(user, "<span class='notice'>You begin to attach \the [src] to \the [A]...</span>")
|
||||
var/C = locate(/obj/machinery/clamp) in get_turf(A)
|
||||
if (do_after(user, 30, src) && !C)
|
||||
if(!user.unEquip(src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You have attached \the [src] to \the [A].</span>")
|
||||
new/obj/machinery/clamp(A.loc, A)
|
||||
qdel(src)
|
||||
if(C)
|
||||
to_chat(user, "<span class='notice'>\The [C] is already attached to the pipe at this location!</span>")
|
||||
@@ -149,6 +149,8 @@
|
||||
var/power_losses
|
||||
var/last_power_draw = 0
|
||||
var/obj/item/weapon/cell/cell
|
||||
var/use_cell = TRUE
|
||||
var/removeable_cell = TRUE
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/powered()
|
||||
if(use_power) //using area power
|
||||
@@ -158,7 +160,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/powered/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/cell))
|
||||
if(use_cell && istype(I, /obj/item/weapon/cell))
|
||||
if(cell)
|
||||
to_chat(user, "There is already a power cell installed.")
|
||||
return
|
||||
@@ -173,7 +175,7 @@
|
||||
power_change()
|
||||
return
|
||||
|
||||
if(I.is_screwdriver())
|
||||
if(I.is_screwdriver() && removeable_cell)
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>There is no power cell installed.</span>")
|
||||
return
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mm
|
||||
name = "SMG magazine (9mm)"
|
||||
path = /obj/item/ammo_magazine/m9mml
|
||||
hidden = 1
|
||||
/* De-coded?
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mmr
|
||||
name = "SMG magazine (9mm rubber)"
|
||||
path = /obj/item/ammo_magazine/m9mml/rubber
|
||||
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mmp
|
||||
name = "SMG magazine (9mm practice)"
|
||||
path = /obj/item/ammo_magazine/m9mml/practice
|
||||
|
||||
/datum/category_item/autolathe/arms/classic_smg_9mmf
|
||||
name = "SMG magazine (9mm flash)"
|
||||
path = /obj/item/ammo_magazine/m9mml/flash
|
||||
*/
|
||||
@@ -113,7 +113,7 @@
|
||||
triggerCameraAlarm()
|
||||
update_icon()
|
||||
update_coverage()
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
|
||||
take_damage(P.get_structure_damage())
|
||||
@@ -283,7 +283,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
add_hiddenprint(user)
|
||||
|
||||
/obj/machinery/camera/proc/take_damage(var/force, var/message)
|
||||
/obj/machinery/camera/take_damage(var/force, var/message)
|
||||
//prob(25) gives an average of 3-4 hits
|
||||
if (force >= toughness && (force > toughness*4 || prob(25)))
|
||||
destroy()
|
||||
|
||||
@@ -7,9 +7,19 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 60000 //60 kW. (this the power drawn when charging)
|
||||
var/efficiency = 60000 //will provide the modified power rate when upgraded
|
||||
power_channel = EQUIP
|
||||
var/obj/item/weapon/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
circuit = /obj/item/weapon/circuitboard/cell_charger
|
||||
|
||||
/obj/machinery/cell_charger/New()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 5)
|
||||
RefreshParts()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/cell_charger/update_icon()
|
||||
icon_state = "ccharger[charging ? 1 : 0]"
|
||||
@@ -32,9 +42,9 @@
|
||||
if(!..(user, 5))
|
||||
return
|
||||
|
||||
user << "There's [charging ? "a" : "no"] cell in the charger."
|
||||
to_chat(user, "[charging ? "[charging]" : "Nothing"] is in [src].")
|
||||
if(charging)
|
||||
user << "Current charge: [charging.charge]"
|
||||
to_chat(user, "Current charge: [charging.charge] / [charging.maxcharge]")
|
||||
|
||||
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
|
||||
if(stat & BROKEN)
|
||||
@@ -42,56 +52,60 @@
|
||||
|
||||
if(istype(W, /obj/item/weapon/cell) && anchored)
|
||||
if(istype(W, /obj/item/weapon/cell/device))
|
||||
user << "<span class='warning'> The charger isn't fitted for that type of cell.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] isn't fitted for that type of cell.</span>")
|
||||
return
|
||||
if(charging)
|
||||
user << "<span class='warning'>There is already a cell in the charger.</span>"
|
||||
to_chat(user, "<span class='warning'>There is already [charging] in [src].</span>")
|
||||
return
|
||||
else
|
||||
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
|
||||
if(!isarea(a))
|
||||
return
|
||||
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
|
||||
user << "<span class='warning'>The [name] blinks red as you try to insert the cell!</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] blinks red as you try to insert [W]!</span>")
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
charging = W
|
||||
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
|
||||
user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].")
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
else if(W.is_wrench())
|
||||
if(charging)
|
||||
user << "<span class='warning'>Remove the cell first!</span>"
|
||||
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
|
||||
return
|
||||
|
||||
anchored = !anchored
|
||||
user << "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground"
|
||||
to_chat(user, "You [anchored ? "attach" : "detach"] [src] [anchored ? "to" : "from"] the ground")
|
||||
playsound(src, W.usesound, 75, 1)
|
||||
else if(default_deconstruction_screwdriver(user, W))
|
||||
return
|
||||
else if(default_deconstruction_crowbar(user, W))
|
||||
return
|
||||
else if(default_part_replacement(user, W))
|
||||
return
|
||||
|
||||
/obj/machinery/cell_charger/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(charging)
|
||||
usr.put_in_hands(charging)
|
||||
charging.add_fingerprint(user)
|
||||
user.put_in_hands(charging)
|
||||
charging.update_icon()
|
||||
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
|
||||
|
||||
charging = null
|
||||
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/cell_charger/attack_ai(mob/user)
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
|
||||
if(!charging)
|
||||
return
|
||||
|
||||
charging.loc = src.loc
|
||||
charging.update_icon()
|
||||
charging = null
|
||||
update_icon()
|
||||
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
|
||||
|
||||
if(charging)
|
||||
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
|
||||
charging.loc = src.loc
|
||||
charging.update_icon()
|
||||
charging = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/cell_charger/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
@@ -108,9 +122,15 @@
|
||||
return
|
||||
|
||||
if(charging && !charging.fully_charged())
|
||||
charging.give(active_power_usage*CELLRATE)
|
||||
charging.give(efficiency*CELLRATE)
|
||||
update_use_power(2)
|
||||
|
||||
update_icon()
|
||||
else
|
||||
update_use_power(1)
|
||||
|
||||
/obj/machinery/cell_charger/RefreshParts()
|
||||
var/E = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
E += C.rating
|
||||
efficiency = active_power_usage * (1+ (E - 1)*0.5)
|
||||
@@ -279,7 +279,7 @@
|
||||
|
||||
if ("terminate")
|
||||
if (is_authenticated())
|
||||
modify.assignment = "Terminated"
|
||||
modify.assignment = "Dismissed" //VOREStation Edit: setting adjustment
|
||||
modify.access = list()
|
||||
|
||||
callHook("terminate_employee", list(modify))
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/obj/machinery/computer/shutoff_monitor
|
||||
name = "automated shutoff valve monitor"
|
||||
desc = "Console used to remotely monitor shutoff valves on the station."
|
||||
icon_keyboard = "power_key"
|
||||
icon_screen = "power:0"
|
||||
light_color = "#a97faa"
|
||||
circuit = /obj/item/weapon/circuitboard/shutoff_monitor
|
||||
|
||||
/obj/machinery/computer/shutoff_monitor/attack_hand(var/mob/user)
|
||||
..()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shutoff_monitor/attack_robot(var/mob/user) // Borgs and AI will want to see this too
|
||||
..()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shutoff_monitor/attack_ai(var/mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shutoff_monitor/ui_interact(mob/user, ui_key = "shutoff_monitor", var/datum/nanoui/ui = null, var/force_open = 1, var/key_state = null)
|
||||
var/data[0]
|
||||
data["valves"] = list()
|
||||
for(var/obj/machinery/atmospherics/valve/shutoff/S in GLOB.shutoff_valves)
|
||||
data["valves"][++data["valves"].len] = list("name" = S.name, "enable" = S.close_on_leaks, "open" = S.open, "x" = S.x, "y" = S.y, "z" = S.z)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "shutoff_monitor.tmpl", "Automated Shutoff Valve Monitor", 625, 700, state = key_state)
|
||||
// when the ui is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every 20 Master Controller tick
|
||||
ui.set_auto_update(20) // Longer term to reduce the rate of data collection and processing
|
||||
|
||||
/obj/machinery/computer/shutoff_monitor/update_icon()
|
||||
..()
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty", overlay_layer)
|
||||
@@ -2,52 +2,6 @@
|
||||
CONTAINS:
|
||||
Deployable items
|
||||
Barricades
|
||||
|
||||
for reference:
|
||||
access_security = 1
|
||||
access_brig = 2
|
||||
access_armory = 3
|
||||
access_forensics_lockers= 4
|
||||
access_medical = 5
|
||||
access_morgue = 6
|
||||
access_tox = 7
|
||||
access_tox_storage = 8
|
||||
access_genetics = 9
|
||||
access_engine = 10
|
||||
access_engine_equip= 11
|
||||
access_maint_tunnels = 12
|
||||
access_external_airlocks = 13
|
||||
access_emergency_storage = 14
|
||||
access_change_ids = 15
|
||||
access_ai_upload = 16
|
||||
access_teleporter = 17
|
||||
access_eva = 18
|
||||
access_heads = 19
|
||||
access_captain = 20
|
||||
access_all_personal_lockers = 21
|
||||
access_chapel_office = 22
|
||||
access_tech_storage = 23
|
||||
access_atmospherics = 24
|
||||
access_bar = 25
|
||||
access_janitor = 26
|
||||
access_crematorium = 27
|
||||
access_kitchen = 28
|
||||
access_robotics = 29
|
||||
access_rd = 30
|
||||
access_cargo = 31
|
||||
access_construction = 32
|
||||
access_chemistry = 33
|
||||
access_cargo_bot = 34
|
||||
access_hydroponics = 35
|
||||
access_manufacturing = 36
|
||||
access_library = 37
|
||||
access_lawyer = 38
|
||||
access_virology = 39
|
||||
access_cmo = 40
|
||||
access_qm = 41
|
||||
access_court = 42
|
||||
access_clown = 43
|
||||
access_mime = 44
|
||||
*/
|
||||
|
||||
//Barricades!
|
||||
@@ -80,6 +34,7 @@ for reference:
|
||||
return material
|
||||
|
||||
/obj/structure/barricade/attackby(obj/item/W as obj, mob/user as mob)
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
if(istype(W, /obj/item/stack))
|
||||
var/obj/item/stack/D = W
|
||||
if(D.get_material_name() != material.name)
|
||||
@@ -96,37 +51,54 @@ for reference:
|
||||
return
|
||||
return
|
||||
else
|
||||
user.setClickCooldown(user.get_attack_speed(W))
|
||||
switch(W.damtype)
|
||||
if("fire")
|
||||
health -= W.force * 1
|
||||
if("brute")
|
||||
health -= W.force * 0.75
|
||||
else
|
||||
if(health <= 0)
|
||||
visible_message("<span class='danger'>The barricade is smashed apart!</span>")
|
||||
dismantle()
|
||||
qdel(src)
|
||||
return
|
||||
if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
|
||||
playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
CheckHealth()
|
||||
..()
|
||||
|
||||
/obj/structure/barricade/proc/CheckHealth()
|
||||
if(health <= 0)
|
||||
dismantle()
|
||||
return
|
||||
|
||||
/obj/structure/barricade/take_damage(var/damage)
|
||||
health -= damage
|
||||
CheckHealth()
|
||||
return
|
||||
|
||||
/obj/structure/barricade/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||
if(material == get_material_by_name("resin"))
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
else if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
|
||||
playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
user.do_attack_animation(src)
|
||||
health -= damage
|
||||
CheckHealth()
|
||||
return
|
||||
|
||||
/obj/structure/barricade/proc/dismantle()
|
||||
material.place_dismantled_product(get_turf(src))
|
||||
visible_message("<span class='danger'>\The [src] falls apart!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/barricade/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
visible_message("<span class='danger'>\The [src] is blown apart!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
dismantle()
|
||||
if(2.0)
|
||||
health -= 25
|
||||
if(health <= 0)
|
||||
visible_message("<span class='danger'>\The [src] is blown apart!</span>")
|
||||
dismantle()
|
||||
return
|
||||
CheckHealth()
|
||||
|
||||
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
@@ -158,6 +130,7 @@ for reference:
|
||||
icon_state = "barrier[locked]"
|
||||
|
||||
/obj/machinery/deployable/barrier/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(istype(W, /obj/item/weapon/card/id/))
|
||||
if(allowed(user))
|
||||
if (emagged < 2.0)
|
||||
@@ -196,11 +169,28 @@ for reference:
|
||||
health -= W.force * 0.75
|
||||
if("brute")
|
||||
health -= W.force * 0.5
|
||||
else
|
||||
if(health <= 0)
|
||||
explode()
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
CheckHealth()
|
||||
..()
|
||||
|
||||
/obj/machinery/deployable/barrier/proc/CheckHealth()
|
||||
if(health <= 0)
|
||||
explode()
|
||||
return
|
||||
|
||||
/obj/machinery/deployable/barrier/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
user.do_attack_animation(src)
|
||||
health -= damage
|
||||
CheckHealth()
|
||||
return
|
||||
|
||||
/obj/machinery/deployable/barrier/take_damage(var/damage)
|
||||
health -= damage
|
||||
CheckHealth()
|
||||
return
|
||||
|
||||
/obj/machinery/deployable/barrier/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -208,8 +198,7 @@ for reference:
|
||||
return
|
||||
if(2.0)
|
||||
health -= 25
|
||||
if(health <= 0)
|
||||
explode()
|
||||
CheckHealth()
|
||||
return
|
||||
|
||||
/obj/machinery/deployable/barrier/emp_act(severity)
|
||||
|
||||
@@ -387,7 +387,7 @@
|
||||
/obj/machinery/door/airlock/uranium/process()
|
||||
if(world.time > last_event+20)
|
||||
if(prob(50))
|
||||
radiation_repository.radiate(src, rad_power)
|
||||
SSradiation.radiate(src, rad_power)
|
||||
last_event = world.time
|
||||
..()
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
icon_state = icon_state_closed
|
||||
else
|
||||
icon_state = icon_state_open
|
||||
radiation_repository.resistance_cache.Remove(get_turf(src))
|
||||
SSradiation.resistance_cache.Remove(get_turf(src))
|
||||
return
|
||||
|
||||
// Has to be in here, comment at the top is older than the emag_act code on doors proper
|
||||
|
||||
@@ -351,6 +351,12 @@
|
||||
name = "Cell 6"
|
||||
id = "Cell 6"
|
||||
|
||||
|
||||
/obj/machinery/door_timer/tactical_pet_storage //Vorestation Addition
|
||||
name = "Tactical Pet Storage"
|
||||
id = "tactical_pet_storage"
|
||||
desc = "Opens and Closes on a timer. This one seals away a tactical boost in morale."
|
||||
|
||||
#undef FONT_SIZE
|
||||
#undef FONT_COLOR
|
||||
#undef FONT_STYLE
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
operating = -1
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/proc/take_damage(var/damage)
|
||||
/obj/machinery/door/take_damage(var/damage)
|
||||
var/initialhealth = src.health
|
||||
src.health = max(0, src.health - damage)
|
||||
if(src.health <= 0 && initialhealth > 0)
|
||||
@@ -382,7 +382,7 @@
|
||||
icon_state = "door1"
|
||||
else
|
||||
icon_state = "door0"
|
||||
radiation_repository.resistance_cache.Remove(get_turf(src))
|
||||
SSradiation.resistance_cache.Remove(get_turf(src))
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -90,12 +90,24 @@
|
||||
circuit = /obj/item/weapon/circuitboard/recharger
|
||||
frame_size = 3
|
||||
|
||||
/datum/frame/frame_types/cell_charger
|
||||
name = "Heavy-Duty Cell Charger"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
circuit = /obj/item/weapon/circuitboard/cell_charger
|
||||
frame_size = 3
|
||||
|
||||
/datum/frame/frame_types/grinder
|
||||
name = "Grinder"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
circuit = /obj/item/weapon/circuitboard/grinder
|
||||
frame_size = 3
|
||||
|
||||
/datum/frame/frame_types/reagent_distillery
|
||||
name = "Distillery"
|
||||
frame_class = FRAME_CLASS_MACHINE
|
||||
circuit = /obj/item/weapon/circuitboard/distiller
|
||||
frame_size = 4
|
||||
|
||||
/datum/frame/frame_types/display
|
||||
name = "Display"
|
||||
frame_class = FRAME_CLASS_DISPLAY
|
||||
|
||||
@@ -214,7 +214,6 @@ Class Procs:
|
||||
/obj/machinery/CanUseTopic(var/mob/user)
|
||||
if(!interact_offline && (stat & (NOPOWER | BROKEN)))
|
||||
return STATUS_CLOSE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/CouldUseTopic(var/mob/user)
|
||||
@@ -458,4 +457,4 @@ Class Procs:
|
||||
return
|
||||
|
||||
/datum/proc/remove_visual(mob/M)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -27,6 +27,7 @@ var/global/list/atmos_pipe_recipes = null
|
||||
new /datum/pipe_recipe/pipe("Gas Pump", /obj/machinery/atmospherics/binary/pump),
|
||||
new /datum/pipe_recipe/pipe("Pressure Regulator", /obj/machinery/atmospherics/binary/passive_gate),
|
||||
new /datum/pipe_recipe/pipe("High Power Gas Pump",/obj/machinery/atmospherics/binary/pump/high_power),
|
||||
//new /datum/pipe_recipe/pipe("Automatic Shutoff Valve",/obj/machinery/atmospherics/valve/shutoff), //VOREStation Removal: Without leaks, those are just regular valves,
|
||||
new /datum/pipe_recipe/pipe("Scrubber", /obj/machinery/atmospherics/unary/vent_scrubber),
|
||||
new /datum/pipe_recipe/meter("Meter"),
|
||||
new /datum/pipe_recipe/pipe("Gas Filter", /obj/machinery/atmospherics/trinary/atmos_filter),
|
||||
|
||||
@@ -36,83 +36,75 @@
|
||||
name = "turret"
|
||||
catalogue_data = list(/datum/category_item/catalogue/technology/turret)
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
icon_state = "turret_cover"
|
||||
anchored = 1
|
||||
icon_state = "turret_cover_normal"
|
||||
anchored = TRUE
|
||||
|
||||
density = 0
|
||||
use_power = 1 //this turret uses and requires power
|
||||
density = FALSE
|
||||
use_power = TRUE //this turret uses and requires power
|
||||
idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power
|
||||
active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power
|
||||
power_channel = EQUIP //drains power from the EQUIPMENT channel
|
||||
req_one_access = list(access_security, access_heads)
|
||||
|
||||
// icon_states for turrets.
|
||||
// These are for the turret covers.
|
||||
var/closed_state = "turret_cover" // For when it is closed.
|
||||
var/raising_state = "popup" // When turret is opening.
|
||||
var/opened_state = "open" // When fully opened.
|
||||
var/lowering_state = "popdown" // When closing.
|
||||
var/gun_active_state = "target_prism" // The actual gun's icon_state when active.
|
||||
var/gun_disabled_state = "grey_target_prism" // Gun sprite when depowered/disabled.
|
||||
var/gun_destroyed_state = "destroyed_target_prism" // Turret sprite for when the turret dies.
|
||||
|
||||
var/raised = 0 //if the turret cover is "open" and the turret is raised
|
||||
var/raising= 0 //if the turret is currently opening or closing its cover
|
||||
var/health = 80 //the turret's health
|
||||
var/maxhealth = 80 //turrets maximal health.
|
||||
var/auto_repair = 0 //if 1 the turret slowly repairs itself.
|
||||
var/locked = 1 //if the turret's behaviour control access is locked
|
||||
var/controllock = 0 //if the turret responds to control panels
|
||||
var/raised = FALSE //if the turret cover is "open" and the turret is raised
|
||||
var/raising= FALSE //if the turret is currently opening or closing its cover
|
||||
var/health = 80 //the turret's health
|
||||
var/maxhealth = 80 //turrets maximal health.
|
||||
var/auto_repair = FALSE //if 1 the turret slowly repairs itself.
|
||||
var/locked = TRUE //if the turret's behaviour control access is locked
|
||||
var/controllock = FALSE //if the turret responds to control panels
|
||||
|
||||
var/installation = /obj/item/weapon/gun/energy/gun //the type of weapon installed
|
||||
var/gun_charge = 0 //the charge of the gun inserted
|
||||
var/projectile = null //holder for bullettype
|
||||
var/eprojectile = null //holder for the shot when emagged
|
||||
var/reqpower = 500 //holder for power needed
|
||||
var/iconholder = null //holder for the icon_state. 1 for sprite based on icon_color, null for blue.
|
||||
var/icon_color = "orange" // When iconholder is set to 1, the icon_state changes based on what is in this variable.
|
||||
var/egun = null //holder to handle certain guns switching bullettypes
|
||||
var/gun_charge = 0 //the charge of the gun inserted
|
||||
var/projectile = null //holder for bullettype
|
||||
var/lethal_projectile = null //holder for the shot when emagged
|
||||
var/reqpower = 500 //holder for power needed
|
||||
var/turret_type = "normal"
|
||||
var/icon_color = "blue"
|
||||
var/lethal_icon_color = "blue"
|
||||
|
||||
var/last_fired = 0 //1: if the turret is cooling down from a shot, 0: turret is ready to fire
|
||||
var/last_fired = FALSE //TRUE: if the turret is cooling down from a shot, FALSE: turret is ready to fire
|
||||
var/shot_delay = 1.5 SECONDS //1.5 seconds between each shot
|
||||
|
||||
var/check_arrest = 1 //checks if the perp is set to arrest
|
||||
var/check_records = 1 //checks if a security record exists at all
|
||||
var/check_weapons = 0 //checks if it can shoot people that have a weapon they aren't authorized to have
|
||||
var/check_access = 1 //if this is active, the turret shoots everything that does not meet the access requirements
|
||||
var/check_anomalies = 1 //checks if it can shoot at unidentified lifeforms (ie xenos)
|
||||
var/check_synth = 0 //if active, will shoot at anything not an AI or cyborg
|
||||
var/check_all = 0 //If active, will fire on anything, including synthetics.
|
||||
var/ailock = 0 // AI cannot use this
|
||||
var/faction = null //if set, will not fire at people in the same faction for any reason.
|
||||
var/check_arrest = TRUE //checks if the perp is set to arrest
|
||||
var/check_records = TRUE //checks if a security record exists at all
|
||||
var/check_weapons = FALSE //checks if it can shoot people that have a weapon they aren't authorized to have
|
||||
var/check_access = TRUE //if this is active, the turret shoots everything that does not meet the access requirements
|
||||
var/check_anomalies = TRUE //checks if it can shoot at unidentified lifeforms (ie xenos)
|
||||
var/check_synth = FALSE //if active, will shoot at anything not an AI or cyborg
|
||||
var/check_all = FALSE //If active, will fire on anything, including synthetics.
|
||||
var/ailock = FALSE // AI cannot use this
|
||||
var/check_down = FALSE //If active, will shoot to kill when lethals are also on
|
||||
var/faction = null //if set, will not fire at people in the same faction for any reason.
|
||||
|
||||
var/attacked = 0 //if set to 1, the turret gets pissed off and shoots at people nearby (unless they have sec access!)
|
||||
var/attacked = FALSE //if set to TRUE, the turret gets pissed off and shoots at people nearby (unless they have sec access!)
|
||||
|
||||
var/enabled = 1 //determines if the turret is on
|
||||
var/lethal = 0 //whether in lethal or stun mode
|
||||
var/disabled = 0
|
||||
var/enabled = TRUE //determines if the turret is on
|
||||
var/lethal = FALSE //whether in lethal or stun mode
|
||||
var/disabled = FALSE
|
||||
|
||||
var/shot_sound //what sound should play when the turret fires
|
||||
var/eshot_sound //what sound should play when the emagged turret fires
|
||||
var/shot_sound //what sound should play when the turret fires
|
||||
var/lethal_shot_sound //what sound should play when the emagged turret fires
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/spark_system //the spark system, used for generating... sparks?
|
||||
|
||||
var/wrenching = 0
|
||||
var/wrenching = FALSE
|
||||
var/last_target //last target fired at, prevents turrets from erratically firing at all valid targets in range
|
||||
var/timeout = 10 // When a turret pops up, then finds nothing to shoot at, this number decrements until 0, when it pops down.
|
||||
var/can_salvage = TRUE // If false, salvaging doesn't give you anything.
|
||||
|
||||
/obj/machinery/porta_turret/crescent
|
||||
req_one_access = list(access_cent_specops)
|
||||
enabled = 0
|
||||
ailock = 1
|
||||
check_synth = 0
|
||||
check_access = 1
|
||||
check_arrest = 1
|
||||
check_records = 1
|
||||
check_weapons = 1
|
||||
check_anomalies = 1
|
||||
check_all = 0
|
||||
enabled = FALSE
|
||||
ailock = TRUE
|
||||
check_synth = FALSE
|
||||
check_access = TRUE
|
||||
check_arrest = TRUE
|
||||
check_records = TRUE
|
||||
check_weapons = TRUE
|
||||
check_anomalies = TRUE
|
||||
check_all = FALSE
|
||||
check_down = TRUE
|
||||
|
||||
/obj/machinery/porta_turret/can_catalogue(mob/user) // Dead turrets can't be scanned.
|
||||
if(stat & BROKEN)
|
||||
@@ -121,8 +113,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/porta_turret/stationary
|
||||
ailock = 1
|
||||
lethal = 1
|
||||
ailock = TRUE
|
||||
lethal = TRUE
|
||||
installation = /obj/item/weapon/gun/energy/laser
|
||||
|
||||
/obj/machinery/porta_turret/stationary/syndie // Generic turrets for POIs that need to not shoot their buddies.
|
||||
@@ -155,7 +147,7 @@
|
||||
name = "interior anti-boarding turret"
|
||||
desc = "A very tough looking turret made by alien hands."
|
||||
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_turret)
|
||||
icon_state = "alien_turret_cover"
|
||||
icon_state = "turret_cover_alien"
|
||||
req_one_access = list(access_alien)
|
||||
installation = /obj/item/weapon/gun/energy/alien
|
||||
enabled = TRUE
|
||||
@@ -164,19 +156,12 @@
|
||||
check_all = TRUE
|
||||
health = 250 // Similar to the AI turrets.
|
||||
maxhealth = 250
|
||||
|
||||
closed_state = "alien_turret_cover"
|
||||
raising_state = "alien_popup"
|
||||
opened_state = "alien_open"
|
||||
lowering_state = "alien_popdown"
|
||||
gun_active_state = "alien_gun"
|
||||
gun_disabled_state = "alien_gun_disabled"
|
||||
gun_destroyed_state = "alien_gun_destroyed"
|
||||
turret_type = "alien"
|
||||
|
||||
/obj/machinery/porta_turret/alien/destroyed // Turrets that are already dead, to act as a warning of what the rest of the submap contains.
|
||||
name = "broken interior anti-boarding turret"
|
||||
desc = "A very tough looking turret made by alien hands. This one looks destroyed, thankfully."
|
||||
icon_state = "alien_gun_destroyed"
|
||||
icon_state = "destroyed_target_prism_alien"
|
||||
stat = BROKEN
|
||||
can_salvage = FALSE // So you need to actually kill a turret to get the alien gun.
|
||||
|
||||
@@ -184,18 +169,11 @@
|
||||
name = "industrial turret"
|
||||
desc = "This variant appears to be much more rugged."
|
||||
req_one_access = list(access_heads)
|
||||
icon_state = "turret_cover_industrial"
|
||||
installation = /obj/item/weapon/gun/energy/phasegun
|
||||
health = 200
|
||||
maxhealth = 200
|
||||
|
||||
icon_state = "turret_cover_industrial"
|
||||
closed_state = "turret_cover_industrial"
|
||||
raising_state = "popup_industrial"
|
||||
opened_state = "open_industrial"
|
||||
lowering_state = "popdown_industrial"
|
||||
gun_active_state = "target_prism_industrial"
|
||||
gun_disabled_state = "grey_target_prism_industrial"
|
||||
gun_destroyed_state = "destroyed_target_prism_industrial"
|
||||
turret_type = "industrial"
|
||||
|
||||
/obj/machinery/porta_turret/industrial/bullet_act(obj/item/projectile/Proj)
|
||||
var/damage = round(Proj.get_structure_damage() * 1.33)
|
||||
@@ -205,10 +183,10 @@
|
||||
|
||||
if(enabled)
|
||||
if(!attacked && !emagged)
|
||||
attacked = 1
|
||||
attacked = TRUE
|
||||
spawn()
|
||||
sleep(60)
|
||||
attacked = 0
|
||||
attacked = FALSE
|
||||
|
||||
take_damage(damage)
|
||||
|
||||
@@ -230,6 +208,98 @@
|
||||
check_all = TRUE
|
||||
can_salvage = FALSE // So you can't just twoshot a turret and get a fancy gun
|
||||
|
||||
/obj/machinery/porta_turret/lasertag
|
||||
name = "lasertag turret"
|
||||
turret_type = "normal"
|
||||
req_one_access = list()
|
||||
installation = /obj/item/weapon/gun/energy/lasertag/omni
|
||||
|
||||
locked = FALSE
|
||||
enabled = FALSE
|
||||
anchored = FALSE
|
||||
//These two are used for lasertag
|
||||
check_synth = FALSE
|
||||
check_weapons = FALSE
|
||||
//These vars aren't used
|
||||
check_access = FALSE
|
||||
check_arrest = FALSE
|
||||
check_records = FALSE
|
||||
check_anomalies = FALSE
|
||||
check_all = FALSE
|
||||
check_down = FALSE
|
||||
|
||||
/obj/machinery/porta_turret/lasertag/red
|
||||
turret_type = "red"
|
||||
installation = /obj/item/weapon/gun/energy/lasertag/red
|
||||
check_weapons = TRUE // Used to target blue players
|
||||
|
||||
/obj/machinery/porta_turret/lasertag/blue
|
||||
turret_type = "blue"
|
||||
installation = /obj/item/weapon/gun/energy/lasertag/blue
|
||||
check_synth = TRUE // Used to target red players
|
||||
|
||||
/obj/machinery/porta_turret/lasertag/assess_living(var/mob/living/L)
|
||||
if(!ishuman(L))
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(L.invisibility >= INVISIBILITY_LEVEL_ONE) // Cannot see him. see_invisible is a mob-var
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(get_dist(src, L) > 7) //if it's too far away, why bother?
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(!(L in check_trajectory(L, src))) //check if we have true line of sight
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(L.lying) //Don't need to stun-lock the players
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/M = L
|
||||
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag) && check_synth) // Checks if they are a red player
|
||||
return TURRET_PRIORITY_TARGET
|
||||
|
||||
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag) && check_weapons) // Checks if they are a blue player
|
||||
return TURRET_PRIORITY_TARGET
|
||||
|
||||
/obj/machinery/porta_turret/lasertag/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
data["access"] = !isLocked(user)
|
||||
data["locked"] = locked
|
||||
data["enabled"] = enabled
|
||||
//data["is_lethal"] = 1 // VOREStation Removal of "Lethal" setting - it does nothing. Rykka did dis.
|
||||
//data["lethal"] = lethal // VOREStation Removal of "Lethal" setting - it does nothing. Rykka did dis.
|
||||
|
||||
if(data["access"])
|
||||
var/settings[0]
|
||||
settings[++settings.len] = list("category" = "Target Red", "setting" = "check_synth", "value" = check_synth) // Could not get the UI to work with new vars specifically for lasertag turrets -Nalarac
|
||||
settings[++settings.len] = list("category" = "Target Blue", "setting" = "check_weapons", "value" = check_weapons) // So I'm using these variables since they don't do anything else in this case
|
||||
data["settings"] = settings
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/porta_turret/lasertag/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["command"] && href_list["value"])
|
||||
var/value = text2num(href_list["value"])
|
||||
if(href_list["command"] == "enable")
|
||||
enabled = value
|
||||
//else if(href_list["command"] == "lethal") // VOREStation Removal of "Lethal" setting - it does nothing. Rykka did dis.
|
||||
//lethal = value // VOREStation Removal of "Lethal" setting - it does nothing. Rykka did dis.
|
||||
else if(href_list["command"] == "check_synth")
|
||||
check_synth = value
|
||||
else if(href_list["command"] == "check_weapons")
|
||||
check_weapons = value
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/porta_turret/Initialize()
|
||||
//Sets up a spark system
|
||||
spark_system = new /datum/effect/effect/system/spark_spread
|
||||
@@ -239,7 +309,7 @@
|
||||
setup()
|
||||
|
||||
// If turrets ever switch overlays, this will need to be cached and reapplied each time overlays_cut() is called.
|
||||
var/image/turret_opened_overlay = image(icon, opened_state)
|
||||
var/image/turret_opened_overlay = image(icon, "open_[turret_type]")
|
||||
turret_opened_overlay.layer = layer-0.1
|
||||
add_overlay(turret_opened_overlay)
|
||||
return ..()
|
||||
@@ -251,99 +321,85 @@
|
||||
|
||||
/obj/machinery/porta_turret/update_icon()
|
||||
if(stat & BROKEN) // Turret is dead.
|
||||
icon_state = gun_destroyed_state
|
||||
icon_state = "destroyed_target_prism_[turret_type]"
|
||||
|
||||
else if(raised || raising)
|
||||
// Turret is open.
|
||||
if(powered() && enabled)
|
||||
// Trying to shoot someone.
|
||||
icon_state = gun_active_state
|
||||
if(lethal)
|
||||
icon_state = "[lethal_icon_color]_target_prism_[turret_type]"
|
||||
else
|
||||
icon_state = "[icon_color]_target_prism_[turret_type]"
|
||||
|
||||
else
|
||||
// Disabled.
|
||||
icon_state = gun_disabled_state
|
||||
icon_state = "grey_target_prism_[turret_type]"
|
||||
|
||||
else
|
||||
// Its closed.
|
||||
icon_state = closed_state
|
||||
icon_state = "turret_cover_[turret_type]"
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/proc/setup()
|
||||
var/obj/item/weapon/gun/energy/E = installation //All energy-based weapons are applicable
|
||||
var/obj/item/projectile/P = initial(E.projectile_type)
|
||||
//var/obj/item/ammo_casing/shottype = E.projectile_type
|
||||
|
||||
projectile = initial(E.projectile_type)
|
||||
eprojectile = projectile
|
||||
shot_sound = initial(E.fire_sound)
|
||||
eshot_sound = shot_sound
|
||||
projectile = P
|
||||
lethal_projectile = projectile
|
||||
shot_sound = initial(P.fire_sound)
|
||||
lethal_shot_sound = shot_sound
|
||||
|
||||
if(istype(P, /obj/item/projectile/energy))
|
||||
icon_color = "orange"
|
||||
|
||||
else if(istype(P, /obj/item/projectile/beam/stun))
|
||||
icon_color = "blue"
|
||||
|
||||
else if(istype(P, /obj/item/projectile/beam/lasertag))
|
||||
icon_color = "blue"
|
||||
|
||||
else if(istype(P, /obj/item/projectile/beam))
|
||||
icon_color = "red"
|
||||
|
||||
else
|
||||
icon_color = "blue"
|
||||
|
||||
lethal_icon_color = icon_color
|
||||
|
||||
weapon_setup(installation)
|
||||
|
||||
/obj/machinery/porta_turret/proc/weapon_setup(var/guntype)
|
||||
switch(guntype)
|
||||
if(/obj/item/weapon/gun/energy/laser/practice)
|
||||
iconholder = 1
|
||||
eprojectile = /obj/item/projectile/beam
|
||||
|
||||
// if(/obj/item/weapon/gun/energy/laser/practice/sc_laser)
|
||||
// iconholder = 1
|
||||
// eprojectile = /obj/item/projectile/beam
|
||||
|
||||
if(/obj/item/weapon/gun/energy/gun/burst)
|
||||
iconholder = 1
|
||||
eprojectile = /obj/item/projectile/beam/burstlaser
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
icon_color = "red"
|
||||
projectile = /obj/item/projectile/beam/stun/weak
|
||||
shot_sound = 'sound/weapons/Taser.ogg'
|
||||
lethal_icon_color = "red"
|
||||
lethal_projectile = /obj/item/projectile/beam/burstlaser
|
||||
lethal_shot_sound = 'sound/weapons/Laser.ogg'
|
||||
shot_delay = 1 SECOND
|
||||
|
||||
if(/obj/item/weapon/gun/energy/phasegun)
|
||||
iconholder = 1
|
||||
eprojectile = /obj/item/projectile/energy/phase/heavy
|
||||
eshot_sound = 'sound/weapons/gunshot_pathetic.ogg'
|
||||
icon_color = "orange"
|
||||
projectile = /obj/item/projectile/energy/phase
|
||||
shot_sound = 'sound/weapons/gunshot_pathetic.ogg'
|
||||
lethal_icon_color = "orange"
|
||||
lethal_projectile = /obj/item/projectile/energy/phase/heavy
|
||||
shot_delay = 1 SECOND
|
||||
|
||||
if(/obj/item/weapon/gun/energy/retro)
|
||||
iconholder = 1
|
||||
|
||||
// if(/obj/item/weapon/gun/energy/retro/sc_retro)
|
||||
// iconholder = 1
|
||||
|
||||
if(/obj/item/weapon/gun/energy/captain)
|
||||
iconholder = 1
|
||||
|
||||
if(/obj/item/weapon/gun/energy/lasercannon)
|
||||
iconholder = 1
|
||||
|
||||
if(/obj/item/weapon/gun/energy/taser)
|
||||
eprojectile = /obj/item/projectile/beam
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
if(/obj/item/weapon/gun/energy/stunrevolver)
|
||||
eprojectile = /obj/item/projectile/beam
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
if(/obj/item/weapon/gun/energy/gun)
|
||||
eprojectile = /obj/item/projectile/beam //If it has, going to kill mode
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
egun = 1
|
||||
lethal_icon_color = "red"
|
||||
lethal_projectile = /obj/item/projectile/beam //If it has, going to kill mode
|
||||
lethal_shot_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
if(/obj/item/weapon/gun/energy/gun/nuclear)
|
||||
eprojectile = /obj/item/projectile/beam //If it has, going to kill mode
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
egun = 1
|
||||
lethal_icon_color = "red"
|
||||
lethal_projectile = /obj/item/projectile/beam //If it has, going to kill mode
|
||||
lethal_shot_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
if(/obj/item/weapon/gun/energy/xray)
|
||||
eprojectile = /obj/item/projectile/beam/xray
|
||||
lethal_icon_color = "green"
|
||||
lethal_projectile = /obj/item/projectile/beam/xray
|
||||
projectile = /obj/item/projectile/beam/stun // Otherwise we fire xrays on both modes.
|
||||
eshot_sound = 'sound/weapons/eluger.ogg'
|
||||
lethal_shot_sound = 'sound/weapons/eluger.ogg'
|
||||
shot_sound = 'sound/weapons/Taser.ogg'
|
||||
iconholder = 1
|
||||
icon_color = "green"
|
||||
|
||||
/obj/machinery/porta_turret/proc/isLocked(mob/user)
|
||||
if(ailock && issilicon(user))
|
||||
@@ -351,7 +407,7 @@
|
||||
return 1
|
||||
|
||||
if(locked && !issilicon(user))
|
||||
to_chat(user, "<span class='notice'>Access denied.</span>")
|
||||
to_chat(user, "<span class='notice'>Controls locked.</span>")
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -385,6 +441,7 @@
|
||||
settings[++settings.len] = list("category" = "Check Access Authorization", "setting" = "check_access", "value" = check_access)
|
||||
settings[++settings.len] = list("category" = "Check misc. Lifeforms", "setting" = "check_anomalies", "value" = check_anomalies)
|
||||
settings[++settings.len] = list("category" = "Neutralize All Entities", "setting" = "check_all", "value" = check_all)
|
||||
settings[++settings.len] = list("category" = "Neutralize Downed Entities", "setting" = "check_down", "value" = check_down)
|
||||
data["settings"] = settings
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
@@ -436,6 +493,8 @@
|
||||
check_anomalies = value
|
||||
else if(href_list["command"] == "check_all")
|
||||
check_all = value
|
||||
else if(href_list["command"] == "check_down")
|
||||
check_down = value
|
||||
|
||||
return 1
|
||||
|
||||
@@ -486,20 +545,20 @@
|
||||
"<span class='notice'>You begin [anchored ? "un" : ""]securing the turret.</span>" \
|
||||
)
|
||||
|
||||
wrenching = 1
|
||||
wrenching = TRUE
|
||||
if(do_after(user, 50 * I.toolspeed))
|
||||
//This code handles moving the turret around. After all, it's a portable turret!
|
||||
if(!anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
anchored = 1
|
||||
anchored = TRUE
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
|
||||
else if(anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
anchored = 0
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
|
||||
update_icon()
|
||||
wrenching = 0
|
||||
wrenching = FALSE
|
||||
|
||||
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
|
||||
//Behavior lock/unlock mangement
|
||||
@@ -540,15 +599,14 @@
|
||||
//the turret shoot much, much faster.
|
||||
to_chat(user, "<span class='warning'>You short out [src]'s threat assessment circuits.</span>")
|
||||
visible_message("[src] hums oddly...")
|
||||
emagged = 1
|
||||
iconholder = 1
|
||||
controllock = 1
|
||||
enabled = 0 //turns off the turret temporarily
|
||||
emagged = TRUE
|
||||
controllock = TRUE
|
||||
enabled = FALSE //turns off the turret temporarily
|
||||
sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
|
||||
enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
|
||||
enabled = TRUE //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
|
||||
return 1
|
||||
|
||||
/obj/machinery/porta_turret/proc/take_damage(var/force)
|
||||
/obj/machinery/porta_turret/take_damage(var/force)
|
||||
if(!raised && !raising)
|
||||
force = force / 8
|
||||
if(force < 5)
|
||||
@@ -571,7 +629,7 @@
|
||||
attacked = 1
|
||||
spawn()
|
||||
sleep(60)
|
||||
attacked = 0
|
||||
attacked = FALSE
|
||||
|
||||
..()
|
||||
|
||||
@@ -587,12 +645,12 @@
|
||||
check_access = prob(20) // check_access is a pretty big deal, so it's least likely to get turned on
|
||||
check_anomalies = prob(50)
|
||||
if(prob(5))
|
||||
emagged = 1
|
||||
emagged = TRUE
|
||||
|
||||
enabled=0
|
||||
spawn(rand(60,600))
|
||||
if(!enabled)
|
||||
enabled=1
|
||||
enabled = TRUE
|
||||
|
||||
..()
|
||||
|
||||
@@ -677,10 +735,10 @@
|
||||
if(faction && L.faction == faction)
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(!emagged && issilicon(L) && check_all == 0) // Don't target silica, unless told to neutralize everything.
|
||||
if(!emagged && issilicon(L) && check_all == FALSE) // Don't target silica, unless told to neutralize everything.
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(L.stat && !emagged) //if the perp is dead/dying, no need to bother really
|
||||
if(L.stat == DEAD && !emagged) //if the perp is dead, no need to bother really
|
||||
return TURRET_NOT_TARGET //move onto next potential victim!
|
||||
|
||||
if(get_dist(src, L) > 7) //if it's too far away, why bother?
|
||||
@@ -697,13 +755,13 @@
|
||||
|
||||
if(check_synth || check_all) //If it's set to attack all non-silicons or everything, target them!
|
||||
if(L.lying)
|
||||
return lethal ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
return check_down ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
return TURRET_PRIORITY_TARGET
|
||||
|
||||
if(iscuffed(L)) // If the target is handcuffed, leave it alone
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(isanimal(L) || issmall(L)) // Animals are not so dangerous
|
||||
if(isanimal(L)) // Animals are not so dangerous
|
||||
return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
|
||||
if(isxenomorph(L) || isalien(L)) // Xenos are dangerous
|
||||
@@ -714,7 +772,7 @@
|
||||
return TURRET_NOT_TARGET //if threat level < 4, keep going
|
||||
|
||||
if(L.lying) //if the perp is lying down, it's still a target but a less-important target
|
||||
return lethal ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
return check_down ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
|
||||
return TURRET_PRIORITY_TARGET //if the perp has passed all previous tests, congrats, it is now a "shoot-me!" nominee
|
||||
|
||||
@@ -750,7 +808,7 @@
|
||||
|
||||
var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc)
|
||||
flick_holder.layer = layer + 0.1
|
||||
flick(raising_state, flick_holder)
|
||||
flick("popup_[turret_type]", flick_holder)
|
||||
sleep(10)
|
||||
qdel(flick_holder)
|
||||
|
||||
@@ -771,7 +829,7 @@
|
||||
|
||||
var/atom/flick_holder = new /atom/movable/porta_turret_cover(loc)
|
||||
flick_holder.layer = layer + 0.1
|
||||
flick(lowering_state, flick_holder)
|
||||
flick("popdown_[turret_type]", flick_holder)
|
||||
sleep(10)
|
||||
qdel(flick_holder)
|
||||
|
||||
@@ -802,10 +860,10 @@
|
||||
if(!(emagged || attacked)) //if it hasn't been emagged or attacked, it has to obey a cooldown rate
|
||||
if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged
|
||||
return
|
||||
last_fired = 1
|
||||
last_fired = TRUE
|
||||
spawn()
|
||||
sleep(shot_delay)
|
||||
last_fired = 0
|
||||
last_fired = FALSE
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/turf/U = get_turf(target)
|
||||
@@ -818,8 +876,8 @@
|
||||
update_icon()
|
||||
var/obj/item/projectile/A
|
||||
if(emagged || lethal)
|
||||
A = new eprojectile(loc)
|
||||
playsound(loc, eshot_sound, 75, 1)
|
||||
A = new lethal_projectile(loc)
|
||||
playsound(loc, lethal_shot_sound, 75, 1)
|
||||
else
|
||||
A = new projectile(loc)
|
||||
playsound(loc, shot_sound, 75, 1)
|
||||
@@ -840,8 +898,7 @@
|
||||
//Shooting Code:
|
||||
A.firer = src
|
||||
A.old_style_target(target)
|
||||
A.def_zone = def_zone
|
||||
A.fire()
|
||||
A.launch_projectile_from_turf(target, def_zone, src)
|
||||
|
||||
// Reset the time needed to go back down, since we just tried to shoot at someone.
|
||||
timeout = 10
|
||||
@@ -863,7 +920,6 @@
|
||||
return
|
||||
enabled = TC.enabled
|
||||
lethal = TC.lethal
|
||||
iconholder = TC.lethal
|
||||
|
||||
check_synth = TC.check_synth
|
||||
check_access = TC.check_access
|
||||
@@ -899,7 +955,7 @@
|
||||
if(I.is_wrench() && !anchored)
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You secure the external bolts.</span>")
|
||||
anchored = 1
|
||||
anchored = TRUE
|
||||
build_step = 1
|
||||
return
|
||||
|
||||
@@ -924,7 +980,7 @@
|
||||
else if(I.is_wrench())
|
||||
playsound(loc, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the external bolts.</span>")
|
||||
anchored = 0
|
||||
anchored = FALSE
|
||||
build_step = 0
|
||||
return
|
||||
|
||||
@@ -1082,4 +1138,4 @@
|
||||
|
||||
#undef TURRET_PRIORITY_TARGET
|
||||
#undef TURRET_SECONDARY_TARGET
|
||||
#undef TURRET_NOT_TARGET
|
||||
#undef TURRET_NOT_TARGET
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
obj/machinery/recharger
|
||||
/obj/machinery/recharger
|
||||
name = "recharger"
|
||||
desc = "A standard recharger for all devices that use power."
|
||||
icon = 'icons/obj/stationobjs_vr.dmi' //VOREStation Edit
|
||||
icon_state = "recharger0"
|
||||
anchored = 1
|
||||
@@ -9,7 +10,7 @@ obj/machinery/recharger
|
||||
active_power_usage = 40000 //40 kW
|
||||
var/efficiency = 40000 //will provide the modified power rate when upgraded
|
||||
var/obj/item/charging = null
|
||||
var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/modular_computer, /obj/item/weapon/computer_hardware/battery_module, /obj/item/weapon/cell, /obj/item/device/flashlight, /obj/item/device/electronic_assembly, /obj/item/weapon/weldingtool/electric, /obj/item/ammo_magazine/smart, /obj/item/device/flash, /obj/item/ammo_casing/nsfw_batt) //VOREStation Add - NSFW Batteries
|
||||
var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/modular_computer, /obj/item/weapon/computer_hardware/battery_module, /obj/item/weapon/cell, /obj/item/device/flashlight, /obj/item/device/electronic_assembly, /obj/item/weapon/weldingtool/electric, /obj/item/ammo_magazine/smart, /obj/item/device/flash, /obj/item/ammo_casing/microbattery) //VOREStation Add - NSFW Batteries
|
||||
var/icon_state_charged = "recharger2"
|
||||
var/icon_state_charging = "recharger1"
|
||||
var/icon_state_idle = "recharger0" //also when unpowered
|
||||
@@ -24,10 +25,16 @@ obj/machinery/recharger
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||
if(istype(user,/mob/living/silicon))
|
||||
/obj/machinery/recharger/examine(mob/user)
|
||||
if(!..(user, 5))
|
||||
return
|
||||
|
||||
to_chat(user, "[charging ? "[charging]" : "Nothing"] is in [src].")
|
||||
if(charging)
|
||||
var/obj/item/weapon/cell/C = charging.get_cell()
|
||||
to_chat(user, "Current charge: [C.charge] / [C.maxcharge]")
|
||||
|
||||
/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||
var/allowed = 0
|
||||
for (var/allowed_type in allowed_devices)
|
||||
if(istype(G, allowed_type)) allowed = 1
|
||||
@@ -38,32 +45,49 @@ obj/machinery/recharger
|
||||
return
|
||||
// Checks to make sure he's not in space doing it, and that the area got proper power.
|
||||
if(!powered())
|
||||
to_chat(user, "<span class='warning'>The [name] blinks red as you try to insert the item!</span>")
|
||||
to_chat(user, "<span class='warning'>\The [src] blinks red as you try to insert [G]!</span>")
|
||||
return
|
||||
if(istype(G, /obj/item/weapon/gun/energy))
|
||||
var/obj/item/weapon/gun/energy/E = G
|
||||
if(E.self_recharge)
|
||||
to_chat(user, "<span class='notice'>Your gun has no recharge port.</span>")
|
||||
to_chat(user, "<span class='notice'>\The [E] has no recharge port.</span>")
|
||||
return
|
||||
if(istype(G, /obj/item/modular_computer))
|
||||
var/obj/item/modular_computer/C = G
|
||||
if(!C.battery_module)
|
||||
to_chat(user, "This device does not have a battery installed.")
|
||||
to_chat(user, "<span class='notice'>\The [C] does not have a battery installed. </span>")
|
||||
return
|
||||
else if(!G.get_cell() && !istype(G, /obj/item/ammo_casing/nsfw_batt)) //VOREStation Edit: NSFW charging
|
||||
to_chat(user, "This device does not have a battery installed.")
|
||||
if(istype(G, /obj/item/weapon/melee/baton))
|
||||
var/obj/item/weapon/melee/baton/B = G
|
||||
if(B.use_external_power)
|
||||
to_chat(user, "<span class='notice'>\The [B] has no recharge port.</span>")
|
||||
return
|
||||
if(istype(G, /obj/item/device/flash))
|
||||
var/obj/item/device/flash/F = G
|
||||
if(F.use_external_power)
|
||||
to_chat(user, "<span class='notice'>\The [F] has no recharge port.</span>")
|
||||
return
|
||||
if(istype(G, /obj/item/weapon/weldingtool/electric))
|
||||
var/obj/item/weapon/weldingtool/electric/EW = G
|
||||
if(EW.use_external_power)
|
||||
to_chat(user, "<span class='notice'>\The [EW] has no recharge port.</span>")
|
||||
return
|
||||
else if(!G.get_cell() && !istype(G, /obj/item/ammo_casing/microbattery)) //VOREStation Edit: NSFW charging
|
||||
to_chat(user, "\The [G] does not have a battery installed.")
|
||||
return
|
||||
|
||||
user.drop_item()
|
||||
G.loc = src
|
||||
charging = G
|
||||
update_icon()
|
||||
user.visible_message("[user] inserts [charging] into [src].", "You insert [charging] into [src].")
|
||||
|
||||
else if(portable && G.is_wrench())
|
||||
if(charging)
|
||||
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
|
||||
return
|
||||
anchored = !anchored
|
||||
to_chat(user, "You [anchored ? "attached" : "detached"] the recharger.")
|
||||
to_chat(user, "You [anchored ? "attached" : "detached"] [src].")
|
||||
playsound(loc, G.usesound, 75, 1)
|
||||
else if(default_deconstruction_screwdriver(user, G))
|
||||
return
|
||||
@@ -73,17 +97,24 @@ obj/machinery/recharger
|
||||
return
|
||||
|
||||
/obj/machinery/recharger/attack_hand(mob/user as mob)
|
||||
if(istype(user,/mob/living/silicon))
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(charging)
|
||||
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
|
||||
charging.update_icon()
|
||||
user.put_in_hands(charging)
|
||||
charging = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/cell_charger/attack_ai(mob/user)
|
||||
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
|
||||
if(charging)
|
||||
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
|
||||
charging.update_icon()
|
||||
charging.loc = src.loc
|
||||
charging = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/process()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
update_use_power(0)
|
||||
@@ -126,8 +157,8 @@ obj/machinery/recharger
|
||||
update_use_power(1)
|
||||
|
||||
//VOREStation Add - NSFW Batteries
|
||||
else if(istype(charging, /obj/item/ammo_casing/nsfw_batt))
|
||||
var/obj/item/ammo_casing/nsfw_batt/batt = charging
|
||||
else if(istype(charging, /obj/item/ammo_casing/microbattery))
|
||||
var/obj/item/ammo_casing/microbattery/batt = charging
|
||||
if(batt.shots_left >= initial(batt.shots_left))
|
||||
icon_state = icon_state_charged
|
||||
update_use_power(1)
|
||||
@@ -164,6 +195,7 @@ obj/machinery/recharger
|
||||
|
||||
/obj/machinery/recharger/wallcharger
|
||||
name = "wall recharger"
|
||||
desc = "A more powerful recharger designed for energy weapons."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "wrecharger0"
|
||||
plane = TURF_PLANE
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
model_text = "Exploration"
|
||||
departments = list("Exploration","Old Exploration")
|
||||
|
||||
/obj/machinery/suit_cycler/exploreration/Initialize()
|
||||
/obj/machinery/suit_cycler/exploration/Initialize()
|
||||
species -= SPECIES_TESHARI
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -22,7 +22,17 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
machinetype = 5
|
||||
produces_heat = 0
|
||||
delay = 7
|
||||
circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
|
||||
circuit = /obj/item/weapon/circuitboard/telecomms/broadcaster
|
||||
|
||||
/obj/machinery/telecomms/processor/Initialize()
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/subspace/sub_filter(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/subspace/crystal(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser/high(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
// Don't broadcast rejected signals
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
/obj/machinery/telecomms
|
||||
var/temp = "" // output message
|
||||
var/construct_op = 0
|
||||
|
||||
|
||||
/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob)
|
||||
@@ -21,7 +20,6 @@
|
||||
if(istype(P, /obj/item/device/multitool))
|
||||
attack_hand(user)
|
||||
|
||||
|
||||
// REPAIRING: Use Nanopaste to repair 10-20 integrity points.
|
||||
if(istype(P, /obj/item/stack/nanopaste))
|
||||
var/obj/item/stack/nanopaste/T = P
|
||||
@@ -34,75 +32,10 @@
|
||||
return
|
||||
|
||||
|
||||
switch(construct_op)
|
||||
if(0)
|
||||
if(P.is_screwdriver())
|
||||
to_chat(user, "You unfasten the bolts.")
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
construct_op ++
|
||||
if(1)
|
||||
if(P.is_screwdriver())
|
||||
to_chat(user, "You fasten the bolts.")
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
construct_op --
|
||||
if(P.is_wrench())
|
||||
to_chat(user, "You dislodge the external plating.")
|
||||
playsound(src.loc, P.usesound, 75, 1)
|
||||
construct_op ++
|
||||
if(2)
|
||||
if(P.is_wrench())
|
||||
to_chat(user, "You secure the external plating.")
|
||||
playsound(src.loc, P.usesound, 75, 1)
|
||||
construct_op --
|
||||
if(P.is_wirecutter())
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
to_chat(user, "You remove the cables.")
|
||||
construct_op ++
|
||||
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc )
|
||||
A.amount = 5
|
||||
stat |= BROKEN // the machine's been borked!
|
||||
if(3)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = P
|
||||
if (A.use(5))
|
||||
to_chat(user, "<span class='notice'>You insert the cables.</span>")
|
||||
construct_op--
|
||||
stat &= ~BROKEN // the machine's not borked anymore!
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need five coils of wire for this.</span>")
|
||||
if(P.is_crowbar())
|
||||
to_chat(user, "You begin prying out the circuit board other components...")
|
||||
playsound(src.loc, P.usesound, 50, 1)
|
||||
if(do_after(user,60 * P.toolspeed))
|
||||
to_chat(user, "You finish prying out the components.")
|
||||
|
||||
// Drop all the component stuff
|
||||
if(contents.len > 0)
|
||||
for(var/obj/x in src)
|
||||
x.loc = user.loc
|
||||
else
|
||||
|
||||
// If the machine wasn't made during runtime, probably doesn't have components:
|
||||
// manually find the components and drop them!
|
||||
var/newpath = text2path(circuitboard)
|
||||
var/obj/item/weapon/circuitboard/C = new newpath
|
||||
for(var/I in C.req_components)
|
||||
for(var/i = 1, i <= C.req_components[I], i++)
|
||||
newpath = text2path(I)
|
||||
var/obj/item/s = new newpath
|
||||
s.loc = user.loc
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/A = P
|
||||
A.amount = 1
|
||||
|
||||
// Drop a circuit board too
|
||||
C.loc = user.loc
|
||||
|
||||
// Create a frame and delete the current machine
|
||||
var/obj/structure/frame/F = new
|
||||
F.loc = src.loc
|
||||
qdel(src)
|
||||
|
||||
if(default_deconstruction_screwdriver(user, P))
|
||||
return
|
||||
if(default_deconstruction_crowbar(user, P))
|
||||
return
|
||||
|
||||
/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
|
||||
attack_hand(user)
|
||||
|
||||
@@ -3,3 +3,6 @@
|
||||
hide = 1
|
||||
produces_heat = 0
|
||||
autolinkers = list("hb_relay")
|
||||
|
||||
/obj/machinery/telecomms/relay/proc/reset_z()
|
||||
listening_level = z
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user