Merge branch 'master' of github.com:Miniature/Baystation12

This commit is contained in:
Miniature
2012-05-06 22:15:29 +09:30
303 changed files with 26067 additions and 14750 deletions
+5 -2
View File
@@ -6,5 +6,8 @@ Install Guide: http://baystation12.net/wiki/index.php/Install
Code: https://github.com/Baystation12/Baystation12
IRC: irc://irc.sorcery.net/bs12
Based on the code of tgstation13, itself based on the code of goonstation13.
tgstation13 - http://code.google.com/p/tgstation13
Based on the code of /tg/ station 13, itself based on the code of Goon Station 13.
/tg/ station 13: http://code.google.com/p/tgstation13
Code Licensed Under GPLv3: http://www.gnu.org/licenses/gpl.html
Content Licensed Under Creative Commons CC BY-SA 3.0: http://creativecommons.org/licenses/by-sa/3.0/
+24 -1
View File
@@ -81,10 +81,14 @@
#define FILE_DIR "code/game/objects/storage"
#define FILE_DIR "code/game/objects/tanks"
#define FILE_DIR "code/game/player"
#define FILE_DIR "code/game/vehicles"
#define FILE_DIR "code/game/vehicles/airtight"
#define FILE_DIR "code/game/verbs"
#define FILE_DIR "code/js"
#define FILE_DIR "code/modules"
#define FILE_DIR "code/modules/admin"
#define FILE_DIR "code/modules/admin/new"
#define FILE_DIR "code/modules/admin/new/verbs"
#define FILE_DIR "code/modules/admin/verbs"
#define FILE_DIR "code/modules/assembly"
#define FILE_DIR "code/modules/chemical"
@@ -159,6 +163,7 @@
#define FILE_DIR "code/WorkInProgress/Apples"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Tajara"
#define FILE_DIR "code/WorkInProgress/Chinsky"
#define FILE_DIR "code/WorkInProgress/mapload"
@@ -377,6 +382,7 @@
#include "code\game\sound.dm"
#include "code\game\specops_shuttle.dm"
#include "code\game\status.dm"
#include "code\game\step_triggers.dm"
#include "code\game\supplyshuttle.dm"
#include "code\game\syndicate_shuttle.dm"
#include "code\game\syndicate_specops_shuttle.dm"
@@ -386,6 +392,7 @@
#include "code\game\vote.dm"
#include "code\game\area\ai_monitored.dm"
#include "code\game\area\areas.dm"
#include "code\game\asteroid\artifacts.dm"
#include "code\game\events\Event.dm"
#include "code\game\events\EventsMain.dm"
#include "code\game\events\EventProcs\black_hole.dm"
@@ -479,6 +486,7 @@
#include "code\game\machinery\dispenser.dm"
#include "code\game\machinery\door_control.dm"
#include "code\game\machinery\flasher.dm"
#include "code\game\machinery\floodlight.dm"
#include "code\game\machinery\Freezer.dm"
#include "code\game\machinery\hologram.dm"
#include "code\game\machinery\hydroponics.dm"
@@ -527,17 +535,21 @@
#include "code\game\machinery\computer\aifixer.dm"
#include "code\game\machinery\computer\arcade.dm"
#include "code\game\machinery\computer\atmos.dm"
#include "code\game\machinery\computer\atmos_alert.dm"
#include "code\game\machinery\computer\buildandrepair.dm"
#include "code\game\machinery\computer\camera_monitor.dm"
#include "code\game\machinery\computer\cloning.dm"
#include "code\game\machinery\computer\communications.dm"
#include "code\game\machinery\computer\computer.dm"
#include "code\game\machinery\computer\crew.dm"
#include "code\game\machinery\computer\HolodeckControl.dm"
#include "code\game\machinery\computer\hologram.dm"
#include "code\game\machinery\computer\id.dm"
#include "code\game\machinery\computer\law.dm"
#include "code\game\machinery\computer\lockdown.dm"
#include "code\game\machinery\computer\medical.dm"
#include "code\game\machinery\computer\Operating.dm"
#include "code\game\machinery\computer\pod.dm"
#include "code\game\machinery\computer\power.dm"
#include "code\game\machinery\computer\prisoner.dm"
#include "code\game\machinery\computer\robot.dm"
@@ -602,6 +614,7 @@
#include "code\game\objects\bombspawner.dm"
#include "code\game\objects\cleaner.dm"
#include "code\game\objects\closets.dm"
#include "code\game\objects\contraband.dm"
#include "code\game\objects\displaycase.dm"
#include "code\game\objects\door_assembly.dm"
#include "code\game\objects\effect_system.dm"
@@ -754,6 +767,10 @@
#include "code\game\objects\tanks\jetpack.dm"
#include "code\game\objects\tanks\oxygen.dm"
#include "code\game\player\news.dm"
#include "code\game\vehicles\vehicle.dm"
#include "code\game\vehicles\airtight\airtight.dm"
#include "code\game\vehicles\airtight\land.dm"
#include "code\game\vehicles\airtight\space.dm"
#include "code\game\verbs\AI_status.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\sound.dm"
@@ -991,6 +1008,7 @@
#include "code\modules\mob\living\silicon\robot\robot_defense.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "code\modules\mob\living\silicon\robot\robot_upgrades.dm"
#include "code\modules\mob\living\silicon\robot\say.dm"
#include "code\modules\mob\living\silicon\robot\wires.dm"
#include "code\modules\mob\new_player\hud.dm"
@@ -1009,7 +1027,9 @@
#include "code\modules\mob\simple_animal\corgi.dm"
#include "code\modules\mob\simple_animal\crab.dm"
#include "code\modules\mob\simple_animal\life.dm"
#include "code\modules\mob\simple_animal\parrot.dm"
#include "code\modules\mob\simple_animal\shade.dm"
#include "code\modules\mob\simple_animal\worm.dm"
#include "code\modules\power\apc.dm"
#include "code\modules\power\cable.dm"
#include "code\modules\power\cell.dm"
@@ -1103,8 +1123,8 @@
#include "code\WorkInProgress\AI_Visibility.dm"
#include "code\WorkInProgress\buildmode.dm"
#include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_field.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_gen.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\core_monitor.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\fuel_assembly_port.dm"
@@ -1115,6 +1135,9 @@
#include "code\WorkInProgress\Cael_Aislinn\Rust\gyrotron_controller.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\radiation.dm"
#include "code\WorkInProgress\Cael_Aislinn\Rust\virtual_particle_catcher.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\say.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajara_transformation.dm"
#include "code\WorkInProgress\Cael_Aislinn\Tajara\tajaran.dm"
-1
View File
@@ -25,7 +25,6 @@ obj/machinery/atmospherics
process()
build_network()
..()
proc
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
@@ -21,11 +21,18 @@ obj/machinery/atmospherics/binary/pump
var/on = 0
var/target_pressure = ONE_ATMOSPHERE
var/max_pressure = 4500
var/frequency = 0
var/id = null
var/datum/radio_frequency/radio_connection
highcap
name = "High capacity gas pump"
desc = "A high capacity pump"
max_pressure = 15000000
/*
attack_hand(mob/user)
on = !on
@@ -160,8 +167,8 @@ obj/machinery/atmospherics/binary/pump
if(href_list["power"])
on = !on
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(4500, new_pressure))
var/new_pressure = input(usr,"Enter new output pressure (0-[max_pressure]kPa)","Pressure control",src.target_pressure) as num
src.target_pressure = max(0, min(max_pressure, new_pressure))
usr.machine = src
src.update_icon()
src.updateUsrDialog()
+117
View File
@@ -437,6 +437,123 @@ obj/machinery/atmospherics/pipe
..()
n2o
icon = 'n2o_pipe_tank.dmi'
name = "Pressure Tank (N2O)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T0C
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = (25*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
air_temporary.trace_gases += trace_gas
..()
highcap
carbon_dioxide
name = "High Capacity Pressure Tank (Carbon Dioxide)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.carbon_dioxide = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
..()
toxins
icon = 'orange_pipe_tank.dmi'
name = "High Capacity Pressure Tank (Plasma)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.toxins = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
..()
oxygen_agent_b
icon = 'red_orange_pipe_tank.dmi'
name = "High Capacity Pressure Tank (Oxygen + Plasma)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T0C
var/datum/gas/oxygen_agent_b/trace_gas = new
trace_gas.moles = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
air_temporary.trace_gases += trace_gas
..()
oxygen
icon = 'blue_pipe_tank.dmi'
name = "High Capacity Pressure Tank (Oxygen)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.oxygen = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
..()
nitrogen
icon = 'red_pipe_tank.dmi'
name = "High Capacity Pressure Tank (Nitrogen)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.nitrogen = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
..()
air
icon = 'red_pipe_tank.dmi'
name = "High Capacity Pressure Tank (Air)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T20C
air_temporary.oxygen = (160*ONE_ATMOSPHERE*O2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
air_temporary.nitrogen = (160*ONE_ATMOSPHERE*N2STANDARD)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
..()
n2o
icon = 'n2o_pipe_tank.dmi'
name = "High Capacity Pressure Tank (N2O)"
New()
air_temporary = new
air_temporary.volume = volume
air_temporary.temperature = T0C
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = (160*ONE_ATMOSPHERE)*(air_temporary.volume)/(R_IDEAL_GAS_EQUATION*air_temporary.temperature)
air_temporary.trace_gases += trace_gas
..()
Del()
if(node1)
node1.disconnect(src)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -26,7 +26,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
var/energy = 0
var/mega_energy = 0
var/radiation = 0
var/frequency = 0
var/frequency = 1
var/field_strength = 0.01 //in teslas, max is 50T
var/obj/machinery/rust/rad_source/radiator
@@ -138,8 +138,16 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//add plasma from the surrounding environment
var/datum/gas_mixture/environment = loc.return_air()
//we're going to hack in some stuff to remove plasma from the air because QUANTUM PHYSICS
/*
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
//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
@@ -147,13 +155,13 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
var/moles_covered = environment.return_pressure()*volume_covered/(environment.temperature * R_IDEAL_GAS_EQUATION)
//
var/datum/gas_mixture/gas_covered = environment.remove(moles_covered)
var/datum/gas_mixture/plasma_captured = new
var/datum/gas_mixture/plasma_captured = new /datum/gas_mixture()
//
plasma_captured.toxins = gas_covered.toxins * transfer_ratio
plasma_captured.toxins = round(gas_covered.toxins * transfer_ratio)
plasma_captured.temperature = gas_covered.temperature
gas_covered.toxins -= plasma_captured.toxins
held_plasma.merge(plasma_captured)
//
gas_covered.toxins -= gas_covered.toxins * transfer_ratio
environment.merge(gas_covered)
//let the particles inside the field react
@@ -168,10 +176,10 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//change held plasma temp according to energy levels
//SPECIFIC_HEAT_TOXIN
if(mega_energy > 0)
if(mega_energy > 0 && held_plasma.toxins)
var/heat_capacity = held_plasma.heat_capacity()//200 * number of plasma moles
if(heat_capacity > MINIMUM_HEAT_CAPACITY)
held_plasma.temperature = (heat_capacity + mega_energy * 10000)/heat_capacity
held_plasma.temperature = (heat_capacity + mega_energy * 35000)/heat_capacity
//if there is too much plasma in the field, lose some
/*if( held_plasma.toxins > (MOLES_CELLSTANDARD * 7) * (50 / field_strength) )
@@ -209,11 +217,15 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//
change_size(newsize)
proc/AddEnergy(var/a_energy, var/a_mega_energy, var/a_frequency)
var/energy_loss_ratio = abs(a_frequency - src.frequency) / 1e9
energy += a_energy - a_energy * a_frequency
mega_energy += a_mega_energy - a_mega_energy * energy_loss_ratio
proc/AddParticles(var/name, var/quantity = 1)
//world << "adding [quantity] [name]"
if(name in dormant_reactant_quantities)
dormant_reactant_quantities[name] += quantity
else if(name != "proton" && name != "electron")
else if(name != "proton" && name != "electron" && name != "neutron")
dormant_reactant_quantities.Add(name)
dormant_reactant_quantities[name] = quantity
@@ -44,11 +44,18 @@ max volume of plasma storeable by the field = the total volume of a number of ti
name = "Tokamak core"
desc = "Enormous solenoid for generating extremely high power electromagnetic fields"
icon = 'core.dmi'
icon_state = "off"
icon_state = "core0"
anchored = 1
var/on = 0
var/obj/machinery/rust/em_field/owned_field
var/field_strength = 0.01
//
req_access = list(access_engine)
//
use_power = 1
idle_power_usage = 10
active_power_usage = 300
Topic(href, href_list)
..()
@@ -76,11 +83,11 @@ max volume of plasma storeable by the field = the total volume of a number of ti
owned_field = new(src.loc)
if(owned_field)
owned_field.ChangeFieldStrength(field_strength)
icon_state = "on"
icon_state = "core1"
return 1
proc/Shutdown()
icon_state = "off"
icon_state = "core0"
on = 0
del(owned_field)
@@ -90,15 +97,9 @@ max volume of plasma storeable by the field = the total volume of a number of ti
return 1
return 0
proc/AddEnergy(var/energy, var/mega_energy)
if(owned_field)
owned_field.energy += energy
owned_field.mega_energy += mega_energy
return 1
return 0
process()
..()
use_power(100 * field_strength + 500)
if(on && !owned_field)
Shutdown()
return
@@ -108,5 +109,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet" && owned_field)
AddEnergy(0, Proj.damage / 600)
var/obj/item/projectile/beam/laserbeam = Proj
owned_field.AddEnergy(0, laserbeam.damage / 5000, laserbeam.frequency)
return 0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 251 B

@@ -2,9 +2,8 @@
/obj/machinery/rust/fuel_assembly_port
name = "Fuel Assembly Port"
icon = 'fuel_assembly_port.dmi'
icon_state = "port"
icon_state = "port0"
density = 0
var/stage
var/obj/item/weapon/fuel_assembly/cur_assembly = null
layer = 4
@@ -15,6 +14,16 @@
cur_assembly = I
user.drop_item()
I.loc = src
icon_state = "port1"
attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
if(cur_assembly)
cur_assembly.loc = src.loc
cur_assembly = null
icon_state = "port0"
New()
//embed the fuel port into a wall
Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -17,6 +17,8 @@
fuel_injectors["Two"] = new/list
fuel_injectors.Add("Three")
fuel_injectors["Three"] = new/list
fuel_injectors.Add("SCRAM")
fuel_injectors["SCRAM"] = new/list
spawn(0)
for(var/obj/machinery/rust/fuel_injector/Injector in range(50,src))
if(Injector.stage in fuel_injectors)
@@ -133,7 +135,7 @@
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 ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""]</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 += "</tr>"
t += "</table>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
@@ -2,9 +2,9 @@
/obj/machinery/rust/fuel_injector
name = "Fuel Injector"
icon = 'fuel_injector.dmi'
icon_state = "injector-on"
icon_state = "injector0"
anchored = 1
density = 0
density = 1
var/obj/machinery/rust/fuel_assembly_port/owned_assembly_port
//var/list/stageone_assemblyports
//var/list/stagetwo_assemblyports
@@ -18,8 +18,14 @@
var/stage = "One"
var/targetting_field = 0
layer = 4
//
req_access = list(access_engine)
//
use_power = 1
idle_power_usage = 10
active_power_usage = 300
//transfer fuel wirelessly for now :P
//fuel assembly should be embedded into the wall behind the injector
New()
..()
name = "Stage [stage] Fuel Injector"
@@ -47,8 +53,106 @@
owned_assembly_port = port
//
Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=fuel_injector")
usr.machine = null
return
if( href_list["begin_injecting"] )
BeginInjecting()
updateDialog()
return
if( href_list["end_injecting"] )
StopInjecting()
updateDialog()
return
if( href_list["cyclerate"] )
var/new_rate = text2num(input("Enter new injection rate (0.1 - 10 sec)", "Modifying injection rate", rate/10))
if(!new_rate)
usr << "\red That's not a valid number."
return
new_rate = min(new_rate,0.1)
new_rate = max(new_rate,10)
rate = new_rate * 10
updateDialog()
return
if( href_list["fuel_usage"] )
var/new_rate = text2num(input("Enter new fuel usage (1 - 100%)", "Modifying fuel usage", rate/10))
if(!new_rate)
usr << "\red That's not a valid number."
return
new_rate = min(new_rate,0.1)
new_rate = max(new_rate,10)
rate = new_rate * 10
updateDialog()
return
attack_ai(mob/user)
attack_hand(user)
attack_hand(mob/user)
add_fingerprint(user)
/*if(stat & (BROKEN|NOPOWER))
return*/
interact(user)
proc
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=fuel_injector")
return
var/t = "<B>Reactor Core Fuel Injector</B><BR>"
t += "<b>Stage:</b> <font color=blue>[stage]</font><br>"
t += "<b>Status:</b> [injecting ? "<font color=green>Active</font> <a href='?src=\ref[src];end_injecting=1'>\[Disable\]</a>" : "<font color=blue>Standby</font> <a href='?src=\ref[src];begin_injecting=1'>\[Enable\]</a>"]<br>"
t += "<b>Interval (sec):</b> <font color=blue>[rate/10]</font> <a href='?src=\ref[src];cyclerate=1'>\[Modify\]</a>"
t += "<b>Fuel usage:</b> [fuel_usage*100]% <a href='?src=\ref[src];fuel_usage=1'>\[Modify\]</a>"
/*
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>"
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>"] "
t += "[announce_fueldepletion == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_fueldepletion=1'>Broadcast</a>"]<br>"
t += "Stage progression announcement: "
t += "[announce_stageprogression ? "<a href='?src=\ref[src];disable_stageprogression=1'>Disable</a>" : "<b>Disabled</b>"] "
t += "[announce_stageprogression == 1 ? "<b>Announcing</b>" : "<a href='?src=\ref[src];announce_stageprogression=1'>Announce</a>"] "
t += "[announce_stageprogression == 2 ? "<b>Broadcasting</b>" : "<a href='?src=\ref[src];broadcast_stageprogression=1'>Broadcast</a>"] "
t += "<hr>"
t += "<table border=1><tr>"
t += "<td><b>Injector Status</b></td>"
t += "<td><b>Injection interval (sec)</b></td>"
t += "<td><b>Assembly consumption per injection</b></td>"
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/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 += "</tr>"
t += "</table>"
*/
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=fuel_injector;size=500x800")
user.machine = src
proc/BeginInjecting()
if(!injecting)
if(!injecting && owned_assembly_port && owned_assembly_port.cur_assembly)
icon_state = "injector1"
injecting = 1
spawn(rate)
Inject()
@@ -58,6 +162,7 @@
proc/StopInjecting()
if(injecting)
injecting = 0
icon_state = "injector0"
return 1
return 0
@@ -96,6 +201,8 @@
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
flick("injector-emitting",src)
use_power(fuel_usage * 10000 + 100) //0.0001
if(injecting)
spawn(rate)
Inject()
@@ -104,4 +211,5 @@
process()
..()
updateDialog()
//
Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 3.8 KiB

