Merge pull request #4 from Baystation12/master

Update master
This commit is contained in:
Nerezza
2012-07-30 08:06:19 -07:00
100 changed files with 12837 additions and 12277 deletions
+1
View File
@@ -228,6 +228,7 @@
#define DEBUG
// END_PREFERENCES
// BEGIN_INCLUDE
#include "code\modules\mob\simple_animal\munchkin.dm"
#include "code\access_defines.dm"
#include "code\names.dm"
#include "code\setup.dm"
@@ -116,7 +116,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
volume_covered = PI * major_radius * minor_radius * 2.5 * 2.5 * 1000
process()
..()
//make sure the field generator is still intact
if(!owned_core)
del(src)
@@ -131,29 +130,21 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
radiation = 0
//update values
var/transfer_ratio = field_strength / 50
major_radius = field_strength * 0.21875// max = 8.75
minor_radius = field_strength * 0.2125// max = 8.625
volume_covered = PI * major_radius * minor_radius * 2.5 * 2.5 * 2.5 * 7 * 7 * transfer_ratio
var/transfer_ratio = field_strength / 50 //higher field strength will result in faster plasma aggregation
major_radius = field_strength * 0.21875// max = 8.75m
minor_radius = field_strength * 0.2125// max = 8.625m
volume_covered = PI * major_radius * minor_radius * 2.5 * 2.5 * 2.5 * 7 * 7 * transfer_ratio //one tile = 2.5m*2.5m*2.5m
//add plasma from the surrounding environment
var/datum/gas_mixture/environment = loc.return_air()
/*
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
*/
//we're going to hack in some stuff to remove plasma from the air because QUANTUM PHYSICS
//hack in some stuff to remove plasma from the air because SCIENCE
//the amount of plasma pulled in each update is relative to the field strength, with 50T (max field strength) = 100% of area covered by the field
//at minimum strength, 0.25% of the field volume is pulled in per update (?)
//have a max of 1000 moles suspended
if(held_plasma.toxins < transfer_ratio * 1000)
var/moles_covered = environment.return_pressure()*volume_covered/(environment.temperature * R_IDEAL_GAS_EQUATION)
//world << "\blue moles_covered: [moles_covered]"
//
var/datum/gas_mixture/gas_covered = environment.remove(moles_covered)
var/datum/gas_mixture/plasma_captured = new /datum/gas_mixture()
@@ -161,9 +152,10 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
plasma_captured.toxins = round(gas_covered.toxins * transfer_ratio)
//world << "\blue[plasma_captured.toxins] moles of plasma captured"
plasma_captured.temperature = gas_covered.temperature
//plasma_captured.update_values()
plasma_captured.update_values()
//
gas_covered.toxins -= plasma_captured.toxins
//gas_covered.update_values()
gas_covered.update_values()
//
held_plasma.merge(plasma_captured)
//
@@ -6,8 +6,10 @@
name = "Core Primary Monitor"
icon_state = "power"
var/obj/machinery/rust/core/core_generator = null
var/updating = 1
New()
..()
spawn(0)
core_generator = locate() in world
@@ -23,16 +25,22 @@
Topic(href, href_list)
..()
if( href_list["shutdown"] )
updating = 0
core_generator.Topic(href, href_list)
updateDialog()
updating = 1
return
if( href_list["startup"] )
updating = 0
core_generator.Topic(href, href_list)
updateDialog()
updating = 1
return
if( href_list["modify_field_strength"] )
updating = 0
core_generator.Topic(href, href_list)
updateDialog()
updating = 1
return
if( href_list["close"] )
usr << browse(null, "window=core_monitor")
@@ -41,7 +49,8 @@
process()
..()
updateDialog()
if(updating)
src.updateDialog()
proc
interact(mob/user)
@@ -60,7 +69,7 @@
t += " <font color=blue>Energy levels (MeV): [core_generator.owned_field.mega_energy]</font><br>"
t += " <font color=blue>Core frequency: [core_generator.owned_field.frequency]</font><br>"
t += " <font color=blue>Moles of plasma: [core_generator.owned_field.held_plasma.toxins]</font><br>"
t += " <font color=blue>Plasma temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
t += " <font color=blue>Core temperature: [core_generator.owned_field.held_plasma.temperature]</font><br>"
t += "<hr>"
t += "<b>Core atomic and subatomic constituents:</font></b><br>"
if(core_generator.owned_field.dormant_reactant_quantities && core_generator.owned_field.dormant_reactant_quantities.len)
@@ -74,5 +83,5 @@
t += "<b><font color=red>Core Generator unresponsive</font></b><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=core_monitor;size=500x800")
user << browse(t, "window=core_monitor;size=500x400")
user.machine = src
@@ -4,7 +4,7 @@
icon_state = "fuel_assembly"
name = "Fuel Rod Assembly"
var/list/rod_quantities
var/amount_depleted = 0 //percent depleted
var/percent_depleted = 0
//
New()
rod_quantities = new/list
@@ -3,22 +3,34 @@
name = "Fuel Injection Control"
icon_state = "power"
var/list/fuel_injectors
var/active_stage = "Cooling"
var/list/stage_status
var/announce_fueldepletion = 0
var/announce_stageprogression = 0
//var/obj/machinery/rust/fuel_injector/Injector = null
New()
..()
//these are the only three stages we can accept
//we have another console for SCRAM
fuel_injectors = new/list
stage_status = new/list
fuel_injectors.Add("One")
fuel_injectors["One"] = new/list
stage_status.Add("One")
stage_status["One"] = 0
fuel_injectors.Add("Two")
fuel_injectors["Two"] = new/list
stage_status.Add("Two")
stage_status["Two"] = 0
fuel_injectors.Add("Three")
fuel_injectors["Three"] = new/list
stage_status.Add("Three")
stage_status["Three"] = 0
fuel_injectors.Add("SCRAM")
fuel_injectors["SCRAM"] = new/list
stage_status.Add("SCRAM")
stage_status["SCRAM"] = 0
spawn(0)
for(var/obj/machinery/rust/fuel_injector/Injector in world)
if(Injector.stage in fuel_injectors)
@@ -46,20 +58,33 @@
usr.machine = null
return
if( href_list["beginstage"] )
active_stage = href_list["beginstage"]
if(active_stage in fuel_injectors)
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[active_stage])
Injector.BeginInjecting()
var/stage_name = href_list["beginstage"]
if(stage_name in fuel_injectors)
var/success = 1
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
if(!Injector.BeginInjecting())
success = 0
if(!success) //may still partially complete
usr << "\red Unable to complete command."
stage_status[stage_name] = 1
updateDialog()
return
if( href_list["begincool"] )
var/stage_name = href_list["begincool"]
if(stage_name in fuel_injectors)
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
Injector.StopInjecting()
stage_status[stage_name] = 0
updateDialog()
return
if( href_list["restart"] )
updateDialog()
return
if( href_list["cooldown"] )
if(active_stage in fuel_injectors)
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[active_stage])
for(var/stage_name in fuel_injectors)
for(var/obj/machinery/rust/fuel_injector/Injector in fuel_injectors[stage_name])
Injector.StopInjecting()
active_stage = "Cooling"
stage_status[stage_name] = 0
updateDialog()
return
if( href_list["update"] )
@@ -94,7 +119,7 @@
process()
..()
updateDialog()
src.updateDialog()
proc
interact(mob/user)
@@ -104,12 +129,17 @@
user << browse(null, "window=fuel_monitor")
return
var/t = "<B>Reactor Core Fuel Control</B><BR>"
t += "Current fuel injection stage: [active_stage]<br>"
if(active_stage == "Cooling")
//t += "<a href='?src=\ref[src];restart=1;'>Restart injection cycle</a><br>"
var/cooling = 0
for(var/stage in stage_status)
if(stage_status[stage])
t += "Fuel injection: <font color=blue>Active</font><br>"
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
cooling = 1
break
if(!cooling)
t += "Fuel injection: <font color=blue>Cooling</font><br>"
t += "----<br>"
else
t += "<a href='?src=\ref[src];cooldown=1;'>Enter cooldown phase</a><br>"
//
t += "Fuel depletion announcement: "
t += "[announce_fueldepletion ? "<a href='?src=\ref[src];disable_fueldepletion=1'>Disable</a>" : "<b>Disabled</b>"] "
t += "[announce_fueldepletion == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_fueldepletion=1'>Announce</a>"] "
@@ -126,18 +156,18 @@
t += "<td><b>Fuel Assembly Port</b></td>"
t += "<td><b>Assembly depletion percentage</b></td>"
t += "</tr>"
for(var/stage in fuel_injectors)
var/list/cur_stage = fuel_injectors[stage]
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> <font color=blue>[stage]</font> [active_stage == stage ? "<font color=green> (Currently active)</font>" : "<a href='?src=\ref[src];beginstage=[stage]'>Activate</a>"]</td></tr>"
for(var/stage_name in fuel_injectors)
var/list/cur_stage = fuel_injectors[stage_name]
t += "<tr><td colspan=5><b>Fuel Injection Stage:</b> [stage_name]</font>, [stage_status[stage_name] ? "<font color=green>Active</font> <a href='?src=\ref[src];begincool=[stage_name]'>\[Enter cooldown\]</a>" : "Cooling <a href='?src=\ref[src];beginstage=[stage_name]'>\[Begin injection\]</a>"]</td></tr>"
for(var/obj/machinery/rust/fuel_injector/Injector in cur_stage)
t += "<tr>"
t += "<td>[Injector.on && Injector.remote_enabled ? "<font color=green>Operational</font>" : "<font color=red>Unresponsive</font>"]</td>"
t += "<td>[Injector.rate/10] <a href='?src=\ref[Injector];cyclerate=1'>Modify</a></td>"
t += "<td>[Injector.fuel_usage*100]% <a href='?src=\ref[Injector];fuel_usage=1'>Modify</a></td>"
t += "<td>[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "<font color=green>Loaded</font>": "<font color=blue>Empty</font>"]" : "<font color=red>Disconnected</font>" ]</td>"
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[100 - Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</td>"
t += "<td>[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.percent_depleted]%" : ""]</td>"
t += "</tr>"
t += "</table>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuel_monitor;size=500x800")
user << browse(t, "window=fuel_monitor;size=500x600")
user.machine = src
@@ -196,7 +196,7 @@
//
owned_assembly_port.cur_assembly.rod_quantities[reagent] -= amount
amount_left += owned_assembly_port.cur_assembly.rod_quantities[reagent]
owned_assembly_port.cur_assembly.amount_depleted = amount_left / 300
owned_assembly_port.cur_assembly.percent_depleted = amount_left / 300
flick("injector-emitting",src)
use_power(fuel_usage * 10000 + 100) //0.0001
if(injecting)
@@ -88,9 +88,33 @@
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
comp.updateDialog()
return
/*
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
playsound(src.loc, 'emitter.ogg', 25, 1)
if(prob(35))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
A.dir = src.dir
if(src.dir == 1)//Up
A.yo = 20
A.xo = 0
else if(src.dir == 2)//Down
A.yo = -20
A.xo = 0
else if(src.dir == 4)//Right
A.yo = 0
A.xo = 20
else if(src.dir == 8)//Left
A.yo = 0
A.xo = -20
else // Any other
A.yo = -20
A.xo = 0
A.fired()
*/
proc/Emit()
var/obj/item/projectile/beam/ehf_beam/A = new ( src.loc )
var/obj/item/projectile/beam/ehf_beam/A = new /obj/item/projectile/beam/ehf_beam( src.loc )
A.frequency = frequency
A.damage = mega_energy * 500
//
@@ -2,6 +2,7 @@
/obj/machinery/computer/rust/gyrotron_controller
name = "Gyrotron Remote Controller"
icon_state = "power"
var/updating = 1
New()
..()
@@ -33,7 +34,8 @@
process()
..()
//updateDialog()
if(updating)
src.updateDialog()
proc
interact(mob/user)
@@ -96,5 +98,5 @@
t += "</table>"
*/
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=gyrotron_controller;size=500x800")
user << browse(t, "window=gyrotron_controller;size=500x400")
user.machine = src
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@@ -34,18 +34,3 @@
closed += T
return closed
/obj/machinery/shield_gen/external/process()
/*if(stat & (NOPOWER|BROKEN))
return*/
if(!active)
return
/*spawn(100)
power()*/
/*if(src.active >= 1)
if(src.power == 0)
src.visible_message("\red The [src.name] shuts down due to lack of power!", \
"You hear heavy droning fade out")
icon_state = "generator0"
src.active = 0*/
..()
@@ -26,12 +26,13 @@
var/charge_rate = 100
/obj/machinery/shield_capacitor/New()
spawn(10)
for(var/obj/machinery/shield_gen/possible_gen in range(1, src))
if(get_dir(src, possible_gen) == src.dir)
target_generator = possible_gen
possible_gen.owned_capacitor = src
break
..()
target_generator = locate() in get_step(src,dir)
if(target_generator && !target_generator.owned_capacitor)
target_generator.owned_capacitor = src
/*spawn(10)
check_powered()*/
/obj/machinery/shield_capacitor/verb/rotate()
set name = "Rotate Clockwise"
@@ -42,10 +43,9 @@
usr << "It is fastened to the floor!"
return 0
src.dir = turn(src.dir, 270)
for(var/obj/machinery/shield_gen/possible_gen in range(1))
if(get_dir(src, possible_gen) == dir)
possible_gen.owned_capacitor = src
break
target_generator = locate() in get_step(src,dir)
if(target_generator && !target_generator.owned_capacitor)
target_generator.owned_capacitor = src
return 1
/obj/machinery/shield_capacitor/power_change()
+7 -13
View File
@@ -34,14 +34,14 @@
active_power_usage = 100
/obj/machinery/shield_gen/New()
..()
spawn(10)
for(var/obj/machinery/shield_capacitor/possible_cap in range(1, src))
if(get_dir(possible_cap, src) == possible_cap.dir)
owned_capacitor = possible_cap
possible_cap.target_generator = src
break
field = new/list()
for(var/obj/machinery/shield_capacitor/possible_cap in range(1))
if(get_dir(possible_cap, src) == possible_cap.dir)
owned_capacitor = possible_cap
break
/*spawn(10)
check_powered()*/
..()
//copied from a copypaste. DRY, right?
/obj/machinery/shield_gen/proc/check_powered()
@@ -78,12 +78,6 @@
/obj/machinery/shield_gen/process()
if(!owned_capacitor)
for(var/obj/machinery/shield_capacitor/possible_cap in range(1))
if(get_dir(possible_cap, src) == possible_cap.dir)
owned_capacitor = possible_cap
break
if(active && field.len)
var/stored_renwicks = 0
var/target_field_strength = min(average_field_strength + strengthen_rate, max_field_strength)
+4 -38
View File
@@ -48,44 +48,6 @@ atom/movable/RepelAirflowDest(n)
*/
vs_control/var
airflow_lightest_pressure = 30
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
airflow_light_pressure = 45
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
airflow_medium_pressure = 90
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
airflow_heavy_pressure = 95
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
airflow_dense_pressure = 120
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
airflow_stun_pressure = 100
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
airflow_stun_cooldown = 60
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
airflow_stun = 0.15
airflow_stun_NAME = "Airflow Impact - Stunning"
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
airflow_damage = 0.3
airflow_damage_NAME = "Airflow Impact - Damage"
airflow_damage_DESC = "Damage from airflow impacts."
airflow_speed_decay = 1.5
airflow_speed_decay_NAME = "Airflow Speed Decay"
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
airflow_delay = 30
airflow_delay_NAME = "Airflow Retrigger Delay"
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
airflow_mob_slowdown = 1
airflow_mob_slowdown_NAME = "Airflow Slowdown"
airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
mob/var/tmp/last_airflow_stun = 0
mob/proc/airflow_stun()
if(stat == 2)
@@ -309,6 +271,8 @@ atom/movable
src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z)
if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy))
return
if(!istype(loc, /turf))
return
step_towards(src, src.airflow_dest)
if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown
airflow_dest = null
@@ -363,6 +327,8 @@ atom/movable
src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z)
if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy))
return
if(!istype(loc, /turf))
return
step_towards(src, src.airflow_dest)
if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown
airflow_dest = null
+220 -168
View File
@@ -2,10 +2,14 @@
This object is contained within zone/var/connections. It's generated whenever two turfs from different zones are linked.
Indirect connections will not merge the two zones after they reach equilibrium.
*/
#define CONNECTION_DIRECT 2
#define CONNECTION_INDIRECT 1
#define CONNECTION_CLOSED 0
connection
var
turf //The turfs involved in the connection.
turf/simulated //The turfs involved in the connection.
A
B
zone
@@ -16,6 +20,7 @@ connection
indirect = 0 //If the connection is purely indirect, the zones should not join.
last_updated //The tick at which this was last updated.
no_zone_count = 0
New(turf/T,turf/O)
A = T
B = O
@@ -30,67 +35,59 @@ connection
zone_B = B.zone
ref_B = "\ref[B]"
if(!air_master.tiles_with_connections)
air_master.tiles_with_connections = list()
if(air_master.tiles_with_connections[ref_A])
var/list/A_connections = air_master.tiles_with_connections[ref_A]
A_connections |= src
if(ref_A in air_master.turfs_with_connections)
var/list/connections = air_master.turfs_with_connections[ref_A]
connections.Add(src)
else
var/list/A_connections = list(src)
air_master.tiles_with_connections[ref_A] = A_connections
air_master.turfs_with_connections[ref_A] = list(src)
if(air_master.tiles_with_connections[ref_B])
var/list/B_connections = air_master.tiles_with_connections[ref_B]
B_connections |= src
if(ref_B in air_master.turfs_with_connections)
var/list/connections = air_master.turfs_with_connections[ref_B]
connections.Add(src)
else
var/list/B_connections = list(src)
air_master.tiles_with_connections[ref_B] = B_connections
air_master.turfs_with_connections[ref_B] = list(src)
if(!A.zone.connected_zones)
A.zone.connected_zones = list()
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(!(B.zone in A.zone.connected_zones))
if(B.zone in A.zone.connected_zones)
A.zone.connected_zones[B.zone]++
else
A.zone.connected_zones += B.zone
A.zone.connected_zones[B.zone] = 1
else
A.zone.connected_zones[B.zone]++
if(!(A.zone in B.zone.connected_zones))
if(A.zone in B.zone.connected_zones)
B.zone.connected_zones[A.zone]++
else
B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1
else
B.zone.connected_zones[A.zone]++
if(A.HasDoor(B) || B.HasDoor(A))
indirect = 1
else
world.log << "Attempted to create connection object for non-zone tiles: [T] -> [O]"
del(src)
Del()
if(ref_B in air_master.turfs_with_connections)
var/list/connections = air_master.turfs_with_connections[ref_B]
connections.Remove(src)
if(ref_A in air_master.turfs_with_connections)
var/list/connections = air_master.turfs_with_connections[ref_A]
connections.Remove(src)
if(A)
if(A.zone && A.zone.connections)
A.zone.connections.Remove(src)
if(!A.zone.connections.len)
del A.zone.connections
if(ref_A in air_master.tiles_with_connections)
var/list/A_connections = air_master.tiles_with_connections[ref_A]
A_connections -= src
if(A_connections && !A_connections.len)
del A_connections
air_master.tiles_with_connections.Remove(ref_A)
if(B)
if(B.zone && B.zone.connections)
B.zone.connections.Remove(src)
if(!B.zone.connections.len)
del B.zone.connections
if(ref_B in air_master.tiles_with_connections)
var/list/B_connections = air_master.tiles_with_connections[ref_B]
B_connections -= src
if(B_connections && !B_connections.len)
del B_connections
air_master.tiles_with_connections.Remove(ref_B)
if(zone_A)
if(zone_A && zone_A.connections)
zone_A.connections.Remove(src)
@@ -102,74 +99,75 @@ connection
if(!zone_B.connections.len)
del zone_B.connections
if(A && A.zone)
if(B && B.zone)
if(B.zone in A.zone.connected_zones)
if(A.zone.connected_zones[B.zone] > 1)
A.zone.connected_zones[B.zone]--
else
A.zone.connected_zones -= B.zone
if(A.zone.connected_zones && !A.zone.connected_zones.len)
A.zone.connected_zones = null
if( zone_B && (!B.zone || zone_B != B.zone) )
if(zone_B in A.zone.connected_zones)
if(A.zone.connected_zones[zone_B] > 1)
A.zone.connected_zones[zone_B]--
else
A.zone.connected_zones -= zone_B
if(A.zone.connected_zones && !A.zone.connected_zones.len)
A.zone.connected_zones = null
if(zone_A && (!A.zone || zone_A != A.zone))
if(B && B.zone)
if(B.zone in zone_A.connected_zones)
if(zone_A.connected_zones[B.zone] > 1)
zone_A.connected_zones[B.zone]--
else
zone_A.connected_zones -= B.zone
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if( zone_B && (!B.zone || zone_B != B.zone) )
if(zone_B in zone_A.connected_zones)
if(zone_A.connected_zones[zone_B] > 1)
zone_A.connected_zones[zone_B]--
else
zone_A.connected_zones -= zone_B
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if(B && B.zone)
if(indirect != CONNECTION_CLOSED)
if(A && A.zone)
if(A.zone in B.zone.connected_zones)
if(B.zone.connected_zones[A.zone] > 1)
B.zone.connected_zones[A.zone]--
else
B.zone.connected_zones -= A.zone
if(B.zone.connected_zones && !B.zone.connected_zones.len)
B.zone.connected_zones = null
if( zone_A && (!A.zone || zone_A != A.zone) )
if(zone_A in B.zone.connected_zones)
if(B.zone.connected_zones[zone_A] > 1)
B.zone.connected_zones[zone_A]--
else
B.zone.connected_zones -= zone_A
if(B.zone.connected_zones && !B.zone.connected_zones.len)
B.zone.connected_zones = null
if(zone_B && (!B.zone || zone_B != B.zone))
if(A && A.zone)
if(A.zone in zone_B.connected_zones)
if(zone_B.connected_zones[A.zone] > 1)
zone_B.connected_zones[A.zone]--
else
zone_B.connected_zones -= A.zone
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if( zone_A && (!A.zone || zone_A != A.zone) )
if(zone_A in zone_B.connected_zones)
if(zone_B.connected_zones[zone_A] > 1)
zone_B.connected_zones[zone_A]--
else
zone_B.connected_zones -= zone_A
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if(B && B.zone)
if(B.zone in A.zone.connected_zones)
if(A.zone.connected_zones[B.zone] > 1)
A.zone.connected_zones[B.zone]--
else
A.zone.connected_zones -= B.zone
if(A.zone.connected_zones && !A.zone.connected_zones.len)
A.zone.connected_zones = null
if( zone_B && (!B.zone || zone_B != B.zone) )
if(zone_B in A.zone.connected_zones)
if(A.zone.connected_zones[zone_B] > 1)
A.zone.connected_zones[zone_B]--
else
A.zone.connected_zones -= zone_B
if(A.zone.connected_zones && !A.zone.connected_zones.len)
A.zone.connected_zones = null
if(zone_A && (!A.zone || zone_A != A.zone))
if(B && B.zone)
if(B.zone in zone_A.connected_zones)
if(zone_A.connected_zones[B.zone] > 1)
zone_A.connected_zones[B.zone]--
else
zone_A.connected_zones -= B.zone
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if( zone_B && (!B.zone || zone_B != B.zone) )
if(zone_B in zone_A.connected_zones)
if(zone_A.connected_zones[zone_B] > 1)
zone_A.connected_zones[zone_B]--
else
zone_A.connected_zones -= zone_B
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if(B && B.zone)
if(A && A.zone)
if(A.zone in B.zone.connected_zones)
if(B.zone.connected_zones[A.zone] > 1)
B.zone.connected_zones[A.zone]--
else
B.zone.connected_zones -= A.zone
if(B.zone.connected_zones && !B.zone.connected_zones.len)
B.zone.connected_zones = null
if( zone_A && (!A.zone || zone_A != A.zone) )
if(zone_A in B.zone.connected_zones)
if(B.zone.connected_zones[zone_A] > 1)
B.zone.connected_zones[zone_A]--
else
B.zone.connected_zones -= zone_A
if(B.zone.connected_zones && !B.zone.connected_zones.len)
B.zone.connected_zones = null
if(zone_B && (!B.zone || zone_B != B.zone))
if(A && A.zone)
if(A.zone in zone_B.connected_zones)
if(zone_B.connected_zones[A.zone] > 1)
zone_B.connected_zones[A.zone]--
else
zone_B.connected_zones -= A.zone
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if( zone_A && (!A.zone || zone_A != A.zone) )
if(zone_A in zone_B.connected_zones)
if(zone_B.connected_zones[zone_A] > 1)
zone_B.connected_zones[zone_A]--
else
zone_B.connected_zones -= zone_A
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
. = ..()
proc/Cleanup()
@@ -191,14 +189,58 @@ connection
return 0
return 1
proc/UpdateZones() //Changes connection data in the zones if it is required.
if(istype(A,/turf/space) || istype(B,/turf/space))
src.Cleanup()
return
if(A.ZAirPass(B))
var/door_pass = A.CanPass(null,B,1.5,1)
if(door_pass || A.CanPass(null,B,0,0))
if(indirect == CONNECTION_CLOSED)
//ADJUST FOR CAN CONNECT
if(!A.zone.connected_zones)
A.zone.connected_zones = list()
if(B.zone in A.zone.connected_zones)
A.zone.connected_zones[B.zone]++
else
A.zone.connected_zones += B.zone
A.zone.connected_zones[B.zone] = 1
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(A.zone in B.zone.connected_zones)
B.zone.connected_zones[A.zone]++
else
B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1
if(door_pass)
indirect = CONNECTION_DIRECT
else if(!door_pass)
indirect = CONNECTION_INDIRECT
else if(indirect > CONNECTION_CLOSED)
indirect = CONNECTION_CLOSED
//ADJUST FOR CANNOT CONNECT
if(A.zone.connected_zones)
if(A.zone.connected_zones[B.zone] > 1)
A.zone.connected_zones[B.zone]--
else
A.zone.connected_zones.Remove(B.zone)
if(A.zone.connected_zones && !A.zone.connected_zones.len)
A.zone.connected_zones = null
if(B.zone.connected_zones)
if(B.zone.connected_zones[A.zone] > 1)
B.zone.connected_zones[A.zone]--
else
B.zone.connected_zones.Remove(A.zone)
if(B.zone.connected_zones && !B.zone.connected_zones.len)
B.zone.connected_zones = null
else //If I can no longer pass air, better delete
del src
proc/CheckPassSanity()
Cleanup()
if(!A.CanPass(null, B, 0, 0) || !B.CanPass(null, A, 0, 0))
del src
if(A.HasDoor(B) || B.HasDoor(A))
indirect = 1
else
indirect = 0
UpdateZones()
return 1
proc/Sanitize()
//If the zones change on connected turfs, update it.
@@ -223,13 +265,14 @@ connection
if(!zone_A.connections.len)
del zone_A.connections
if(zone_A.connected_zones)
if(zone_A.connected_zones[zone_B] > 1)
zone_A.connected_zones[zone_B]--
else
zone_A.connected_zones.Remove(zone_B)
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if(indirect != CONNECTION_CLOSED)
if(zone_A.connected_zones)
if(zone_A.connected_zones[zone_B] > 1)
zone_A.connected_zones[zone_B]--
else
zone_A.connected_zones.Remove(zone_B)
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if(zone_B)
if(zone_B.connections)
@@ -237,36 +280,38 @@ connection
if(!zone_B.connections.len)
del zone_B.connections
if(zone_B.connected_zones)
if(zone_B.connected_zones[zone_A] > 1)
zone_B.connected_zones[zone_A]--
else
zone_B.connected_zones.Remove(zone_A)
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if(indirect != CONNECTION_CLOSED)
if(zone_B.connected_zones)
if(zone_B.connected_zones[zone_A] > 1)
zone_B.connected_zones[zone_A]--
else
zone_B.connected_zones.Remove(zone_A)
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if(!A.zone.connections)
A.zone.connections = list()
A.zone.connections |= src
if(!B.zone.connections)
B.zone.connections = list()
B.zone.connections |= src
if(indirect != CONNECTION_CLOSED)
if(!A.zone.connections)
A.zone.connections = list()
A.zone.connections |= src
if(!B.zone.connections)
B.zone.connections = list()
B.zone.connections |= src
if(!A.zone.connected_zones)
A.zone.connected_zones = list()
if(!(B.zone in A.zone.connected_zones))
A.zone.connected_zones += B.zone
A.zone.connected_zones[B.zone] = 1
else
A.zone.connected_zones[B.zone]++
if(!A.zone.connected_zones)
A.zone.connected_zones = list()
if(B.zone in A.zone.connected_zones)
A.zone.connected_zones[B.zone]++
else
A.zone.connected_zones += B.zone
A.zone.connected_zones[B.zone] = 1
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(!(A.zone in B.zone.connected_zones))
B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1
else
B.zone.connected_zones[A.zone]++
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(A.zone in B.zone.connected_zones)
B.zone.connected_zones[A.zone]++
else
B.zone.connected_zones += A.zone
B.zone.connected_zones[A.zone] = 1
zone_B = B.zone
@@ -284,21 +329,22 @@ connection
A.zone.connections = list()
A.zone.connections |= src
if(zone_A.connected_zones)
if(zone_A.connected_zones[zone_B] > 1)
zone_A.connected_zones[zone_B]--
else
zone_A.connected_zones.Remove(zone_B)
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if(indirect != CONNECTION_CLOSED)
if(zone_A.connected_zones)
if(zone_A.connected_zones[zone_B] > 1)
zone_A.connected_zones[zone_B]--
else
zone_A.connected_zones.Remove(zone_B)
if(zone_A.connected_zones && !zone_A.connected_zones.len)
zone_A.connected_zones = null
if(!A.zone.connected_zones)
A.zone.connected_zones = list()
if(!(zone_B in A.zone.connected_zones))
A.zone.connected_zones += zone_B
A.zone.connected_zones[zone_B] = 1
else
A.zone.connected_zones[zone_B]++
if(!A.zone.connected_zones)
A.zone.connected_zones = list()
if(!(zone_B in A.zone.connected_zones))
A.zone.connected_zones += zone_B
A.zone.connected_zones[zone_B] = 1
else
A.zone.connected_zones[zone_B]++
zone_A = A.zone
@@ -316,23 +362,29 @@ connection
B.zone.connections = list()
B.zone.connections |= src
if(zone_B.connected_zones)
if(zone_B.connected_zones[zone_A] > 1)
zone_B.connected_zones[zone_A]--
else
zone_B.connected_zones.Remove(zone_A)
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if(indirect != CONNECTION_CLOSED)
if(zone_B.connected_zones)
if(zone_B.connected_zones[zone_A] > 1)
zone_B.connected_zones[zone_A]--
else
zone_B.connected_zones.Remove(zone_A)
if(zone_B.connected_zones && !zone_B.connected_zones.len)
zone_B.connected_zones = null
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(!(zone_A in B.zone.connected_zones))
B.zone.connected_zones += zone_A
B.zone.connected_zones[zone_A] = 1
else
B.zone.connected_zones[zone_A]++
if(!B.zone.connected_zones)
B.zone.connected_zones = list()
if(!(zone_A in B.zone.connected_zones))
B.zone.connected_zones += zone_A
B.zone.connected_zones[zone_A] = 1
else
B.zone.connected_zones[zone_A]++
zone_B = B.zone
else
del src
del src
#undef CONNECTION_DIRECT
#undef CONNECTION_INDIRECT
#undef CONNECTION_CLOSED
+64 -9
View File
@@ -1,5 +1,6 @@
zone
New(turf/start)
. = ..()
//Get the turfs that are part of the zone using a floodfill method
if(istype(start,/list))
contents = start
@@ -8,7 +9,7 @@ zone
//Change all the zone vars of the turfs, check for space to be added to space_tiles.
for(var/turf/T in contents)
if(T.zone)
if(T.zone && T.zone != src)
T.zone.RemoveTurf(T)
T.zone = src
if(istype(T,/turf/space))
@@ -28,7 +29,7 @@ zone
air.update_values()
//Add this zone to the global list.
zones += src
zones.Add(src)
Del()
//Ensuring the zone list doesn't get clogged with null values.
@@ -40,8 +41,8 @@ zone
if(src in Z.connected_zones)
Z.connected_zones.Remove(src)
for(var/connection/C in connections)
C.Cleanup()
zones -= src
del C
zones.Remove(src)
. = ..()
proc/FloodFill(turf/start)
@@ -51,6 +52,7 @@ proc/FloodFill(turf/start)
list
open = list(start)
closed = list()
doors = list()
while(open.len)
for(var/turf/T in open)
@@ -60,18 +62,49 @@ proc/FloodFill(turf/start)
for(var/d in cardinal)
var/turf/O = get_step(T,d)
//Simple pass check.
if(O.ZCanPass(T) && !(O in open) && !(O in closed))
if(istype(O) && O.ZCanPass(T) && !(O in open) && !(O in closed))
open += O
else
doors += T
open -= T
continue
open -= T
closed += T
for(var/turf/T in doors)
var/force_connection = 1
var/turf/O = get_step(T,NORTH)
if(O in closed)
closed += T
continue
else if(T.ZCanPass(O))
force_connection = 0
O = get_step(T,WEST)
if(O in closed)
closed += T
continue
else if(force_connection && T.ZCanPass(O))
force_connection = 0
if(force_connection)
O = get_step(T,SOUTH)
if(O in closed)
closed += T
else if(!T.ZCanPass(O) && get_step(T,EAST) in closed)
closed += T
return closed
turf/proc/ZCanPass(turf/T, var/include_space = 0)
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
if(!istype(T))
return 0
if(istype(T,/turf/space) && !include_space) return 0
if(istype(T,/turf/space) && !include_space)
return 0
else
if(T.blocks_air||blocks_air)
return 0
@@ -79,13 +112,35 @@ turf/proc/ZCanPass(turf/T, var/include_space = 0)
for(var/obj/obstacle in src)
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
continue
if(!obstacle.CanPass(0, T, 1.5, 1))
if(!obstacle.CanPass(null, T, 1.5, 1))
return 0
for(var/obj/obstacle in T)
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
continue
if(!obstacle.CanPass(0, src, 1.5, 1))
if(!obstacle.CanPass(null, src, 1.5, 1))
return 0
return 1
return 1
turf/proc/ZAirPass(turf/T)
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
if(!istype(T))
return 0
if(T.blocks_air||blocks_air)
return 0
for(var/obj/obstacle in src)
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
continue
if(!obstacle.CanPass(null, T, 0, 0))
return 0
for(var/obj/obstacle in T)
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
continue
if(!obstacle.CanPass(null, src, 0, 0))
return 0
return 1
+2
View File
@@ -1,6 +1,8 @@
turf/var/zone/zone
var/list/zones = list()
var/list/DoorDirections = list(NORTH,WEST) //Which directions doors turfs can connect to zones
var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs can connect to zones
zone
var
+2 -1
View File
@@ -336,7 +336,8 @@ datum
corresponding.moles += trace_gas.moles*giver.group_multiplier/group_multiplier
update_values()
del(giver)
// Let the garbage collector handle it, faster according to /tg/ testers
//del(giver)
return 1
proc/remove(amount)
+23 -20
View File
@@ -92,17 +92,14 @@ datum
controller
air_system
//Geoemetry lists
// var/list/turf/simulated/active_singletons = list()
var/list/turf/simulated/turfs_with_connections = list()
var/list/obj/fire/active_hotspots = list()
//Special functions lists
// var/list/turf/simulated/active_super_conductivity = list()
// var/list/turf/simulated/high_pressure_delta = list()
//Geometry updates lists
var/list/turf/simulated/tiles_to_update = list()
var/list/turf/simulated/tiles_with_connections = list()
var/list/connection/connections_checked = list()
// var/list/turf/simulated/groups_to_rebuild = list()
var/current_cycle = 0
var/update_delay = 5 //How long between check should it try to process atmos again.
@@ -137,15 +134,15 @@ datum
var/start_time = world.timeofday
for(var/turf/simulated/S in world)
if(S.z < 5)
if(!S.zone && !S.blocks_air && S.z < 5) // Added last check to force skipping asteroid z-levels -- TLE
if(S.CanPass(null, S, 0, 0))
new/zone(S)
if(!S.zone && !S.blocks_air)
if(S.CanPass(null, S, 0, 0))
new/zone(S)
S.update_air_properties()
for(var/turf/simulated/S in world)
S.update_air_properties()
world << "\red \b Geometry processed in [time2text(world.timeofday-start_time, "mm:ss")] minutes!"
spawn start()
// spawn start()
proc/start()
//Purpose: This is kicked off by the master controller, and controls the processing of all atmosphere.
@@ -169,16 +166,19 @@ datum
*/
proc/tick()
. = 1 //Set the default return value, for runtime detection.
if(current_cycle >= next_stat_check)
var/zone/z = pick(zones)
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY.txt")]")
log_file << "Zone | \The [get_area(pick(z.contents))] | [z.air.oxygen], [z.air.nitrogen], [z.air.carbon_dioxide], [z.air.toxins] | [z.air.temperature] | [z.air.group_multiplier * z.air.volume]"
var/log_file = file("[time2text(world.timeofday, "statistics/DD-MM-YYYY-air.txt")]")
log_file << "\"\The [get_area(pick(z.contents))]\",[z.air.oxygen],[z.air.nitrogen],[z.air.carbon_dioxide],[z.air.toxins],[z.air.temperature],[z.air.group_multiplier * z.air.volume]"
next_stat_check = current_cycle + (rand(5,7)*60)
if(tiles_to_update.len > 0) //If there are tiles to update, do so.
for(var/turf/simulated/T in tiles_to_update)
T.update_air_properties()
var/output = T.update_air_properties()
if(. && T && !output)
. = 0 //If a runtime occured, make sure we can sense it.
tiles_to_update = list()
for(var/connection/C in connections_checked)
C.CheckPassSanity()
@@ -186,10 +186,13 @@ datum
for(var/zone/Z in zones)
if(Z.last_update < current_cycle)
Z.process()
if(Z) Z.last_update = current_cycle
var/output = Z.process()
if(Z)
Z.last_update = current_cycle
if(. && Z && !output)
. = 0
for(var/obj/fire/F)
F.process()
return 1
for(var/obj/fire/F in active_hotspots)
var/output = F.process()
if(. && F && !output)
. = 0
+28 -30
View File
@@ -171,25 +171,34 @@ turf
air_check_directions = 0
for(var/direction in cardinal)
if(CanPass(null, get_step(src,direction), 0, 0))
if(ZAirPass(get_step(src,direction)))
air_check_directions |= direction
if(!zone && CanPass(null, src, 1.5, 1)) //No zone and not a wall, lets add ourself to a zone.
for(var/direction in cardinal)
if(!zone && !blocks_air) //No zone, but not a wall.
for(var/direction in DoorDirections) //Check door directions first.
if(air_check_directions&direction)
var/turf/simulated/T = get_step(src,direction)
if(T.zone)
T.zone.AddTurf(src)
break
if(!zone) //Still no zone
for(var/direction in CounterDoorDirections) //Check the others second.
if(air_check_directions&direction)
var/turf/simulated/T = get_step(src,direction)
if(T.zone)
T.zone.AddTurf(src)
break
if(!zone) //No zone found, new zone!
new/zone(src)
if(!zone) //Still no zone, the floodfill determined it is not part of a larger zone. Force a zone on it.
new/zone(list(src))
if(air_master.tiles_with_connections["\ref[src]"]) //Check pass sanity of the connections.
var/list/connections = air_master.tiles_with_connections["\ref[src]"]
for(var/connection/C in connections)
air_master.connections_checked |= C
if("\ref[src]" in air_master.turfs_with_connections) //Check pass sanity of the connections.
for(var/connection/C in air_master.turfs_with_connections["\ref[src]"])
if(!(C in air_master.connections_checked))
air_master.connections_checked += C
update_zone_properties() //Update self zone and adjacent zones.
. = update_zone_properties() //Update self zone and adjacent zones.
if(air_check_directions)
processing = 1
@@ -199,32 +208,21 @@ turf
proc/update_zone_properties()
for(var/direction in cardinal)
var/turf/simulated/T = get_step(src,direction)
var/turf/T = get_step(src,direction)
if(air_check_directions&direction) //I can connect air in this direction
if(!istype(T)) //Space
if(!CanPass(null, T, 1.5, 1) && CanPass(src, T, 0, 0)) //Normally would block it, instead lets make a connection to it.
if(zone)
zone.AddSpace(T)
else if(!CanPass(src, T, 0, 0) || !CanPass(T, src, 0, 0)) //I block the air or it blocks air, disconnect from it if connected.
if(zone && T in zone.space_tiles)
zone.RemoveSpace(T)
else if(zone)
zone.rebuild = 1
continue
else if(!T.CanPass(null, src, 1.5, 1) && !T.CanPass(null, src, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt.
if(!CanPass(null, T, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt.
if(T.zone && !T.zone.rebuild)
for(var/direction2 in cardinal - direction) //Check all other directions for air that might be connected.
var/turf/simulated/NT = get_step(src, direction2)
if(NT && NT.zone && NT.zone == T.zone)
if(NT && NT.zone && NT.zone == T.zone && !NT.HasDoor())
T.zone.rebuild = 1
else if(T.CanPass(null, src, 0, 0))
if(T.zone != zone)
ZConnect(src,T)
else
ZConnect(src,T)
return 1
else if(zone && !zone.rebuild)
for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected.
var/turf/simulated/NT = get_step(T, direction2)
if(NT && NT.zone && NT.zone == zone)
zone.rebuild = 1
// else if(zone && !zone.rebuild)
// for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected.
// var/turf/simulated/NT = get_step(T, direction2)
// if(NT && NT.zone && NT.zone == zone)
// zone.rebuild = 1
+3 -2
View File
@@ -12,8 +12,6 @@ Attach to transfer valve and open. BOOM.
vs_control/var/IgnitionLevel = 0.5
vs_control/var/IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn."
//Some legacy definitions so fires can be started.
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -79,6 +77,7 @@ obj
archived_firelevel = 0
process()
. = 1
if(firelevel > vsc.IgnitionLevel)
@@ -169,12 +168,14 @@ obj
firelevel = fl
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(min(max(0.1,firelevel / 20),10)) //Burn the humans!
air_master.active_hotspots.Add(src)
Del()
if (istype(loc, /turf/simulated))
ul_SetLuminosity(0)
loc = null
air_master.active_hotspots.Remove(src)
..()
+19 -9
View File
@@ -6,21 +6,27 @@
if(T.zone)
T.zone.RemoveTurf(T)
contents += T
air.group_multiplier++
if(air)
air.group_multiplier++
T.zone = src
proc/RemoveTurf(turf/T)
//Same, but in reverse.
if(!(T in contents))
return
contents -= T
air.group_multiplier--
if(air)
air.group_multiplier--
T.zone = null
proc/AddSpace(turf/space/S)
//Adds a space tile to the list, and creates the list if null.
if(istype(S,/turf/space))
if(!space_tiles) space_tiles = list()
if(istype(S))
if(!space_tiles)
space_tiles = list()
else if(S in space_tiles)
return
space_tiles += S
contents -= S
proc/RemoveSpace(turf/space/S)
//Removes a space tile from the list, and deletes the list if length is 0.
@@ -100,7 +106,7 @@ proc/ZMerge(zone/A,zone/B)
del B
proc/ZConnect(turf/A,turf/B)
proc/ZConnect(turf/simulated/A,turf/simulated/B)
//Connects two zones by forming a connection object representing turfs A and B.
//Make sure that if it's space, it gets added to space_tiles instead.
@@ -113,15 +119,19 @@ proc/ZConnect(turf/A,turf/B)
B.zone.AddSpace(A)
return
if(!istype(A) || !istype(B))
return
//Make some preliminary checks to see if the connection is valid.
if(!A.zone || !B.zone) return
if(A.zone == B.zone) return
if(!A.CanPass(0,B,0,0) || !B.CanPass(0,A,0,0)) return
if(!A.CanPass(null,B,0,0)) return
if(A.CanPass(null,B,1.5,1))
return ZMerge(A.zone,B.zone)
//Ensure the connection isn't already made.
if(air_master.tiles_with_connections["\ref[A]"])
var/list/connections = air_master.tiles_with_connections["\ref[A]"]
for(var/connection/C in connections)
if("\ref[A]" in air_master.turfs_with_connections)
for(var/connection/C in air_master.turfs_with_connections["\ref[A]"])
C.Cleanup()
if(C && (C.B == B || C.A == B))
return
+28 -7
View File
@@ -1,21 +1,41 @@
var/image/contamination_overlay = image('icons/effects/contamination.dmi')
pl_control/var
PLASMA_DMG = 3
PLASMA_DMG_NAME = "Plasma Damage Amount"
PLASMA_DMG_DESC = "Self Descriptive"
CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
CLOTH_CONTAMINATION = 0
CLOTH_CONTAMINATION_NAME = "Cloth Contamination"
CLOTH_CONTAMINATION_DESC = "If this is on, plasma does damage by getting into cloth."
PLASMAGUARD_ONLY = 0 //If this is on, only biosuits and spacesuits protect against contamination and ill effects.
PLASMAGUARD_ONLY = 0
PLASMAGUARD_ONLY_NAME = "\"PlasmaGuard Only\""
PLASMAGUARD_ONLY_DESC = "If this is on, only biosuits and spacesuits protect against contamination and ill effects."
GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 10,000.
GENETIC_CORRUPTION = 0
GENETIC_CORRUPTION_NAME = "Genetic Corruption Chance"
GENETIC_CORRUPTION_DESC = "Chance of genetic corruption as well as toxic damage, X in 10,000."
SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
SKIN_BURNS = 1
SKIN_BURNS_DESC = "Plasma has an effect similar to mustard gas on the un-suited."
SKIN_BURNS_NAME = "Skin Burns"
EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
EYE_BURNS = 1
EYE_BURNS_NAME = "Eye Burns"
EYE_BURNS_DESC = "Plasma burns the eyes of anyone not wearing eye protection."
CONTAMINATION_LOSS = 0.01
CONTAMINATION_LOSS_NAME = "Contamination Loss"
CONTAMINATION_LOSS_DESC = "How much toxin damage is dealt from contaminated clothing" //Per tick? ASK ARYN
PLASMA_HALLUCINATION = 0
PLASMA_HALLUCINATION_NAME = "Plasma Hallucination"
PLASMA_HALLUCINATION_DESC = "Does being in plasma cause you to hallucinate?"
N2O_HALLUCINATION = 1
N2O_HALLUCINATION_NAME = "N2O Hallucination"
N2O_HALLUCINATION_DESC = "Does being in sleeping gas cause you to hallucinate?"
obj/var/contaminated = 0
@@ -32,11 +52,11 @@ obj/item/proc
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
if(!contaminated)
contaminated = 1
overlays += 'icons/effects/contamination.dmi'
overlays += contamination_overlay
decontaminate()
contaminated = 0
overlays -= 'icons/effects/contamination.dmi'
overlays -= contamination_overlay
/mob/proc/contaminate()
@@ -94,6 +114,7 @@ obj/item/proc
src << "\red High levels of toxins cause you to spontaneously mutate."
domutcheck(src,null)
/mob/living/carbon/human/proc/burn_eyes()
//The proc that handles eye burning.
if(prob(20)) src << "\red Your eyes burn!"
+80 -88
View File
@@ -1,13 +1,11 @@
#define QUANTIZE(variable) (round(variable,0.0001))
vs_control/var/zone_share_percent = 10
vs_control/var/zone_share_percent_NAME = "Zone Share Percent"
vs_control/var/zone_share_percent_DESC = "Percentage of air difference to move per tick"
zone/proc/process()
. = 1
//Deletes zone if empty.
if(!contents.len)
del src
return 0
//Does rebuilding stuff. Not sure if used.
//Does rebuilding stuff.
if(rebuild)
rebuild = 0
Rebuild() //Shoving this into a proc.
@@ -24,18 +22,16 @@ zone/proc/process()
if(space_tiles)
for(var/T in space_tiles)
if(!istype(T,/turf/space))
space_tiles -= T
continue
total_space++
if(space_tiles && !space_tiles.len)
del space_tiles
RemoveSpace(T)
if(space_tiles)
total_space = space_tiles.len
//Add checks to ensure that we're not sucking air out of an empty room.
if(total_space && air.total_moles > 0.1 && air.temperature > TCMB+0.5)
//If there is space, air should flow out of the zone.
if(abs(air.return_pressure()) > vsc.airflow_lightest_pressure)
AirflowSpace(src)
ShareSpace(air,total_space*(vsc.zone_share_percent/100))
ShareSpace(air,total_space*vsc.zone_share_percent/200)
//React the air here.
air.react(null,0)
@@ -82,7 +78,7 @@ zone/proc/process()
//Do merging if conditions are met. Specifically, if there's a non-door connection
//to somewhere with space, the zones are merged regardless of equilibrium, to speed
//up spacing in areas with double-plated windows.
if(C && !C.indirect && C.A.zone && C.B.zone)
if(C && C.indirect == 2 && C.A.zone && C.B.zone) //indirect = 2 is a direct connection.
if(C.A.zone.air.compare(C.B.zone.air) || total_space)
ZMerge(C.A.zone,C.B.zone)
@@ -92,7 +88,7 @@ zone/proc/process()
if(abs(air.total_moles - Z.air.total_moles) > 0.1 || abs(air.temperature - Z.air.temperature) > 0.1)
if(abs(Z.air.return_pressure() - air.return_pressure()) > vsc.airflow_lightest_pressure)
Airflow(src,Z)
ShareRatio( air , Z.air , max(connected_zones[Z]*(vsc.zone_share_percent/200)*(space_tiles || Z.space_tiles ? 2 : 1) , 1) )
ShareRatio( air , Z.air , connected_zones[Z]*vsc.zone_share_percent/200 )
//Divided by 200 since each zone is processed. Each connection is considered twice
//Space tiles force it to try and move twice as much air.
@@ -197,7 +193,77 @@ proc/ShareSpace(datum/gas_mixture/A, ratio)
return 1
zone/proc/Rebuild()
//Choose a random turf and regenerate the zone from it.
var
turf/simulated/sample = pick(contents)
list/new_contents
problem = 0
var/list/turfs_to_consider = contents.Copy()
do
if(sample)
turfs_to_consider.Remove(sample)
if(!turfs_to_consider.len)
break
sample = pick(turfs_to_consider) //Nor this.
while(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1))
if(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1)) //Not a single valid turf.
for(var/turf/simulated/T in contents)
air_master.tiles_to_update |= T
del src
new_contents = FloodFill(sample)
for(var/turf/space/S in new_contents)
AddSpace(S)
new_contents.Remove(S)
if(contents.len != new_contents.len)
problem = 1
//If something isn't carried over, there was a complication.
for(var/turf/T in contents)
if(!(T in new_contents))
T.zone = null
problem = 1
if(problem)
//Build some new zones for stuff that wasn't included.
var/list/turf/simulated/rebuild_turfs = contents - new_contents
var/list/turf/simulated/reconsider_turfs = list()
contents = new_contents
for(var/turf/simulated/T in rebuild_turfs)
if(!T.zone && T.CanPass(null, T, 1.5, 1))
var/zone/Z = new /zone(T)
Z.air.copy_from(air)
else
reconsider_turfs |= T
for(var/turf/simulated/T in reconsider_turfs)
if(!T.zone && T.CanPass(null, T, 1.5, 1))
var/zone/Z = new /zone(T)
Z.air.copy_from(air)
else if(!T in air_master.tiles_to_update)
air_master.tiles_to_update.Add(T)
for(var/turf/simulated/T in contents)
if(T.zone && T.zone != src)
T.zone.RemoveTurf(T)
T.zone = src
else if(!T.zone)
T.zone = src
air.group_multiplier = contents.len
if(space_tiles)
var/list/new_space_tiles = space_tiles.Copy()
space_tiles = null
for(var/turf/space/S in new_space_tiles)
for(var/direction in cardinal)
var/turf/simulated/T = get_step(S,direction)
if(istype(T) && T.zone)
T.zone.AddSpace(S)
/*
zone/proc/connected_zones()
//A legacy proc for getting connected zones.
. = list()
@@ -212,78 +278,4 @@ zone/proc/connected_zones()
.[Z]++
else
. += Z
.[Z] = 1
zone/proc/Rebuild()
//Choose a random turf and regenerate the zone from it.
var
turf/simulated/sample = pick(contents)
list/new_contents
problem = 0
if(space_tiles)
del(space_tiles)
contents.Remove(null) //I can't believe this is needed.
if(!contents.len)
del src
var/list/tried_turfs = list()
do
if(sample)
tried_turfs |= sample
var/list/turfs_to_consider = contents - tried_turfs
if(!turfs_to_consider.len)
break
sample = pick(turfs_to_consider) //Nor this.
while(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1))
if(!istype(sample) || !sample.CanPass(null, sample, 1.5, 1)) //Not a single valid turf.
for(var/turf/simulated/T in contents)
air_master.tiles_to_update |= T
del src
new_contents = FloodFill(sample)
for(var/turf/space/S in new_contents)
if(!space_tiles)
space_tiles = list()
space_tiles |= S
if(contents.len != new_contents.len)
problem = 1
//If something isn't carried over, there was a complication.
for(var/turf/T in contents)
if(!(T in new_contents))
T.zone = null
problem = 1
for(var/turf/T in new_contents)
if(problem)
//Build some new zones for stuff that wasn't included.
var/list/turf/simulated/rebuild_turfs = contents - new_contents
var/list/turf/simulated/reconsider_turfs = list()
contents = new_contents
for(var/turf/T in rebuild_turfs)
if(istype(T,/turf/space))
air_master.tiles_to_update |= T
else if(!T.zone && T.CanPass(null, T, 1.5, 1))
var/zone/Z = new /zone(T)
Z.air.copy_from(air)
else
reconsider_turfs |= T
for(var/turf/T in reconsider_turfs)
if(!T.zone)
var/zone/Z = new /zone(T)
Z.air.copy_from(air)
for(var/turf/T in contents)
if(T.zone && T.zone != src)
T.zone.RemoveTurf(T)
T.zone = src
else if(!T.zone)
T.zone = src
air.group_multiplier = contents.len
.[Z] = 1*/
+117 -6
View File
@@ -1,4 +1,49 @@
var/global/vs_control/vsc = new
vs_control/var
zone_share_percent = 12
zone_share_percent_NAME = "Zone Share Percent"
zone_share_percent_DESC = "Percentage of air difference to move per tick"
IgnitionLevel = 0.5
IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn."
airflow_lightest_pressure = 30
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
airflow_light_pressure = 45
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
airflow_medium_pressure = 90
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
airflow_heavy_pressure = 95
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
airflow_dense_pressure = 120
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
airflow_stun_pressure = 100
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
airflow_stun_cooldown = 60
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
airflow_stun = 0.15
airflow_stun_NAME = "Airflow Impact - Stunning"
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
airflow_damage = 0.3
airflow_damage_NAME = "Airflow Impact - Damage"
airflow_damage_DESC = "Damage from airflow impacts."
airflow_speed_decay = 1.5
airflow_speed_decay_NAME = "Airflow Speed Decay"
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
airflow_delay = 30
airflow_delay_NAME = "Airflow Retrigger Delay"
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
airflow_mob_slowdown = 1
airflow_mob_slowdown_NAME = "Airflow Slowdown"
airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
vs_control
var
list/settings = list()
@@ -120,12 +165,13 @@ vs_control
////world << "Plasma randomized."
proc/SetDefault(var/mob/user)
var/list/setting_choices = list("Original", "Hazard - Low", "Hazard - High", "Oh Shit!")
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
if(!def)
return
switch(def)
if("Original")
if("Plasma - Standard")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 0
@@ -150,7 +196,7 @@ vs_control
//plc.PLASMA_DMG_QUOTIENT = 10
plc.CONTAMINATION_LOSS = 0
if("Hazard - Low")
if("Plasma - Low Hazard")
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 0
@@ -177,7 +223,7 @@ vs_control
plc.CONTAMINATION_LOSS = 0
if("Hazard - High")
if("Plasma - High Hazard")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 0
@@ -199,7 +245,7 @@ vs_control
//plc.PLASMA_DMG_OFFSET = 3
//plc.PLASMA_DMG_QUOTIENT = 5
if("Oh Shit!")
if("Plasma - Oh Shit!")
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
plc.PLASMAGUARD_ONLY = 1
@@ -221,7 +267,72 @@ vs_control
//plc.PLASMA_DMG_OFFSET = 3
//plc.PLASMA_DMG_QUOTIENT = 5
/////world << "Plasma color updated."
if("ZAS - Normal")
zone_share_percent = 10
IgnitionLevel = 0.5
airflow_lightest_pressure = 30
airflow_light_pressure = 45
airflow_medium_pressure = 90
airflow_heavy_pressure = 95
airflow_dense_pressure = 120
airflow_stun_pressure = 100
airflow_stun_cooldown = 60
airflow_stun = 0.15
airflow_damage = 0.3
airflow_speed_decay = 1.5
airflow_delay = 30
airflow_mob_slowdown = 1
if("ZAS - Forgiving")
zone_share_percent = 6
IgnitionLevel = 1
airflow_lightest_pressure = 45
airflow_light_pressure = 60
airflow_medium_pressure = 120
airflow_heavy_pressure = 110
airflow_dense_pressure = 200
airflow_stun_pressure = 150
airflow_stun_cooldown = 90
airflow_stun = 0.15
airflow_damage = 0.15
airflow_speed_decay = 1.5
airflow_delay = 50
airflow_mob_slowdown = 0
if("ZAS - Dangerous")
zone_share_percent = 15
IgnitionLevel = 0.4
airflow_lightest_pressure = 25
airflow_light_pressure = 35
airflow_medium_pressure = 75
airflow_heavy_pressure = 80
airflow_dense_pressure = 100
airflow_stun_pressure = 90
airflow_stun_cooldown = 50
airflow_stun = 2
airflow_damage = 1
airflow_speed_decay = 1.2
airflow_delay = 25
airflow_mob_slowdown = 2
if("ZAS - Hellish")
zone_share_percent = 20
IgnitionLevel = 0.3
airflow_lightest_pressure = 20
airflow_light_pressure = 30
airflow_medium_pressure = 70
airflow_heavy_pressure = 75
airflow_dense_pressure = 80
airflow_stun_pressure = 70
airflow_stun_cooldown = 40
airflow_stun = 3
airflow_damage = 2
airflow_speed_decay = 1
airflow_delay = 20
airflow_mob_slowdown = 3
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"
pl_control
var/list/settings = list()
+2
View File
@@ -24,6 +24,8 @@ datum/mind
proc/transfer_to(mob/new_character)
// multikey information is stored in the mob, not the mind, so
// we need to clean this stuff up to avoid multikey alerts
if(!new_character || !current)
return
current.lastKnownIP = null
current.computer_id = null
@@ -449,6 +449,7 @@ proc/process_ghost_teleport_locs()
name = "\improper Syndicate Station"
icon_state = "yellow"
requires_power = 0
ul_Lighting = 0
/area/syndicate_station/start
name = "\improper Syndicate Station Start"
@@ -936,6 +937,10 @@ proc/process_ghost_teleport_locs()
name = "\improper Engineering Core"
icon_state = "engine_core"
cooling
name = "\improper Emergency Cooling Room"
icon_state = "engine"
//reactor areas
reactor_core
@@ -1278,6 +1283,10 @@ proc/process_ghost_teleport_locs()
//Anomaly
/area/anomaly/hallway
name = "Anomaly Hallway"
icon_state = "anomaly"
/area/anomaly/lab
name = "Anomaly Lab"
icon_state = "anomaly"
+7
View File
@@ -535,6 +535,13 @@
icon_state = "circuit"
item_state = "syringe_kit"
/obj/item/weapon/storage/AirlockBox
name = "spare airlock electronics"
desc = "A box of spare airlock circuit boards."
icon = 'storage.dmi'
icon_state = "circuit"
item_state = "syringe_kit"
/obj/item/weapon/storage/toolbox/syndicate
name = "red and black toolbox"
desc = "An oddly coloured toolbox."
+5 -2
View File
@@ -33,12 +33,13 @@
containername = "Empty Box crate"
/datum/supply_packs/pcm
name = "Power Control Module supplies"
name = "APC and Airlock Electronics crate"
contains = list("/obj/item/weapon/storage/PCMBox",
"/obj/item/weapon/storage/PCMBox")
"/obj/item/weapon/storage/AirlockBox")
cost = 25
containertype = "/obj/structure/closet/crate"
containername = "Power Control Module crate"
group = "Engineering"
/datum/supply_packs/body_bags
name = "Body Bag supplies"
@@ -764,6 +765,7 @@
containername = "Secruity Barriers crate"
group = "Security"
/*
/datum/supply_packs/randomised
var/num_contained = 3 //number of items picked to be contained in a randomised crate
contains = list("/obj/item/clothing/head/collectable/chef",
@@ -812,3 +814,4 @@
containertype = "/obj/structure/closet/crate"
containername = "Contraband crate"
contraband = 1
*/
+23 -4
View File
@@ -1,3 +1,8 @@
/atom/Del()
var/log_file = file("[time2text(world.timeofday, "deletions/DD-MM-YYYY.txt")]")
log_file << "[type] named [name] - [x],[y],[z]"
. = ..()
/atom/proc/MouseDrop_T()
return
@@ -1000,9 +1005,20 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
usr.next_move = world.time + 6
return
////////////////////////////////////////
///IMPORTANT: CACHE FOR DUMMY OBJECTS///
//Used to cut down on stupid deletions//
////////////////////////////////////////
var/list/DummyCache = list()
/proc/CanReachThrough(turf/srcturf, turf/targetturf, atom/target)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( srcturf )
var/obj/item/weapon/dummy/D = locate() in DummyCache
if(!D)
D = new /obj/item/weapon/dummy( srcturf )
else
DummyCache.Remove(D)
D.loc = srcturf
if(targetturf.density && targetturf != get_turf(target))
return 0
@@ -1011,17 +1027,20 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
for(var/obj/border_obstacle in srcturf)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, targetturf))
del D
D.loc = null
DummyCache.Add(D)
return 0
//Next, check objects to block entry that are on the border
for(var/obj/border_obstacle in targetturf)
if((border_obstacle.flags & ON_BORDER) && (target != border_obstacle))
if(!border_obstacle.CanPass(D, srcturf, 1, 0))
del D
D.loc = null
DummyCache.Add(D)
return 0
del D
D.loc = null
DummyCache.Add(D)
return 1
/atom/proc/CtrlClick(var/mob/M as mob)
+2 -2
View File
@@ -1,8 +1,8 @@
/datum/event/radiation
var/current_iteration = 0
// 35 - 20 (grace period) seconds lifetime = at least 15*4=60 damage
Lifetime = 35
// 50 - 20 (grace period) seconds lifetime
Lifetime = 50
Announce()
command_alert("The station is now travelling through a radiation belt. Take shelter in the maintenance tunnels, or in the crew quarters!", "Medical Alert")
+4 -1
View File
@@ -10,6 +10,7 @@
/proc/is_convertable_to_cult(datum/mind/mind)
if(!istype(mind)) return 0
// Convert ALL the people
/* if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Head of Security", "Security Officer", "Detective", "Chaplain", "Warden"))) return 0
for(var/obj/item/weapon/implant/loyalty/L in mind.current)
if(L && L.implanted)
@@ -20,7 +21,9 @@
/datum/game_mode/cult
name = "cult"
config_tag = "cult"
restricted_jobs = list("AI", "Cyborg")
// Why is the Head of Security restricted always? It's because he is usually put in charge of dealing with the cult,
// as well as him having an easy time converting the rest of security, which leads to a bit of an unbalance.
restricted_jobs = list("AI", "Cyborg", "Head of Security")
protected_jobs = list("Security Officer", "Warden", "Detective", "Captain", "Head of Security")
required_players = 3
required_enemies = 3
+1 -1
View File
@@ -45,7 +45,7 @@
// for every 10 players, get 1 meme, and for each meme, get a host
// also make sure that there's at least one meme and one host
recommended_enemies = max(src.num_players() / 10 * 2, 2)
recommended_enemies = max(src.num_players() / 20 * 2, 2)
var/list/datum/mind/possible_memes = get_players_for_role(BE_MEME)
+2 -2
View File
@@ -723,7 +723,7 @@ datum
return 20
magboots
/*magboots
steal_target = /obj/item/clothing/shoes/magboots
explanation_text = "Steal a pair of \"NanoTrasen\" brand magboots."
weight = 20
@@ -745,7 +745,7 @@ datum
if(GetRank(job) == 4)
return 10
else
return 20
return 20*/
blueprints
+1 -1
View File
@@ -294,7 +294,7 @@ datum/objective/steal
"a jetpack" = /obj/item/weapon/tank/jetpack,
"a captains jumpsuit" = /obj/item/clothing/under/rank/captain,
"a functional AI" = /obj/item/device/aicard,
"a pair of magboots" = /obj/item/clothing/shoes/magboots,
/*"a pair of magboots" = /obj/item/clothing/shoes/magboots,*/
"the station blueprints" = /obj/item/blueprints,
"a nasa voidsuit" = /obj/item/clothing/suit/space/nasavoid,
"28 moles of plasma (full tank)" = /obj/item/weapon/tank,
+1 -1
View File
@@ -290,7 +290,7 @@
AN = "[e.broken_description]:"
if(e.open)
open = "Open:"
if(e.implant && e.implant.len)
if(e.implant)
imp = "Implanted:"
if(!AN && !open && !infected & !imp)
AN = "None"
+14 -13
View File
@@ -331,7 +331,7 @@
for (var/area/A in alarm_area.related)
for (var/obj/machinery/alarm/AA in A)
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.danger_level != new_danger_level)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.danger_level != new_danger_level)
AA.update_icon()
if(danger_level > 1)
@@ -354,17 +354,18 @@
spawn(0)
E.close()
continue
if(istype(E, /obj/machinery/door/airlock))
if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER)) continue
if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER) || E:air_locked) continue
if(!E.density)
spawn(0)
E.close()
sleep(10)
if(E.density)
E:air_locked = E.req_access
E:req_access = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS)
E.update_icon()
if(E.operating)
spawn(10)
if(E.density)
E:air_locked = E.req_access
E:req_access = list(ACCESS_ENGINE, ACCESS_ATMOSPHERICS)
E.update_icon()
else if(E.operating)
spawn(10)
E.close()
if(E.density)
@@ -389,13 +390,13 @@
spawn(0)
E.open()
continue
if(istype(E, /obj/machinery/door/airlock))
if((!E:arePowerSystemsOn()) || (E.stat & NOPOWER)) continue
if(E:air_locked) //Don't mess with doors locked for other reasons.
if(E.density)
E:req_access = E:air_locked
E:air_locked = null
E.update_icon()
if(!isnull(E:air_locked)) //Don't mess with doors locked for other reasons.
E:req_access = E:air_locked
E:air_locked = null
E.update_icon()
///////////
//HACKING//
@@ -6,11 +6,11 @@
else
switch(department)
if("Security")
networks = list("Arrivals","SS13","Engineering","Research","Medbay","Tcomsat","Mess Hall","Security","Atmospherics","Cargo","Command","Solars","Robotics","Chapel","Hydroponics", "Dormitory")
networks = list("Arrivals","SS13","Engineering","Research","Medbay","Tcomsat","Mess Hall","Security","Prison Wing","Atmospherics","Cargo","Command","Solars","Robotics","Chapel","Hydroponics", "Dormitory","Theatre","Library")
if("Engineering")
networks = list("Engineering","Tcomsat","Singularity","Atmospherics","Solars","Robotics")
if("Research")
networks = list("Research","Bomb Testing")
networks = list("Research","Bomb Testing","Outpost")
if("Medbay")
networks = list("Medbay")
if("Cargo")
+2 -1
View File
@@ -208,7 +208,8 @@
dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>"
for(var/id in geneticsrecords)
var/datum/data/record/R = geneticsrecords[id]
dat += "<a href='byond://?src=\ref[src];view_rec=[id]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
if(R)
dat += "<a href='byond://?src=\ref[src];view_rec=[id]'>[R.fields["id"]]-[R.fields["name"]]</a><br>"
if(3)
dat += "<h4>Selected Record</h4>"
+1 -1
View File
@@ -85,7 +85,7 @@ Pod/Blast Doors computer
/obj/machinery/computer/process()
if(stat & (NOPOWER|BROKEN))
return
use_power(250)
use_power(750)
/obj/machinery/computer/proc/set_broken()
icon_state = initial(icon_state)
+67 -64
View File
@@ -9,32 +9,29 @@
circuit = "/obj/item/weapon/circuitboard/lockdown"
var/connected_doors
var/department*/
var/list/displayedNetworks
New()
..()
connected_doors = new/list()
displayedNetworks = new/list()
//only load blast doors for map-defined departments for the moment
//door networks are hardcoded here.
switch(department)
if("Engineering")
//Antiqua SinguloEngineering
connected_doors.Add("Engineering Primary Access")
connected_doors.Add("Engineering Secondary Access")
connected_doors.Add("Fore Maintenance Access")
connected_doors.Add("Aft Maintenance Access")
connected_doors.Add("Particle Accelerator Rad Shielding")
connected_doors.Add("Foreward Emitter Array Rad Shielding")
connected_doors.Add("Aftward Emitter Array Rad Shielding")
connected_doors.Add("Starboard Observation Rad Shielding")
connected_doors.Add("Atmospheric Storage Rad Shielding")
connected_doors.Add("Construction Storage Rad Shielding")
connected_doors.Add("Engineering Secure Storage")
//Antiqua RustEngineering
connected_doors.Add("Port vessel entry")
connected_doors.Add("Starboard vessel entry")
connected_doors.Add("Central aft shell access")
connected_doors.Add("Port aft shell access")
connected_doors.Add("Starboard aft shell access")
connected_doors.Add("Engineering")
//Antiqua Engineering
connected_doors.Add("Reactor core")
connected_doors.Add("Control Room")
connected_doors.Add("Vent Seal")
connected_doors.Add("Rig Storage")
connected_doors.Add("Fore Port Shutters")
connected_doors.Add("Fore Starboard Shutters")
connected_doors.Add("Electrical Storage Shutters")
connected_doors.Add("Locker Room Shutters")
connected_doors.Add("Breakroom Shutters")
connected_doors.Add("Observation Shutters")
//exodus engineering
if("Medbay")
//Exodus Medbay
connected_doors.Add("Genetics Outer Shutters")
@@ -47,14 +44,20 @@
for(var/net in connected_doors)
connected_doors[net] = new/list()
world << "network: [net]"
//loop through the world, grabbing all the relevant doors
spawn(1)
for(var/obj/machinery/door/poddoor/D in world)
if(D.id in connected_doors)
var/list/L = connected_doors[D.id]
L.Add(D)
ConnectDoors()
proc/ConnectDoors()
for(var/list/L in connected_doors)
for(var/item in L)
L.Remove(item)
//
for(var/obj/machinery/door/poddoor/D in world)
if(D.network in connected_doors)
var/list/L = connected_doors[D.network]
L.Add(D)
attack_ai(mob/user)
attack_hand(user)
@@ -71,7 +74,8 @@
return
var/t = "<B>Lockdown Control</B><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><hr>"
t += "<A href='?src=\ref[src];refresh=1'>Refresh</A><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
t += "<table border=1>"
var/empty = 1
for(var/curNetId in connected_doors)
@@ -80,36 +84,57 @@
continue
empty = 0
t += "<tr>"
t += "<td><b>" + curNetId + "<b></td>"
t += "<td><b><a href='?src=\ref[src];open_net=[curNetId]'>Disable lockdown</a> / <a href='?src=\ref[src];close_net=[curNetId]'>Enable lockdown</a></b></td>"
t += "</tr>"
for(var/obj/machinery/door/poddoor/D in connected_doors[curNetId])
t += "<tr>"
if(istype(D,/obj/machinery/door/poddoor/shutters))
t += "<td> Shutter</td>"
else
t += "<td> Blast door</td>"
if(D.density)
//t += "<td><a href='?src=\ref[D];open=1'>Open</a> - Close</td>"
t += "Closed"
else
//t += "<td>Open - <a href='?src=\ref[D];close=1'>Close</a></td>"
t += "Open"
if(curNetId in displayedNetworks)
t += "<td><a href='?src=\ref[src];hide_net=[curNetId]'>\[-\]</a><b> " + curNetId + "<b></td>"
t += "<td colspan=\"2\"><b><a href='?src=\ref[src];open_net=[curNetId]'>Open all</a> / <a href='?src=\ref[src];close_net=[curNetId]'>Close all</a></b></td>"
t += "</tr>"
for(var/obj/machinery/door/poddoor/D in connected_doors[curNetId])
t += "<tr>"
t += "<td>[D.id]</td>"
if(istype(D,/obj/machinery/door/poddoor/shutters))
t += "<td>Shutter ([D.density ? "Closed" : "Open"])</td>"
else
t += "<td>Blast door ([D.density ? "Closed" : "Open"])</td>"
t += "<td><b><a href='?src=\ref[D];toggle=1'>Toggle</a></b></td>"
t += "</tr>"
else
t += "<td><a href='?src=\ref[src];show_net=[curNetId]'>\[+\]</a> <b>" + curNetId + "<b></td>"
t += "</table>"
if(empty)
t += "\red No networks connected.<br>"
t += "<A href='?src=\ref[src];refresh=1'>Refresh</A><BR>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=lockdown;size=500x800")
user << browse(t, "window=lockdown;size=550x600")
onclose(user, "lockdown")
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=lockdown")
usr.machine = null
return
if( href_list["show_net"] )
displayedNetworks.Add(href_list["show_net"])
updateDialog()
if( href_list["hide_net"] )
if(href_list["hide_net"] in displayedNetworks)
displayedNetworks.Remove(href_list["hide_net"])
updateDialog()
if( href_list["toggle_id"] )
var/idTag = href_list["toggle_id"]
for(var/net in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[net])
if(D.id == idTag)
if(D.density)
D.open()
else
D.close()
break
if( href_list["open_net"] )
var/netTag = href_list["open_net"]
@@ -117,8 +142,6 @@
if(D.density) //for some reason, there's no var saying whether the door is open or not >.>
spawn(0)
D.open()
src.updateDialog()
return
if( href_list["close_net"] )
var/netTag = href_list["close_net"]
@@ -126,25 +149,5 @@
if(!D.density)
spawn(0)
D.close()
src.updateDialog()
return
if( href_list["close_all"] )
for(var/netTag in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(!D.density)
spawn(0)
D.close()
src.updateDialog()
return
if( href_list["open_all"] )
for(var/netTag in connected_doors)
for(var/obj/machinery/door/poddoor/D in connected_doors[netTag])
if(D.density)
spawn(0)
D.open()
src.updateDialog()
return
src.updateDialog()
+3
View File
@@ -16,6 +16,9 @@
var/current_heat_capacity = 50
return_air()
return air_contents
New()
..()
+2 -2
View File
@@ -1,7 +1,7 @@
/obj/machinery/door/firedoor
name = "Firelock"
name = "Emergency shutter"
desc = "Apply crowbar"
icon = 'Doorfire.dmi'
icon = 'DoorHazard.dmi'
icon_state = "door_open"
var/blocked = 0
opacity = 0
+13
View File
@@ -4,6 +4,19 @@
icon = 'rapid_pdoor.dmi'
icon_state = "pdoor1"
var/id = ""
var/network = ""
Topic(href, href_list)
..()
if( href_list["open"] )
open()
if( href_list["close"] )
close()
if( href_list["toggle"] )
if(src.density)
open()
else
close()
/obj/machinery/door/poddoor/Bumped(atom/AM)
if(!density)
+1
View File
@@ -2,6 +2,7 @@
name = "Shutters"
icon = 'rapid_pdoor.dmi'
icon_state = "shutter1"
desc = "Steel-reinforced privacy."
/obj/machinery/door/poddoor/shutters/New()
..()
@@ -6,6 +6,8 @@
#define AIRLOCK_STATE_OUTOPEN 2
#define AIRLOCK_STATE_BOTHOPEN 3
//todo: add an internal and external sensor, so that the pressure is actually equalised, rather than just toggled between 1atm and 0atm
datum/computer/file/embedded_program/airlock_controller
var/id_tag
var/exterior_door_tag
+5 -3
View File
@@ -114,7 +114,7 @@ Class Procs:
/obj/machinery/emp_act(severity)
if(use_power && stat == 0)
use_power(7500/severity)
use_power(15000/severity)
var/obj/effect/overlay/pulse2 = new/obj/effect/overlay ( src.loc )
pulse2.icon = 'effects.dmi'
@@ -147,13 +147,15 @@ Class Procs:
if(prob(50))
del(src)
#define POWER_USE_MULTIPLIER 3
/obj/machinery/proc/auto_use_power()
if(!powered(power_channel))
return 0
if(src.use_power == 1)
use_power(idle_power_usage,power_channel)
use_power(idle_power_usage * POWER_USE_MULTIPLIER,power_channel)
else if(src.use_power >= 2)
use_power(active_power_usage,power_channel)
use_power(active_power_usage * POWER_USE_MULTIPLIER,power_channel)
return 1
/obj/machinery/Topic(href, href_list)
+5 -2
View File
@@ -176,8 +176,11 @@ datum/controller/game_controller
air_master.current_cycle++
var/success = air_master.tick() //Changed so that a runtime does not crash the ticker.
if(!success) //Runtimed.
world << "<font color='red'><b>ERROR IN ATMOS TICKER. Killing air simulation!</font></b>"
kill_air = 1
air_master.failed_ticks++
if(air_master.failed_ticks > 5)
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
kill_air = 1
air_master.failed_ticks = 0
air_master_ready = 1
src.set_debug_state("Tension Master")
+1 -1
View File
@@ -965,7 +965,7 @@
set category = "Object"
set name = "Enter Exosuit"
set src in oview(1)
if ((ishuman(usr) && istajaran(usr)) == 0 || usr.stat) //Mechs can take Tajaran pilots now. (Because I have fixed the little bork that happened when fixing my little bork. Bork bork bork :P)
if(usr.stat != 0 || ( !istajaran(usr) && !ishuman(usr) ))
return
src.log_message("[usr] tries to move in.")
if (src.occupant)
+1
View File
@@ -116,6 +116,7 @@ obj/structure/closet/wardrobe/hop/New()
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/magboots(src) //[Redacted] ZAS! >:C
/obj/structure/closet/wardrobe/engineering_yellow/New()
new /obj/item/clothing/under/rank/engineer(src)
+7 -7
View File
@@ -124,7 +124,7 @@ steam.start() -- spawns the effect
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
var/direction
@@ -195,7 +195,7 @@ steam.start() -- spawns the effect
if(src.total_sparks > 20)
return
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
src.total_sparks++
@@ -265,7 +265,7 @@ steam.start() -- spawns the effect
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/obj/effect/effect/harmless_smoke/smoke = new /obj/effect/effect/harmless_smoke(src.location)
src.total_smoke++
@@ -365,7 +365,7 @@ steam.start() -- spawns the effect
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/obj/effect/effect/bad_smoke/smoke = new /obj/effect/effect/bad_smoke(src.location)
src.total_smoke++
@@ -494,7 +494,7 @@ steam.start() -- spawns the effect
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/iterator = pick(0,1,1,1,2,2,2,3)
var/obj/effect/effect/chem_smoke/smoke = new /obj/effect/effect/chem_smoke(src.location)
@@ -602,7 +602,7 @@ steam.start() -- spawns the effect
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/obj/effect/effect/sleep_smoke/smoke = new /obj/effect/effect/sleep_smoke(src.location)
src.total_smoke++
@@ -688,7 +688,7 @@ steam.start() -- spawns the effect
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
if(holder && !istype(holder,/datum))
src.location = get_turf(holder)
var/obj/effect/effect/mustard_gas/smoke = new /obj/effect/effect/mustard_gas(src.location)
src.total_smoke++
@@ -341,15 +341,20 @@ the implant may become unstable and either pre-maturely inject the subject or si
process()
var/mob/M = imp_in
var/area/t = get_area(M)
if(isnull(M)) // If the mob got gibbed
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.autosay("states, \"[mobname] has died-zzzzt in-in-in...\"", "[mobname]'s Death Alarm")
del(a)
processing_objects.Remove(src)
else if(M.stat == 2)
var/area/t = get_area(M)
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
a.autosay("states, \"[mobname] has died in [t.name]!\"", "[mobname]'s Death Alarm")
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
//give the syndies a bit of stealth
a.autosay("states, \"[mobname] has died in Space!\"", "[mobname]'s Death Alarm")
else
a.autosay("states, \"[mobname] has died in [t.name]!\"", "[mobname]'s Death Alarm")
del(a)
processing_objects.Remove(src)
@@ -114,8 +114,7 @@
..()
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob)
if(istype(A,/obj/item))
var/obj/item/weapon/implant/compressed/c = imp
c.scanned = A
if(istype(A,/obj/item) && imp)
imp:scanned = A
A.loc.contents.Remove(A)
update()
@@ -304,8 +304,8 @@ CIRCULAR SAW
var/mob/living/carbon/human/H = M
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
if(isnull(S))
CRASH("External organ S is null in surgery_tools.dm")
if(user.zone_sel.selecting == "mouth" || user.zone_sel.selecting == "eyes")
S = H.organs["head"]
if(((user.zone_sel.selecting == "l_arm") || (user.zone_sel.selecting == "r_arm") || (user.zone_sel.selecting == "l_leg") || (user.zone_sel.selecting == "r_leg")) & (istype(M, /mob/living/carbon/human)))
if(S.status & ORGAN_DESTROYED)
@@ -449,8 +449,6 @@ CIRCULAR SAW
return ..()
M:brain_op_stage = 0
S.open = 1
if(!try_bone_surgery(M, user))
return ..()
else
return ..()
+26
View File
@@ -321,6 +321,32 @@
new /obj/item/weapon/reagent_containers/glass/bottle/ert/boost( src )
return
/obj/item/weapon/storage/PCMBox/New()
..()
contents = list()
sleep(1)
new /obj/item/weapon/module/power_control( src )
new /obj/item/weapon/module/power_control( src )
new /obj/item/weapon/module/power_control( src )
new /obj/item/weapon/module/power_control( src )
new /obj/item/weapon/module/power_control( src )
new /obj/item/weapon/module/power_control( src )
new /obj/item/weapon/module/power_control( src )
return
/obj/item/weapon/storage/AirlockBox/New()
..()
contents = list()
sleep(1)
new /obj/item/weapon/airlock_electronics( src )
new /obj/item/weapon/airlock_electronics( src )
new /obj/item/weapon/airlock_electronics( src )
new /obj/item/weapon/airlock_electronics( src )
new /obj/item/weapon/airlock_electronics( src )
new /obj/item/weapon/airlock_electronics( src )
new /obj/item/weapon/airlock_electronics( src )
return
/obj/item/weapon/storage/box/syndicate/New()
..()
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "screwed" = 1, "guns" = 1, "freedom" = 1, "hacker" = 1, "lordsingulo" = 1)))
+2 -2
View File
@@ -80,7 +80,7 @@ var/specops_shuttle_timeleft = 0
for(var/turf/T in get_area_turfs(end_location) )
var/mob/M = locate(/mob) in T
M << "\red You have arrived at Central Command. Operation has ended!"
M << "\red You have returned to Central Command."
specops_shuttle_at_station = 0
@@ -223,7 +223,7 @@ var/specops_shuttle_timeleft = 0
for(var/turf/T in get_area_turfs(end_location) )
var/mob/M = locate(/mob) in T
M << "\red You have arrived to [station_name]. Commence operation!"
M << "\red You have arrived to [station_name]."
for(var/obj/machinery/computer/specops_shuttle/S in world)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
+16 -7
View File
@@ -99,12 +99,11 @@
if(istype(A,/mob/living))
if(A:lying) continue
src.throw_impact(A)
if(src.throwing == 1)
src.throwing = 0
throwing = 0
if(isobj(A))
if(A.density && !A.CanPass(src,target))
src.throw_impact(A)
src.throwing = 0
throwing = 0
/atom/proc/throw_impact(atom/hit_atom)
if(istype(hit_atom,/mob/living))
@@ -133,10 +132,20 @@
message_admins("ATTACK: [hit_atom] ([M.ckey]) was hit by [src] thrown by ([src.fingerprintslast])")
else if(isobj(hit_atom))
var/obj/O = hit_atom
if(!O.anchored)
step(O, src.dir)
O.hitby(src)
if (istype(hit_atom,/obj/machinery/disposal) && istype(src, /obj/item))
var/obj/item/I = src
if(prob(75))
I.loc = hit_atom
for(var/mob/M in viewers(hit_atom))
M.show_message("\The [I] lands in \the [hit_atom].", 3)
else
for(var/mob/M in viewers(hit_atom))
M.show_message("\The [I] bounces off of \the [hit_atom]'s rim!", 3)
else
var/obj/O = hit_atom
if(!O.anchored)
step(O, src.dir)
O.hitby(src)
else if(isturf(hit_atom))
var/turf/T = hit_atom
+13 -13
View File
@@ -37,20 +37,20 @@
log_ooc("[src.name]/[src.key] : [msg]")
for (var/client/C)
if (src.client.holder && (!src.client.stealth || ( C.holder && C.holder.level != 0)))
if (src.client.holder.rank == "Admin Observer")
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (src.client.holder.rank == "Retired Admin")
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (src.client.holder.rank == "Moderator")
C << "<span class='modooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (src.client.holder.level >= 5)
C << "<font color=[src.client.ooccolor]><b><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
if (C.listen_ooc)
if (src.client.holder && (!src.client.stealth || ( C.holder && C.holder.level != 0)))
if (src.client.holder.rank == "Admin Observer")
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (src.client.holder.rank == "Retired Admin")
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (src.client.holder.rank == "Moderator")
C << "<span class='modooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (src.client.holder.level >= 5)
C << "<font color=[src.client.ooccolor]><b><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
else
C << "<span class='adminooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else
C << "<span class='adminooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
else if (C.listen_ooc)
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.client.stealth ? src.client.fakekey : src.key]:</EM> <span class='message'>[msg]</span></span>"
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.client.stealth ? src.client.fakekey : src.key]:</EM> <span class='message'>[msg]</span></span>"
/*
/mob/verb/goonsay(msg as text)
set name = "Goonsay"
+5 -3
View File
@@ -6,6 +6,7 @@
icon = 'storage.dmi'
icon_state = "evidenceobj"
w_class = 1
var/image/overlay_image
/obj/item/weapon/evidencebag/afterattack(obj/item/O, mob/user as mob)
if(!in_range(O,user))
@@ -47,7 +48,8 @@
user.visible_message("\The [user] puts \a [O] into \a [src]", "You put \the [O] inside \the [src].",\
"You hear a rustle as someone puts something into a plastic bag.")
icon_state = "evidence"
overlays += O
overlay_image = image(O.icon, O.icon_state, layer, O.dir)
overlays += overlay_image
desc = "An evidence bag containing \a [O]. [O.desc]"
O.loc = src
w_class = O.w_class
@@ -59,7 +61,8 @@
var/obj/item/I = contents[1]
user.visible_message("\The [user] takes \a [I] out of \a [src]", "You take \the [I] out of \the [src].",\
"You hear someone rustle around in a plastic bag, and remove something.")
overlays -= I
overlays -= overlay_image
del overlay_image
user.put_in_hands(I)
w_class = 1
icon_state = "evidenceobj"
@@ -67,7 +70,6 @@
else
user << "\The [src] is empty."
icon_state = "evidenceobj"
return
/obj/item/weapon/storage/box/evidence
+1 -1
View File
@@ -101,6 +101,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
msg = sanitize_simple(msg, replacechars)
if(tension_master)
tension_master.new_adminhelp()
send2adminirc("#bs12admin","HELP: \"[src.key]: [msg]\"")
send2adminirc("#bs12admin","HELP: \"[src.key]: [original_msg]\"")
//feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -84,6 +84,13 @@ datum
required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "oxygen" = 1)
result_amount = 3
oxycodone
name = "Oxycodone"
id = "oxycodone"
result = "oxycodone"
required_reagents = list("ethanol" = 1, "tramadol" = 1, "plasma" = 1)
result_amount = 1
//cyanide
// name = "Cyanide"
// id = "cyanide"
-8
View File
@@ -158,14 +158,6 @@
var/stunchance = 10 // chance to tackle things down
//TEMPORARY
New()
..()
spawn(0)
del(src)
//TEMPORARY
Harvest(var/obj/item/weapon/W, var/mob/living/user)
if(..())
var/success = 0
+29
View File
@@ -112,6 +112,14 @@
icon_on = "blackzippoon"
icon_off = "blackzippo"
/obj/item/weapon/lighter/zippo/fluff/sniperyeti_1 //sniperyeti: Patrick Harris/Susan Harris
name = "red black zippo"
desc = "A shiny red zippo lighter that looks like it's in perfect condition."
icon = 'custom_items.dmi'
icon_state = "redzippo"
icon_on = "redzippoon"
icon_off = "redzippo"
/obj/item/weapon/fluff/cado_keppel_1 //sparklysheep: Cado Keppel
name = "purple comb"
desc = "A pristine purple comb made from flexible plastic. It has a small K etched into its side."
@@ -237,6 +245,12 @@
icon = 'custom_items.dmi'
icon_state = "yuki_matsuda_1"
/obj/item/clothing/head/helmet/welding/fluff/norah_briggs_1 //bountylord13: Norah Briggs
name = "blue flame decal welding helmet"
desc = "A welding helmet with blue flame decals on it."
icon = 'custom_items.dmi'
icon_state = "norah_briggs_1"
/obj/item/clothing/head/helmet/greenbandana/fluff/taryn_kifer_1 //themij: Taryn Kifer
name = "orange bandana"
desc = "Hey, I think we're missing a hazard vest..."
@@ -280,6 +294,13 @@
icon = 'custom_items.dmi'
icon_state = "labcoat_burnt_open"
/obj/item/clothing/suit/armor/vest/fluff/deus_blueshield //deusdactyl
name = "blue shield security armor"
desc = "An armored vest with the badge of a Blue Shield Security lieutenant."
icon = 'custom_items.dmi'
icon_state = "deus_blueshield"
item_state = "deus_blueshield"
//////////// Uniforms ////////////
/obj/item/clothing/under/fluff/jumpsuitdown //searif: Yuki Matsuda
@@ -305,6 +326,14 @@
icon_state = "jeremy_wolf_1"
color = "jeremy_wolf_1"
/obj/item/clothing/under/fluff/tian_dress //phaux: Tian Yinhu
name = "purple dress"
desc = "A nicely tailored purple dress made for the taller woman."
icon = 'custom_items.dmi'
icon_state = "tian_dress"
item_state = "tian_dress"
color = "tian_dress"
//////////// Masks ////////////
/obj/item/clothing/mask/fluff/flagmask //searif: Tsiokeriio Tarbell
@@ -294,7 +294,7 @@
if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
else if(temp.wound_descs.len)
else if(temp.wound_descs && temp.wound_descs.len)
var/list/wound_descriptors = list()
for(var/time in temp.wound_descs)
for(var/wound in temp.wound_descs[time])
@@ -969,7 +969,7 @@
// Gloves
var/datum/organ/external/lo = organs["l_hand"]
var/datum/organ/external/ro = organs["r_hand"]
if (!(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED))
if (lo && ro && !(lo.status & ORGAN_DESTROYED && ro.status & ORGAN_DESTROYED))
if (gloves)
var/t1 = gloves.item_state
if (!t1)
@@ -1419,7 +1419,7 @@
lying_icon.Blend(new /icon('human.dmi', "chest_[g]_l"), ICON_OVERLAY)
var/datum/organ/external/head = organs["head"]
if(!(head.status & ORGAN_DESTROYED))
if(head && !(head.status & ORGAN_DESTROYED))
stand_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('human.dmi', "head_[g]_l"), ICON_OVERLAY)
+10 -4
View File
@@ -357,7 +357,7 @@
emote("gasp")
updatehealth()
if(damage)
if(damage && organs.len)
var/V = pick(organs)
var/datum/organ/external/O = organs[V]
if(istype(O)) O.add_wound("Radiation Poisoning", damage)
@@ -562,6 +562,8 @@
var/ratio = breath.toxins/safe_toxins_max
adjustToxLoss(min(ratio, 10)) //Limit amount of damage toxin exposure can do per second
toxins_alert = max(toxins_alert, 1)
if(vsc.plc.PLASMA_HALLUCINATION && prob(20))
hallucination += 20
else
toxins_alert = 0
@@ -575,12 +577,15 @@
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20) && isbreathing)
spawn(0) emote(pick("giggle", "laugh"))
if(vsc.plc.N2O_HALLUCINATION && prob(10) && isbreathing)
hallucination += 30
SA.moles = 0 //Hack to stop the damned surgeon from giggling.
if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(prob(20))
src << "\red You feel a searing heat in your lungs!"
take_overall_damage(0,2) //burn them a bit.
fire_alert = max(fire_alert, 1)
else
fire_alert = 0
@@ -599,8 +604,6 @@
if(istype(loc, /turf/space))
environment_heat_capacity = loc:heat_capacity
loc_temp = 2.7
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
loc_temp = loc:air_contents.temperature
else
loc_temp = environment.temperature
@@ -688,7 +691,7 @@
var/pressure = environment.return_pressure()
if(!istype(wear_suit, /obj/item/clothing/suit/space) && !istype(wear_suit, /obj/item/clothing/suit/fire))
if(!istype(wear_suit, /obj/item/clothing/suit/space) && !istype(wear_suit, /obj/item/clothing/suit/fire) && !istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
/*if(pressure < 20)
if(prob(25))
src << "You feel the splittle on your lips and the fluid on your eyes boiling away, the capillteries in your skin breaking."
@@ -816,6 +819,9 @@
handle_chemicals_in_body()
if(reagents && stat != 2) reagents.metabolize(src)
if(vessel && stat != 2) vessel.metabolize(src)
for(var/obj/item/I in src)
if(I.contaminated)
toxloss += vsc.plc.CONTAMINATION_LOSS
if(mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
@@ -700,11 +700,17 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
health = 150
stat = 0
/mob/living/carbon/metroid/proc/get_obstacle_ok(atom/A)
var/direct = get_dir(src, A)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( src.loc )
var/obj/item/weapon/dummy/D = locate() in DummyCache //See atom_procs.dm
if(!D)
D = new /obj/item/weapon/dummy( src.loc )
else
D.loc = src.loc
DummyCache.Remove(D)
var/ok = 0
if ( (direct - 1) & direct)
var/turf/Step_1
var/turf/Step_2
@@ -725,56 +731,64 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
Step_1 = get_step(src, SOUTH)
Step_2 = get_step(src, WEST)
else
if(Step_1 && Step_2)
var/check_1 = 0
var/check_2 = 0
if(step_to(D, Step_1))
check_1 = 1
for(var/obj/border_obstacle in Step_1)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
check_1 = 0
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_1 = 0
break
if(check_1 != 0)
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_1 = 0
break
D.loc = src.loc
if(step_to(D, Step_2))
if(check_1 != 1 && step_to(D, Step_2))
check_2 = 1
for(var/obj/border_obstacle in Step_2)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
check_2 = 0
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_2 = 0
break
if(check_2 != 0)
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (src != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
check_2 = 0
break
if(check_1 || check_2)
ok = 1
else
if(loc == src.loc)
ok = 1
else
ok = 1
ok = 1
//Now, check objects to block exit that are on the border
for(var/obj/border_obstacle in src.loc)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
ok = 0
//Now, check objects to block exit that are on the border
for(var/obj/border_obstacle in src.loc)
if(border_obstacle.flags & ON_BORDER)
if(!border_obstacle.CheckExit(D, A))
ok = 0
break
if(ok != 0)
//Next, check objects to block entry that are on the border
for(var/obj/border_obstacle in get_turf(A))
if((border_obstacle.flags & ON_BORDER) && (A != border_obstacle))
if(!border_obstacle.CanPass(D, D.loc, 1, 0))
ok = 0
del(D)
D.loc = null
DummyCache.Add(D)
if (!( ok ))
return 0
return 1
+4 -4
View File
@@ -194,12 +194,12 @@ mob/living/parasite/meme/proc/select_indoctrinated(var/title, var/message)
// A meme can make people hear things with the thought ability
mob/living/parasite/meme/verb/Thought()
set category = "Meme"
set name = "Thought(150)"
set name = "Thought(50)"
set desc = "Implants a thought into the target, making them think they heard someone talk."
if(meme_points < 150)
if(meme_points < 50)
// just call use_points() to give the standard failure message
use_points(150)
use_points(50)
return
var/list/candidates = indoctrinated.Copy()
@@ -217,7 +217,7 @@ mob/living/parasite/meme/verb/Thought()
if(!message) return
// Use the points at the end rather than the beginning, because the user might cancel
if(!use_points(150)) return
if(!use_points(50)) return
message = say_quote(message)
var/rendered = "<span class='game say'><span class='name'>[speaker]</span> <span class='message'>[message]</span></span>"
@@ -253,7 +253,7 @@
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
if(ticker.mode.name == "AI malfunction")
if(ticker.mode && ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if(connected_ai)
@@ -146,7 +146,8 @@
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/trashbag(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
src.modules += new/obj/item/weapon/mop(src)
src.modules += new /obj/item/weapon/mop(src)
src.modules += new /obj/item/device/portalathe(src)
src.emag = new /obj/item/weapon/cleaner(src)
var/datum/reagents/R = new/datum/reagents(1000)
+23 -69
View File
@@ -1,122 +1,76 @@
// fun if you want to typecast humans/monkeys/etc without writing long path-filled lines.
/proc/ishuman(A)
if(istype(A, /mob/living/carbon/human))
return 1
return 0
return istype(A, /mob/living/carbon/human)
/proc/isamorph(A)
return istype(A, /mob/living/carbon/amorph)
/proc/ismonkey(A)
if(A && istype(A, /mob/living/carbon/monkey))
return 1
return 0
return istype(A, /mob/living/carbon/monkey)
/proc/isbrain(A)
if(A && istype(A, /mob/living/carbon/brain))
return 1
return 0
return istype(A, /mob/living/carbon/brain)
/proc/isalien(A)
if(istype(A, /mob/living/carbon/alien))
return 1
return 0
return istype(A, /mob/living/carbon/alien)
/proc/isalienadult(A)
if(istype(A, /mob/living/carbon/alien/humanoid))
return 1
return 0
return istype(A, /mob/living/carbon/alien/humanoid)
/proc/islarva(A)
if(istype(A, /mob/living/carbon/alien/larva))
return 1
return 0
return istype(A, /mob/living/carbon/alien/larva)
/proc/ismetroid(A)
if(istype(A, /mob/living/carbon/metroid))
return 1
return 0
return istype(A, /mob/living/carbon/metroid)
/proc/isrobot(A)
if(istype(A, /mob/living/silicon/robot))
return 1
return 0
return istype(A, /mob/living/silicon/robot)
/proc/isanimal(A)
if(istype(A, /mob/living/simple_animal))
return 1
return 0
return istype(A, /mob/living/simple_animal)
/proc/iscorgi(A)
if(istype(A, /mob/living/simple_animal/corgi))
return 1
return 0
return istype(A, /mob/living/simple_animal/corgi)
/proc/iscrab(A)
if(istype(A, /mob/living/simple_animal/crab))
return 1
return 0
return istype(A, /mob/living/simple_animal/crab)
/proc/iscat(A)
if(istype(A, /mob/living/simple_animal/cat/))
return 1
return 0
return istype(A, /mob/living/simple_animal/cat/)
/proc/istajaran(A)
if(istype(A, /mob/living/carbon/human/tajaran))
return 1
return 0
return istype(A, /mob/living/carbon/human/tajaran)
/*proc/ishivebot(A)
if(A && istype(A, /mob/living/silicon/hivebot))
return 1
return 0*/
return istype(A, /mob/living/silicon/hivebot)*/
/*proc/ishivemainframe(A)
if(A && istype(A, /mob/living/silicon/hive_mainframe))
return 1
return 0*/
return istype(A, /mob/living/silicon/hive_mainframe)*/
/proc/isAI(A)
if(istype(A, /mob/living/silicon/ai))
return 1
return 0
return istype(A, /mob/living/silicon/ai)
/proc/ispAI(A)
if(istype(A, /mob/living/silicon/pai))
return 1
return 0
return istype(A, /mob/living/silicon/pai)
/proc/iscarbon(A)
if(istype(A, /mob/living/carbon))
return 1
return 0
return istype(A, /mob/living/carbon)
/proc/issilicon(A)
if(istype(A, /mob/living/silicon))
return 1
return 0
return istype(A, /mob/living/silicon)
/proc/isliving(A)
if(istype(A, /mob/living))
return 1
return 0
return istype(A, /mob/living)
proc/isobserver(A)
if(istype(A, /mob/dead/observer))
return 1
return 0
return istype(A, /mob/dead/observer)
proc/isorgan(A)
if(istype(A, /datum/organ/external))
return 1
return 0
return istype(A, /datum/organ/external)
proc/hasorgans(A)
if(ishuman(A) || ismonkey(A))
return 1
return 0
return (ishuman(A) || ismonkey(A))
+2 -2
View File
@@ -84,11 +84,11 @@
min_broken_damage = 15
body_part = HAND_LEFT
/datum/organ/Del()
/*/datum/organ/Del()
CRASH("Some dawg tried to delete this sexy datum. Here's the data.")
/obj/item/weapon/organ/Del()
CRASH("Some dawg tried to delete this sexy organ. Here's the data.")
CRASH("Some dawg tried to delete this sexy organ. Here's the data.")*/
obj/item/weapon/organ
+14 -34
View File
@@ -51,7 +51,7 @@
var/speed = 0 //LETS SEE IF I CAN SET SPEEDS FOR SIMPLE MOBS WITHOUT DESTROYING EVERYTHING. Higher speed is slower, negative speed is faster
var/obj/item/device/radio/headset/ears = null
var/obj/item/device/radio/headset/l_ear = null
/mob/living/simple_animal/New()
..()
verbs -= /mob/verb/observe
@@ -126,38 +126,15 @@
//Speaking
if(speak_chance)
if(prob(speak_chance))
if(speak && speak.len)
if((emote_hear && emote_hear.len) || (emote_see && emote_see.len))
var/length = speak.len
if(emote_hear && emote_hear.len)
length += emote_hear.len
if(emote_see && emote_see.len)
length += emote_see.len
var/randomValue = rand(1,length)
if(randomValue <= speak.len)
say(pick(speak))
else
randomValue -= speak.len
if(emote_see && randomValue <= emote_see.len)
emote(pick(emote_see),1)
else
emote(pick(emote_hear),2)
else
say(pick(speak))
else
if(!(emote_hear && emote_hear.len) && (emote_see && emote_see.len))
emote(pick(emote_see),1)
if((emote_hear && emote_hear.len) && !(emote_see && emote_see.len))
emote(pick(emote_hear),2)
if((emote_hear && emote_hear.len) && (emote_see && emote_see.len))
var/length = emote_hear.len + emote_see.len
var/pick = rand(1,length)
if(pick <= emote_see.len)
emote(pick(emote_see),1)
else
emote(pick(emote_hear),2)
if(prob(speak_chance))
var/length = speak.len + emote_hear.len + emote_see.len
if(speak.len && prob((speak.len / length) * 100))
say(pick(speak))
else if(emote_see.len && prob((emote_see.len / length) * 100))
emote("auto",1,pick(emote_see))
else if(emote_hear.len)
emote("auto",2,pick(emote_hear))
//var/act,var/m_type=1,var/message = null
//Atmos
@@ -278,8 +255,11 @@
m_type = 2
else
message = "<B>[src]</B> [message]"
if("auto")
message = "<B>[src]</B> [message]"
else
src << text("Invalid Emote: []", act)
if(!message)
src << text("Invalid Emote: []", act)
if ((message && src.stat == 0))
if (m_type & 1)
for(var/mob/O in viewers(src, null))
@@ -0,0 +1,31 @@
//kobold
/mob/living/simple_animal/kobold
name = "kobold"
desc = "A small, rat-like creature."
icon = 'mob.dmi'
icon_state = "kobold_idle"
icon_living = "kobold_idle"
icon_dead = "kobold_dead"
speak = list("You no take candle!","Ooh, pretty shiny.","Me take?","Where gold here...","Me likey.")
speak_emote = list("mutters","hisses","grumbles")
emote_hear = list("mutters under it's breath.","grumbles.", "yips!")
emote_see = list("looks around suspiciously.", "scratches it's arm.","putters around a bit.")
speak_chance = 15
turns_per_move = 5
see_in_dark = 6
meat_type = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meat
response_help = "pets the"
response_disarm = "gently pushes aside the"
response_harm = "kicks the"
/mob/living/simple_animal/kobold/Life()
..()
if(prob(15) && turns_since_move)
flick("kobold_act",src)
/mob/living/simple_animal/kobold/Move(var/dir)
..()
flick("kobold_walk",src)
/mob/living/simple_animal/kobold/munchkin
name = "Munchkin"
+15 -15
View File
@@ -2,26 +2,26 @@
name = "\improper Parrot"
desc = "It's a parrot! No dirty words!"
icon = 'mob.dmi'
icon_state = "cat"
icon_living = "cat"
icon_dead = "cat_dead"
icon_state = "parrot"
icon_living = "parrot"
icon_dead = "parrot_dead"
speak = list("Hi","Hello!","Cracker?","BAWWWWK george mellons griffing me")
speak_emote = list("squawks","says","yells")
emote_hear = list("squawks","bawks")
emote_see = list("flutters its wings", "glares at you")
speak_chance = 1
emote_hear = list("squawks.","bawks.")
emote_see = list("flutters its wings.", "glares at you.")
speak_chance = 5
turns_per_move = 5
meat_type = /obj/item/weapon/reagent_containers/food/snacks/cracker/
response_help = "pets the"
response_disarm = "gently moves aside the"
response_harm = "swats the"
ears = new /obj/item/device/radio/headset/heads/ce()
l_ear = new /obj/item/device/radio/headset/headset_eng()
/mob/living/simple_animal/parrot/DrProfessor
name = "Doctor Professor Parrot, PhD"
desc = "That's the Doctor Professor. He has more degrees than all of the engineering team put together, and has several published papers on quantum cracker theory."
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE")
speak = list(":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN RIG SUIT?",":e OH GOD ITS FREE CALL THE SHUTTLE",":e Open secure storage please.",":e I think something happened to the containment field...")
response_harm = "is attacked in the face by"
/obj/item/weapon/reagent_containers/food/snacks/cracker/
@@ -33,8 +33,8 @@
if(user.stat) return
var/dat = "<div align='center'><b>Inventory of [name]</b></div><p>"
if(ears)
dat += "<br><b>Headset:</b> [ears] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
if(l_ear)
dat += "<br><b>Headset:</b> [l_ear] (<a href='?src=\ref[src];remove_inv=ears'>Remove</a>)"
else
dat += "<br><b>Headset:</b> <a href='?src=\ref[src];add_inv=ears'>Nothing</a>"
@@ -54,10 +54,10 @@
var/remove_from = href_list["remove_inv"]
switch(remove_from)
if("ears")
if(ears)
if(l_ear)
src.say(":e BAWWWWWK LEAVE THE HEADSET BAWKKKKK!")
ears.loc = src.loc
ears = null
l_ear.loc = src.loc
l_ear = null
else
usr << "\red There is nothing to remove from its [remove_from]."
return
@@ -72,7 +72,7 @@
return
switch(add_to)
if("ears")
if(ears)
if(l_ear)
usr << "\red It's already wearing something."
return
else
@@ -86,6 +86,6 @@
usr.drop_item()
item_to_add.loc = src
src.ears = item_to_add
src.l_ear = item_to_add
else
..()
+3 -2
View File
@@ -1061,8 +1061,8 @@
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
area.poweralert(0, src)
else if(cell.percent() < 30) // <30%, turn off lighting & equipment
equipment = autoset(equipment, 2)
else if(cell.percent() < 30) // <30%, turn off lighting and only lighting
//equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
environ = autoset(environ, 1)
area.poweralert(0, src)
@@ -1135,6 +1135,7 @@
// val 0=off, 1=off(auto) 2=on 3=on(auto)
// on 0=off, 1=on, 2=autooff
// this function needs more freaking documentation
/proc/autoset(var/val, var/on)
if(on==0)
+18 -5
View File
@@ -1,8 +1,6 @@
// thermo electric generator powered by twinned gas turbines
// more realistic than type 2, and also cooler
#define ENERGY_TRANSFER_FACTOR 10
#define POWER_PRODUCTION_FACTOR 1.25
/*/obj/machinery/power/generator/verb/set_amount(var/g as num)
set src in view(1)
@@ -31,7 +29,8 @@
if(lastgenlev != 0)
overlays += image('power.dmi', "teg-op[lastgenlev]")
#define GENRATE 800 // generator output coefficient from Q
#define GENRATE 0.1 // generator output coefficient from Q
#define MAX_SAFE_OUTPUT 1000000
/obj/machinery/power/generator/process()
@@ -62,7 +61,7 @@
var/energy_transfer = delta_temperature*hot_air_heat_capacity*cold_air_heat_capacity/(hot_air_heat_capacity+cold_air_heat_capacity)
var/heat = energy_transfer*(1-efficiency)
lastgen = POWER_PRODUCTION_FACTOR * energy_transfer*efficiency
lastgen = energy_transfer * efficiency * GENRATE
//ENERGY_TRANSFER_FACTOR to beef up the amount of heat passed over
hot_air.temperature -= energy_transfer/hot_air_heat_capacity
@@ -71,7 +70,18 @@
//world << "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]"
//if producing more than 1 million watts, emit sparks and waste a little power
var/runoff = 0
if(lastgen > MAX_SAFE_OUTPUT)
runoff = lastgen - MAX_SAFE_OUTPUT
if( prob(max( 100, (100 * runoff / MAX_SAFE_OUTPUT) )) )
lastgen -= rand(1, 10) * (runoff / 100)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
//
add_avail(lastgen)
// update icon overlays only if displayed level has changed
if(air1)
@@ -80,7 +90,7 @@
if(air2)
circ2.air2.merge(air2)
var/genlev = max(0, min( round(11*lastgen / 250000), 11))
var/genlev = max(0, min( round(11*lastgen / MAX_SAFE_OUTPUT), 11))
if(genlev != lastgenlev)
lastgenlev = genlev
updateicon()
@@ -98,6 +108,9 @@
if(stat & (BROKEN|NOPOWER)) return
if(lastgenlev > MAX_SAFE_OUTPUT)
electrocute_mob(user, get_area(src), src, 0.7)
interact(user)
/obj/machinery/power/generator/proc/interact(mob/user)
@@ -39,16 +39,16 @@
if (A)
if(ismob(A))
toxmob(A)
if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/machinery/singularity/)))
else if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/machinery/singularity/)))
A:energy += energy
// energy = 0 //This breaks the current singularity
if( istype(A,/obj/machinery/rust/particle_catcher) )
else if( istype(A,/obj/machinery/rust/particle_catcher) )
var/obj/machinery/rust/particle_catcher/collided_catcher = A
if(particle_type && particle_type != "neutron")
if(collided_catcher.AddParticles(particle_type, 1 + additional_particles))
collided_catcher.parent.AddEnergy(energy,mega_energy)
del (src)
if( istype(A,/obj/machinery/rust/core) )
else if( istype(A,/obj/machinery/rust/core) )
var/obj/machinery/rust/core/collided_core = A
if(particle_type && particle_type != "neutron")
if(collided_core.AddParticles(particle_type, 1 + additional_particles))
@@ -73,6 +73,7 @@
proc
toxmob(var/mob/living/M)
var/radiation = (energy*2)
M.adjustToxLoss(radiation)
/* if(istype(M,/mob/living/carbon/human))
if(M:wear_suit) //TODO: check for radiation protection
radiation = round(radiation/2,1)
@@ -80,10 +81,10 @@
if(M:wear_suit) //TODO: check for radiation protection
radiation = round(radiation/2,1)*/
if(ionizing)
M.apply_effects((radiation*3),IRRADIATE,0)
M.apply_effect((radiation*3),IRRADIATE,0)
M.updatehealth()
else
M.apply_effects((radiation*2),IRRADIATE,0)
M.apply_effect((radiation*2),IRRADIATE,0)
M.updatehealth()
//M << "\red You feel odd."
return
+2 -2
View File
@@ -10,11 +10,11 @@
icon_state = "smes"
density = 1
anchored = 1
var/output = 50000
var/output = 120000
var/lastout = 0
var/loaddemand = 0
var/capacity = 10e6
var/charge = 3e6
var/charge = 10e6
var/charging = 0
var/chargemode = 0
var/chargecount = 0
+4 -3
View File
@@ -54,7 +54,7 @@
return
rpm = 0.9* rpm + 0.1 * rpmtarget
var/datum/gas_mixture/environment = inturf.return_air()
var/transfer_moles = environment.total_moles/10
var/transfer_moles = environment.total_moles/50
//var/transfer_moles = rpm/10000*capacity
var/datum/gas_mixture/removed = inturf.remove_air(transfer_moles)
gas_contained.merge(removed)
@@ -274,8 +274,9 @@
return
user.machine = src
var/dat = "<TT><B>Gas turbine remote control system</B>"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A> <A href='?src=\ref[src];close=1'>Close</A><BR>"
var/dat = "<TT><B>Gas turbine remote control system</B>BR"
dat += "<A href='?src=\ref[src];refresh=1'>Refresh</A><br>"
dat += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
dat += "<HR>"
if(src.doors.len)
+56 -29
View File
@@ -1,3 +1,13 @@
var/list/beam_master = list()
//Use: Caches beam state images and holds turfs that had these images overlaid.
//Structure:
//beam_master
// icon_states/dirs of beams
// image for that beam
// references for fired beams
// icon_states/dirs for each placed beam image
// turfs that have that icon_state/dir
/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
@@ -7,46 +17,63 @@
flag = "laser"
eyeblur = 4
var/frequency = 1
var/ID = 0
var/main = 0
fired()
main = 1
ID = rand(0,1000)
var/first = 1
var/obj/effect/effect/laserdealer/lasor = new /obj/effect/effect/laserdealer(null)
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
var/first = 1 //So we don't make the overlay in the same tile as the firer
spawn(0)
lasor.setup(ID)
spawn(0)
while(!bumped)
step_towards(src, current)
while(!bumped) //Move until we hit something
step_towards(src, current) //Move~
for(var/mob/living/M in loc)
Bump(M)
if((!( current ) || loc == current))
Bump(M) //Bump anyone we touch
if((!( current ) || loc == current)) //If we pass our target
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src)
del(src) //Delete if it passes the world edge
return
if(!first)
var/obj/item/projectile/beam/new_beam = new src.type(loc)
processing_objects.Remove(new_beam)
new_beam.dir = get_dir(src, current)
new_beam.ID = ID
new_beam.icon_state = icon_state
if(!first) //Add the overlay as we pass over tiles
var/target_dir = get_dir(src, current) //So we don't call this too much
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
turf_master["[icon_state][target_dir]"] = list(loc)
else
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
else
first = 0
cleanup(reference)
return
/obj/effect/effect/laserdealer
name = "laserdealio"
proc/setup(var/ID = 0)
sleep(5)
for(var/obj/item/projectile/beam/beam in world)
if(ID == beam.ID)
del(beam)
spawn(0)
del(src)
proc/cleanup(reference) //Waits .3 seconds then removes the overlay.
src = null
sleep(3)
var/list/turf_master = beam_master[reference]
for(var/laser_state in turf_master)
var/list/turfs = turf_master[laser_state]
for(var/turf/T in turfs)
T.overlays -= beam_master[laser_state]
return
/obj/item/projectile/practice
name = "laser"
-16
View File
@@ -502,22 +502,6 @@
H.vent_gas(loc)
del(H)
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if (istype(mover,/obj/item) && mover.throwing)
var/obj/item/I = mover
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
return
if(prob(75))
I.loc = src
for(var/mob/M in viewers(src))
M.show_message("\the [I] lands in \the [src].", 3)
else
for(var/mob/M in viewers(src))
M.show_message("\the [I] bounces off of \the [src]'s rim!", 3)
return 0
else
return ..()
// virtual disposal object
// travels through pipes in lieu of actual items
// contents will be items flushed by the disposal
+2 -2
View File
@@ -68,8 +68,8 @@ proc/move_research_shuttle()
/obj/machinery/computer/research_shuttle/attack_hand(user as mob)
src.add_fingerprint(usr)
var/dat
dat = text("<center>research shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
var/dat = "<center>Research shuttle: <b><A href='?src=\ref[src];move=1'>Send</A></b></center><br>"
user << browse("[dat]", "window=researchshuttle;size=200x100")
/obj/machinery/computer/research_shuttle/Topic(href, href_list)
@@ -93,7 +93,7 @@
if (get_dist(user, src) > 1)
user << "\red You can't reach [src] from here."
return
if(istype(user:gloves,/obj/item/clothing/gloves))
if(ishuman(user) && istype(user:gloves,/obj/item/clothing/gloves))
return ..()
for(var/mob/O in viewers(src, null))
O.show_message(text("<b>[]</b> touches [].", user, src), 1)
+1 -1
View File
@@ -167,7 +167,7 @@ var/MAX_EXPLOSION_RANGE = 14
#define BLOCKHAIR 32768 // temporarily removes the user's hair icon
#define PLASMAGUARD 65536 //Does not get contaminated by plasma.
#define PLASMAGUARD 8192 //Does not get contaminated by plasma.
//flags for pass_flags
#define PASSTABLE 1
+1
View File
@@ -16,6 +16,7 @@ quilan - Tajaran
searif - Soghun
searif - Tajaran
searif - Skrell
teddybehr - Soghun
spaceman96 - Tajaran
spaceman96 - Soghun
spaceman96 - Skrell
+6 -1
View File
@@ -39,4 +39,9 @@ vinceluk: Seth Sealis: /obj/item/clothing/suit/storage/det_suit/fluff/graycoat
whitellama: Ethan Way: /obj/item/fluff/ethan_way_1
whitewolf41: Jeremy Wolf: /obj/item/clothing/under/rank/security/fluff/jeremy_wolf_1
jamini: Edwin Atweeke: /obj/item/clothing/suit/storage/labcoat/fluff/burnt
cubejackal: Barry Sharke: /obj/item/clothing/mask/fluff/electriccig
cubejackal: Barry Sharke: /obj/item/clothing/mask/fluff/electriccig
sniperyeti: Patrick Harris: /obj/item/weapon/lighter/zippo/fluff/sniperyeti_1
sniperyeti: Susan Harris: /obj/item/weapon/lighter/zippo/fluff/sniperyeti_1
bountylord13: Norah Briggs: /obj/item/clothing/head/helmet/welding/fluff/norah_briggs_1
deusdactyl: James Girard: /obj/item/clothing/suit/armor/vest/fluff/deus_blueshield
phaux: Tian Yinhu: /obj/item/clothing/under/fluff/tian_dress
Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

After

Width:  |  Height:  |  Size: 132 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

+3892 -3932
View File
File diff suppressed because it is too large Load Diff
+7701 -7509
View File
File diff suppressed because it is too large Load Diff