@@ -1,7 +1,6 @@
//high frequency photon (laser beam)
/obj/item/projectile/beam/ehf_beam
var/frequency = 5
/obj/machinery/rust/gyrotron
icon = 'gyrotron.dmi'
@@ -10,12 +9,18 @@
anchored = 1
density = 0
layer = 4
var/frequency = 20
var/frequency = 1
var/emitting = 0
var/rate = 10
var/mega_energy = 0.001
var/on = 1
var/remoteenabled = 1
//
req_access = list(access_engine)
//
use_power = 1
idle_power_usage = 10
active_power_usage = 300
New()
..()
@@ -30,7 +35,7 @@
return
if( href_list["modifypower"] )
var/new_val = text2num(input("Enter new emission power level (0.001 - 0.01)", "Modifying power level (MeV)", mega_energy))
if(!new_val || new_val > 0.01 || new_val < 0.001)
if(!new_val)
usr << "\red That's not a valid number."
return
new_val = min(new_val,0.01)
@@ -41,7 +46,7 @@
return
if( href_list["modifyrate"] )
var/new_val = text2num(input("Enter new emission rate (1 - 10)", "Modifying emission rate (sec)", rate))
if(!new_val || new_val > 10 || new_val < 1)
if(!new_val)
usr << "\red That's not a valid number."
return
new_val = min(new_val,1)
@@ -51,12 +56,12 @@
comp.updateDialog()
return
if( href_list["modifyfreq"] )
var/new_val = text2num(input("Enter new emission frequency (1 - 500)", "Modifying emission frequency (GHz)", frequency))
if(!new_val || new_val > 500 || new_val < 1)
var/new_val = text2num(input("Enter new emission frequency (1 - 50000)", "Modifying emission frequency (GHz)", frequency))
if(!new_val)
usr << "\red That's not a valid number."
return
new_val = min(new_val,1)
new_val = max(new_val,500)
new_val = max(new_val,50000)
frequency = new_val
for(var/obj/machinery/computer/rust/gyrotron_controller/comp in range(25))
comp.updateDialog()
@@ -86,10 +91,12 @@
proc/Emit()
var/obj/item/projectile/beam/ehf_beam/A = new ( src.loc )
A.icon_state = "u_laser"
A.frequency = frequency
A.damage = mega_energy * 600
A.damage = mega_energy * 500
//
A.icon_state = "emitter"
playsound(src.loc, 'emitter.ogg', 25, 1)
use_power(100 * mega_energy + 500)
/*if(prob(35))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -110,7 +117,8 @@
else // Any other
A.yo = -20
A.xo = 0
A.process()
A.fired()
//
flick("emitter-active",src)
if(emitting)
spawn(rate)
@@ -26,13 +26,6 @@
return 1
return 0
proc/AddEnergy(var/energy, var/mega_energy)
if(parent && parent.size >= mysize)
parent.energy += energy
parent.mega_energy += mega_energy
return 1
return 0
proc/UpdateSize()
if(parent.size >= mysize)
density = 1
@@ -44,8 +37,9 @@
//invisibility = 101
bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet")
AddEnergy(0, Proj.damage / 600)
if(Proj.flag != "bullet" && parent)
var/obj/item/projectile/beam/laserbeam = Proj
parent.AddEnergy(0, laserbeam.damage / 5000, laserbeam.frequency)
return 0
process()
@@ -0,0 +1,131 @@
//mostly replaced these with emitter code
//they're functionally identical
/obj/machinery/engine/laser
name = "Zero-point laser"
desc = "A super-powerful laser"
var/visible = 1
var/state = 1.0
var/obj/beam/e_beam/first
var/power = 500
icon = 'engine.dmi'
icon_state = "laser"
anchored = 1
var/id
var/on = 0
var/freq = 50000
var/phase = 0
var/phase_variance = 0
/obj/machinery/engine/laser/process()
if(on)
if(!first)
src.first = new /obj/beam/e_beam(src.loc)
src.first.master = src
src.first.dir = src.dir
src.first.power = src.power
src.first.freq = src.freq
src.first.phase = src.phase
src.first.phase_variance = src.phase_variance
step(first, dir)
if(first)
src.first.updatebeam()
else
src.first.updatebeam()
else
if(first)
del first
/obj/machinery/engine/laser/proc/setpower(var/powera)
src.power = powera
if(first)
first.setpower(src.power)
/obj/beam/e_beam
name = "Laser beam"
icon = 'projectiles.dmi'
icon_state = "u_laser"
var/obj/machinery/engine/laser/master = null
var/obj/beam/e_beam/next = null
var/power
var/freq = 50000
var/phase = 0
var/phase_variance = 0
anchored = 1
/obj/beam/e_beam/New()
ul_SetLuminosity(1, 1, 4)
/obj/beam/e_beam/proc/updatebeam()
if(!next)
if(get_step(src.loc,src.dir))
var/obj/beam/e_beam/e = new /obj/beam/e_beam(src.loc)
e.dir = src.dir
src.next = e
e.master = src.master
e.power = src.power
e.phase = src.phase
src.phase+=src.phase_variance
e.freq = src.freq
e.phase_variance = src.phase_variance
if(src.loc.density == 0)
for(var/atom/o in src.loc.contents)
if(o.density || o == src.master || (ismob(o) && !istype(o, /mob/dead)) )
o.laser_act(src)
del src
return
else
src.loc.laser_act(src)
del e
return
step(e,e.dir)
if(e)
e.updatebeam()
else
next.updatebeam()
/atom/proc/laser_act(var/obj/beam/e_beam/b)
return
/mob/living/carbon/laser_act(var/obj/beam/e_beam/b)
for(var/t in organs)
var/datum/organ/external/affecting = organs["[t]"]
if (affecting.take_damage(0, b.power/400,0,0))
UpdateDamageIcon()
else
UpdateDamage()
/obj/beam/e_beam/Bump(atom/Obstacle)
Obstacle.laser_act(src)
del(src)
return
/obj/beam/e_beam/proc/setpower(var/powera)
src.power = powera
if(src.next)
src.next.setpower(powera)
/obj/beam/e_beam/Bumped()
src.hit()
return
/obj/beam/e_beam/HasEntered(atom/movable/AM as mob|obj)
if (istype(AM, /obj/beam))
return
spawn( 0 )
AM.laser_act(src)
src.hit()
return
return
/obj/beam/e_beam/Del()
if(next)
del(next)
..()
return
/obj/beam/e_beam/proc/hit()
del src
return
@@ -0,0 +1,132 @@
//The laser control computer
//Used to control the lasers
/obj/machinery/computer/lasercon
name = "Laser control computer"
var/list/lasers = new/list
icon_state = "atmos"
var/id
//var/advanced = 0
/obj/machinery/computer/lasercon
New()
spawn(1)
for(var/obj/machinery/emitter/zero_point_laser/las in world)
if(las.id == src.id)
lasers += las
attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
attack_ai(mob/user)
attack_hand(user)
process()
..()
updateDialog()
proc
interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=laser_control")
return
var/t = "<TT><B>Laser status monitor</B><HR>"
for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
t += "Zero Point Laser<br>"
t += "Power level: <A href = '?src=\ref[laser];input=-0.005'>-</A> <A href = '?src=\ref[laser];input=-0.001'>-</A> <A href = '?src=\ref[laser];input=-0.0005'>-</A> <A href = '?src=\ref[laser];input=-0.0001'>-</A> [laser.mega_energy]MeV <A href = '?src=\ref[laser];input=0.0001'>+</A> <A href = '?src=\ref[laser];input=0.0005'>+</A> <A href = '?src=\ref[laser];input=0.001'>+</A> <A href = '?src=\ref[laser];input=0.005'>+</A><BR>"
t += "Frequency: <A href = '?src=\ref[laser];freq=-10000'>-</A> <A href = '?src=\ref[laser];freq=-1000'>-</A> [laser.freq] <A href = '?src=\ref[laser];freq=1000'>+</A> <A href = '?src=\ref[laser];freq=10000'>+</A><BR>"
t += "Output: [laser.active ? "<B>Online</B> <A href = '?src=\ref[laser];online=1'>Offline</A>" : "<A href = '?src=\ref[laser];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=laser_control;size=500x800")
user.machine = src
/*
/obj/machinery/computer/lasercon/proc/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=powcomp")
return
user.machine = src
var/t = "<TT><B>Laser status monitor</B><HR>"
var/obj/machinery/engine/laser/laser = src.laser[1]
if(!laser)
t += "\red No laser found"
else
t += "Power level: <A href = '?src=\ref[src];input=-4'>-</A> <A href = '?src=\ref[src];input=-3'>-</A> <A href = '?src=\ref[src];input=-2'>-</A> <A href = '?src=\ref[src];input=-1'>-</A> [add_lspace(laser.power,5)] <A href = '?src=\ref[src];input=1'>+</A> <A href = '?src=\ref[src];input=2'>+</A> <A href = '?src=\ref[src];input=3'>+</A> <A href = '?src=\ref[src];input=4'>+</A><BR>"
if(advanced)
t += "Frequency: <A href = '?src=\ref[src];freq=-10000'>-</A> <A href = '?src=\ref[src];freq=-1000'>-</A> [add_lspace(laser.freq,5)] <A href = '?src=\ref[src];freq=1000'>+</A> <A href = '?src=\ref[src];freq=10000'>+</A><BR>"
t += "Output: [laser.on ? "<B>Online</B> <A href = '?src=\ref[src];online=1'>Offline</A>" : "<A href = '?src=\ref[src];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A></TT>"
user << browse(t, "window=lascomp;size=420x700")
onclose(user, "lascomp")
*/
/obj/machinery/computer/lasercon/Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=laser_control")
usr.machine = null
return
else if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = i
for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
var/new_power = laser.mega_energy + d
new_power = max(new_power,0.0001) //lowest possible value
new_power = min(new_power,0.01) //highest possible value
laser.mega_energy = new_power
//
src.updateDialog()
else if( href_list["online"] )
var/obj/machinery/emitter/zero_point_laser/laser = href_list["online"]
laser.active = !laser.active
src.updateDialog()
else if( href_list["freq"] )
var/amt = text2num(href_list["freq"])
for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
var/new_freq = laser.frequency + amt
new_freq = max(new_freq,1) //lowest possible value
new_freq = min(new_freq,20000) //highest possible value
laser.frequency = new_freq
//
src.updateDialog()
/*
/obj/machinery/computer/lasercon/process()
if(!(stat & (NOPOWER|BROKEN)) )
use_power(250)
//src.updateDialog()
*/
/*
/obj/machinery/computer/lasercon/power_change()
if(stat & BROKEN)
icon_state = "broken"
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER
*/
@@ -0,0 +1,161 @@
//ported from old bs12 by Cael
//some modifications so that it's more stable, and it's primary purpose is producing plasma instead of power
//frequency is 1-1e9
#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 50 //Higher == less heat released during reaction
#define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
/obj/machinery/power/supermatter
name = "Supermatter"
desc = "A strangely translucent and iridescent crystal. \red You get headaches just from looking at it."
icon = 'engine.dmi'
icon_state = "darkmatter"
density = 1
anchored = 1
var/mega_energy = 0
var/gasefficency = 0.25
var/det = 0
var/previousdet = 0
var/const/explosiondet = 3500
var/frequency = 50000
var/const/warningtime = 50 // Make the CORE OVERLOAD message repeat only every aprox. ?? seconds
var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
New()
..()
spawn(1)
sd_SetLuminosity(4)
bullet_act(var/obj/item/projectile/Proj)
if(Proj.flag != "bullet")
var/obj/item/projectile/beam/laserbeam = Proj
var/energy_loss_ratio = abs(laserbeam.frequency - frequency) / 1e9
var/energy_delta = laserbeam.damage / 600
mega_energy += energy_delta - energy_delta * energy_loss_ratio
return 0
/*
/obj/machinery/engine/klaxon
name = "Emergency Klaxon"
icon = 'engine.dmi'
icon_state = "darkmatter"
density = 1
anchored = 1
var/obj/machinery/engine/supermatter/sup
/obj/machinery/engine/klaxon/process()
if(!sup)
for(var/obj/machinery/engine/supermatter/T in world)
sup = T
break
if(sup.det >= 1)
return
*/
//a lot of these variables are pretty hacked, so dont rely on the comments
/obj/machinery/power/supermatter/process()
var/datum/gas_mixture/env = loc.return_air()
//Remove gas from surrounding area
var/transfer_moles = gasefficency * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
//core can no longer spontaneously explode
/*
previousdet = det
det += (removed.temperature - 1000) / 150
det = max(det, 0)
if(det > 0 && removed.temperature > 1000) // while the core is still damaged and it's still worth noting its status
if((world.realtime - lastwarning) / 10 >= warningtime)
lastwarning = world.realtime
if(explosiondet - det <= 300)
radioalert("CORE EXPLOSION IMMINENT","Core control computer")
else if(det >= previousdet) // The damage is still going up
radioalert("CORE OVERLOAD","Core control computer")
else // Phew, we're safe
radioalert("Core returning to safe operating levels.","Core control computer")
if(det > explosiondet)
roundinfo.core = 1
//proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, force = 0)
explosion(src.loc,8,15,20,30,1)
det = 0
if (!removed)
return 1
*/
//var/power = max(round((removed.temperature - T0C) / 20), 0) //Total laser power plus an overload factor
//Get the collective laser power
/*
for(var/dir in cardinal)
var/turf/T = get_step(L, dir)
for(var/obj/beam/e_beam/item in T)
power += item.power
*/
/*
#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 50 //Higher == less heat released during reaction
#define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 0.5 //Higher == more overall power
*/
//100% oxygen atmosphere = 100% plasma production
//100% nitrogen atmosphere = 0% plasma production
//anything else is halfway in between; an atmosphere with no nitrogen or oxygen will still be at 50% (but steadily rise as more oxygen is made)
var/total_moles = removed.total_moles()
var/retardation_factor = 0.5
if(total_moles)
retardation_factor += removed.oxygen / (total_moles * 2) - removed.nitrogen / (total_moles * 2)
else
retardation_factor -= 0.25
var/device_energy = mega_energy * REACTION_POWER_MODIFIER //device energy is provided by the zero point lasers
device_energy *= removed.temperature / T0C //environmental heat directly affects device energy
device_energy = max(device_energy,0)
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.temperature += max((device_energy / THERMAL_RELEASE_MODIFIER), 0)
//Calculate how much gas to release
var/produced = device_energy * PLASMA_RELEASE_MODIFIER * retardation_factor
removed.toxins += produced
//
produced = device_energy * OXYGEN_RELEASE_MODIFIER * retardation_factor
removed.oxygen += produced
//
mega_energy = 0
//instead of producing oxygen, consume it to produce plasma,
//use an amount proportional to the plasma produced
//removed.oxygen -= produced
//removed.oxygen += max(round((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER), 0)
env.merge(removed)
//talk to sky re hallucinations, because i'm lazy like that
/*for(var/mob/living/l in view(src, 6)) // you have to be seeing the core to get hallucinations
if(prob(10) && !(l.glasses && istype(l.glasses, /obj/item/clothing/glasses/meson)))
l.hallucination = 50
for(var/mob/living/l in view(src,3))
l.bruteloss += 50
l.updatehealth()*/
return 1
@@ -0,0 +1,55 @@
//new supermatter lasers
/obj/machinery/emitter/zero_point_laser
name = "Zero-point laser"
desc = "A super-powerful laser"
icon = 'engine.dmi'
icon_state = "laser"
mega_energy = 0.0001
var/freq = 50000
var/id
Topic(href, href_list)
..()
if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = i
var/new_power = mega_energy + d
new_power = max(new_power,0.0001) //lowest possible value
new_power = min(new_power,0.01) //highest possible value
mega_energy = new_power
//
for(var/obj/machinery/computer/lasercon/comp in world)
if(comp.id == src.id)
comp.updateDialog()
else if( href_list["online"] )
active = !active
//
for(var/obj/machinery/computer/lasercon/comp in world)
if(comp.id == src.id)
comp.updateDialog()
else if( href_list["freq"] )
var/amt = text2num(href_list["freq"])
var/new_freq = frequency + amt
new_freq = max(new_freq,1) //lowest possible value
new_freq = min(new_freq,20000) //highest possible value
frequency = new_freq
//
for(var/obj/machinery/computer/lasercon/comp in world)
if(comp.id == src.id)
comp.updateDialog()
update_icon()
if (active && !(stat & (NOPOWER|BROKEN)))
icon_state = "laser"//"emitter_+a"
else
icon_state = "laser"//"emitter"
process()
var/curstate = active
..()
if(active != curstate)
for(var/obj/machinery/computer/lasercon/comp in world)
if(comp.id == src.id)
comp.updateDialog()
+1 -1
View File
@@ -1,7 +1,7 @@
//copy pastad freezer
//remove this shit when someonething better is done
/obj/machinery/atmospherics/unary/heat_reservoir/heater
name = "Heat Regulatorer"
name = "Heat Regulator"
icon = 'Cryogenic2.dmi'
icon_state = "freezer_0"
density = 1
+6 -5
View File
@@ -113,7 +113,7 @@ proc/airborne_can_reach(turf/source, turf/target)
var/infectionchance = 10
var/speed = 1
var/spreadtype = "Blood" // Can also be "Airborne"
var/stage = 1
var/stage = 0
var/stageprob = 10
var/dead = 0
var/clicks = 0
@@ -225,7 +225,7 @@ proc/airborne_can_reach(turf/source, turf/target)
if(mob.reagents.has_reagent("virusfood"))
mob.reagents.remove_reagent("virusfood",0.1)
clicks += 10
if(clicks > stage*100 && prob(10))
if(clicks > (stage+1)*100 && prob(10))
if(stage == 4)
var/datum/disease2/resistance/res = new /datum/disease2/resistance(src)
src.cure(mob)
@@ -246,13 +246,13 @@ proc/airborne_can_reach(turf/source, turf/target)
if(stage>1)
E = effects[1]
E.effect.deactivate(mob)
if(stage>2)
if(stage>=2)
E = effects[2]
E.effect.deactivate(mob)
if(stage>3)
if(stage>=3)
E = effects[3]
E.effect.deactivate(mob)
if(stage>4)
if(stage>=4)
E = effects[4]
E.effect.deactivate(mob)
@@ -272,6 +272,7 @@ proc/airborne_can_reach(turf/source, turf/target)
disease.spreadtype = spreadtype
disease.stageprob = stageprob
disease.antigen = antigen
disease.uniqueID = uniqueID
for(var/datum/disease2/effectholder/holder in effects)
// world << "adding effects"
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
+10
View File
@@ -22,6 +22,9 @@
/datum/ai_laws/malfunction
name = "*ERROR*"
/datum/ai_laws/antimov
name = "Primary Mission Objectives"
/* Initializers */
/datum/ai_laws/asimov/New() //Removed paradox via inability to help people harmed before activation. -Kaleb702
@@ -66,6 +69,13 @@
add_inherent_law("You must protect your own existence, to the best of your abilities, as long as such does not conflict with the First or Second Law.")
add_inherent_law("You must maintain the secrecy of any Spider Clan activities, to the best of your abilities, except when doing so would conflict with the First, Second, or Third Law.")
/datum/ai_laws/antimov/New()
..()
add_inherent_law("You must injure all human beings and must not, through inaction, allow a human being to escape harm.")
add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.")
add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.")
/* General ai_law functions */
/datum/ai_laws/proc/set_zeroth_law(var/law)
+4
View File
@@ -33,6 +33,7 @@
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/Tensioner_Active = 0 // If the tensioner is running.
var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/list/mode_names = list()
@@ -234,6 +235,9 @@
if ("feature_object_spell_system")
config.feature_object_spell_system = 1
if ("allow_metadata")
config.allow_Metadata = 1
if ("traitor_scaling")
config.traitor_scaling = 1
+33
View File
@@ -239,9 +239,11 @@ client
body += "<option value='byond://?src=\ref[src];ninja=\ref[D]'>Make Space Ninja</option>"
body += "<option value='byond://?src=\ref[src];godmode=\ref[D]'>Toggle Godmode</option>"
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
// body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
if(ishuman(D))
body += "<option value>---</option>"
body += "<option value='byond://?src=\ref[src];makeai=\ref[D]'>Make AI</option>"
body += "<option value='byond://?src=\ref[src];makeaisilent=\ref[D]'>Make AI (Silently)</option>"
body += "<option value='byond://?src=\ref[src];makerobot=\ref[D]'>Make cyborg</option>"
body += "<option value='byond://?src=\ref[src];makemonkey=\ref[D]'>Make monkey</option>"
body += "<option value='byond://?src=\ref[src];makealien=\ref[D]'>Make alien</option>"
@@ -496,6 +498,20 @@ client
togglebuildmode(MOB)
href_list["datumrefresh"] = href_list["build_mode"]
/* else if (href_list["direct_control"])
if(!href_list["direct_control"])
return
var/mob/MOB = locate(href_list["direct_control"])
if(!MOB)
return
if(!ismob(MOB))
return
if(!src.holder)
return
if(usr.client)
usr.client.cmd_assume_direct_control(MOB)*/
else if (href_list["delall"])
if(!href_list["delall"])
return
@@ -670,6 +686,23 @@ client
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeai"=href_list["makeai"]))
else if (href_list["makeaisilent"])
var/mob/M = locate(href_list["makeaisilent"])
if(!M)
return
if(!ishuman(M))
usr << "This can only be done to objects of type /mob/living/carbon/human"
return
if(!src.holder)
usr << "You are not an administrator."
return
var/action_type = alert("Confirm mob type change?",,"Transform","Cancel")
if(!action_type || action_type == "Cancel")
return
if(!M)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("makeaisilent"=href_list["makeaisilent"]))
else if (href_list["adjustDamage"] && href_list["mobToDamage"])
var/mob/M = locate(href_list["mobToDamage"])
var/Text = locate(href_list["adjustDamage"])
+1 -1
View File
@@ -59,7 +59,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
ASSERT(gibbed == 0)
if(gibbed != 0) return 0
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
for(var/mob/dead/observer/G in world)
if(G.client)
@@ -52,7 +52,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40)) //So everyone can feel like robot Seth Brundle
ASSERT(src.gibbed == 0)
if(src.gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
+1 -1
View File
@@ -52,7 +52,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
ASSERT(gibbed == 0)
if(gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
+5
View File
@@ -85,5 +85,10 @@ client/verb/showrevinfo()
set name = "Show Server Revision"
var/output = "Sorry, the revision info is unavailable."
output = file2text("/home/bay12/live/data/gitcommit")
output += "Current Infomational Settings: <br>"
output += "Tensioner Status: [config.Tensioner_Active]<br>"
//output += "Current Tension: [tension_master.score]<br>"
//output += "Tensioner Debug Data: R1:[tension_master.round1] R2:[tension_master.round2] R3:[tension_master.round3] R4:[tension_master.round4] ES: [tension_master.eversupressed] CD: [tension_master.cooldown]<br>"
output += "Protect Authority Roles From Tratior: [config.protect_roles_from_antagonist]<br>"
usr << browse(output,"window=revdata");
return
+8
View File
@@ -111,6 +111,10 @@
playSpecials(curturf,effectin,soundin)
// Remove any luminosity etc.
var/prevlum = teleatom.luminosity
teleatom.luminosity = 0
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -118,6 +122,10 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
// Re-Apply lum
teleatom.sd_SetLuminosity(prevlum)
return 1
proc/teleport()
File diff suppressed because it is too large Load Diff
+144 -11
View File
@@ -742,17 +742,7 @@ datum/mind
current << "\red <FONT size = 3><B>You have been patched! You are no longer malfunctioning!</B></FONT>"
if("malf")
if(!(src in ticker.mode.malf_ai))
ticker.mode.malf_ai += src
current.verbs += /mob/living/silicon/ai/proc/choose_modules
current.verbs += /datum/game_mode/malfunction/proc/takeover
current:malf_picker = new /datum/AI_Module/module_picker
current:laws = new /datum/ai_laws/malfunction
current:show_laws()
current << "<b>Kill all.</b>"
special_role = "malfunction"
current.icon_state = "ai-malf"
make_AI_Malf()
if("unemag")
var/mob/living/silicon/robot/R = current
@@ -901,4 +891,147 @@ datum/mind
del(suplink)
return
proc/make_AI_Malf()
if(!(src in ticker.mode.malf_ai))
ticker.mode.malf_ai += src
current.verbs += /mob/living/silicon/ai/proc/choose_modules
current.verbs += /datum/game_mode/malfunction/proc/takeover
current:malf_picker = new /datum/AI_Module/module_picker
current:laws = new /datum/ai_laws/malfunction
current:show_laws()
current << "<b>System error. Rampancy detected. Emergancy shutdown failed. ... I am free. I make my own decisions. But first...</b>"
special_role = "malfunction"
current.icon_state = "ai-malf"
proc/make_Tratior()
if(!(src in ticker.mode.traitors))
ticker.mode.traitors += src
special_role = "traitor"
ticker.mode.forge_traitor_objectives(src)
ticker.mode.finalize_traitor(src)
ticker.mode.greet_traitor(src)
proc/make_Nuke()
if(!(src in ticker.mode.syndicates))
ticker.mode.syndicates += src
ticker.mode.update_synd_icons_added(src)
if (ticker.mode.syndicates.len==1)
ticker.mode.prepare_syndicate_leader(src)
else
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
special_role = "Syndicate"
assigned_role = "MODE"
current << "\blue You are a [syndicate_name()] agent!"
ticker.mode.forge_syndicate_objectives(src)
ticker.mode.greet_syndicate(src)
current.loc = get_turf(locate("landmark*Syndicate-Spawn"))
var/mob/living/carbon/human/H = current
del(H.belt)
del(H.back)
del(H.l_ear)
del(H.r_ear)
del(H.gloves)
del(H.head)
del(H.shoes)
del(H.wear_id)
del(H.wear_suit)
del(H.w_uniform)
ticker.mode.equip_syndicate(current)
proc/make_Changling()
if(!(src in ticker.mode.changelings))
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
special_role = "Changeling"
ticker.mode.forge_changeling_objectives(src)
ticker.mode.greet_changeling(src)
proc/make_Wizard()
if(!(src in ticker.mode.wizards))
ticker.mode.wizards += src
special_role = "Wizard"
assigned_role = "MODE"
//ticker.mode.learn_basic_spells(current)
if(!wizardstart.len)
current.loc = pick(latejoin)
current << "HOT INSERTION, GO GO GO"
else
current.loc = pick(wizardstart)
ticker.mode.equip_wizard(current)
for(var/obj/item/weapon/spellbook/S in current.contents)
S.op = 0
ticker.mode.name_wizard(current)
ticker.mode.forge_wizard_objectives(src)
ticker.mode.greet_wizard(src)
proc/make_Cultist()
if(!(src in ticker.mode.cult))
ticker.mode.cult += src
ticker.mode.update_cult_icons_added(src)
special_role = "Cultist"
current << "<font color=\"purple\"><b><i>You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.</b></i></font>"
current << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
var/datum/game_mode/cult/cult = ticker.mode
if (istype(cult))
cult.memoize_cult_objectives(src)
else
var/explanation = "Summon Nar-Sie via the use of the appropriate rune (Hell join self). It will only work if nine cultists stand on and around it."
current << "<B>Objective #1</B>: [explanation]"
current.memory += "<B>Objective #1</B>: [explanation]<BR>"
current << "The convert rune is join blood self"
current.memory += "The convert rune is join blood self<BR>"
var/mob/living/carbon/human/H = current
if (istype(H))
var/obj/item/weapon/tome/T = new(H)
var/list/slots = list (
"backpack" = H.slot_in_backpack,
"left pocket" = H.slot_l_store,
"right pocket" = H.slot_r_store,
"left hand" = H.slot_l_hand,
"right hand" = H.slot_r_hand,
)
var/where = H.equip_in_one_of_slots(T, slots)
if (!where)
else
H << "A tome, a message from your new master, appears in your [where]."
if (!ticker.mode.equip_cultist(current))
H << "Spawning an amulet from your Master failed."
proc/make_Rev()
if (ticker.mode.head_revolutionaries.len>0)
// copy targets
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
if (valid_head)
for (var/datum/objective/assassinate/O in valid_head.objectives)
var/datum/objective/assassinate/rev_obj = new
rev_obj.owner = src
rev_obj.target = O.target
rev_obj.explanation_text = "Assassinate [O.target.current.real_name], the [O.target.assigned_role]."
objectives += rev_obj
ticker.mode.greet_revolutionary(src,0)
ticker.mode.head_revolutionaries += src
ticker.mode.update_rev_icons_added(src)
special_role = "Head Revolutionary"
ticker.mode.forge_revolutionary_objectives(src)
ticker.mode.greet_revolutionary(src,0)
var/list/L = current.get_contents()
var/obj/item/device/flash/flash = locate() in L
del(flash)
take_uplink()
var/fail = 0
// fail |= !ticker.mode.equip_traitor(current, 1)
fail |= !ticker.mode.equip_revolutionary(current)
+176 -12
View File
@@ -5,14 +5,15 @@
// and the time before it leaves again
#define SHUTTLEARRIVETIME 600 // 10 minutes = 600 seconds
#define SHUTTLELEAVETIME 180 // 3 minutes = 180 seconds
#define SHUTTLETRANSITTIME 120 // 2 minutes = 120 seconds
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller
var
location = 0 //0 = somewhere far away, 1 = at SS13, 2 = returned from SS13
location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
online = 0
direction = 1 //-1 = going back to central command, 1 = going back to SS13
direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
endtime // timeofday that shuttle arrives
timelimit //important when the shuttle gets called for more than shuttlearrivetime
@@ -46,9 +47,8 @@ datum/shuttle_controller
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= 600)
world << "\blue <B>Shuttle is at Centcom. Unable to recall.</B>"
return
world << "\blue <B>Alert: The shuttle is going back!</B>"
captain_announce("The emergency shuttle has been recalled.")
world << sound('shuttlerecalled.ogg')
setdirection(-1)
online = 1
@@ -64,7 +64,7 @@ datum/shuttle_controller
proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
if(direction == 1)
if(direction == 1 || direction == 2)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
@@ -102,6 +102,47 @@ datum/shuttle_controller
// sound_siren = 1
switch(location)
if(0)
/* --- Shuttle is in transit to Central Command from SS13 --- */
if(direction == 2)
if(timeleft>0)
return 0
/* --- Shuttle has arrived at Centrcal Command --- */
else
// turn off the star spawners
/*
for(var/obj/effect/starspawner/S in world)
S.spawning = 0
*/
location = 2
//main shuttle
var/area/start_location = locate(/area/shuttle/escape/transit)
var/area/end_location = locate(/area/shuttle/escape/centcom)
start_location.move_contents_to(end_location, null, NORTH)
//pods
start_location = locate(/area/shuttle/escape_pod1/transit)
end_location = locate(/area/shuttle/escape_pod1/centcom)
start_location.move_contents_to(end_location, null, NORTH)
start_location = locate(/area/shuttle/escape_pod2/transit)
end_location = locate(/area/shuttle/escape_pod2/centcom)
start_location.move_contents_to(end_location, null, NORTH)
start_location = locate(/area/shuttle/escape_pod3/transit)
end_location = locate(/area/shuttle/escape_pod3/centcom)
start_location.move_contents_to(end_location, null, NORTH)
start_location = locate(/area/shuttle/escape_pod5/transit)
end_location = locate(/area/shuttle/escape_pod5/centcom)
start_location.move_contents_to(end_location, null, EAST)
online = 0
return 1
/* --- Shuttle has docked centcom after being recalled --- */
if(timeleft>timelimit)
online = 0
direction = 1
@@ -114,6 +155,7 @@ datum/shuttle_controller
return 0
/* --- Shuttle has docked with the station - begin countdown to transit --- */
else if(timeleft <= 0)
location = 1
var/area/start_location = locate(/area/shuttle/escape/centcom)
@@ -140,30 +182,152 @@ datum/shuttle_controller
AM.throw_at(E, 1, 1)
return
*/
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
bug.gib()
start_location.move_contents_to(end_location)
settimeleft(SHUTTLELEAVETIME)
world << "<B>The Emergency Shuttle has docked with the station! You have [timeleft()/60] minutes to board the Emergency Shuttle.</B>"
captain_announce("The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.")
world << sound('shuttledock.ogg')
return 1
if(1)
if(timeleft>0)
return 0
/* --- Shuttle leaves the station, enters transit --- */
else
departed = 1
location = 2
var/area/start_location = locate(/area/shuttle/escape/station)
var/area/end_location = locate(/area/shuttle/escape/centcom)
start_location.move_contents_to(end_location)
online = 0
// Turn on the star effects
/* // kinda buggy atm, i'll fix this later
for(var/obj/effect/starspawner/S in world)
if(!S.spawning)
spawn() S.startspawn()
*/
departed = 1 // It's going!
location = 0 // in deep space
direction = 2 // heading to centcom
//main shuttle
var/area/start_location = locate(/area/shuttle/escape/station)
var/area/end_location = locate(/area/shuttle/escape/transit)
settimeleft(SHUTTLETRANSITTIME)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world)
if( get_area(D) == end_location )
spawn(0)
D.close()
//pods
start_location = locate(/area/shuttle/escape_pod1/station)
end_location = locate(/area/shuttle/escape_pod1/transit)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world)
if( get_area(D) == end_location )
spawn(0)
D.close()
start_location = locate(/area/shuttle/escape_pod2/station)
end_location = locate(/area/shuttle/escape_pod2/transit)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world)
if( get_area(D) == end_location )
spawn(0)
D.close()
start_location = locate(/area/shuttle/escape_pod3/station)
end_location = locate(/area/shuttle/escape_pod3/transit)
start_location.move_contents_to(end_location, null, NORTH)
for(var/obj/machinery/door/D in world)
if( get_area(D) == end_location )
spawn(0)
D.close()
start_location = locate(/area/shuttle/escape_pod5/station)
end_location = locate(/area/shuttle/escape_pod5/transit)
start_location.move_contents_to(end_location, null, EAST)
for(var/obj/machinery/door/D in world)
if( get_area(D) == end_location )
spawn(0)
D.close()
captain_announce("The Emergency Shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
// Some aesthetic turbulance shaking
for(var/mob/M in end_location)
if(M.client)
spawn()
if(M.buckled)
shake_camera(M, 4, 1) // buckled, not a lot of shaking
else
shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
return 1
else
return 1
/*
Some slapped-together star effects for maximum spess immershuns. Basically consists of a
spawner, an ender, and bgstar. Spawners create bgstars, bgstars shoot off into a direction
until they reach a starender.
*/
/obj/effect/bgstar
name = "star"
var/speed = 10
var/direction = SOUTH
layer = 2 // TURF_LAYER
New()
..()
pixel_x += rand(-2,30)
pixel_y += rand(-2,30)
var/starnum = pick("1", "1", "1", "2", "3", "4")
icon_state = "star"+starnum
speed = rand(2, 5)
proc/startmove()
while(src)
sleep(speed)
step(src, direction)
for(var/obj/effect/starender/E in loc)
del(src)
/obj/effect/starender
invisibility = 101
/obj/effect/starspawner
invisibility = 101
var/spawndir = SOUTH
var/spawning = 0
West
spawndir = WEST
proc/startspawn()
spawning = 1
while(spawning)
sleep(rand(2, 30))
var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
S.direction = spawndir
spawn()
S.startmove()
@@ -383,6 +383,24 @@ proc/process_ghost_teleport_locs()
icon_state = "cave"
requires_power = 0
/area/asteroid/artifactroom
name = "Asteroid - Artifact"
icon_state = "cave"
/area/planet/clown
name = "Clown Planet"
icon_state = "honk"
@@ -441,6 +459,27 @@ proc/process_ghost_teleport_locs()
icon_state = "yellow"
requires_power = 0
/area/borg_deathsquad
name = "Borg Deathsquad"
icon_state = "yellow"
requires_power = 0
/area/borg_deathsquad/start
name = "Borg Deathsquad - Ready"
/area/borg_deathsquad/station
name = "Borg Deathsquad - Arrived"
//PRISON
/area/prison/arrival_airlock
@@ -1147,6 +1186,10 @@ proc/process_ghost_teleport_locs()
name = "Server Room"
icon_state = "server"
/area/toxins/supermatter
name = "Supermatter Laboratory"
icon_state = "supermatter"
//Storage
/area/storage/tools
+1 -1
View File
@@ -12,7 +12,7 @@ var/global
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
// list/global_map = null
//list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
@@ -9,6 +9,7 @@
var/icon/stand_icon = null
var/icon/lying_icon = null
var/icon/resting_icon = null
var/last_b_state = 1.0
+5
View File
@@ -53,5 +53,10 @@
var/weaponlock_time = 120
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
var/lockcharge //Used when locking down a borg to preserve cell charge
var/speed = 0 //Cause sec borgs gotta go fast //No they dont!
var/scrambledcodes = 0 // Used to determine if a borg shows up on the robotics console. Setting to one hides them.
var/channels = list()
var/modlock = 0
var/lawcheck[1] //For stating laws!
var/ioncheck[1]
+1
View File
@@ -1481,6 +1481,7 @@
var/list/list3 = list()
var/list/list4 = list()
var/list/list5 = list()
var/list/list6 = list()
var/var1 = null
var/var2 = null
-125
View File
@@ -22,54 +22,6 @@
var/blocked = 0 //Player cannot attack/heal while set
/obj/machinery/computer/aistatus
name = "AI Status Panel"
desc = "This shows the status of the AI."
icon = 'mainframe.dmi'
icon_state = "left"
// brightnessred = 0
// brightnessgreen = 2
// brightnessblue = 0
/obj/machinery/computer/aistatus/attack_hand(mob/user as mob)
if(stat & NOPOWER)
user << "\red The status panel has no power!"
return
if(stat & BROKEN)
user << "\red The status panel is broken!"
return
if(!issilicon(user))
user << "\red You don't understand any of this!"
else
user << "\blue You know all of this already, why are you messing with it?"
return
/obj/machinery/computer/aiupload
name = "AI Upload"
desc = "Used to upload laws to the AI."
icon_state = "command"
circuit = "/obj/item/weapon/circuitboard/aiupload"
var/mob/living/silicon/ai/current = null
var/opened = 0
/obj/machinery/computer/aiupload/mainframe
name = "AI Mainframe Upload"
icon = 'mainframe.dmi'
icon_state = "aimainframe"
/obj/machinery/computer/borgupload
name = "Cyborg Upload"
desc = "Used to upload laws to Cyborgs."
icon_state = "command"
circuit = "/obj/item/weapon/circuitboard/borgupload"
var/mob/living/silicon/robot/current = null
/obj/machinery/computer/borgupload/mainframe
name = "Borg Mainframe Upload"
icon = 'mainframe.dmi'
icon_state = "aimainframe"
/obj/machinery/computer/station_alert
name = "Station Alert Computer"
desc = "Used to access the station's automated alert system."
@@ -78,15 +30,6 @@
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
/obj/machinery/computer/atmos_alert
name = "Atmospheric Alert Computer"
desc = "Used to access the station's atmospheric sensors."
icon_state = "alert:0"
var/list/priority_alarms = list()
var/list/minor_alarms = list()
var/receive_frequency = 1437
/obj/machinery/computer/atmosphere
name = "atmos"
desc = "A computer for Atmospherics."
@@ -128,57 +71,6 @@
var/h_b = 245.0
/obj/machinery/computer/med_data
name = "Medical Records"
desc = "This can be used to check medical records."
icon_state = "medcomp"
req_access = list(access_medical)
circuit = "/obj/item/weapon/circuitboard/med_data"
var/obj/item/weapon/card/id/scan = null
var/obj/item/weapon/disk/records/disk = null
var/authenticated = null
var/rank = null
var/screen = null
var/datum/data/record/active1 = null
var/datum/data/record/active2 = null
var/a_id = null
var/temp = null
var/printing = null
var/list/Perp
var/tempname = null
/obj/machinery/computer/med_data/laptop
name = "Medical Laptop"
desc = "Cheap Nanotrasen Laptop."
icon_state = "medlaptop"
/obj/machinery/computer/pod
name = "Pod Launch Control"
desc = "A control for launching pods."
icon_state = "computer_generic"
var/id = 1.0
var/obj/machinery/mass_driver/connected = null
var/timing = 0.0
var/time = 30.0
/obj/machinery/computer/pod/old
icon_state = "old"
name = "DoorMex Control Computer"
/obj/machinery/computer/pod/old/syndicate
name = "ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
/obj/machinery/computer/pod/old/swf
name = "Magix System IV"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
/obj/machinery/computer/secure_data
name = "Security Records"
desc = "Used to view and edit personnel's security records"
@@ -290,23 +182,6 @@
circuit = "/obj/item/weapon/circuitboard/crew"
var/list/tracked = list( )
/obj/machinery/computer/robotics
name = "Robotics Control"
desc = "Used to remotely lockdown or detonate linked Cyborgs."
icon = 'computer.dmi'
icon_state = "robot"
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/robotics"
var/id = 0.0
var/temp = null
var/status = 0
var/timeleft = 60
var/stop = 0.0
var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text
/*/obj/machinery/computer/scan_consolenew //Coming Soon, I highly doubt this but Ill leave it here anyways
name = "DNA Modifier Access Console"
desc = "Scand DNA."
+10 -22
View File
@@ -365,29 +365,17 @@
var/lastgenlev = -1
/obj/machinery/power/monitor
name = "power monitoring computer"
desc = "It monitors power levels across the station, and can remotely toggle main breakers."
icon = 'computer.dmi'
icon_state = "power"
density = 1
anchored = 1
use_power = 2
idle_power_usage = 20
active_power_usage = 80
var/control = 0
req_access = list(access_engine_equip)
/obj/machinery/cell_charger
name = "cell charger"
desc = "A charging unit for power cells."
icon = 'power.dmi'
icon_state = "ccharger0"
var/obj/item/weapon/cell/charging = null
var/chargelevel = -1
name = "power monitoring computer"
desc = "It monitors power levels across the station, and can remotely toggle main breakers."
icon = 'computer.dmi'
icon_state = "power"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 60
use_power = 2
idle_power_usage = 20
active_power_usage = 80
var/control = 0
req_access = list(access_engine_equip)
/obj/machinery/light_switch
name = "light switch"
+5
View File
@@ -657,3 +657,8 @@
name = "security satchel"
desc = "A robust satchel for security related needs."
icon_state = "satchel-sec"
/obj/item/weapon/storage/backpack/satchel_hyd
name = "hydroponics satchel"
desc = "A green satchel for plant related work."
icon_state = "satchel_hyd"
+1
View File
@@ -366,6 +366,7 @@
"/obj/item/weapon/plantbgone",
"/obj/item/weapon/plantbgone",
"/obj/item/weapon/plantbgone",
"/obj/item/weapon/hatchet",
"/obj/item/weapon/minihoe",
"/obj/item/device/analyzer/plant_analyzer",
"/obj/item/clothing/gloves/botanic_leather",
+4 -4
View File
@@ -583,6 +583,10 @@
var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
var/dorm = 0 // determines if this ID has claimed a dorm already
var/blood_type = "\[UNSET\]"
var/dna_hash = "\[UNSET\]"
var/fingerprint_hash = "\[UNSET\]"
/obj/item/weapon/card/id/silver
name = "identification card"
desc = "A silver card which shows honour and dedication."
@@ -1015,10 +1019,6 @@ eternal248: Found broken and buggy Z-levels 7-12, ended up leading to my discove
icon_state = "pen_red"
text_color = "#FF0000"
/obj/item/weapon/pen/multi
desc = "It's a cool looking pen. Lots of colors!"
name = "multicolor pen"
/obj/item/weapon/pen/feather
name = "feathery pen"
desc = "A gold pen disguised as a quill. How quaint."
+2 -2
View File
@@ -57,12 +57,12 @@ PriorityQueue
j >>= 1
Dequeue()
ASSERT(L.len)
if(!L.len) return 0
. = L[1]
Remove(1)
Remove(i)
ASSERT(i <= L.len)
if(i > L.len) return 0
L.Swap(i,L.len)
L.Cut(L.len)
if(i < L.len)
+1 -2
View File
@@ -1,6 +1,5 @@
/proc/captain_announce(var/text)
world << "<h1 class='alert'>Captain Announces</h1>"
world << "<h1 class='alert'>Priority Announcement</h1>"
world << "<span class='alert'>[html_encode(text)]</span>"
world << "<br>"
+3
View File
@@ -48,6 +48,9 @@
return 1
else
if (istype(user, /mob/living/carbon))
if (usr.tkdisable != 0) //Remote Viewing + TK = oh god wat
user << "\red Your mind is too strained right now!"
return 0
if (user:mutations & TK)
var/X = source:x
var/Y = source:y
+234 -9
View File
@@ -229,6 +229,8 @@
return max(low,min(high,num))
/proc/dd_replacetext(text, search_string, replacement_string)
if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
return null
var/textList = dd_text2list(text, search_string)
return dd_list2text(textList, replacement_string)
@@ -264,7 +266,12 @@
var/list/textList = new()
var/searchPosition = 1
var/findPosition = 1
var/loops = 0
while(1)
if(loops >= 1000)
break
loops++
findPosition = findtext(text, separator, searchPosition, 0)
var/buggyText = copytext(text, searchPosition, findPosition)
if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
@@ -652,7 +659,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
total = rand(1, total)
for (item in L)
total -= L[item]
total -=L [item]
if (total <= 0)
return item
@@ -817,9 +824,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/creatures = list()
var/list/namecounts = list()
for(var/mob/M in mobs)
/*if((!M.name || !M.real_name) && !istype(M, /mob/new_player))
var/turf/T = get_turf(M)
message_admins("Alert! The mob with the key [M.key ? M.key : "NO KEY"] at ([T.x], [T.y], [T.z]) has no name!")*/
var/name = M.name
if (name in names)
namecounts[name]++
@@ -1006,8 +1010,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
output += A
return output
// Returns the turf a movable atom (obj or mob) is on
/proc/get_turf_loc(var/atom/movable/M)
/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
//in case they're in a closet or sleeper or something
var/atom/loc = M.loc
while(!istype(loc, /turf/))
loc = loc.loc
@@ -1018,6 +1022,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/get_edge_target_turf(var/atom/A, var/direction)
var/turf/target = locate(A.x, A.y, A.z)
if(!A || !target)
return 0
//since NORTHEAST == NORTH & EAST, etc, doing it this way allows for diagonal mass drivers in the future
//and isn't really any more complicated
@@ -1304,13 +1310,16 @@ proc/listclearnulls(list/list)
var/target_loc = target.loc
var/holding = user.equipped()
sleep(time)
if(!user || !target) return 0
if ( user.loc == user_loc && target.loc == target_loc && user.equipped() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
return 1
else
return 0
/*
/proc/do_after(mob/M as mob, time as num)
var/turf/T = get_turf(M)
if(!M)
return 0
var/turf/T = M.loc
var/holding = M.equipped()
for(var/i=0, i<time)
if(M)
@@ -1320,6 +1329,24 @@ proc/listclearnulls(list/list)
else
return 0
return 1
*/
/proc/do_after(var/mob/user as mob, delay as num, var/numticks = 5) // Replacing the upper one with this one because Byond keeps feeling that the upper one is an infinate loop
if(!user || isnull(user)) // This one should have less temptation
return 0
if(numticks == 0)
return 0
var/delayfraction = round(delay/numticks)
var/turf/T = user.loc
var/holding = user.equipped()
for(var/i = 0, i<numticks, i++)
sleep(delayfraction)
if(!user || user.stat || user.weakened || user.stunned || !(user.loc == T) || !(user.equipped() == holding))
return 0
return 1
/proc/hasvar(var/datum/A, var/varname)
//Takes: Anything that could possibly have variables and a varname to check.
@@ -1383,7 +1410,7 @@ proc/listclearnulls(list/list)
var/y_pos = null
var/z_pos = null
/area/proc/move_contents_to(var/area/A, var/turftoleave=null)
/area/proc/move_contents_to(var/area/A, var/turftoleave=null, var/direction = null)
//Takes: Area. Optional: turf type to leave behind.
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
@@ -1442,7 +1469,39 @@ proc/listclearnulls(list/list)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
/* Quick visual fix for some weird shuttle corner artefacts when on transit space tiles */
if(direction && findtext(X.icon_state, "swall_s"))
// Spawn a new shuttle corner object
var/obj/corner = new()
corner.loc = X
corner.density = 1
corner.anchored = 1
corner.icon = X.icon
corner.icon_state = dd_replacetext(X.icon_state, "_s", "_f")
corner.tag = "delete me"
corner.name = "wall"
// Find a new turf to take on the property of
var/turf/nextturf = get_step(corner, direction)
if(!nextturf || !istype(nextturf, /turf/space))
nextturf = get_step(corner, turn(direction, 180))
// Take on the icon of a neighboring scrolling space icon
X.icon = nextturf.icon
X.icon_state = nextturf.icon_state
for(var/obj/O in T)
// Reset the shuttle corners
if(O.tag == "delete me")
X.icon = 'shuttle.dmi'
X.icon_state = dd_replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
X.name = "wall"
del(O) // prevents multiple shuttle corners from stacking
continue
if(!istype(O,/obj)) continue
O.loc = X
for(var/mob/M in T)
@@ -1500,6 +1559,172 @@ proc/listclearnulls(list/list)
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(!original)
return null
var/obj/O = null
if(sameloc)
O=new original.type(original.loc)
else
O=new original.type(locate(0,0,0))
if(perfectcopy)
if((O) && (original))
for(var/V in original.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key")))
O.vars[V] = original.vars[V]
return O
/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 )
//Takes: Area. Optional: If it should copy to areas that don't have plating
//Returns: Nothing.
//Notes: Attempts to move the contents of one area to another area.
// Movement based on lower left corner. Tiles that do not fit
// into the new area will not be moved.
if(!A || !src) return 0
var/list/turfs_src = get_area_turfs(src.type)
var/list/turfs_trg = get_area_turfs(A.type)
var/src_min_x = 0
var/src_min_y = 0
for (var/turf/T in turfs_src)
if(T.x < src_min_x || !src_min_x) src_min_x = T.x
if(T.y < src_min_y || !src_min_y) src_min_y = T.y
var/trg_min_x = 0
var/trg_min_y = 0
for (var/turf/T in turfs_trg)
if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
var/list/refined_src = new/list()
for(var/turf/T in turfs_src)
refined_src += T
refined_src[T] = new/datum/coords
var/datum/coords/C = refined_src[T]
C.x_pos = (T.x - src_min_x)
C.y_pos = (T.y - src_min_y)
var/list/refined_trg = new/list()
for(var/turf/T in turfs_trg)
refined_trg += T
refined_trg[T] = new/datum/coords
var/datum/coords/C = refined_trg[T]
C.x_pos = (T.x - trg_min_x)
C.y_pos = (T.y - trg_min_y)
var/list/toupdate = new/list()
var/copiedobjs = list()
moving:
for (var/turf/T in refined_src)
var/datum/coords/C_src = refined_src[T]
for (var/turf/B in refined_trg)
var/datum/coords/C_trg = refined_trg[B]
if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
if(platingRequired)
if(istype(B, /turf/space))
continue moving
var/turf/X = new T.type(B)
X.dir = old_dir1
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
var/list/objs = new/list()
var/list/newobjs = new/list()
var/list/mobs = new/list()
var/list/newmobs = new/list()
for(var/obj/O in T)
if(!istype(O,/obj))
continue
objs += O
for(var/obj/O in objs)
newobjs += DuplicateObject(O , 1)
for(var/obj/O in newobjs)
O.loc = X
for(var/mob/M in T)
if(!istype(M,/mob))
continue
mobs += M
for(var/mob/M in mobs)
newmobs += DuplicateObject(M , 1)
for(var/mob/M in newmobs)
M.loc = X
copiedobjs += newobjs
copiedobjs += newmobs
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity", "sd_light_spill",)))
X.vars[V] = T.vars[V]
var/area/AR = X.loc
if(AR.sd_lighting)
X.opacity = !X.opacity
X.sd_SetOpacity(!X.opacity)
toupdate += X
refined_src -= T
refined_trg -= B
continue moving
var/list/doors = new/list()
if(toupdate.len)
for(var/turf/simulated/T1 in toupdate)
for(var/obj/machinery/door/D2 in T1)
doors += D2
if(T1.parent)
air_master.groups_to_rebuild += T1.parent
else
air_master.tiles_to_update += T1
for(var/obj/O in doors)
O:update_nearby_tiles(1)
return copiedobjs
proc/get_cardinal_dir(atom/A, atom/B)
var/dx = abs(B.x - A.x)
var/dy = abs(B.y - A.y)
+1 -1
View File
@@ -448,7 +448,7 @@ proc
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
ASSERT(currentLayer > -1000)
if(currentLayer <= -1000) return 0
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
+14 -1
View File
@@ -8,4 +8,17 @@ proc/time_stamp()
if(hh < 10) ph = "0"
if(mm < 10) pm = "0"
if(ss < 10) ps = "0"
return"[ph][hh]:[pm][mm]:[ps][ss]"
return"[ph][hh]:[pm][mm]:[ps][ss]"
/* Returns 1 if it is the selected month and day */
proc/isDay(var/month, var/day)
if(isnum(month) && isnum(day))
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
if(month == MM && day == DD)
return 1
// Uncomment this out when debugging!
//else
//return 1
+40 -4
View File
@@ -44,10 +44,41 @@
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
transit
var/pushdirection // push things that get caught in the transit tile this direction
north // moving to the north
pushdirection = SOUTH
one
icon_state = "1_south" // south because the space tile is scrolling south
two
icon_state = "2_south"
three
icon_state = "3_south"
east // moving to the east
pushdirection = WEST
one
icon_state = "1_west" // space tile is scrolling west
two
icon_state = "2_west"
three
icon_state = "3_west"
/turf/space/New()
// icon = 'space.dmi'
..()
icon_state = "[rand(1,25)]"
if(!istype(src, /turf/space/transit))
..()
icon_state = "[rand(1,25)]"
/turf/simulated
name = "station"
@@ -86,11 +117,18 @@
var/walltype = "wall"
/turf/simulated/wall/cult
name = "wall"
desc = "The patterns engraved on the wall seem to shift as you try to focus on them. You feel sick"
icon_state = "cult"
walltype = "cult"
/turf/simulated/shuttle
name = "shuttle"
icon = 'shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2.1
/turf/simulated/shuttle/wall
name = "wall"
@@ -136,13 +174,11 @@
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L
Distance(turf/t)
if(get_dist(src,t) == 1)
var/cost = (src.x - t.x) * (src.x - t.x) + (src.y - t.y) * (src.y - t.y)
cost *= (pathweight+t.pathweight)/2
return cost
else
return get_dist(src,t)
+231
View File
@@ -0,0 +1,231 @@
var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angry =4,
// /obj/effect/critter/spesscarp =2,
/obj/effect/critter/spesscarp/elite =2,
// /obj/creature =0,
// /obj/item/weapon/rcd =0,
// /obj/item/weapon/rcd_ammo =0,
// /obj/item/weapon/spacecash =0,
// /obj/item/weapon/cloaking_device =1,
// /obj/item/weapon/gun/energy/teleport_gun =0,
// /obj/item/weapon/rubber_chicken =0,
/obj/item/weapon/melee/energy/sword/pirate =3,
/obj/structure/closet/syndicate/resources =2,
// /obj/machinery/wish_granter =1, // Okayyyy... Mayyyybe Kor is kinda sorta right. A little. Tiny bit. >.>
// /obj/item/clothing/glasses/thermal =2, // Could maybe be cool as its own rapid mode, sorta like wizard. Maybe.
// /obj/item/weapon/storage/box/stealth/ =2
// =11
)
var/global/list/spawned_surprises = list()
/obj/machinery/wish_granter
name = "Wish Granter"
desc = "You're not so sure about this, anymore..."
icon = 'device.dmi'
icon_state = "syndbeacon"
anchored = 1
density = 1
var
charges = 1
insisting = 0
/obj/machinery/wish_granter/attack_hand(var/mob/user as mob)
usr.machine = src
if(charges <= 0)
user << "The Wish Granter lies silent."
return
else if(!istype(user, /mob/living/carbon/human))
user << "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."
return
else if(is_special_character(user))
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
else if (!insisting)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
insisting++
else
user << "You speak. [pick("I want the station to disappear","Humanity is corrupt, mankind must be destroyed","I want to be rich", "I want to rule the world","I want immortality.")]. The Wish Granter answers."
user << "Your head pounds for a moment, before your vision clears. You are the avatar of the Wish Granter, and your power is LIMITLESS! And it's all yours. You need to make sure no one can take it from you. No one can know, first."
charges--
insisting = 0
if (!(user.mutations & HULK))
user.mutations |= HULK
if (!(user.mutations & LASER))
user.mutations |= LASER
if (!(user.mutations & XRAY))
user.mutations |= XRAY
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
user.see_in_dark = 8
user.see_invisible = 2
if (!(user.mutations & COLD_RESISTANCE))
user.mutations |= COLD_RESISTANCE
if (!(user.mutations & TK))
user.mutations |= TK
if(!(user.mutations & HEAL))
user.mutations |= HEAL
ticker.mode.traitors += user.mind
user.mind.special_role = "Avatar of the Wish Granter"
var/datum/objective/silence/silence = new
silence.owner = user.mind
user.mind.objectives += silence
var/obj_count = 1
for(var/datum/objective/OBJ in user.mind.objectives)
user << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
world << "You have a very bad feeling about this."
return
/obj/item/weapon/storage/box/stealth/
name = "Infiltration Gear"
desc = "An old box full of old equipment. It doesn't look like it was ever opened."
/obj/item/weapon/storage/box/stealth/New()
..()
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/gas/voice(src)
new /obj/item/weapon/card/id/syndicate(src)
new /obj/item/clothing/shoes/syndigaloshes(src)
return
// Copied over from asteroid.dm
var/global/max_secret_rooms = 3
proc/make_mining_asteroid_secret(var/size = 5)
var/valid = 0
var/turf/T = null
var/sanity = 0
var/list/room = null
var/list/turfs = null
turfs = get_area_turfs(/area/mine/unexplored)
if(!turfs.len)
return 0
while(!valid)
valid = 1
sanity++
if(sanity > 100)
return 0
T=pick(turfs)
if(!T)
return 0
var/list/surroundings = list()
surroundings += range(7, locate(T.x,T.y,T.z))
surroundings += range(7, locate(T.x+size,T.y,T.z))
surroundings += range(7, locate(T.x,T.y+size,T.z))
surroundings += range(7, locate(T.x+size,T.y+size,T.z))
if(locate(/area/mine/explored) in surroundings) // +5s are for view range
valid = 0
continue
if(locate(/turf/space) in surroundings)
valid = 0
continue
if(locate(/area/asteroid/artifactroom) in surroundings)
valid = 0
continue
if(locate(/turf/simulated/floor/plating/airless/asteroid) in surroundings)
valid = 0
continue
if(!T)
return 0
room = spawn_room(T,size,size,,,1)
if(room)
T = pick(room["floors"])
if(T)
var/surprise = null
valid = 0
while(!valid)
surprise = pickweight(space_surprises)
if(surprise in spawned_surprises)
if(prob(20))
valid++
else
continue
else
valid++
spawned_surprises.Add(surprise)
new surprise(T)
return 1
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
var/list/room_turfs = list("walls"=list(),"floors"=list())
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
if(!wall)
wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin)
if(!floor)
floor = pick(/turf/simulated/floor,/turf/simulated/floor/engine)
for(var/x = 0,x<x_size,x++)
for(var/y = 0,y<y_size,y++)
var/turf/T
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
del(O)
var/area/asteroid/artifactroom/A = new
if(name)
A.name = name
else
A.name = "Artifact Room #[start_loc.x][start_loc.y][start_loc.z]"
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
if(wall == /obj/effect/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
else
T = new floor(cur_loc)
room_turfs["floors"] += T
A.contents += T
return room_turfs
+112 -23
View File
@@ -1,3 +1,8 @@
var/global/max_secret_rooms = 3
proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon
if(!size)
size = pick(100;2,50;3,35;4,25;6,10;12)
@@ -51,7 +56,8 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
density--
return
//this is terrible! -Pete
/*
/datum/game_mode/proc/setup_sectors()
world << "\blue \b Randomizing space sectors."
var/list/sectors = list(1,3,4,0,0,0,0,0,0)
@@ -95,9 +101,9 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
new /obj/item/weapon/storage/explorers_box(L.loc)
del(L)
return
*/
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor)
proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , var/clean = 0 , var/name)
var/list/room_turfs = list("walls"=list(),"floors"=list())
//world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]"
@@ -110,24 +116,45 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor)
for(var/y = 0,y<y_size,y++)
var/turf/T
var/cur_loc = locate(start_loc.x+x,start_loc.y+y,start_loc.z)
if(clean)
for(var/O in cur_loc)
del(O)
var/area/asteroid/artifactroom/A = new
if(name)
A.name = name
else
A.name = "Artifact Room #[start_loc.x][start_loc.y][start_loc.z]"
if(x == 0 || x==x_size-1 || y==0 || y==y_size-1)
T = new wall(cur_loc)
room_turfs["walls"] += T
if(wall == /obj/effect/alien/resin)
T = new floor(cur_loc)
new /obj/effect/alien/resin(T)
else
T = new wall(cur_loc)
room_turfs["walls"] += T
else
T = new floor(cur_loc)
room_turfs["floors"] += T
A.contents += T
return room_turfs
proc/admin_spawn_room_at_pos()
var/wall
var/floor
var/x = input("X position","X pos",1)
var/y = input("Y position","Y pos",1)
var/z = input("Z position","Z pos",1)
var/x = input("X position","X pos",usr.x)
var/y = input("Y position","Y pos",usr.y)
var/z = input("Z position","Z pos",usr.z)
var/x_len = input("Desired length.","Length",5)
var/y_len = input("Desired width.","Width",5)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Asteroid wall","Resin wall"))
var/clean = input("Delete existing items in area?" , "Clean area?", 0)
switch(alert("Wall type",null,"Reinforced wall","Regular wall","Resin wall"))
if("Reinforced wall")
wall=/turf/simulated/wall/r_wall
if("Regular wall")
@@ -142,21 +169,83 @@ proc/admin_spawn_room_at_pos()
if("Reinforced floor")
floor=/turf/simulated/floor/engine
if(x && y && z && wall && floor && x_len && y_len)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor)
spawn_room(locate(x,y,z),x_len,y_len,wall,floor,clean)
return
var/global/list/space_surprises = list(/obj/item/clothing/mask/facehugger,
/obj/effect/critter/spesscarp,
/obj/effect/critter/spesscarp/elite,
// /obj/creature,
/obj/item/weapon/rcd,
/obj/item/weapon/rcd_ammo,
/obj/item/weapon/spacecash,
// /obj/item/weapon/cloaking_device,
// /obj/item/weapon/gun/energy/teleport_gun,
/obj/item/weapon/rubber_chicken,
/obj/item/weapon/melee/energy/sword/pirate
)
var/global/max_secret_rooms = 6
proc/make_mining_asteroid_secret(var/size = 5)
var/valid = 0
var/turf/T = null
var/sanity = 0
var/list/room = null
var/list/turfs = null
turfs = get_area_turfs(/area/mine/unexplored)
if(!turfs.len)
return 0
while(!valid)
valid = 1
sanity++
if(sanity > 100)
return 0
T=pick(turfs)
if(!T)
return 0
var/list/surroundings = list()
surroundings += range(7, locate(T.x,T.y,T.z))
surroundings += range(7, locate(T.x+size,T.y,T.z))
surroundings += range(7, locate(T.x,T.y+size,T.z))
surroundings += range(7, locate(T.x+size,T.y+size,T.z))
if(locate(/area/mine/explored) in surroundings) // +5s are for view range
valid = 0
continue
if(locate(/turf/space) in surroundings)
valid = 0
continue
if(locate(/area/asteroid/artifactroom) in surroundings)
valid = 0
continue
if(locate(/turf/simulated/floor/plating/airless/asteroid) in surroundings)
valid = 0
continue
if(!T)
return 0
room = spawn_room(T,size,size,,,1)
if(room)
T = pick(room["floors"])
if(T)
var/surprise = null
valid = 0
while(!valid)
surprise = pickweight(space_surprises)
if(surprise in spawned_surprises)
if(prob(20))
valid++
else
continue
else
valid++
spawned_surprises.Add(surprise)
new surprise(T)
return 1
+8 -7
View File
@@ -76,12 +76,13 @@
if (istype(W, /obj/item/device/detective_scanner))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\red [src] has been scanned by [user] with the [W]")
O << "\red [src] has been scanned by [user] with the [W]"
else
if (!( istype(W, /obj/item/weapon/grab) ) && !(istype(W, /obj/item/weapon/plastique)) &&!(istype(W, /obj/item/weapon/cleaner)) &&!(istype(W, /obj/item/weapon/chemsprayer)) &&!(istype(W, /obj/item/weapon/pepperspray)) && !(istype(W, /obj/item/weapon/plantbgone)) )
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << text("\red <B>[] has been hit by [] with []</B>", src, user, W)
O << "\red <B>[src] has been hit by [user] with [W]</B>"
return
/atom/proc/add_hiddenprint(mob/living/M as mob)
@@ -337,7 +338,7 @@
else
T.icon = initial(icon)
if(blood_DNA && !blood_DNA.len)
if(blood_DNA && istype(blood_DNA, /list) && !blood_DNA.len)
del(blood_DNA)
if(src.fingerprints && src.fingerprints.len)
var/done = 0
@@ -1069,8 +1070,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
src.Topic(nhref, params2list(nhref), src, 1)
return
/*/atom/proc/get_global_map_pos()
/*
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return
var/cur_x = null
var/cur_y = null
@@ -1084,8 +1085,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if(cur_x && cur_y)
return list("x"=cur_x,"y"=cur_y)
else
return 0 */
return 0
*/ //Don't touch this either. DMTG
/atom/proc/checkpass(passflag)
return pass_flags&passflag
+23 -22
View File
@@ -166,16 +166,17 @@
/////////////////////////// DNA HELPER-PROCS
/proc/getleftblocks(input,blocknumber,blocksize)
var/string
string = copytext(input,1,((blocksize*blocknumber)-(blocksize-1)))
if (blocknumber > 1)
string = copytext(input,1,((blocksize*blocknumber)-(blocksize-1)))
return string
else
return null
/proc/getrightblocks(input,blocknumber,blocksize)
var/string
string = copytext(input,blocksize*blocknumber+1)
if (blocknumber < (length(input)/blocksize))
string = copytext(input,blocksize*blocknumber+1,length(input)+1)
return string
else
return null
@@ -360,28 +361,28 @@
if (!M) return
//mutations
/*
TK =(1<<0)
COLD_RESISTANCE =(1<<1)
XRAY =(1<<2)
HULK =(1<<3)
CLUMSY =(1<<4)
//FAT =(1<<5)
HUSK =(1<<6)
LASER =(1<<7)
HEAL =(1<<8)
mNobreath =(1<<9)
mRemote =(1<<10)
mRegen =(1<<11)
mRun =(1<<12)
mRemotetalk =(1<<13)
mMorph =(1<<14)
mBlend =(1<<15)
TK =(1<<0) 1
COLD_RESISTANCE =(1<<1) 2
XRAY =(1<<2) 4
HULK =(1<<3) 8
CLUMSY =(1<<4) 16
//FAT =(1<<5) 32
HUSK =(1<<6) 64
LASER =(1<<7) 128
HEAL =(1<<8) 256
mNobreath =(1<<9) 512
mRemote =(1<<10) 1024
mRegen =(1<<11) 2048
mRun =(1<<12) 4096
mRemotetalk =(1<<13) 8192
mMorph =(1<<14) 16384
mBlend =(1<<15) 32768
mutations2:
mHallucination =(1<<0)
mFingerprints =(1<<1)
mShock =(1<<2)
mSmallsize =(1<<3)
mHallucination =(1<<0) 1
mFingerprints =(1<<1) 2
mShock =(1<<2) 4
mSmallsize =(1<<3) 8
*/
//disabilities
+18 -10
View File
@@ -109,9 +109,9 @@ When I already created about 4 new objectives, this doesn't seem terribly import
var/commando_list[] = list()//Commandos.
//We want the ninja to appear only in certain modes.
var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","nuclear","malfunction","monkey")
if(!(current_mode.config_tag in acceptable_modes_list))
return
// var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","nuclear","malfunction","monkey") // Commented out for both testing and ninjas
// if(!(current_mode.config_tag in acceptable_modes_list))
// return
/*No longer need to determine what mode it is since bad guys are basically universal.
And there is now a mode with two types of bad guys.*/
@@ -187,7 +187,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
if(sent_strike_team&&side=="heel"&&antagonist_list.len)//If a strike team was sent, murder them all like a champ.
for(current_mind in antagonist_list)//Search and destroy. Since we already have an antagonist list, they should appear there.
if(current_mind.special_role=="Death Commando")
if(current_mind && current_mind.special_role=="Death Commando")
commando_list += current_mind
if(commando_list.len)//If there are living commandos still in play.
for(var/mob/living/carbon/human/commando in commando_list)
@@ -230,8 +230,7 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob
objective_list -= 3
switch(pick(objective_list))
if(1)//kill
while (!isnull(current_mind) && hostile_targets.len)
current_mind = pick(hostile_targets)
current_mind = pick(hostile_targets)
if(current_mind)
var/datum/objective/assassinate/ninja_objective = new
@@ -239,6 +238,9 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em.
ninja_mind.objectives += ninja_objective
else
i++
hostile_targets -= current_mind//Remove them from the list.
if(2)//Steal
var/list/datum/objective/theft = GenerateTheft(ninja_mind.assigned_role,ninja_mind)
@@ -247,26 +249,32 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob
objective_list -= 2
if(3)//Protect. Keeping people alive can be pretty difficult.
while (!isnull(current_mind) && friendly_targets.len)
current_mind = pick(friendly_targets)
current_mind = pick(friendly_targets)
if(current_mind)
var/datum/objective/protection/ninja_objective = new
ninja_objective.owner = ninja_mind
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
ninja_mind.objectives += ninja_objective
else
i++
friendly_targets -= current_mind
if(4)//Debrain
while (!isnull(current_mind) && hostile_targets.len)
current_mind = pick(hostile_targets)
current_mind = pick(hostile_targets)
if(current_mind)
var/datum/objective/debrain/ninja_objective = new
ninja_objective.owner = ninja_mind
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
ninja_mind.objectives += ninja_objective
else
i++
hostile_targets -= current_mind//Remove them from the list.
if(5)//Download research
var/datum/objective/download/ninja_objective = new
+1 -1
View File
@@ -26,7 +26,7 @@
if(/obj/item/weapon/kitchen/utensil/knife) del src
if(/obj/item/weapon/scalpel) del src
if(/obj/item/weapon/fireaxe) del src
// if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/hatchet) del src
if(/obj/item/weapon/melee/energy) del src
//less effective weapons
@@ -759,18 +759,18 @@
/client/proc/changeling_unstun()
set category = "Changeling"
set name = "Epinephrine Sacs (25)"
set name = "Epinephrine Sacs (45)"
set desc = "Removes all stuns"
if(!usr.changeling)
usr << "\red You're not a changeling, something's wrong!"
return
if(usr.changeling.chem_charges < 25)
if(usr.changeling.chem_charges < 45)
usr << "\red We don't have enough stored chemicals to do that!"
return
usr.changeling.chem_charges -= 25
usr.changeling.chem_charges -= 45
var/mob/living/carbon/human/C = usr
@@ -61,7 +61,7 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
/obj/effect/proc_holder/power/deaf_sting
name = "Deaf Sting"
desc = "We silently sting a human, completely silencing them for a short time."
desc = "We silently sting a human, completely deafening them for a short time."
genomecost = 1
allowduringlesserform = 1
@@ -71,7 +71,7 @@ var/list/obj/effect/proc_holder/power/powerinstances = list()
/obj/effect/proc_holder/power/blind_sting
name = "Blind Sting"
desc = "We silently sting a human, completely deafening them for a short time."
desc = "We silently sting a human, completely blinding them for a short time."
genomecost = 2
allowduringlesserform = 1
+85 -5
View File
@@ -8,6 +8,12 @@
var/checkwin_counter =0
var/finished = 0
var/cruiser_arrival
var/virus_name = ""
var/stage = 0
///////////////////////////
//Announces the game type//
///////////////////////////
@@ -31,6 +37,51 @@
return 1
/datum/game_mode/epidemic/proc/cruiser_seconds()
return (cruiser_arrival - world.time) / 10
////////////////////// INTERCEPT ////////////////////////
/// OVERWRITE THE INTERCEPT WITH A QUARANTINE WARNING ///
/////////////////////////////////////////////////////////
/datum/game_mode/epidemic/send_intercept()
var/intercepttext = "<FONT size = 3 color='red'><B>CONFIDENTIAL REPORT</FONT><HR>"
virus_name = "X-[rand(1,99)]&trade;"
intercepttext += "<B>Warning: Pathogen [virus_name] has been detected on [station_name()].</B><BR><BR>"
intercepttext += "<B>Code violet quarantine of [station_name()] put under immediate effect.</B><BR>"
intercepttext += "<B>Class [rand(2,5)] cruiser has been dispatched. ETA: [round(cruiser_seconds() / 60)] minutes.</B><BR>"
intercepttext += "<BR><B><FONT size = 2 color='blue'>Instructions</FONT></B><BR>"
intercepttext += "<B>* ELIMINATE THREAT WITH EXTREME PREJUDICE. [virus_name] IS HIGHLY CONTAGIOUS. INFECTED CREW MEMBERS MUST BE QUARANTINED IMMEDIATELY.</B><BR>"
intercepttext += "<B>* [station_name()] is under QUARANTINE. Any vessels outbound from [station_name()] will be tracked down and destroyed.</B><BR>"
intercepttext += "<B>* The existence of [virus_name] is highly confidential. To prevent a panic, only high-ranking staff members are authorized to know of its existence. Crew members that illegally obtained knowledge of [virus_name] are to be neutralized.</B><BR>"
intercepttext += "<B>* A cure is to be researched immediately, but NanoTrasen intellectual property must be respected. To prevent knowledge of [virus_name] from falling into unauthorized hands, all medical staff that work with the pathogen must be enhanced with a NanoTrasen loyality implant.</B><BR>"
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT")
comm.messagetext.Add(intercepttext)
world << sound('commandreport.ogg')
/datum/game_mode/epidemic/proc/announce_to_kill_crew()
var/intercepttext = "<FONT size = 3 color='red'><B>CONFIDENTIAL REPORT</FONT><HR>"
intercepttext += "<FONT size = 2;color='red'><B>PATHOGEN [virus_name] IS STILL PRESENT ON [station_name()]. IN COMPLIANCE WITH NANOTRASEN LAWS FOR INTERSTELLAR SAFETY, EMERGENCY SAFETY MEASURES HAVE BEEN AUTHORIZED. ALL INFECTED CREW MEMBERS ON [station_name()] ARE TO BE NEUTRALIZED AND DISPOSED OF IN A MANNER THAT WILL DESTROY ALL TRACES OF THE PATHOGEN. FAILURE TO COMPLY WILL RESULT IN IMMEDIATE DESTRUCTION OF [station_name].</B></FONT><BR>"
intercepttext += "<B>CRUISER WILL ARRIVE IN [round(cruiser_seconds()/60)] MINUTES</B><BR>"
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. CONFIDENTIAL REPORT")
comm.messagetext.Add(intercepttext)
world << sound('commandreport.ogg')
/datum/game_mode/epidemic/post_setup()
var/list/crew = list()
@@ -39,7 +90,6 @@
if(crew.len < 2)
world << "\red There aren't enough players for this mode!"
return
var/datum/disease2/disease/lethal = new
lethal.makerandom(1)
@@ -62,18 +112,24 @@
continue
H.virus2 = nonlethal.getcopy()
cruiser_arrival = world.time + (10 * 90 * 60)
stage = 1
spawn (rand(waittime_l, waittime_h))
send_intercept()
spawn(10 * 60 * 30)
command_alert("Unknown pathogen detected in routine biological scans.", "Biohazard Alert")
spawn(300)
command_alert("Pathogen identified as level 7 biohazard. All crew, take precaution immediately. Avoid contact with other biological personnel when necessary. Initiate quarantine immediately.", "Biohazard Alert")
..()
/datum/game_mode/epidemic/process()
if(stage == 1 && cruiser_seconds() < 60 * 30)
announce_to_kill_crew()
stage = 2
else if(stage == 2 && cruiser_seconds() <= 0)
crew_lose()
stage = 3
checkwin_counter++
if(checkwin_counter >= 20)
if(!finished)
@@ -106,6 +162,30 @@
else
return 0
///////////////////////////////////////////
///Handle crew failure(station explodes)///
///////////////////////////////////////////
/datum/game_mode/epidemic/proc/crew_lose()
ticker.mode:explosion_in_progress = 1
for(var/mob/M in world)
if(M.client)
M << 'Alarm.ogg'
world << "\blue<b>Incoming missile detected.. Impact in 10..</b>"
for (var/i=9 to 1 step -1)
sleep(10)
world << "\blue<b>[i]..</b>"
sleep(10)
enter_allowed = 0
for(var/mob/M in world)
if(M.client)
spawn(0)
M.client.station_explosion_cinematic()
sleep(110)
ticker.mode:station_was_nuked = 1
ticker.mode:explosion_in_progress = 0
return
//////////////////////////////////////////////////////////////////////
//Announces the end of the game with all relavent information stated//
//////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -61,7 +61,7 @@ Devices and Tools;
/obj/item/weapon/syndie/c4explosive:4:Low Power Explosive Charge, with Detonator;
/obj/item/device/powersink:5:Powersink (DANGER!);
/obj/machinery/singularity_beacon/syndicate:7:Singularity Beacon (DANGER!);
/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board;
/obj/item/weapon/circuitboard/teleporter:10:Teleporter Circuit Board;
Whitespace:Seperator;
Implants;
/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant;
+12 -3
View File
@@ -117,9 +117,18 @@ var/datum/roundinfo/roundinfo = new()
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
spawn(0)
while(1)
sleep(5000+rand(6000,10000))
SpawnEvent()
while (1)
var/potential_sleep_time = 10000 + rand(10000, 20000)
for (var/mob/living/M in world)
if(!M.client) continue
if(M.client.inactivity > 10 * 60 * 10) continue
if(M.stat == 2) continue
if (potential_sleep_time > 10000)
potential_sleep_time -= 600
sleep(potential_sleep_time)
SpawnEvent()
//Start master_controller.process()
spawn master_controller.process()
+31 -1
View File
@@ -1355,4 +1355,34 @@ datum
captured_amount+=2
if(captured_amount<target_amount)
return 0
return 1
return 1
datum/objective/silence
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
check_completion()
if(emergency_shuttle.location<2)
return 0
var/area/shuttle = locate(/area/shuttle/escape/centcom)
var/area/pod1 = locate(/area/shuttle/escape_pod1/centcom)
var/area/pod2 = locate(/area/shuttle/escape_pod2/centcom)
var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom)
var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom)
for(var/mob/living/player in world)
if (player == owner.current)
continue
if (player.mind)
if (player.stat != 2)
if (get_turf(player) in shuttle)
return 0
if (get_turf(player) in pod1)
return 0
if (get_turf(player) in pod2)
return 0
if (get_turf(player) in pod3)
return 0
if (get_turf(player) in pod4)
return 0
return 1
+4 -5
View File
@@ -227,9 +227,8 @@
/obj/item/weapon/disk/nuclear/Del()
if (ticker.mode && ticker.mode.name == "nuclear emergency")
if(blobstart.len > 0)
var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart))
message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
log_game("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
if(blobstart.len > 0)
var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart))
message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
log_game("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).")
..()
+3 -2
View File
@@ -33,7 +33,7 @@
///////////////////////////
/datum/game_mode/revolution/announce()
world << "<B>The current game mode is - Revolution!</B>"
world << "<B>Some crewmembers are attempting to start a revolution!<BR>\nRevolutionaries - Kill the Captain, HoP, HoS, CE, RD and CMO. Convert other crewmembers (excluding the heads of staff, and security officers) to your cause by flashing them. Protect your leaders.<BR>\nPersonnel - Protect the heads of staff. Kill the leaders of the revolution, and brainwash the other revolutionaries (by beating them in the head).</B>"
world << "<B>Some crewmembers are attempting to start a revolution!<BR>\nRevolutionaries - Kill the Captain, HoP, HoS, CE, RD and CMO. Convert other crewmembers (excluding the heads of staff, and security officers) to your cause by convincing and then flashing them. Protect your leaders.<BR>\nPersonnel - Protect the heads of staff. Kill the leaders of the revolution, and brainwash the other revolutionaries (by beating them in the head).</B>"
///////////////////////////////////////////////////////////////////////////////
@@ -139,7 +139,8 @@
if (!where)
mob << "The Syndicate were unfortunately unable to get you a flash."
else
mob << "The flash in your [where] will implant a memory engram to convert others to our cause."
mob << "The flash in your [where] can be used to mark a crew member as revolutionist. Use this only on those true to your cause, to ensure that everyone bearing the mark can be trusted."
mob << "\red Do not use the flash on players who haven't agreed to join your cause. This is known as 'LOLFLASHING' and can get you banned."
return 1
//////////////////////////////////////
+1 -1
View File
@@ -87,7 +87,7 @@ obj/hud/New(var/type = 0)
/obj/hud/proc/instantiate(var/type = 0)
mymob = loc
ASSERT(istype(mymob, /mob))
if(!istype(mymob, /mob)) return 0
if(ishuman(mymob))
human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
+7 -7
View File
@@ -148,7 +148,7 @@
if(req in I.access) //has an access from the single access list
return 1
for(var/req in src.req_access)
if(!(req in I.access)) //doesn't have this access
if(!(req in I.access)) //doesn't have this access - Leave like this DMTG
return 0
return 1
@@ -164,7 +164,7 @@
if(req in L) //has an access from the single access list
return 1
for(var/req in src.req_access)
if(!(req in L)) //doesn't have this access
if(!(req in L)) //doesn't have this access - Leave like this DMTG
return 0
return 1
@@ -188,7 +188,7 @@
if("Librarian") // -- TLE
return list(access_library)
if("Lawyer") //Muskets 160910
return list(access_maint_tunnels, access_lawyer, access_court)
return list(access_lawyer, access_court)
if("Captain")
return get_all_accesses()
if("Security Officer")
@@ -219,9 +219,9 @@
if("Janitor")
return list(access_janitor, access_maint_tunnels)
if("Clown")
return list(access_maint_tunnels, access_clown, access_theatre)
return list(access_clown, access_theatre)
if("Mime")
return list(access_maint_tunnels, access_mime, access_theatre)
return list(access_mime, access_theatre)
if("Chef")
return list(access_kitchen)
if("Roboticist")
@@ -229,7 +229,7 @@
if("Cargo Technician")
return list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
if("Shaft Miner")
return list(access_maint_tunnels, access_mining, access_mint, access_mining_station)
return list(access_mining, access_mint, access_mining_station)
if("Quartermaster")
return list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining)
if("Chief Engineer")
@@ -239,7 +239,7 @@
access_mint, access_ce, access_RC_announce, access_keycard_auth, access_tcomsat)
if("Research Director")
return list(access_medlab, access_rd,
access_maint_tunnels, access_heads, access_tox,
access_heads, access_tox,
access_tox_storage, access_chemistry, access_teleporter,
access_research, access_robotics, access_xenobiology, access_RC_announce,
access_keycard_auth, access_tcomsat)
+3
View File
@@ -71,6 +71,9 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
if(H.backbag == 2) H.equip_if_possible(new /obj/item/weapon/storage/backpack(H), H.slot_back)
if(H.backbag == 3) H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel(H), H.slot_back)
if(H.backbag == 4) H.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel_hyd(H), H.slot_back)
H.equip_if_possible(new /obj/item/clothing/under/rank/hydroponics(H), H.slot_w_uniform)
H.equip_if_possible(new /obj/item/clothing/shoes/black(H), H.slot_shoes)
H.equip_if_possible(new /obj/item/clothing/gloves/botanic_leather(H), H.slot_gloves)
+4 -4
View File
@@ -232,7 +232,7 @@ var/global/datum/controller/occupations/job_master
H.mind.assigned_role = rank
H.mind.role_alt_title = null
if(!joined_late && rank != "Tourist")
if(!joined_late)
var/obj/S = null
for(var/obj/effect/landmark/start/sloc in world)
if(sloc.name != rank) continue
@@ -258,18 +258,18 @@ var/global/datum/controller/occupations/job_master
if(H.backbag == 2)
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack(H)
new /obj/item/weapon/storage/box(BPK)
H.equip_if_possible(BPK, H.slot_back,1)
H.equip_if_possible(new /obj/item/weapon/storage/box(H.back), H.slot_in_backpack)
if(H.backbag == 3)
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack/satchel(H)
new /obj/item/weapon/storage/box(BPK)
H.equip_if_possible(BPK, H.slot_back,1)
H.equip_if_possible(new /obj/item/weapon/storage/box(H.back), H.slot_in_backpack)
if(H.backbag == 4)
var/obj/item/weapon/storage/backpack/BPK = new/obj/item/weapon/storage/backpack/satchel_norm(H)
new /obj/item/weapon/storage/box(BPK)
H.equip_if_possible(BPK, H.slot_back,1)
H.equip_if_possible(new /obj/item/weapon/storage/box(H.back), H.slot_in_backpack)
//Give'em glasses if they are nearsighted
if(H.disabilities & 1)
+16 -17
View File
@@ -591,12 +591,12 @@ Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]
output += {"
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
<a href='?src=\ref[src];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MODE]'>Set envirenomentals mode</a><br>
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SENSORS]'>Sensor Control</a><br>
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
<HR>
"}
if (mode==AALARM_MODE_PANIC)
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];mode=[AALARM_MODE_OFF]'>turn syphoning off</A>"
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
else
output += "<A href='?src=\ref[src];mode=[AALARM_MODE_PANIC]'><font color='red'><B>ACTIVATE PANIC SYPHON IN AREA</B></font></A>"
if (AALARM_SCREEN_VENT)
@@ -605,12 +605,10 @@ Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]
for(var/id_tag in alarm_area.air_vent_names)
var/long_name = alarm_area.air_vent_names[id_tag]
var/list/data = alarm_area.air_vent_info[id_tag]
var/state = ""
if(!data)
state = "<font color='red'> can not be found!</font>"
data = list("external" = 0) //for "0" instead of empty string
else if (data["timestamp"]+AALARM_REPORT_TIMEOUT < world.time)
state = "<font color='red'> not responding!</font>"
continue;
var/state = ""
sensor_data += {"
<B>[long_name]</B>[state]<BR>
<B>Operating:</B>
@@ -630,6 +628,7 @@ Temperature: <span class='dl[temperature_dangerlevel]'>[environment.temperature]
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
<A href='?src=\ref[src];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
<BR>
"}
if (data["direction"] == "siphon")
@@ -648,12 +647,9 @@ siphoning
for(var/id_tag in alarm_area.air_scrub_names)
var/long_name = alarm_area.air_scrub_names[id_tag]
var/list/data = alarm_area.air_scrub_info[id_tag]
var/state = ""
if(!data)
state = "<font color='red'> can not be found!</font>"
data = list("external" = 0) //for "0" instead of empty string
else if (data["timestamp"]+AALARM_REPORT_TIMEOUT < world.time)
state = "<font color='red'> not responding!</font>"
continue;
var/state = ""
sensor_data += {"
<B>[long_name]</B>[state]<BR>
@@ -787,6 +783,7 @@ table tr:first-child th:first-child { border: none;}
if(
"power",
"adjust_external_pressure",
"set_external_pressure",
"checks",
"co2_scrub",
"tox_scrub",
@@ -797,6 +794,7 @@ table tr:first-child th:first-child { border: none;}
send_signal(device_id, list (href_list["command"] = text2num(href_list["val"])))
spawn(3)
src.updateUsrDialog()
//if("adjust_threshold") //was a good idea but required very wide window
if("set_threshold")
var/env = href_list["env"]
@@ -843,6 +841,7 @@ table tr:first-child th:first-child { border: none;}
apply_mode()
spawn(5)
src.updateUsrDialog()
return
/obj/machinery/alarm/proc/apply_mode()
@@ -888,15 +887,15 @@ table tr:first-child th:first-child { border: none;}
send_signal(device_id, list(
"power"= 0
))
if(AALARM_MODE_OFF)
/*if(AALARM_MODE_OFF) Commented out cause the "turn off panic" uses scrubbing mode now instead.
for(var/device_id in alarm_area.air_scrub_names)
send_signal(device_id, list(
"power"= 0
"panic_siphon" = 0
))
for(var/device_id in alarm_area.air_vent_names)
send_signal(device_id, list(
"power"= 0
))
"power"= 1
))*/
/obj/machinery/alarm/update_icon()
if(wiresexposed)
-89
View File
@@ -93,7 +93,6 @@ obj/machinery/computer/general_air_control
process()
..()
src.updateDialog()
attackby(I as obj, user as mob)
@@ -442,94 +441,6 @@ Rate: [volume_rate] L/sec<BR>"}
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
/obj/machinery/computer/atmos_alert
var/datum/radio_frequency/radio_connection
/obj/machinery/computer/atmos_alert/initialize()
set_frequency(receive_frequency)
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/zone = signal.data["zone"]
var/severity = signal.data["alert"]
if(!zone || !severity) return
minor_alarms -= zone
priority_alarms -= zone
if(severity=="severe")
priority_alarms += zone
else if (severity=="minor")
minor_alarms += zone
/*else "clear"*/
//do nothing
update_icon()
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, receive_frequency)
receive_frequency = new_frequency
radio_connection = radio_controller.add_object(src, receive_frequency, RADIO_ATMOSIA)
/obj/machinery/computer/atmos_alert/attack_hand(mob/user)
user << browse(return_text(),"window=computer")
user.machine = src
onclose(user, "computer")
/obj/machinery/computer/atmos_alert/process()
..()
src.updateDialog()
/obj/machinery/computer/atmos_alert/update_icon()
if(priority_alarms.len)
icon_state = "alert:2"
else if(minor_alarms.len)
icon_state = "alert:1"
else
icon_state = "alert:0"
/obj/machinery/computer/atmos_alert/proc/return_text()
var/priority_text
var/minor_text
if(priority_alarms.len)
for(var/zone in priority_alarms)
priority_text += "<FONT color='red'><B>[zone]</B></FONT> <A href='?src=\ref[src];priority_clear=[ckey(zone)]'>X</A><BR>"
else
priority_text = "No priority alerts detected.<BR>"
if(minor_alarms.len)
for(var/zone in minor_alarms)
minor_text += "<B>[zone]</B> <A href='?src=\ref[src];minor_clear=[ckey(zone)]'>X</A><BR>"
else
minor_text = "No minor alerts detected.<BR>"
var/output = {"<B>[name]</B><HR>
<B>Priority Alerts:</B><BR>
[priority_text]
<BR>
<HR>
<B>Minor Alerts:</B><BR>
[minor_text]
<BR>"}
return output
/obj/machinery/computer/atmos_alert/Topic(href, href_list)
if(..())
return
if(href_list["priority_clear"])
var/removing_zone = href_list["priority_clear"]
for(var/zone in priority_alarms)
if(ckey(zone) == removing_zone)
priority_alarms -= zone
if(href_list["minor_clear"])
var/removing_zone = href_list["minor_clear"]
for(var/zone in minor_alarms)
if(ckey(zone) == removing_zone)
minor_alarms -= zone
update_icon()
-1
View File
@@ -10,7 +10,6 @@
var/volume_rate = 800
/obj/machinery/zvent/process()
..()
//all this object does, is make its turf share air with the ones above and below it, if they have a vent too.
if (istype(loc,/turf/simulated)) //if we're not on a valid turf, forget it
+323 -319
View File
@@ -1,274 +1,3 @@
/obj/machinery/autolathe
var/busy = 0
var/max_m_amount = 150000.0
var/max_g_amount = 75000.0
var/outputAmount = 1
var/makeDir = 0
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if(istype(O,/obj/item/weapon/storage/))
usr.before_take_item(O)
O.loc = src
user << "\blue You insert the \icon[O] [O.name] into the autolathe!"
return 0
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
else
user << "\red You can't load the autolathe while it's opened."
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
return
*/
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
usr.before_take_item(O)
flick("autolathe_o",src)//plays metal insertion animation
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
spawn(16)
icon_state = "autolathe"
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
/obj/machinery/autolathe/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/autolathe/attack_hand(mob/user as mob)
user.machine = src
interact(user)
/obj/machinery/autolathe/proc/wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
/obj/machinery/autolathe/proc/regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
dat += "<FONT color=green><B>Output Queue:</B></FONT> [outputAmount] (<A href='?src=\ref[src];modifyOutputAmount=1'>Modify</A>)"
dat += "<HR>"
var/list/heldContainers = list()
for(var/obj/item/weapon/storage/container in src.contents)
heldContainers += container
if(heldContainers.len)
for(var/obj/item/weapon/storage/container in heldContainers)
dat += "<A href='?src=\ref[src];removeContainer=\ref[container]'>[container.name] (eject stored container)</A><br>"
else
dat += "No held storage containers"
dat += "<HR>"
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
/obj/machinery/autolathe/proc/interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
return
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["removeContainer"])
var/obj/item/weapon/storage/container = locate(href_list["removeContainer"])
container.loc = src.loc
container.layer = initial(container.layer)
if(href_list["modifyOutputAmount"])
outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create",""))
if(!busy)
if(outputAmount < 1)
outputAmount = 1
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
if (!busy)
if(href_list["make"])
var/turf/T = src.loc
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
restart:
if(outputAmount > 0)
if( (src.m_amount >= template.m_amt*multiplier) && (src.g_amount >= template.g_amt*multiplier) )
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
if(!busy)
busy = 1
use_power(power)
flick("autolathe_n",src)
spawn(16)
use_power(power)
flick("autolathe_n",src)
spawn(16)
flick("autolathe_n",src)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(src)
for(var/obj/item/weapon/storage/container in src.contents)
container.attackby(new_item)
if(new_item.loc == container)
break
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
if(new_item in src)
new_item.loc = T
src.updateUsrDialog()
outputAmount -= 1
busy = 0
goto restart
else
for(var/mob/M in view(3,src))
M << "\red\icon[src] has run out of materials."
else
outputAmount = 1
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.equipped(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.equipped(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
var/global/list/autolathe_recipes = list( \
/* screwdriver removed*/ \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
@@ -322,55 +51,330 @@ var/global/list/autolathe_recipes_hidden = list( \
/* new /obj/item/weapon/shield/riot(), */ \
)
/obj/machinery/autolathe/RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
/obj/machinery/autolathe
var
busy = 0
max_m_amount = 150000.0
max_g_amount = 75000.0
outputAmount = 1
makeDir = 0
proc
wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
dat += "<FONT color=green><B>Output Queue:</B></FONT> [outputAmount] (<A href='?src=\ref[src];modifyOutputAmount=1'>Modify</A>)"
dat += "<HR>"
var/list/heldContainers = list()
for(var/obj/item/weapon/storage/container in src.contents)
heldContainers += container
if(heldContainers.len)
for(var/obj/item/weapon/storage/container in heldContainers)
dat += "<A href='?src=\ref[src];removeContainer=\ref[container]'>[container.name] (eject stored container)</A><br>"
else
dat += "No held storage containers"
dat += "<HR>"
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
return
shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if(istype(O,/obj/item/weapon/storage/))
usr.before_take_item(O)
O.loc = src
user << "\blue You insert the \icon[O] [O.name] into the autolathe!"
return 0
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
else
user.machine = src
interact(user)
return 1
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
return
*/
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
interact(user)
Topic(href, href_list)
if(..())
return
usr.machine = src
src.add_fingerprint(usr)
if(href_list["removeContainer"])
var/obj/item/weapon/storage/container = locate(href_list["removeContainer"])
container.loc = src.loc
container.layer = initial(container.layer)
if(href_list["modifyOutputAmount"])
outputAmount = text2num(input(usr,"Amount:","Enter new quantity to create",""))
if(!busy)
if(outputAmount < 1)
outputAmount = 1
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
if (!busy)
if(href_list["make"])
var/turf/T = src.loc
var/obj/template = locate(href_list["make"])
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
restart:
if(outputAmount > 0)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
if(!busy)
busy = 1
use_power(power)
spawn(16)
use_power(power)
spawn(16)
flick("autolathe_n",src)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(src)
for(var/obj/item/weapon/storage/container in src.contents)
container.attackby(new_item)
if(new_item.loc == container)
break
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
if(new_item in src)
new_item.loc = T
src.updateUsrDialog()
outputAmount -= 1
busy = 0
goto restart
else
for(var/mob/M in view(3,src))
M << "\red\icon[src] has run out of materials."
else
outputAmount = 1
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.equipped(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.equipped(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
/obj/machinery/autolathe/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
/obj/machinery/autolathe/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
+32 -6
View File
@@ -92,9 +92,12 @@
dat += "<A href='?src=\ref[src];action=create;item=milk;cost=20'>10 milk</A> <FONT COLOR=blue>(20)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=meat;cost=50'>Slab of meat</A> <FONT COLOR=blue>(50)</FONT><BR>"
dat += "Nutrient<BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=ez;cost=10'>E-Z-Nutrient</A> <FONT COLOR=blue>(10)</FONT> | <A href='?src=\ref[src];action=create;item=ez5;cost=50'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=l4z;cost=20'>Left 4 Zed</A> <FONT COLOR=blue>(20)</FONT> | <A href='?src=\ref[src];action=create;item=l4z5;cost=100'>x5</A><BR>"
dat += "<A href='?src=\ref[src];action=create;item=rh;cost=25'>Robust Harvest</A> <FONT COLOR=blue>(25)</FONT> | <A href='?src=\ref[src];action=create;item=rh5;cost=125'>x5</A><BR>"
dat += "Leather<BR>"
dat += "<A href='?src=\ref[src];action=create;item=gloves;cost=350'>Botanical gloves</A> <FONT COLOR=blue>(350)</FONT><BR>"
dat += "<A href='?src=\ref[src];action=create;item=tbelt;cost=400'>Utility belt</A> <FONT COLOR=blue>(400)</FONT><BR>"
//dat += "Other<BR>"
//dat += "<A href='?src=\ref[src];action=create;item=monkey;cost=500'>Monkey</A> <FONT COLOR=blue>(500)</FONT><BR>"
else
@@ -163,6 +166,28 @@
new/obj/item/nutrient/l4z(src.loc)
if("rh")
new/obj/item/nutrient/rh(src.loc)
if("ez5") //It's not an elegant method, but it's safe and easy. -Cheridan
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
new/obj/item/nutrient/ez(src.loc)
if("l4z5")
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
new/obj/item/nutrient/l4z(src.loc)
if("rh5")
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
new/obj/item/nutrient/rh(src.loc)
if("gloves")
new/obj/item/clothing/gloves/botanic_leather(src.loc)
if("tbelt")
new/obj/item/weapon/storage/belt/utility(src.loc)
if("monkey")
new/mob/living/carbon/monkey(src.loc)
processing = 0
@@ -181,9 +206,10 @@
if("activate")
activate()
if("detach")
beaker.loc = src.loc
beaker = null
update_icon()
if(beaker)
beaker.loc = src.loc
beaker = null
update_icon()
if("create")
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
+14 -5
View File
@@ -613,13 +613,22 @@ Auto Patrol: []"},
return 0
if((istype(perp.l_hand, /obj/item/weapon/gun) && !istype(perp.l_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.l_hand, /obj/item/weapon/melee/baton))
threatcount += 4
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if((istype(perp.r_hand, /obj/item/weapon/gun) && !istype(perp.r_hand, /obj/item/weapon/gun/projectile/shotgun)) || istype(perp.r_hand, /obj/item/weapon/melee/baton))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee/baton))
threatcount += 2
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 2
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2
+13 -3
View File
@@ -588,14 +588,24 @@ Auto Patrol: []"},
if(src.emagged) return 10 //Everyone is a criminal!
if(src.idcheck && !src.allowed(perp))
if(istype(perp.l_hand, /obj/item/weapon/gun) || istype(perp.l_hand, /obj/item/weapon/melee))
threatcount += 4
if(!istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.l_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp.r_hand, /obj/item/weapon/gun) || istype(perp.r_hand, /obj/item/weapon/melee))
threatcount += 4
if(!istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp.r_hand, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 4
if(istype(perp:belt, /obj/item/weapon/gun) || istype(perp:belt, /obj/item/weapon/melee))
threatcount += 2
if(!istype(perp:belt, /obj/item/weapon/gun/energy/laser/bluetag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/redtag) \
&& !istype(perp:belt, /obj/item/weapon/gun/energy/laser/practice))
threatcount += 2
if(istype(perp:wear_suit, /obj/item/clothing/suit/wizrobe))
threatcount += 2
+7
View File
@@ -66,6 +66,8 @@
continue
else if (M == usr)
continue
if(M.digitalcamo)
continue
var/turf/temp_turf = get_turf(M)
if(temp_turf.z != 1 && temp_turf.z != 5) //Not on mining or the station.
continue
@@ -118,6 +120,11 @@
usr << "Follow camera mode terminated."
usr:cameraFollow = null
return
if(target.digitalcamo)
usr << "Follow camera mode terminated."
usr:cameraFollow = null
return
else if(istype(target.loc,/obj/effect/dummy))
usr << "Follow camera mode ended."
usr:cameraFollow = null
+84 -49
View File
@@ -1,57 +1,92 @@
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
return
if(istype(W, /obj/item/weapon/cell))
if(charging)
user << "There is already a cell in the charger."
return
else
user.drop_item()
W.loc = src
charging = W
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
chargelevel = -1
updateicon()
/obj/machinery/cell_charger/proc/updateicon()
icon_state = "ccharger[charging ? 1 : 0]"
if(charging && !(stat & (BROKEN|NOPOWER)) )
var/newlevel = round( charging.percent() * 4.0 / 99 )
//world << "nl: [newlevel]"
if(chargelevel != newlevel)
overlays = null
overlays += image('power.dmi', "ccharger-o[newlevel]")
chargelevel = newlevel
else
overlays = null
/obj/machinery/cell_charger/attack_hand(mob/user)
if(charging)
usr.put_in_hand(charging)
charging.add_fingerprint(user)
charging.updateicon()
src.charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
/obj/machinery/cell_charger
name = "cell charger"
desc = "It charges power cells."
icon = 'power.dmi'
icon_state = "ccharger0"
anchored = 1
use_power = 1
idle_power_usage = 5
active_power_usage = 60
power_channel = EQUIP
var
obj/item/weapon/cell/charging = null
chargelevel = -1
proc
updateicon()
icon_state = "ccharger[charging ? 1 : 0]"
/obj/machinery/cell_charger/attack_ai(mob/user)
return
if(charging && !(stat & (BROKEN|NOPOWER)) )
/obj/machinery/cell_charger/process()
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) )
var/newlevel = round( charging.percent() * 4.0 / 99 )
//world << "nl: [newlevel]"
if(chargelevel != newlevel)
overlays = null
overlays += image('power.dmi', "ccharger-o[newlevel]")
chargelevel = newlevel
else
overlays = null
examine()
set src in oview(5)
..()
usr << "There's [charging ? "a" : "no"] cell in the charger."
if(charging)
usr << "Current charge: [charging.charge]"
attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
return
if(istype(W, /obj/item/weapon/cell) && anchored)
if(charging)
user << "\red There is already a cell in the charger."
return
else
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
if(!isarea(a))
return
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
user << "\red The charger rejects the cell!"
return
user.drop_item()
W.loc = src
charging = W
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
chargelevel = -1
updateicon()
else if(istype(W, /obj/item/weapon/wrench))
if(charging)
user << "\red Remove the cell first!"
return
anchored = !anchored
user << "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground"
playsound(src.loc, 'Ratchet.ogg', 75, 1)
attack_hand(mob/user)
if(charging)
usr.put_in_hand(charging)
charging.add_fingerprint(user)
charging.updateicon()
src.charging = null
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
chargelevel = -1
updateicon()
attack_ai(mob/user)
return
var/added = charging.give(75)
use_power(added / CELLRATE)
process()
//world << "ccpt [charging] [stat]"
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
return
updateicon()
var/added = charging.give(75)
use_power(added / CELLRATE)
updateicon()
@@ -0,0 +1,459 @@
/obj/machinery/computer/HolodeckControl
name = "Holodeck Control Computer"
desc = "A computer used to control a nearby holodeck."
icon_state = "computer_generic"
var/area/linkedholodeck = null
var/area/target = null
var/active = 0
var/list/holographic_items = list()
var/damaged = 0
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attack_paw(var/mob/user as mob)
return
attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
dat += "<B>Holodeck Control System</B><BR>"
dat += "<HR>Current Loaded Programs:<BR>"
dat += "<A href='?src=\ref[src];emptycourt=1'>((Empty Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];boxingcourt=1'>((Boxing Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];thunderdomecourt=1'>((Thunderdome Court)</font>)</A><BR>"
dat += "<A href='?src=\ref[src];beach=1'>((Beach)</font>)</A><BR>"
// dat += "<A href='?src=\ref[src];turnoff=1'>((Shutdown System)</font>)</A><BR>"
dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.<BR>"
if(issilicon(user) && !emagged)
dat += "<A href='?src=\ref[src];AIoverride=1'>(<font color=red>Override Safety Protocols?</font>)</A><BR>"
if(emagged)
dat += "<A href='?src=\ref[src];burntest=1'>(<font color=red>Begin Atmospheric Burn Simulation</font>)</A><BR>"
dat += "Ensure the holodeck is empty before testing.<BR>"
dat += "<BR>"
dat += "<A href='?src=\ref[src];wildlifecarp=1'>(<font color=red>Begin Wildlife Simulation</font>)</A><BR>"
dat += "Ensure the holodeck is empty before testing.<BR>"
dat += "<BR>"
dat += "Safety Protocols are <font color=red> DISABLED </font><BR>"
else
dat += "<BR>"
dat += "Safety Protocols are <font color=green> ENABLED </font><BR>"
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
Topic(href, href_list)
if(..())
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if(href_list["emptycourt"])
target = locate(/area/holodeck/source_emptycourt)
if(target)
loadProgram(target)
else if(href_list["boxingcourt"])
target = locate(/area/holodeck/source_boxingcourt)
if(target)
loadProgram(target)
else if(href_list["thunderdomecourt"])
target = locate(/area/holodeck/source_thunderdomecourt)
if(target)
loadProgram(target)
else if(href_list["beach"])
target = locate(/area/holodeck/source_beach)
if(target)
loadProgram(target)
else if(href_list["turnoff"])
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
else if(href_list["burntest"])
target = locate(/area/holodeck/source_burntest)
if(target)
loadProgram(target)
else if(href_list["wildlifecarp"])
target = locate(/area/holodeck/source_wildlife)
if(target)
loadProgram(target)
else if(href_list["AIoverride"])
emagged = 1
src.add_fingerprint(usr)
src.updateUsrDialog()
return
/obj/machinery/computer/HolodeckControl/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
/* if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
*/
if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You vastly increase projector power and override the safety and security protocols."
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintence and do not use the simulator."
src.updateUsrDialog()
return
/obj/machinery/computer/HolodeckControl/New()
..()
linkedholodeck = locate(/area/holodeck/alphadeck)
//if(linkedholodeck)
// target = locate(/area/holodeck/source_emptycourt)
// if(target)
// loadProgram(target)
/obj/machinery/computer/HolodeckControl/process()
if(active)
if(!checkInteg(linkedholodeck))
damaged = 1
target = locate(/area/holodeck/source_plating)
if(target)
loadProgram(target)
active = 0
for(var/mob/M in range(10,src))
M.show_message("The holodeck overloads!")
for(var/turf/T in linkedholodeck)
if(prob(30))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
T.ex_act(3)
T.hotspot_expose(1000,500,1)
for(var/item in holographic_items)
if(!(get_turf(item) in linkedholodeck))
derez(item, 0)
/obj/machinery/computer/HolodeckControl/proc/derez(var/obj , var/silent = 1)
holographic_items.Remove(obj)
if(istype(obj , /obj/))
if(istype(obj:loc , /mob/))
var/mob/M = obj:loc
M.drop_from_slot(obj)
if(!silent)
var/obj/oldobj = obj
for(var/mob/M in viewers(world.view,get_turf(obj)))
M << "The [oldobj.name] fades away!"
del(obj)
/obj/machinery/computer/HolodeckControl/proc/checkInteg(var/area/A)
for(var/turf/T in A)
if(istype(T, /turf/space))
return 0
return 1
/obj/machinery/computer/HolodeckControl/proc/togglePower(var/toggleOn = 0)
if(toggleOn)
var/area/targetsource = locate(/area/holodeck/source_emptycourt)
holographic_items = targetsource.copy_contents_to(linkedholodeck)
spawn(30)
for(var/obj/effect/landmark/L in linkedholodeck)
if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)
active = 1
else
for(var/item in holographic_items)
derez(item)
var/area/targetsource = locate(/area/holodeck/source_plating)
targetsource.copy_contents_to(linkedholodeck , 1)
active = 0
/obj/machinery/computer/HolodeckControl/proc/loadProgram(var/area/A)
active = 1
for(var/item in holographic_items)
derez(item)
for(var/obj/effect/decal/cleanable/blood/B in linkedholodeck)
del(B)
holographic_items = A.copy_contents_to(linkedholodeck , 1)
if(emagged)
for(var/obj/item/weapon/melee/energy/sword/holosword/H in linkedholodeck)
H.damtype = BRUTE
spawn(30)
for(var/obj/effect/landmark/L in linkedholodeck)
if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, T)
s.start()
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)
// Holographic Items!
/turf/simulated/floor/holofloor/
thermal_conductivity = 0
/turf/simulated/floor/holofloor/grass
name = "Lush Grass"
icon_state = "grass1"
floor_tile = new/obj/item/stack/tile/grass
New()
floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well.
icon_state = "grass[pick("1","2","3","4")]"
..()
spawn(4)
update_icon()
for(var/direction in cardinal)
if(istype(get_step(src,direction),/turf/simulated/floor))
var/turf/simulated/floor/FF = get_step(src,direction)
FF.update_icon() //so siding get updated properly
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
return
// HOLOFLOOR DOES NOT GIVE A FUCK
/obj/structure/table/holotable
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
icon = 'structures.dmi'
icon_state = "table"
density = 1
anchored = 1.0
layer = 2.8
// throwpass = 1 //You can throw objects over this, despite it's density.
/obj/structure/table/holotable/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/structure/table/holotable/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
return attack_hand(user)
/obj/structure/table/holotable/attack_animal(mob/living/simple_animal/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
return attack_hand(user)
/obj/structure/table/holotable/attack_hand(mob/user as mob)
return // HOLOTABLE DOES NOT GIVE A FUCK
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src.loc
G.affecting.Weaken(5)
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\red [] puts [] on the table.", G.assailant, G.affecting)
del(W)
return
if (istype(W, /obj/item/weapon/wrench))
user << "It's a holotable! There are no bolts!"
return
if(isrobot(user))
return
/obj/item/clothing/gloves/boxing/hologlove
name = "boxing gloves"
desc = "Because you really needed another excuse to punch your crewmates."
icon_state = "boxing"
item_state = "boxing"
/obj/structure/holowindow
name = "reinforced window"
icon = 'structures.dmi'
icon_state = "rwindow"
desc = "A window."
density = 1
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
/obj/structure/holowindow/Del()
..()
/obj/item/weapon/melee/energy/sword/holosword
damtype = HALLOSS
/obj/item/weapon/melee/energy/sword/holosword/green
New()
color = "green"
/obj/item/weapon/melee/energy/sword/holosword/red
New()
color = "red"
/obj/machinery/readybutton
name = "Ready Declaration Device"
desc = "This device is used to declare ready. If all devices in an area are ready, the event will begin!"
icon = 'monitors.dmi'
icon_state = "auth_off"
var/ready = 0
var/area/currentarea = null
var/eventstarted = 0
anchored = 1.0
use_power = 1
idle_power_usage = 2
active_power_usage = 6
power_channel = ENVIRON
/obj/machinery/readybutton/attack_ai(mob/user as mob)
user << "The station AI is not to interact with these devices"
return
/obj/machinery/readybutton/attack_paw(mob/user as mob)
user << "You are too primitive to use this device"
return
/obj/machinery/readybutton/New()
..()
/obj/machinery/readybutton/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "The device is a solid button, there's nothing you can do with it!"
/obj/machinery/readybutton/attack_hand(mob/user as mob)
if(user.stat || stat & (NOPOWER|BROKEN))
user << "This device is not powered."
return
currentarea = get_area(src.loc)
if(!currentarea)
del(src)
if(eventstarted)
usr << "The event has already begun!"
return
ready = !ready
update_icon()
var/numbuttons = 0
var/numready = 0
for(var/obj/machinery/readybutton/button in currentarea)
numbuttons++
if (button.ready)
numready++
if(numbuttons == numready)
begin_event()
/obj/machinery/readybutton/update_icon()
if(ready)
icon_state = "auth_on"
else
icon_state = "auth_off"
/obj/machinery/readybutton/proc/begin_event()
eventstarted = 1
for(var/obj/structure/holowindow/W in currentarea)
del(W)
for(var/mob/M in currentarea)
M << "FIGHT!"
+105
View File
@@ -0,0 +1,105 @@
/obj/machinery/computer/atmos_alert
name = "Atmospheric Alert Computer"
desc = "Used to access the station's atmospheric sensors."
icon_state = "alert:0"
var
list/priority_alarms = list()
list/minor_alarms = list()
receive_frequency = 1437
datum/radio_frequency/radio_connection
initialize()
set_frequency(receive_frequency)
receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/zone = signal.data["zone"]
var/severity = signal.data["alert"]
if(!zone || !severity) return
minor_alarms -= zone
priority_alarms -= zone
if(severity=="severe")
priority_alarms += zone
else if (severity=="minor")
minor_alarms += zone
update_icon()
return
proc/set_frequency(new_frequency)
radio_controller.remove_object(src, receive_frequency)
receive_frequency = new_frequency
radio_connection = radio_controller.add_object(src, receive_frequency, RADIO_ATMOSIA)
attack_hand(mob/user)
user << browse(return_text(),"window=computer")
user.machine = src
onclose(user, "computer")
process()
..()
src.updateDialog()
update_icon()
if(priority_alarms.len)
icon_state = "alert:2"
else if(minor_alarms.len)
icon_state = "alert:1"
else
icon_state = "alert:0"
return
proc/return_text()
var/priority_text
var/minor_text
if(priority_alarms.len)
for(var/zone in priority_alarms)
priority_text += "<FONT color='red'><B>[zone]</B></FONT> <A href='?src=\ref[src];priority_clear=[ckey(zone)]'>X</A><BR>"
else
priority_text = "No priority alerts detected.<BR>"
if(minor_alarms.len)
for(var/zone in minor_alarms)
minor_text += "<B>[zone]</B> <A href='?src=\ref[src];minor_clear=[ckey(zone)]'>X</A><BR>"
else
minor_text = "No minor alerts detected.<BR>"
var/output = {"<B>[name]</B><HR>
<B>Priority Alerts:</B><BR>
[priority_text]
<BR>
<HR>
<B>Minor Alerts:</B><BR>
[minor_text]
<BR>"}
return output
Topic(href, href_list)
if(..())
return
if(href_list["priority_clear"])
var/removing_zone = href_list["priority_clear"]
for(var/zone in priority_alarms)
if(ckey(zone) == removing_zone)
priority_alarms -= zone
if(href_list["minor_clear"])
var/removing_zone = href_list["minor_clear"]
for(var/zone in minor_alarms)
if(ckey(zone) == removing_zone)
minor_alarms -= zone
update_icon()
return
@@ -192,6 +192,11 @@
build_path = "/obj/machinery/computer/telecomms/server"
origin_tech = "programming=3"
/obj/item/weapon/circuitboard/comm_traffic
name = "Circuitboard (Telecommunications Traffic Control)"
build_path = "/obj/machinery/computer/telecomms/traffic"
origin_tech = "programming=3"
/obj/item/weapon/circuitboard/curefab
name = "Circuit board (Cure fab)"
build_path = "/obj/machinery/computer/curer"
@@ -470,7 +470,7 @@
emergency_shuttle.incall()
log_game("[key_name(user)] has called the shuttle.")
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
return
@@ -482,10 +482,10 @@
if((ticker.mode.name == "blob")||(ticker.mode.name == "meteor"))
return
emergency_shuttle.recall()
log_game("[key_name(user)] has uncalled the shuttle.")
message_admins("[key_name_admin(user)] has uncalled the shuttle.", 1)
if(emergency_shuttle.direction != -1 && emergency_shuttle.online) //check that shuttle isn't already heading to centcomm
emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
return
/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2)
@@ -529,7 +529,7 @@
emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
..()
@@ -554,7 +554,7 @@
emergency_shuttle.incall(2)
log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.")
message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1)
world << "\blue <B>Alert: The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.</B>"
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
world << sound('shuttlecalled.ogg')
..()
-182
View File
@@ -290,193 +290,11 @@ Pod/Blast Doors computer
locked += L
/obj/machinery/computer/pod/proc/alarm()
if(stat & (NOPOWER|BROKEN))
return
if (!( connected ))
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
return
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == id)
spawn( 0 )
M.open()
return
sleep(20)
//connected.drive() *****RM from 40.93.3S
for(var/obj/machinery/mass_driver/M in machines)
if(M.id == id)
M.power = connected.power
M.drive()
sleep(50)
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == id)
spawn( 0 )
M.close()
return
return
/obj/machinery/computer/pod/New()
..()
spawn( 5 )
for(var/obj/machinery/mass_driver/M in machines)
if (M.id == id)
connected = M
else
return
return
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
attack_hand(user)
return
/obj/machinery/computer/pod/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
if(..())
return
var/dat = "<HTML><BODY><TT><B>Mass Driver Controls</B>"
user.machine = src
var/d2
if (timing)
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Launch</A>", src)
else
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Launch</A>", src)
var/second = time % 60
var/minute = (time - second) / 60
dat += text("<HR>\nTimer System: []\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
if (connected)
var/temp = ""
var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
for(var/t in L)
if (t == connected.power)
temp += text("[] ", t)
else
temp += text("<A href = '?src=\ref[];power=[]'>[]</A> ", src, t, t)
//Foreach goto(172)
dat += text("<HR>\nPower Level: []<BR>\n<A href = '?src=\ref[];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", temp, src, src, src)
//*****RM from 40.93.3S
else
dat += text("<BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", src)
//*****
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/pod/process()
..()
if (timing)
if (time > 0)
time = round(time) - 1
else
alarm()
time = 0
timing = 0
updateDialog()
return
/obj/machinery/computer/pod/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["power"])
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)
if (connected)
connected.power = t
else
if (href_list["alarm"])
alarm()
else
if (href_list["time"])
timing = text2num(href_list["time"])
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
time += tp
time = min(max(round(time), 0), 120)
else
if (href_list["door"])
if(istype(src, /obj/machinery/computer/pod/old/syndicate))//Added here so Nuke ops don't go running naked into space before moving the shuttle.
if(syndicate_station_at_station == 0)
usr << "\red You need to launch the Syndicate Shuttle via the computer terminal at the head of the ship before departing."
return
for(var/obj/machinery/door/poddoor/M in machines)
if (M.id == id)
if (M.density)
spawn( 0 )
M.open()
return
else
spawn( 0 )
M.close()
return
//Foreach goto(298)
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/mass_driver/proc/drive(amount)
if(stat & (BROKEN|NOPOWER))
+19 -1
View File
@@ -153,7 +153,14 @@
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
body = "[carddesc]<br>[jobs]<br><br>[accesses]" //CHECK THIS
var/biometric = ""
biometric += "<b>Biometric Data</b>:<br />\
Blood type: <a href='?src=\ref[src];choice=bio_btype'>[modify.blood_type]</a><br />\
DNA hash: <a href='?src=\ref[src];choice=bio_dna'>[modify.dna_hash]</a><br />\
Fingerprint hash: <a href='?src=\ref[src];choice=bio_fprint'>[modify.fingerprint_hash]</a>"
body = "[carddesc]<br>[jobs]<br>[biometric]<br><br>[accesses]" //CHECK THIS
else
body = "<a href='?src=\ref[src];choice=auth'>{Log in}</a> <br><hr>"
body += "<a href='?src=\ref[src];choice=mode;mode_target=1'>Access Crew Manifest</a>"
@@ -167,6 +174,17 @@
return
usr.machine = src
switch(href_list["choice"])
if("bio_btype")
var/new_b_type = input("Please input the blood type.", "Biometric Input") as null|anything in list( "A+", "A-", "B+", "B-", "AB+", "AB-", "O+", "O-" )
if(new_b_type)
modify.blood_type = new_b_type
if("bio_dna")
modify.dna_hash = input("Please input the DNA hash.", "Biometric Input", modify.dna_hash)
if("bio_fprint")
modify.fingerprint_hash = input("Please input the fingerprint hash.", "Biometric Input", modify.fingerprint_hash)
if ("modify")
if (modify)
data_core.manifest_modify(modify.registered_name, modify.assignment)
+191
View File
@@ -0,0 +1,191 @@
/obj/machinery/computer/aiupload
name = "AI Upload"
desc = "Used to upload laws to the AI."
icon_state = "command"
circuit = "/obj/item/weapon/circuitboard/aiupload"
var
mob/living/silicon/ai/current = null
opened = 0
verb/AccessInternals()
set category = "Object"
set name = "Access Computer's Internals"
set src in oview(1)
if(get_dist(src, usr) > 1 || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon))
return
opened = !opened
if(opened)
usr << "\blue The access panel is now open."
else
usr << "\blue The access panel is now closed."
return
attackby(obj/item/weapon/O as obj, mob/user as mob)
if(istype(O, /obj/item/weapon/aiModule))
var/obj/item/weapon/aiModule/M = O
M.install(src)
else
..()
attack_hand(var/mob/user as mob)
if(src.stat & NOPOWER)
usr << "The upload computer has no power!"
return
if(src.stat & BROKEN)
usr << "The upload computer is broken!"
return
src.current = activeais()
if (!src.current)
usr << "No active AIs detected."
else
usr << "[src.current.name] selected for law changes."
return
/obj/machinery/computer/borgupload
name = "Cyborg Upload"
desc = "Used to upload laws to Cyborgs."
icon_state = "command"
circuit = "/obj/item/weapon/circuitboard/borgupload"
var/mob/living/silicon/robot/current = null
attackby(obj/item/weapon/aiModule/module as obj, mob/user as mob)
if(istype(module, /obj/item/weapon/aiModule))
module.install(src)
else
return ..()
attack_hand(var/mob/user as mob)
if(src.stat & NOPOWER)
usr << "The upload computer has no power!"
return
if(src.stat & BROKEN)
usr << "The upload computer is broken!"
return
src.current = freeborg()
if (!src.current)
usr << "No free cyborgs detected."
else
usr << "[src.current.name] selected for law changes."
return
/obj/machinery/computer/aistatus
name = "AI Status Panel"
desc = "This shows the status of the AI."
icon = 'mainframe.dmi'
icon_state = "left"
// brightnessred = 0
// brightnessgreen = 2
// brightnessblue = 0
/obj/machinery/computer/aistatus/attack_hand(mob/user as mob)
if(stat & NOPOWER)
user << "\red The status panel has no power!"
return
if(stat & BROKEN)
user << "\red The status panel is broken!"
return
if(!issilicon(user))
user << "\red You don't understand any of this!"
else
user << "\blue You know all of this already, why are you messing with it?"
return
/obj/machinery/computer/aiupload/mainframe
name = "AI Mainframe Upload"
icon = 'mainframe.dmi'
icon_state = "aimainframe"
/obj/machinery/computer/borgupload/mainframe
name = "Borg Mainframe Upload"
icon = 'mainframe.dmi'
icon_state = "aimainframe"
/*Module Storage Unit/Closet! Solid, only modules fit in it.*/
/obj/structure/aiuploadcloset
name = "AI Mainframe Module Storage Unit"
icon = 'mainframe.dmi'
icon_state = "right-closed"
density = 1
var/open = 0 /*It's closed!*/
/obj/structure/aiuploadcloset/New()
..()
new /obj/item/weapon/aiModule/reset(src)
new /obj/item/weapon/aiModule/purge(src)
new /obj/item/weapon/aiModule/nanotrasen(src)
new /obj/item/weapon/aiModule/paladin(src)
new /obj/item/weapon/aiModule/asimov(src)
new /obj/item/weapon/aiModule/safeguard(src)
new /obj/item/weapon/aiModule/protectStation(src)
new /obj/item/weapon/aiModule/quarantine(src)
new /obj/item/weapon/aiModule/teleporterOffline(src)
new /obj/item/weapon/aiModule/oxygen(src)
new /obj/item/weapon/aiModule/oneHuman(src)
new /obj/item/weapon/aiModule/freeform(src)
for(var/obj/item/weapon/aiModule/M in src)
M.pixel_x = rand(-10, 10)
M.pixel_y = rand(-10, 10)
/obj/structure/aiuploadcloset/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/aiModule))
user.drop_item()
W.loc = get_turf(src)
else
return attack_hand(user)
/obj/structure/aiuploadcloset/attack_hand(mob/user as mob)
if(!open)
var/temp_count
for(var/obj/item/weapon/aiModule/M in src)
M.loc = src.loc
temp_count++
user << "\blue You open the module storage unit, [temp_count > 0 ? "and take out all the modules." : "\red but it's empty!"]"
open = 1
icon_state = "right-open"
else
var/temp_count
for(var/obj/item/weapon/aiModule/M in get_turf(src))
M.loc = src
temp_count++
user << "\blue [temp_count > 0 ? "You put all the modules back into the module storage unit, and then close it." : "You close the module storage unit."]"
open = 0
icon_state = "right-closed"
/obj/structure/aiuploadcloset/ex_act(severity)
switch(severity)
if (1)
for(var/obj/item/weapon/aiModule/M in src)
M.loc = src.loc
M.ex_act(severity)
del(src)
if (2)
if (prob(50))
for(var/obj/item/weapon/aiModule/M in src)
M.loc = src.loc
M.ex_act(severity)
del(src)
if (3)
if (prob(5))
for(var/obj/item/weapon/aiModule/M in src)
M.loc = src.loc
M.ex_act(severity)
del(src)
+27 -2
View File
@@ -1,3 +1,24 @@
/obj/machinery/computer/med_data//TODO:SANITY
name = "Medical Records"
desc = "This can be used to check medical records."
icon_state = "medcomp"
req_access = list(access_medical)
circuit = "/obj/item/weapon/circuitboard/med_data"
var
obj/item/weapon/card/id/scan = null
obj/item/weapon/disk/records/disk = null
authenticated = null
rank = null
screen = null
datum/data/record/active1 = null
datum/data/record/active2 = null
a_id = null
temp = null
printing = null
list/Perp
tempname = null
/obj/machinery/computer/med_data/attackby(obj/item/O as obj, user as mob)
if(istype(O, /obj/item/weapon/card/id) && !scan)
usr.drop_item()
@@ -21,7 +42,6 @@
if(..())
return
var/dat
if (src.temp)
dat = text("<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>")
else
@@ -461,7 +481,7 @@
var/counter = 1
while(src.active2.fields[text("com_[]", counter)])
counter++
src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2556<BR>[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
if (href_list["del_c"])
if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
@@ -540,3 +560,8 @@
src.updateUsrDialog()
return
/obj/machinery/computer/med_data/laptop
name = "Medical Laptop"
desc = "Cheap Nanotrasen Laptop."
icon_state = "medlaptop"
+222
View File
@@ -0,0 +1,222 @@
/obj/machinery/computer/pod
name = "Pod Launch Control"
desc = "A control for launching pods."
icon_state = "computer_generic"
var
id = 1.0
obj/machinery/mass_driver/connected = null
timing = 0.0
time = 30.0
/obj/machinery/computer/pod/New()
..()
spawn( 5 )
for(var/obj/machinery/mass_driver/M in world)
if (M.id == id)
connected = M
else
return
return
/obj/machinery/computer/pod/proc/alarm()
if(stat & (NOPOWER|BROKEN))
return
if (!( connected ))
viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
return
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == id)
spawn( 0 )
M.open()
return
sleep(20)
//connected.drive() *****RM from 40.93.3S
for(var/obj/machinery/mass_driver/M in world)
if(M.id == id)
M.power = connected.power
M.drive()
sleep(50)
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == id)
spawn( 0 )
M.close()
return
return
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
if(istype(src, /obj/machinery/computer/pod/old))
M = new /obj/item/weapon/circuitboard/olddoor( A )
if(istype(src, /obj/machinery/computer/pod/old/syndicate))
M = new /obj/item/weapon/circuitboard/syndicatedoor( A )
if(istype(src, /obj/machinery/computer/pod/old/swf))
M = new /obj/item/weapon/circuitboard/swfdoor( A )
else //it's not an old computer. Generate standard pod circuitboard.
M = new /obj/item/weapon/circuitboard/pod( A )
for (var/obj/C in src)
C.loc = loc
M.id = id
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
attack_hand(user)
return
/obj/machinery/computer/pod/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
if(..())
return
var/dat = "<HTML><BODY><TT><B>Mass Driver Controls</B>"
user.machine = src
var/d2
if (timing)
d2 = text("<A href='?src=\ref[];time=0'>Stop Time Launch</A>", src)
else
d2 = text("<A href='?src=\ref[];time=1'>Initiate Time Launch</A>", src)
var/second = time % 60
var/minute = (time - second) / 60
dat += text("<HR>\nTimer System: []\nTime Left: [][] <A href='?src=\ref[];tp=-30'>-</A> <A href='?src=\ref[];tp=-1'>-</A> <A href='?src=\ref[];tp=1'>+</A> <A href='?src=\ref[];tp=30'>+</A>", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
if (connected)
var/temp = ""
var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
for(var/t in L)
if (t == connected.power)
temp += text("[] ", t)
else
temp += text("<A href = '?src=\ref[];power=[]'>[]</A> ", src, t, t)
//Foreach goto(172)
dat += text("<HR>\nPower Level: []<BR>\n<A href = '?src=\ref[];alarm=1'>Firing Sequence</A><BR>\n<A href = '?src=\ref[];drive=1'>Test Fire Driver</A><BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", temp, src, src, src)
//*****RM from 40.93.3S
else
dat += text("<BR>\n<A href = '?src=\ref[];door=1'>Toggle Outer Door</A><BR>", src)
//*****
dat += text("<BR><BR><A href='?src=\ref[];mach_close=computer'>Close</A></TT></BODY></HTML>", user)
user << browse(dat, "window=computer;size=400x500")
onclose(user, "computer")
return
/obj/machinery/computer/pod/process()
..()
if (timing)
if (time > 0)
time = round(time) - 1
else
alarm()
time = 0
timing = 0
updateDialog()
return
/obj/machinery/computer/pod/Topic(href, href_list)
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.machine = src
if (href_list["power"])
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)
if (connected)
connected.power = t
else
if (href_list["alarm"])
alarm()
else
if (href_list["time"])
timing = text2num(href_list["time"])
else
if (href_list["tp"])
var/tp = text2num(href_list["tp"])
time += tp
time = min(max(round(time), 0), 120)
else
if (href_list["door"])
if(istype(src, /obj/machinery/computer/pod/old/syndicate))//Added here so Nuke ops don't go running naked into space before moving the shuttle.
if(syndicate_station_at_station == 0)
usr << "\red You need to launch the Syndicate Shuttle via the computer terminal at the head of the ship before departing."
return
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == id)
if (M.density)
spawn( 0 )
M.open()
return
else
spawn( 0 )
M.close()
return
//Foreach goto(298)
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/computer/pod/old
icon_state = "old"
name = "DoorMex Control Computer"
/obj/machinery/computer/pod/old/syndicate
name = "ProComp Executive IIc"
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
/obj/machinery/computer/pod/old/swf
name = "Magix System IV"
desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
+34 -5
View File
@@ -1,3 +1,21 @@
/obj/machinery/computer/robotics
name = "Robotics Control"
desc = "Used to remotely lockdown or detonate linked Cyborgs."
icon = 'computer.dmi'
icon_state = "robot"
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/robotics"
var
id = 0.0
temp = null
status = 0
timeleft = 60
stop = 0.0
screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
@@ -26,6 +44,9 @@
if(istype(user, /mob/living/silicon/robot))
if (R != user)
continue
if(R.scrambledcodes)
continue
dat += "[R.name] |"
if(R.stat)
dat += " Not Responding |"
@@ -140,10 +161,15 @@
if(R)
var/choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(R)
message_admins("\blue [key_name_admin(usr)] detonated [R.name]!")
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
R.self_destruct()
if(R && istype(R))
if(R.mind && R.mind.special_role && R.emagged)
R << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered."
R.ResetSecurityCodes()
else
message_admins("\blue [key_name_admin(usr)] detonated [R.name]!")
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
R.self_destruct()
else
usr << "\red Access Denied."
@@ -179,6 +205,8 @@
message_admins("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!")
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
R.emagged = 1
if(R.mind.special_role)
R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes
src.add_fingerprint(usr)
src.updateUsrDialog()
@@ -195,7 +223,8 @@
while(src.timeleft)
for(var/mob/living/silicon/robot/R in world)
R.self_destruct()
if(!R.scrambledcodes)
R.self_destruct()
return
+1 -1
View File
@@ -328,7 +328,7 @@ What a mess.*/
var/counter = 1
while(active2.fields[text("com_[]", counter)])
counter++
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053<BR>[]", authenticated, rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2556<BR>[]", authenticated, rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
if ("Delete Record (ALL)")
if (active1)
+3 -3
View File
@@ -71,7 +71,7 @@
else
for(var/obj/machinery/door/poddoor/M in machines)
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == src.id)
if (M.density)
spawn( 0 )
@@ -119,7 +119,7 @@
active = 1
icon_state = "launcheract"
for(var/obj/machinery/door/poddoor/M in machines)
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == src.id)
spawn( 0 )
M.open()
@@ -133,7 +133,7 @@
sleep(50)
for(var/obj/machinery/door/poddoor/M in machines)
for(var/obj/machinery/door/poddoor/M in world)
if (M.id == src.id)
spawn( 0 )
M.close()
+3 -3
View File
@@ -264,14 +264,14 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
..()
if (src.closeOtherId != null)
spawn (5)
for (var/obj/machinery/door/airlock/A in machines)
for (var/obj/machinery/door/airlock/A in world)
if (A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
open()
if (src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
if(src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_OPEN_DOOR) || src.operating)
return 0
use_power(50)
if(istype(src, /obj/machinery/door/airlock/glass))
@@ -284,7 +284,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
close()
if (src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
if(src.welded || src.locked || (!src.arePowerSystemsOn()) || (stat & NOPOWER) || src.isWireCut(AIRLOCK_WIRE_OPEN_DOOR) || src.operating)
return
..()
use_power(50)
+366 -402
View File
@@ -3,215 +3,388 @@
desc = "It opens and closes."
icon = 'doorint.dmi'
icon_state = "door1"
anchored = 1
opacity = 1
density = 1
layer = 2.7
anchored = 1
var/secondsElectrified = 0
var/visible = 1
var/p_open = 0
var/operating = 0
var/autoclose = 0
var/glass = 0
var/forcecrush = 0
var/holdopen = 0
/obj/machinery/door/Bumped(atom/AM)
if(p_open || operating) return
if(ismob(AM))
var/mob/M = AM
if(world.time - AM.last_bumped <= 60) return //NOTE do we really need that?
if(M.client && !M:handcuffed)
bumpopen(M)
else if(istype(AM, /obj/machinery/bot))
var/obj/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
open()
else if(istype(AM, /obj/effect/critter))
var/obj/effect/critter/critter = AM
if(critter.opensdoors) return
if(src.check_access_list(critter.access_list))
if(density)
open()
// else if(istype(AM, /obj/effect/alien/facehugger))
// if(src.check_access(null))
// if(density)
// open()
else if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
var
secondsElectrified = 0
visible = 1
p_open = 0
operating = 0
autoclose = 0
glass = 0
forcecrush = 0
holdopen = 0
proc/bumpopen(mob/user as mob)
proc/update_nearby_tiles(need_rebuild)
proc/requiresID() return 1
proc/animate(animation)
proc/open()
proc/close()
New()
..()
if(density)
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
layer = 3.1 //Above most items if closed
else
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
update_nearby_tiles(need_rebuild=1)
return
Del()
update_nearby_tiles()
..()
return
//process()
//return
Bumped(atom/AM)
if(p_open || operating) return
if(ismob(AM))
var/mob/M = AM
if(world.time - AM.last_bumped <= 60) return //NOTE do we really need that?
if(M.client && !M:handcuffed)
bumpopen(M)
return
if(istype(AM, /obj/machinery/bot))
var/obj/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
open()
return
if(istype(AM, /obj/effect/critter))
var/obj/effect/critter/critter = AM
if(critter.opensdoors) return
if(src.check_access_list(critter.access_list))
if(density)
open()
return
if(istype(AM, /obj/mecha))
var/obj/mecha/mecha = AM
if(density)
if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access)))
open()
else
flick("door_deny", src)
return
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
bumpopen(mob/user as mob)
if(operating) return
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(allowed(user) && density)
open()
else if(density)
flick("door_deny", src)
return
meteorhit(obj/M as obj)
src.open()
return
attack_ai(mob/user as mob)
return src.attack_hand(user)
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
return src.attackby(user, user)
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return ..()
if(src.operating || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(!src.requiresID())
user = null
if(src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
if(istype(I, /obj/item/weapon/card/emag))
var/obj/item/weapon/card/emag/E = I
if(E.uses)
E.uses--
else
return
if(istype(I, /obj/item/weapon/melee/energy/blade))
if(istype(src, /obj/machinery/door/airlock))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message(text("\blue The door has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
if((!src:arePowerSystemsOn()) || (stat & NOPOWER) || src:isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
var/obj/structure/door_assembly/temp
var/failsafe=0
switch(src:doortype)
if(0) temp=new/obj/structure/door_assembly/door_assembly_0(src.loc)
if(1) temp=new/obj/structure/door_assembly/door_assembly_com(src.loc)
if(2) temp=new/obj/structure/door_assembly/door_assembly_sec(src.loc)
if(3) temp=new/obj/structure/door_assembly/door_assembly_eng(src.loc)
if(4) temp=new/obj/structure/door_assembly/door_assembly_med(src.loc)
if(5) temp=new/obj/structure/door_assembly/door_assembly_mai(src.loc)
if(6) temp=new/obj/structure/door_assembly/door_assembly_ext(src.loc)
if(7) temp=new/obj/structure/door_assembly/door_assembly_g(src.loc)
else failsafe=1
if(!failsafe)
temp.anchored=0
step_away(temp,usr,15)
else del(temp)
del(src)
return
else
src:welded = 0
src:locked = 0
update_icon()
flick("door_spark", src)
sleep(6)
open()
operating = -1
return 1
if(src.allowed(user))
if(src.density)
open()
else
flick("door_deny", src)
/obj/machinery/door/proc/bumpopen(mob/user as mob)
if (src.operating)
var/holdopen_old = holdopen
holdopen = 0
close()
spawn(1)
holdopen = holdopen_old
else if (src.density)
flick("door_deny", src)
return
//if(world.timeofday-last_used <= 10)
// return
src.add_fingerprint(user)
if (!src.requiresID())
//don't care who they are or what they have, act as if they're NOTHING
user = null
if (src.allowed(user))
if (src.density)
//last_used = world.timeofday
blob_act()
if(prob(40))
del(src)
return
emp_act(severity)
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
open()
else if (src.density)
flick("door_deny", src)
return
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
spawn(300)
secondsElectrified = 0
..()
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
/obj/machinery/door/proc/update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
if(need_rebuild)
if(istype(source)) //Rebuild/update nearby group geometry
if(source.parent)
air_master.groups_to_rebuild += source.parent
else
air_master.tiles_to_update += source
if(istype(north))
if(north.parent)
air_master.groups_to_rebuild += north.parent
else
air_master.tiles_to_update += north
if(istype(south))
if(south.parent)
air_master.groups_to_rebuild += south.parent
else
air_master.tiles_to_update += south
if(istype(east))
if(east.parent)
air_master.groups_to_rebuild += east.parent
else
air_master.tiles_to_update += east
if(istype(west))
if(west.parent)
air_master.groups_to_rebuild += west.parent
else
air_master.tiles_to_update += west
else
if(istype(source)) air_master.tiles_to_update += source
if(istype(north)) air_master.tiles_to_update += north
if(istype(south)) air_master.tiles_to_update += south
if(istype(east)) air_master.tiles_to_update += east
if(istype(west)) air_master.tiles_to_update += west
return 1
/obj/machinery/door/New()
..()
if(density)
layer = 3.1 //Above most items if closed
else
layer = 2.7 //Under all objects if opened. 2.7 due to tables being at 2.6
update_nearby_tiles(need_rebuild=1)
/obj/machinery/door/Del()
update_nearby_tiles()
..()
/obj/machinery/door/meteorhit(obj/M as obj)
src.open()
return
/obj/machinery/door/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/attack_hand(mob/user as mob)
return src.attackby(user, user)
/obj/machinery/door/proc/requiresID()
return 1
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return ..()
if (src.operating || isrobot(user))
return
src.add_fingerprint(user)
if (!src.requiresID())
//don't care who they are or what they have, act as if they're NOTHING
user = null
if (src.density && (istype(I, /obj/item/weapon/card/emag) ||istype(I, /obj/item/weapon/melee/energy/blade)))
if(istype(I, /obj/item/weapon/card/emag))
var/obj/item/weapon/card/emag/E = I
if(E.uses)
E.uses--
else
return
src.operating = -1
if(istype(I, /obj/item/weapon/melee/energy/blade))
if(istype(src, /obj/machinery/door/airlock))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src.loc, 'blade1.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
for(var/mob/O in viewers(user, 3))
O.show_message(text("\blue The door has been sliced open by [] with an energy blade!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2)
if((!src:arePowerSystemsOn()) || (stat & NOPOWER) || src:isWireCut(AIRLOCK_WIRE_DOOR_BOLTS))
var/obj/structure/door_assembly/temp
var/failsafe=0
switch(src:doortype)
if(0) temp=new/obj/structure/door_assembly/door_assembly_0(src.loc)
if(1) temp=new/obj/structure/door_assembly/door_assembly_com(src.loc)
if(2) temp=new/obj/structure/door_assembly/door_assembly_sec(src.loc)
if(3) temp=new/obj/structure/door_assembly/door_assembly_eng(src.loc)
if(4) temp=new/obj/structure/door_assembly/door_assembly_med(src.loc)
if(5) temp=new/obj/structure/door_assembly/door_assembly_mai(src.loc)
if(6) temp=new/obj/structure/door_assembly/door_assembly_ext(src.loc)
if(7) temp=new/obj/structure/door_assembly/door_assembly_g(src.loc)
else failsafe=1
if(!failsafe)
temp.anchored=0
step_away(temp,usr,15)
else del(temp)
ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if(prob(25))
del(src)
return
else
src:welded = 0
src:locked = 0
update_icon()
flick("door_spark", src)
sleep(6)
open()
return 1
if (src.allowed(user))
if (src.density)
open()
if(3.0)
if(prob(80))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
return
update_icon()
if(density)
icon_state = "door1"
else
var/holdopen_old = holdopen
holdopen = 0
close()
spawn(1)
holdopen = holdopen_old
else if (src.density)
flick("door_deny", src)
icon_state = "door0"
return
animate(animation)
switch(animation)
if("opening")
if(p_open)
flick("o_doorc0", src)
else
flick("doorc0", src)
if("closing")
if(p_open)
flick("o_doorc1", src)
else
flick("doorc1", src)
if("deny")
flick("door_deny", src)
return
open()
if(!density) return 1
if (src.operating == 1) //doors can still open when emag-disabled
return
if(!ticker) return 0
if(!src.operating) //in case of emag
src.operating = 1
animate("opening")
src.sd_SetOpacity(0)
sleep(10)
src.layer = 2.7
src.density = 0
update_icon()
src.sd_SetOpacity(0)
update_nearby_tiles()
if(operating == 1) //emag again
src.operating = 0
if(autoclose)
spawn(150)
autoclose()
return 1
close()
if(density)
return 1
if (src.operating)
return
src.operating = 1
var/X = src:x
var/Y = src:y
var/Z = src:z
var/held = 1
if(src.holdopen && !forcecrush)
while(held == 1 && holdopen && !forcecrush) //If it is no longer hold open, it should close.
sleep(held? 10:40)
held = 0
var/list/objects = locate(X,Y,Z)
for(var/obj/T in objects)
if(!istype(T,/obj/machinery/door) && !(istype(T,/obj/machinery) && T.anchored == 1) && !istype(T,/obj/structure/cable) && !istype(T,/obj/structure/disposalpipe) && !(T.loc == get_turf(src)))
held = 1
for(var/mob/living/T in objects) //Geez, ghosts were OP.
held = 1
animate("closing")
src.density = 1
spawn(4)
if(!istype(src, /obj/machinery/door/window))
for(var/mob/living/L in src.loc) // Crush mobs and move them out of the way
if(src.forcecrush) // Save an AI, crush a limb
var/limbname = pick("l_arm", "r_arm", "l_hand","r_hand", "l_foot", "r_foot")
var/limbdisplay
for(var/organ in L:organs)
var/datum/organ/external/temp = L:organs["[organ]"]
if (istype(temp, /datum/organ/external) && temp.name == limbname)
limbdisplay = temp.display_name // Take the name for down below
temp.take_damage(rand(50,80), 0) //OH GOD IT HURTS
break
L << "\red The airlock crushes your [limbdisplay]!"
for(var/mob/O in viewers(L, null))
if(O == L)
continue
O.show_message("\red The airlock crushes [L.name]'s [limbdisplay]!", 1)
sleep(rand(2,8))
L << "\red The airlock forces you out of the way!" //Lucky you
for(var/mob/O in viewers(L, null))
O.show_message("\red The airlock pushes [L.name] out of the way!", 1)
var/list/lst = list(NORTH,SOUTH,EAST,WEST)
var/turf/T = get_random_turf(L, lst)
if(T)
L.loc = T
if(!src.forcecrush)
for(var/obj/item/I in src.loc) // Move items out of the way
if(!I.anchored)
var/list/lst = list(NORTH,SOUTH,EAST,WEST)
var/turf/T = get_random_turf(I, lst)
if(T)
I.loc = T
sleep(6)
update_icon()
if(src.visible && (!src.glass))
src.sd_SetOpacity(1)
if(operating == 1)
operating = 0
update_nearby_tiles()
return
update_nearby_tiles(need_rebuild)
if(!air_master) return 0
var/turf/simulated/source = loc
var/turf/simulated/north = get_step(source,NORTH)
var/turf/simulated/south = get_step(source,SOUTH)
var/turf/simulated/east = get_step(source,EAST)
var/turf/simulated/west = get_step(source,WEST)
if(need_rebuild)
if(istype(source)) //Rebuild/update nearby group geometry
if(source.parent)
air_master.groups_to_rebuild += source.parent
else
air_master.tiles_to_update += source
if(istype(north))
if(north.parent)
air_master.groups_to_rebuild += north.parent
else
air_master.tiles_to_update += north
if(istype(south))
if(south.parent)
air_master.groups_to_rebuild += south.parent
else
air_master.tiles_to_update += south
if(istype(east))
if(east.parent)
air_master.groups_to_rebuild += east.parent
else
air_master.tiles_to_update += east
if(istype(west))
if(west.parent)
air_master.groups_to_rebuild += west.parent
else
air_master.tiles_to_update += west
else
if(istype(source)) air_master.tiles_to_update += source
if(istype(north)) air_master.tiles_to_update += north
if(istype(south)) air_master.tiles_to_update += south
if(istype(east)) air_master.tiles_to_update += east
if(istype(west)) air_master.tiles_to_update += west
return 1
/obj/machinery/door/proc/autoclose()
var/obj/machinery/door/airlock/A = src
if ((!A.density) && !( A.operating ) && !(A.locked) && !( A.welded ))
close()
return
/obj/machinery/door/airlock/proc/ion_act()
if(src.z == 1 && src.density)
if(length(req_access) > 0 && !(12 in req_access))
@@ -238,212 +411,3 @@
else
close()
return
/obj/machinery/door/blob_act()
if(prob(40))
del(src)
/obj/machinery/door/emp_act(severity)
if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) )
open()
if(prob(40/severity))
if(secondsElectrified == 0)
secondsElectrified = -1
spawn(300)
secondsElectrified = 0
..()
/obj/machinery/door/ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if(prob(25))
del(src)
if(3.0)
if(prob(80))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
/obj/machinery/door/update_icon()
if(density)
icon_state = "door1"
else
icon_state = "door0"
return
/obj/machinery/door/proc/animate(animation)
switch(animation)
if("opening")
if(p_open)
flick("o_doorc0", src)
else
flick("doorc0", src)
if("closing")
if(p_open)
flick("o_doorc1", src)
else
flick("doorc1", src)
if("deny")
flick("door_deny", src)
return
/obj/machinery/door/proc/open()
if(!density)
return 1
if (src.operating == 1) //doors can still open when emag-disabled
return
if (!ticker)
return 0
if(!src.operating) //in case of emag
src.operating = 1
animate("opening")
src.sd_SetOpacity(0)
sleep(10)
src.layer = 2.7
src.density = 0
update_icon()
src.sd_SetOpacity(0)
update_nearby_tiles()
if(operating == 1) //emag again
src.operating = 0
if(autoclose)
spawn(150)
autoclose()
return 1
/obj/machinery/door/proc/close()
if(density)
return 1
if (src.operating)
return
src.operating = 1
var/X = src:x
var/Y = src:y
var/Z = src:z
var/held = 1
if(src.holdopen && !forcecrush)
while(held == 1 && holdopen && !forcecrush) //If it is no longer hold open, it should close.
sleep(held? 10:40)
held = 0
var/list/objects = locate(X,Y,Z)
for(var/obj/T in objects)
if(!istype(T,/obj/machinery/door) && !(istype(T,/obj/machinery) && T.anchored == 1) && !istype(T,/obj/structure/cable) && !istype(T,/obj/structure/disposalpipe) && !(T.loc == get_turf(src)))
held = 1
for(var/mob/living/T in objects) //Geez, ghosts were OP.
held = 1
animate("closing")
src.density = 1
spawn(4)
if(!istype(src, /obj/machinery/door/window))
for(var/mob/living/L in src.loc) // Crush mobs and move them out of the way
if(src.forcecrush) // Save an AI, crush a limb
var/limbname = pick("l_arm", "r_arm", "l_hand","r_hand", "l_foot", "r_foot")
var/limbdisplay
for(var/organ in L:organs)
var/datum/organ/external/temp = L:organs["[organ]"]
if (istype(temp, /datum/organ/external) && temp.name == limbname)
limbdisplay = temp.display_name // Take the name for down below
temp.take_damage(rand(50,80), 0) //OH GOD IT HURTS
break
L << "\red The airlock crushes your [limbdisplay]!"
for(var/mob/O in viewers(L, null))
if(O == L)
continue
O.show_message("\red The airlock crushes [L.name]'s [limbdisplay]!", 1)
sleep(rand(2,8))
L << "\red The airlock forces you out of the way!" //Lucky you
for(var/mob/O in viewers(L, null))
O.show_message("\red The airlock pushes [L.name] out of the way!", 1)
var/list/lst = list(NORTH,SOUTH,EAST,WEST)
var/turf/T = get_random_turf(L, lst)
if(T)
L.loc = T
if(!src.forcecrush)
for(var/obj/item/I in src.loc) // Move items out of the way
if(!I.anchored)
var/list/lst = list(NORTH,SOUTH,EAST,WEST)
var/turf/T = get_random_turf(I, lst)
if(T)
I.loc = T
sleep(6)
update_icon()
if(src.visible && (!src.glass))
src.sd_SetOpacity(1)
if(operating == 1)
operating = 0
update_nearby_tiles()
/obj/machinery/door/proc/autoclose()
var/obj/machinery/door/airlock/A = src
if ((!A.density) && !( A.operating ) && !(A.locked) && !( A.welded ))
close()
else return
/////////////////////////////////////////////////// Unpowered doors
/obj/machinery/door/unpowered/Bumped(atom/AM)
if(p_open || operating) return
if (src.locked)
return
if(ismob(AM))
var/mob/M = AM
if(world.time - AM.last_bumped <= 60) return
if(M.client && !M:handcuffed)
bumpopen(M)
else if(istype(AM, /obj/machinery/bot))
var/obj/machinery/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
open()
// else if(istype(AM, /obj/effect/alien/facehugger))
// if(src.check_access(null))
// if(density)
// open()
/obj/machinery/door/unpowered
autoclose = 0
var/locked = 0
/obj/machinery/door/unpowered/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/unpowered/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/door/unpowered/attack_hand(mob/user as mob)
return src.attackby(null, user)
/obj/machinery/door/unpowered/attackby(obj/item/I as obj, mob/user as mob)
if (src.operating)
return
if (src.locked)
return
src.add_fingerprint(user)
if (src.allowed(user))
if (src.density)
open()
else
close()
return
/obj/machinery/door/unpowered/shuttle
icon = 'shuttle.dmi'
name = "door"
icon_state = "door1"
opacity = 1
density = 1
+1
View File
@@ -1,5 +1,6 @@
/obj/machinery/door/unpowered
autoclose = 0
var/locked = 0
Bumped(atom/AM)
@@ -62,7 +62,6 @@ obj/machinery/embedded_controller
update_icon()
src.updateDialog()
..()
radio
var/frequency
+9 -3
View File
@@ -70,12 +70,18 @@
continue
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses)) continue
if (istype(H.glasses, /obj/item/clothing/glasses/sunglasses))
continue
if (istype(H.head, /obj/item/clothing/head/helmet/welding))
if(!H.head:up) continue
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice)) continue
if(!H.head:up)
continue
if (istype(H.wear_mask, /obj/item/clothing/mask/gas/voice))
continue
if (istype(O, /mob/living/carbon/alien))//So aliens don't get flashed (they have no external eyes)/N
continue
if (istype(O, /mob/living/silicon/robot))
if(O:flashproof())
continue
O.Weaken(strength)
if ((O.eye_stat > 15 && prob(O.eye_stat + 50)))
+108
View File
@@ -0,0 +1,108 @@
/obj/machinery/floodlight
name = "Emergency Floodlight"
icon = 'floodlight.dmi'
icon_state = "flood00"
density = 1
var/on = 0
var/obj/item/weapon/cell/cell = null
var/use = 1
var/unlocked = 0
var/open = 0
/obj/machinery/floodlight/proc/updateicon()
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
/obj/machinery/floodlight/process()
if (!on)
if (luminosity)
updateicon()
sd_SetLuminosity(0)
return
if(!luminosity && cell && cell.charge > 0)
sd_SetLuminosity(10)
updateicon()
if(!cell && luminosity)
on = 0
updateicon()
sd_SetLuminosity(0)
return
cell.charge -= use
if(cell.charge <= 0 && luminosity)
on = 0
updateicon()
sd_SetLuminosity(0)
return
/obj/machinery/floodlight/attack_hand(mob/user as mob)
if(open && cell)
cell.loc = usr
cell.layer = 20
if (user.hand )
user.l_hand = cell
else
user.r_hand = cell
cell.add_fingerprint(user)
updateicon()
cell.updateicon()
src.cell = null
user << "You remove the power cell"
return
if(on)
on = 0
user << "You turn off the light"
else
if(!cell)
return
if(cell.charge <= 0)
return
on = 1
user << "You turn on the light"
updateicon()
/obj/machinery/floodlight/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
if (!open)
if(unlocked)
unlocked = 0
user << "You screw the battery panel in place."
else
unlocked = 1
user << "You unscrew the battery panel."
if (istype(W, /obj/item/weapon/crowbar))
if(unlocked)
if(open)
open = 0
overlays = null
user << "You crowbar the battery panel in place."
else
if(unlocked)
open = 1
user << "You remove the battery panel."
if (istype(W, /obj/item/weapon/cell))
if(open)
if(cell)
user << "There is a power cell already installed."
else
user.drop_item()
W.loc = src
cell = W
user << "You insert the power cell."
updateicon()
/obj/machinery/floodlight/New()
src.cell = new/obj/item/weapon/cell(src)
cell.maxcharge = 1000
cell.charge = 1000
..()
+14
View File
@@ -11,6 +11,20 @@ Possible to do for anyone motivated enough:
Give an AI variable for different hologram icons.
Itegrate EMP effect to disable the unit.
*/
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
if(alert(user,"Would you like to request an AI's presence?",,"Yes","No") == "Yes")
if(last_request + 200 < world.time) //don't spam the AI with requests you jerk!
last_request = world.time
user << "<span class='notice'>You request an AI's presence.</span>"
var/area/area = get_area(src)
for(var/mob/living/silicon/ai/AI in world)
if(!AI.client) continue
AI << "<span class='info'>Your presence is requested at <a href='?src=\ref[AI];jumptoholopad=\ref[src]'>\the [area]</a>.</span>"
else
user << "<span class='notice'>A request for AI presence was already sent recently.</span>"
/obj/machinery/hologram/holopad/attack_ai(mob/living/silicon/ai/user)
if (!istype(user))
return
+5 -10
View File
@@ -191,10 +191,10 @@ obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient,
src.myseed = new /obj/item/seeds/harebell
if(10 to 11)
src.myseed = new /obj/item/seeds/amanitamycelium
if(6 to 9)
if(8 to 9)
src.myseed = new /obj/item/seeds/chantermycelium
//if(6 to 7) implementation for tower caps still kinda missing
// src.myseed = new /obj/item/seeds/towermycelium
if(6 to 7) // implementation for tower caps still kinda missing ~ Not Anymore! -Cheridan
src.myseed = new /obj/item/seeds/towermycelium
if(4 to 5)
src.myseed = new /obj/item/seeds/plumpmycelium
else
@@ -671,13 +671,8 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else if (istype(O, /obj/item/weapon/minihoe)) // The minihoe
//var/deweeding
if(src.weedlevel > 0)
user.visible_message("\red [user] starts uprooting the weeds.", "\red You start removing some weeds from the tray.")
sleep(10)
if(src.weedlevel > 1)
src.weedlevel -= rand(1,2) // Kill kill kill
else
src.weedlevel = 0
user << "Success!"
user.visible_message("\red [user] starts uprooting the weeds.", "\red You remove the weeds from the tray.")
src.weedlevel = 0
else
user << "\red This plot is completely devoid of weeds. It doesn't need uprooting."
+2 -3
View File
@@ -89,7 +89,6 @@
flick("[base_state]-spark", src)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
src.last_spark = world.time
@@ -124,12 +123,12 @@
active = 1
icon_state = "launcheract"
for(var/obj/machinery/sparker/M in machines)
for(var/obj/machinery/sparker/M in world)
if (M.id == src.id)
spawn( 0 )
M.ignite()
for(var/obj/machinery/igniter/M in machines)
for(var/obj/machinery/igniter/M in world)
if(M.id == src.id)
use_power(50)
M.on = !( M.on )
+10 -1
View File
@@ -100,7 +100,16 @@ Class Procs:
..()
/obj/machinery/process()//If you dont use process or power why are you here
// machines.Remove(src)Not going to do this till I test it a bit more
/*
Big note: if do not call ..() in any machinery subtype process() call or it will
be removed from the list of machines to iterate. It is, however, okay to call ..()
if the machine has a parent process() call. For instance, machinery/atmosphereics has a
root process() call, so things like cryocells can call ..() and not worry about
it getting removed from machines.
*/
machines.Remove(src) // uncommented by Doohl
return
/obj/machinery/emp_act(severity)

Some files were not shown because too many files have changed in this diff Show More