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

This commit is contained in:
Mloc
2012-04-30 19:20:26 +01:00
124 changed files with 14300 additions and 7114 deletions
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()
+174 -9
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
@@ -64,7 +65,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 +103,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 +156,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,9 +183,13 @@ 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>"
@@ -151,19 +198,137 @@ datum/shuttle_controller
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()
@@ -1147,6 +1147,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
+4 -1
View File
@@ -56,4 +56,7 @@
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/modlock = 0
var/lawcheck[1] //For stating laws!
var/ioncheck[1]
-25
View File
@@ -128,31 +128,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"
+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"
+201 -1
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)
@@ -1383,7 +1385,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 +1444,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 +1534,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)
+34 -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"
@@ -91,6 +122,7 @@
icon = 'shuttle.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
layer = 2.1
/turf/simulated/shuttle/wall
name = "wall"
@@ -136,13 +168,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)
+3 -2
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)
+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
@@ -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
+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
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)
+3 -3
View File
@@ -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)
+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")
+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
@@ -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!"
@@ -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"
+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"
+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)
@@ -90,19 +90,25 @@
del(src)
attack_ai(var/mob/user as mob)
attack_hand(user)
attack_hand(var/mob/user as mob)
// You need a multitool to use this.
if(user.equipped())
if(!istype(user.equipped(), /obj/item/device/multitool))
// You need a multitool to use this, or be silicon
if(!issilicon(user))
if(user.equipped())
if(!istype(user.equipped(), /obj/item/device/multitool))
return
else
return
else
return
if(stat & (BROKEN|NOPOWER) || !on)
return
var/obj/item/device/multitool/P = user.equipped()
var/obj/item/device/multitool/P = null
if(!issilicon(user))
P = user.equipped()
user.machine = src
var/dat
@@ -138,10 +144,12 @@
dat += "<br> <a href='?src=\ref[src];input=freq'>\[Add Filter\]</a>"
dat += "<hr>"
if(P.buffer)
dat += "<br><br>MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) <a href='?src=\ref[src];link=1'>\[Link\]</a> <a href='?src=\ref[src];flush=1'>\[Flush\]"
else
dat += "<br><br>MULTITOOL BUFFER: <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a>"
if(P)
if(P.buffer)
dat += "<br><br>MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) <a href='?src=\ref[src];link=1'>\[Link\]</a> <a href='?src=\ref[src];flush=1'>\[Flush\]"
else
dat += "<br><br>MULTITOOL BUFFER: <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a>"
dat += "</font>"
temp = ""
@@ -150,16 +158,19 @@
Topic(href, href_list)
if(usr.equipped())
if(!istype(usr.equipped(), /obj/item/device/multitool))
if(!issilicon(usr))
if(usr.equipped())
if(!istype(usr.equipped(), /obj/item/device/multitool))
return
else
return
else
return
if(stat & (BROKEN|NOPOWER) || !on)
return
var/obj/item/device/multitool/P = usr.equipped()
var/obj/item/device/multitool/P = null
if(!issilicon(usr))
P = usr.equipped()
if(href_list["input"])
switch(href_list["input"])
@@ -205,27 +216,30 @@
if(href_list["unlink"])
var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
temp = "<font color = #666633>-% Removed \ref[T] [T.name] from linked entities. %-</font color>"
if(text2num(href_list["unlink"]) <= length(links))
var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
temp = "<font color = #666633>-% Removed \ref[T] [T.name] from linked entities. %-</font color>"
// Remove link entries from both T and src.
if(src in T.links)
T.links.Remove(src)
links.Remove(T)
// Remove link entries from both T and src.
if(src in T.links)
T.links.Remove(src)
links.Remove(T)
if(href_list["link"])
if(P.buffer)
if(!(src in P.buffer.links))
P.buffer.links.Add(src)
if(P)
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
if(P.buffer)
if(!(src in P.buffer.links))
P.buffer.links.Add(src)
temp = "<font color = #666633>-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-</font color>"
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
else
temp = "<font color = #666633>-% Unable to acquire buffer %-</font color>"
temp = "<font color = #666633>-% Successfully linked with \ref[P.buffer] [P.buffer.name] %-</font color>"
else
temp = "<font color = #666633>-% Unable to acquire buffer %-</font color>"
if(href_list["buffer"])
@@ -244,3 +258,4 @@
updateUsrDialog()
+1 -1
View File
@@ -108,7 +108,7 @@
if(href_list["network"])
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
if(newnet && usr in range(1, src))
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
@@ -35,7 +35,7 @@
winset(editingcode, "tcscode", "is-disabled=false")
// If the player's not manning the keyboard anymore, adjust everything
if(!(editingcode in range(1, src)) || editingcode.machine != src)
if( (!(editingcode in range(1, src)) && !issilicon(editingcode)) || (editingcode.machine != src && !issilicon(editingcode)))
if(editingcode)
winshow(editingcode, "Telecomms IDE", 0) // hide the window!
editingcode = null
@@ -169,6 +169,7 @@
editingcode = usr
winshow(editingcode, "Telecomms IDE", 1) // show the IDE
winset(editingcode, "tcscode", "is-disabled=false")
winset(editingcode, "tcscode", "text=\"\"")
var/showcode = dd_replacetext(storedcode, "\\\"", "\\\\\"")
showcode = dd_replacetext(storedcode, "\"", "\\\"")
winset(editingcode, "tcscode", "text=\"[showcode]\"")
@@ -189,7 +190,7 @@
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
if(newnet && usr in range(1, src))
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
@@ -211,7 +212,7 @@
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_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
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
@@ -222,7 +223,7 @@
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
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
+2 -2
View File
@@ -154,6 +154,8 @@
if(W)
W.loc = src.loc
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/weapon/weldingtool) && W:welding )
if(!W:remove_fuel(0,user))
user << "\blue You need more welding fuel to complete this task."
@@ -161,8 +163,6 @@
src.welded =! src.welded
for(var/mob/M in viewers(src))
M.show_message("\red [src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "\red You hear welding.", 2)
else if(istype(W,/obj/item/weapon/packageWrap))
return
else
src.attack_hand(user)
return
+50 -38
View File
@@ -1,12 +1,12 @@
/obj/structure/closet/secure_closet/medicine
name = "Medicine Closet"
desc = "Filled with medical junk."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medical1"
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemed1"
req_access = list(access_medical)
@@ -28,13 +28,13 @@
/obj/structure/closet/secure_closet/anaesthetic
name = "Anesthetic"
desc = "Used to knock people out, either by sleeping gas or brute force."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medical1"
desc = "Used to knock people out."
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemed1"
req_access = list(access_medical)
@@ -51,6 +51,31 @@
/obj/structure/closet/secure_closet/doctor_personal
name = "Doctor's Locker"
req_access = list(access_medical)
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemed1"
New()
..()
sleep(2)
new /obj/item/wardrobe/doctor(src)
//
var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/medical(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/device/flashlight/pen(src)
new /obj/item/weapon/cartridge/medical(src)
new /obj/item/device/radio/headset/headset_med(src)
return
/obj/structure/closet/secure_closet/chemist_personal
name = "Chemist's Locker"
req_access = list(access_chemistry)
@@ -67,25 +92,6 @@
new /obj/item/device/pda/toxins(src)
return
/obj/structure/closet/secure_closet/doctor_personal
name = "Doctor's Locker"
req_access = list(access_medical)
New()
..()
sleep(2)
new /obj/item/wardrobe/doctor(src)
//
var/obj/item/weapon/storage/backpack/medic/BPK = new /obj/item/weapon/storage/backpack/medic(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/medical(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/device/flashlight/pen(src)
new /obj/item/weapon/cartridge/medical(src)
new /obj/item/device/radio/headset/headset_med(src)
return
/obj/structure/closet/secure_closet/genetics_personal
name = "Geneticist's Locker"
req_access = list(access_medlab)
@@ -122,6 +128,12 @@
/obj/structure/closet/secure_closet/CMO
name = "Chief Medical Officer's Locker"
req_access = list(access_cmo)
icon_state = "cmosecure1"
icon_closed = "cmosecure"
icon_locked = "cmosecure1"
icon_opened = "cmosecureopen"
icon_broken = "cmosecurebroken"
icon_off = "cmosecure1"
New()
..()
@@ -159,12 +171,12 @@
/obj/structure/closet/secure_closet/chemical
name = "Chemical Closet"
desc = "Store dangerous chemicals in here."
icon_state = "medical1"
icon_closed = "medical"
icon_locked = "medical1"
icon_opened = "medicalopen"
icon_broken = "medicalbroken"
icon_off = "medical1"
icon_state = "securemed1"
icon_closed = "securemed"
icon_locked = "securemed1"
icon_opened = "securemedopen"
icon_broken = "securemedbroken"
icon_off = "securemed1"
req_access = list(access_medical)
+31 -18
View File
@@ -1,7 +1,37 @@
/obj/structure/closet/secure_closet/scientist
name = "Scientist's Locker"
req_access = list(access_research)
icon_state = "secureres1"
icon_closed = "secureres"
icon_locked = "secureres1"
icon_opened = "secureresopen"
icon_broken = "secureresbroken"
icon_off = "secureres1"
New()
..()
sleep(2)
new /obj/item/wardrobe/scientist(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/toxins(src)
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/radio/headset/headset_sci(src)
/obj/structure/closet/secure_closet/rd
name = "Research Director's Locker"
req_access = list(access_rd)
icon_state = "rdsecure1"
icon_closed = "rdsecure"
icon_locked = "rdsecure1"
icon_opened = "rdsecureopen"
icon_broken = "rdsecurebroken"
icon_off = "rdsecure1"
New()
..()
@@ -16,21 +46,4 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/flash(src)
new /obj/item/device/radio/headset/heads/rd(src)
//
/obj/structure/closet/secure_closet/scientist
name = "Scientist's Locker"
req_access = list(access_research)
New()
..()
sleep(2)
new /obj/item/wardrobe/scientist(src)
//
var/obj/item/weapon/storage/backpack/BPK = new /obj/item/weapon/storage/backpack(src)
var/obj/item/weapon/storage/box/B = new(BPK)
new /obj/item/weapon/pen(B)
new /obj/item/device/pda/toxins(src)
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/radio/headset/headset_sci(src)
//
@@ -1,7 +1,12 @@
/obj/structure/closet/secure_closet/RD
name = "Research Director"
req_access = list(access_rd)
icon_state = "rdsecure1"
icon_closed = "rdsecure"
icon_locked = "rdsecure1"
icon_opened = "rdsecureopen"
icon_broken = "rdsecurebroken"
icon_off = "rdsecure1"
New()
..()
+2 -1
View File
@@ -339,7 +339,8 @@ mob/proc/flash_weak_pain()
if(Metroid)
Metroid.SStun = 1
sleep(rand(5,20))
Metroid.SStun = 0
if(Metroid)
Metroid.SStun = 0
spawn(0)
Metroid.canmove = 0
@@ -106,6 +106,7 @@
if(isigniter(W))
var/obj/item/device/assembly/igniter/I = W
if(I.secured) return 0
if(src.igniter) return
user.remove_from_mob(I)
I.loc = src
igniter = I
+5 -4
View File
@@ -129,11 +129,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if(!src.loc)
on = 0
var/area/A = get_area(src)
if(!A || !isarea(A) || !A.master)
on = 0
else
on = A.master.powered(EQUIP) // set "on" to the power status
var/area/A = src.loc.loc
if(!A || !isarea(A) || !A.master)
on = 0
else
on = A.master.powered(EQUIP) // set "on" to the power status
if(!on)
icon_state = "intercom-p"
+3 -1
View File
@@ -224,9 +224,11 @@
playsound(src.loc, 'Crowbar.ogg', 75, 1)
user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.")
else
var/aforce = W.force
if(reinf) aforce /= 2.0
src.health = max(0, src.health - aforce)
if(W.damtype == BRUTE || W.damtype == BURN)
src.health = max(0, src.health - aforce)
playsound(src.loc, 'Glasshit.ogg', 75, 1)
if (src.health <= 7)
src.anchored = 0
+114
View File
@@ -0,0 +1,114 @@
/* Simple object type, calls a proc when "stepped" on by something */
/obj/step_trigger
var/affect_ghosts = 0
var/stopper = 1 // stops throwers
invisibility = 101 // nope cant see this shit
anchored = 1
/obj/step_trigger/proc/Trigger(var/atom/movable/A)
return 0
/obj/step_trigger/HasEntered(H as mob|obj)
..()
if(!H)
return
if(istype(H, /mob/dead/observer) && !affect_ghosts)
return
Trigger(H)
/* Tosses things in a certain direction */
/obj/step_trigger/thrower
var/direction = SOUTH // the direction of throw
var/tiles = 3 // if 0: forever until atom hits a stopper
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
var/speed = 1 // delay of movement
var/facedir = 0 // if 1: atom faces the direction of movement
var/nostop = 0 // if 1: will only be stopped by teleporters
var/list/affecting = list()
Trigger(var/atom/movable/A)
var/curtiles = 0
var/stopthrow = 0
for(var/obj/step_trigger/thrower/T in orange(2, src))
if(A in T.affecting)
return
if(ismob(A))
var/mob/M = A
if(immobilize)
M.canmove = 0
affecting.Add(A)
while(A && !stopthrow)
if(tiles)
if(curtiles >= tiles)
break
if(A.z != src.z)
break
curtiles++
sleep(speed)
// Calculate if we should stop the process
if(!nostop)
for(var/obj/step_trigger/T in get_step(A, direction))
if(T.stopper && T != src)
stopthrow = 1
else
for(var/obj/step_trigger/teleporter/T in get_step(A, direction))
if(T.stopper)
stopthrow = 1
if(A)
var/predir = A.dir
step(A, direction)
if(!facedir)
A.dir = predir
affecting.Remove(A)
if(ismob(A))
var/mob/M = A
if(immobilize)
M.canmove = 1
/* Stops things thrown by a thrower, doesn't do anything */
/obj/step_trigger/stopper
/* Instant teleporter */
/obj/step_trigger/teleporter
var/teleport_x = 0 // teleportation coordinates (if one is null, then no teleport!)
var/teleport_y = 0
var/teleport_z = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
A.x = teleport_x
A.y = teleport_y
A.z = teleport_z
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
/obj/step_trigger/teleporter/random
var/teleport_x_offset = 0
var/teleport_y_offset = 0
var/teleport_z_offset = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
A.x = rand(teleport_x, teleport_x_offset)
A.y = rand(teleport_y, teleport_y_offset)
A.z = rand(teleport_z, teleport_z_offset)
+1 -1
View File
@@ -243,7 +243,7 @@ var/syndicate_elite_shuttle_timeleft = 0
elite_squad.readyalert()//Trigger alarm for the spec ops area.
syndicate_elite_shuttle_moving_to_station = 1
syndicate_elite_shuttle_time = world.timeofday
syndicate_elite_shuttle_time = world.timeofday + SYNDICATE_ELITE_MOVETIME
spawn(0)
syndicate_elite_process()
+9 -1
View File
@@ -12,8 +12,11 @@
s["host"] = host ? host : null
s["players"] = list()
s["admins"] = 0
var/admins = 0
var/n = 0
for(var/client/C)
n++
if(C.holder && C.holder.level >= 0) //not retired admin
if(!C.stealth) //stealthmins dont count as admins
@@ -25,4 +28,9 @@
s["player[n]"] = "[C.key]"
s["players"] = n
s["end"] = "#end"
return list2params(s)
// 7 + s["players"] + 1 = index of s["revinfo"]
s["revision"] = revdata.revision
s["admins"] = admins
return list2params(s)
+29 -41
View File
@@ -1283,58 +1283,46 @@ turf/simulated/floor/return_siding_icon_state()
// Okay, so let's make it so that people can travel z levels but not nuke disks!
// if(ticker.mode.name == "nuclear emergency") return
if (src.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || src.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1))
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
del(A)
return
if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level.
del(A) //The disk's Del() proc ensures a new one is created
return
if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels
return
if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(A, /mob/living))
var/mob/living/MM = A
if(MM.client)
MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is."
return
// else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") Sandbox_Spacemove(A)
var/move_to_z_str = pickweight(accessable_z_levels)
else
if (src.x <= 2 || A.x >= (world.maxx - 1) || src.y <= 2 || A.y >= (world.maxy - 1))
if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust))
del(A)
return
var/move_to_z = text2num(move_to_z_str)
if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear)))
if(istype(A, /mob/living))
var/mob/living/MM = A
if(MM.client)
MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is."
return
if(!move_to_z)
return
A.z = move_to_z
if(src.x <= TRANSITIONEDGE)
A.x = world.maxx - TRANSITIONEDGE - 2
var/move_to_z_str = pickweight(accessable_z_levels)
else if (A.x >= (world.maxx - TRANSITIONEDGE - 1))
A.x = TRANSITIONEDGE + 1
var/move_to_z = text2num(move_to_z_str)
else if (src.y <= TRANSITIONEDGE)
A.y = world.maxy - TRANSITIONEDGE -2
if(!move_to_z)
return
else if (A.y >= (world.maxy - TRANSITIONEDGE - 1))
A.y = TRANSITIONEDGE +1
A.z = move_to_z
if(src.x <= 2)
A.x = world.maxx - 2
else if (A.x >= (world.maxx - 1))
A.x = 3
else if (src.y <= 2)
A.y = world.maxy - 2
else if (A.y >= (world.maxy - 1))
A.y = 3
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
// if(istype(A, /obj/structure/closet/coffin))
// coffinhandler.Add(A)
spawn (0)
if ((A && A.loc))
A.loc.Entered(A)
/*
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
var/cur_x
+1 -1
View File
@@ -195,6 +195,7 @@
verbs += /client/proc/spawn_xeno
verbs += /client/proc/toggleprayers
verbs += /client/proc/deadmin_self
verbs += /client/proc/tension_report
verbs += /proc/possess
verbs += /proc/release
verbs += /client/proc/admin_deny_shuttle
@@ -229,7 +230,6 @@
//verbs += /proc/togglebuildmode --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/tension_report
verbs += /client/proc/toggleadminhelpsound
else return
+1
View File
@@ -17,6 +17,7 @@
M << "\blue \icon[cross] <b><font color=purple>PRAY: </font>[key_name(src, M)] (<A HREF='?src=\ref[M.client.holder];adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?src=\ref[M.client.holder];adminplayervars=\ref[src]'>VV</A>) (<A HREF='?src=\ref[M.client.holder];adminplayersubtlemessage=\ref[src]'>SM</A>) (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[src]'>JMP</A>) (<A HREF='?src=\ref[M.client.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
usr << "Your prayers have been received by the gods."
//feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]")
+17 -17
View File
@@ -462,23 +462,23 @@
if (href_list["create_vaccine"])
if(!src.wait)
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting
var/datum/disease/D = new vaccine_type
var/name = input(usr,"Name:","Name the vaccine",D.name)
if(!name || name == " ") name = D.name
B.name = "[name] vaccine bottle"
B.reagents.add_reagent("vaccine",15,vaccine_type)
del(D)
wait = 1
var/datum/reagents/R = beaker.reagents
var/datum/reagent/blood/Blood = null
for(var/datum/reagent/blood/L in R.reagent_list)
if(L)
Blood = L
break
var/list/res = Blood.data["resistances"]
spawn(res.len*500)
src.wait = null
if(B)
var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting
var/datum/disease/D = new vaccine_type
if(D)
B.name = "[D.name] vaccine bottle"
B.reagents.add_reagent("vaccine",15,vaccine_type)
del(D)
wait = 1
var/datum/reagents/R = beaker.reagents
var/datum/reagent/blood/Blood = null
for(var/datum/reagent/blood/L in R.reagent_list)
if(L)
Blood = L
break
var/list/res = Blood.data["resistances"]
spawn(res.len*500)
src.wait = null
else
src.temphtml = "The replicator is not ready yet."
src.updateUsrDialog()
+6 -5
View File
@@ -759,13 +759,14 @@ datum
if(M:eyecheck() <= 0)
flick("e_flash", M.flash)
for(var/i = 1, i <= created_volume, i++)
for(var/i = 1, i <= created_volume + rand(1,2), i++)
var/chosen = pick(borks)
var/obj/B = new chosen
B.loc = get_turf_loc(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(B, pick(NORTH,SOUTH,EAST,WEST))
if(B)
B.loc = get_turf_loc(holder.my_atom)
if(prob(50))
for(var/j = 1, j <= rand(1, 3), j++)
step(B, pick(NORTH,SOUTH,EAST,WEST))
+34 -1
View File
@@ -6,6 +6,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/storage/wcoat
name = "waistcoat"
desc = "The height of class."
@@ -13,6 +14,24 @@
item_state = "wcoat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/suit/bluetag
name = "blue laser tag armour"
desc = "Blue Pride, Station Wide"
icon_state = "bluetag"
item_state = "bluetag"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/suit/redtag
name = "red laser tag armour"
desc = "Pew pew pew"
icon_state = "redtag"
item_state = "redtag"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
/obj/item/clothing/suit/storage/apron
name = "apron"
desc = "A basic blue apron. It has a large pocket you can store things in."
@@ -21,6 +40,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
allowed = list (/obj/item/weapon/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/nutrient,/obj/item/weapon/minihoe)
/obj/item/clothing/suit/storage/chef
name = "chef's apron"
desc = "An apron used by a high class chef. Has a few pockets for nic-naks."
@@ -33,6 +53,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
allowed = list (/obj/item/weapon/kitchenknife,/obj/item/weapon/butch)
/obj/item/clothing/suit/storage/chef/classic
name = "classic chef's apron"
desc = "A basic, dull, white chef's apron."
@@ -40,18 +61,21 @@
item_state = "apronchef"
body_parts_covered = UPPER_TORSO|LOWER_TORSO
/obj/item/clothing/suit/hazardvest
name = "hazard vest"
desc = "A high-visibility vest used in work zones."
icon_state = "hazard"
item_state = "hazard"
/obj/item/clothing/suit/suspenders
name = "suspenders"
desc = "They suspend the illusion of the mime's play."
icon = 'belts.dmi'
icon_state = "suspenders"
/obj/item/clothing/suit/syndicatefake
name = "red space suit replica"
icon_state = "syndicate"
@@ -62,6 +86,7 @@
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/storage/captunic
name = "captain's parade tunic"
desc = "Worn by a Captain to show their class."
@@ -70,6 +95,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEJUMPSUIT
/obj/item/clothing/suit/nun
name = "nun robe"
desc = "Maximum piety in this star system."
@@ -92,14 +118,16 @@
item_state = "chaplain_hoodie"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
/obj/item/clothing/suit/hastur
name = "Hastur's robes"
name = "\improper Hastur's robes"
desc = "Robes not meant to be worn by man"
icon_state = "hastur"
item_state = "hastur"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/imperium_monk
name = "imperium monk robes"
desc = "A set of strange robes."
@@ -108,6 +136,7 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/chickensuit
name = "chicken suit"
desc = "Bwak!"
@@ -116,6 +145,7 @@
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HEAD
flags_inv = HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/monkeysuit
name = "monkey suit"
desc = "A suit that looks like a primate"
@@ -124,6 +154,7 @@
body_parts_covered = UPPER_TORSO|ARMS|LOWER_TORSO|LEGS|FEET|HANDS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
/obj/item/clothing/suit/holidaypriest
name = "holiday priest"
desc = "This is a nice holiday my son."
@@ -131,6 +162,8 @@
item_state = "holidaypriest"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
// BubbleWrap - Nothing to see here
/obj/item/clothing/suit/cardborg
+15
View File
@@ -67,6 +67,14 @@
item_state = "jumpsuitdown"
color = "jumpsuitdown"
/obj/item/clothing/under/fluff/olddressuniform
name = "retired dress uniform"
desc = "A retired Station Head of Staff uniform, phased out twenty years ago for the newer jumpsuit design, but still acceptable dress. Lovingly maintained."
icon = 'custom_items.dmi'
icon_state = "olddressuniform"
item_state = "olddressuniform"
color = "olddressuniform"
//////////// Useable Items
/obj/item/weapon/pen/fluff/multi
@@ -101,6 +109,13 @@
icon = 'custom_items.dmi'
icon_state = "maye_daye_1"
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/johann_erzatz_1
name = "vintage thermos"
desc = "An older thermos with a faint shine."
icon = 'custom_items.dmi'
icon_state = "johann_erzatz_1"
volume = 50
//////////// Misc Items
/obj/item/fluff/wes_solari_1
+2
View File
@@ -2000,6 +2000,8 @@
new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(spawnloc)
user << "You cut the potato."
del(src)
else
..()
/obj/item/weapon/reagent_containers/food/snacks/rawsticks
name = "raw potato sticks"
+30
View File
@@ -44,6 +44,36 @@ proc/move_mining_shuttle()
else
fromArea = locate(/area/shuttle/mining/station)
toArea = locate(/area/shuttle/mining/outpost)
var/list/dstturfs = list()
var/throwy = world.maxy
for(var/turf/T in toArea)
dstturfs += T
if(T.y < throwy)
throwy = T.y
// hey you, get out of the way!
for(var/turf/T in dstturfs)
// find the turf to move things to
var/turf/D = locate(T.x, throwy - 1, 1)
//var/turf/E = get_step(D, SOUTH)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
// NOTE: Commenting this out to avoid recreating mass driver glitch
/*
spawn(0)
AM.throw_at(E, 1, 1)
return
*/
if(istype(T, /turf/simulated))
del(T)
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
fromArea.move_contents_to(toArea)
if (mining_shuttle_location)
mining_shuttle_location = 0
@@ -84,6 +84,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/Move(NewLoc, direct)
if(NewLoc)
loc = NewLoc
for(var/obj/step_trigger/S in NewLoc)
S.HasEntered(src)
return
loc = get_turf(src) //Get out of closets and such as a ghost
if((direct & NORTH) && y < world.maxy)
@@ -95,6 +98,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if((direct & WEST) && x > 1)
x--
for(var/obj/step_trigger/S in locate(x, y, z))
S.HasEntered(src)
/mob/dead/observer/examine()
if(usr)
usr << desc
+3
View File
@@ -193,11 +193,13 @@
var/status = ""
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
if(halloss > 0)
if(prob(30))
brutedamage += halloss
if(prob(30))
burndamage += halloss
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
@@ -208,6 +210,7 @@
status += " and "
if(burndamage > 40)
status += "peeling away"
else if(burndamage > 10)
status += "blistered"
else if(burndamage > 0)
@@ -180,14 +180,14 @@
distance = 1
if (src.stat == 1 || stat == 2)
msg += "<span class='warning'>[name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep.</span>\n"
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
if((!isbreathing || holdbreath) && distance <= 3)
msg += "<span class='warning'>[name] does not appear to be breathing.</span>\n"
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0 && src.stat == 1 && distance <= 1)
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
spawn(15)
usr << "\blue [name] has a pulse!"
usr << "\blue [t_He] has a pulse!"
if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1))
if(distance <= 1)
@@ -195,7 +195,19 @@
for(var/mob/O in viewers(usr.loc, null))
O.show_message("[usr] checks [src]'s pulse.", 1)
spawn(15)
usr << "\red [name] has no pulse!"
if(!src.client)
var/foundghost = 0
for(var/mob/dead/observer/G in world)
if(G.client)
if(G.corpse == src)
foundghost++
break
if(!foundghost)
usr << "<span class='deadsay'>[t_He] has no pulse and [t_his] soul has departed...</span>"
else
usr << "<span class='deadsay'>[t_He] has no pulse...</span>"
msg += "<span class='warning'>"
/* if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
@@ -205,9 +217,9 @@
if (src.cloneloss)
if (src.cloneloss < 30)
msg += "<span class='warning'>[src.name] looks slightly... unfinished?</span>\n"
msg += "[t_He] looks slightly... unfinished?\n"
else
msg += "<span class='warning'>[src.name] looks very... unfinished?</B></span>\n"
msg += "<B>[t_He] looks very... unfinished?</B>\n"
/* if (src.getFireLoss())
if (src.getFireLoss() < 30)
@@ -230,7 +242,10 @@
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if (!src.client && !admin_observing)
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
msg += "[t_He] [t_has] a vacant stare...\n"
if (src.digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
var/list/wound_descriptions = list()
var/list/wound_flavor_text = list()
+10 -22
View File
@@ -1098,8 +1098,7 @@
else
m_select.screen_loc = null
var/suit_img //A bit of kludge to make belts go under coats, but on other suits
var/suit_stain
if (wear_suit)
/*if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL))
src << "\red You burst out of the [wear_suit.name]!"
@@ -1113,7 +1112,7 @@
c:layer = initial(c:layer)*/
if (istype(wear_suit, /obj/item/clothing/suit))
var/t1 = wear_suit.icon_state
suit_img = image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
if (wear_suit)
if (wear_suit.blood_DNA)
var/icon/stain_icon = null
@@ -1123,7 +1122,7 @@
stain_icon = icon('blood.dmi', "coatblood[!lying ? "" : "2"]")
else
stain_icon = icon('blood.dmi', "suitblood[!lying ? "" : "2"]")
suit_stain = image("icon" = stain_icon, "layer" = MOB_LAYER)
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
wear_suit.screen_loc = ui_oclothing
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
if (handcuffed)
@@ -1137,24 +1136,6 @@
hand = 0
drop_item()
hand = h
// Belt
var/belt_img //A bit of kludge to make belts go under coats, but on other suits
if (belt)
var/t1 = belt.item_state
if (!t1)
t1 = belt.icon_state
belt_img = image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
belt.screen_loc = ui_belt
//A bit of kludge to make belts go under coats, but on other suits
if (istype(wear_suit, /obj/item/clothing/suit/storage/det_suit) || istype(wear_suit, /obj/item/clothing/suit/storage/labcoat))
overlays += belt_img
overlays += suit_img
overlays += suit_stain
else
overlays += suit_img
overlays += suit_stain
overlays += belt_img
if (lying)
@@ -1188,6 +1169,13 @@
overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
head.screen_loc = ui_head
// Belt
if (belt)
var/t1 = belt.item_state
if (!t1)
t1 = belt.icon_state
overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
belt.screen_loc = ui_belt
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see the face
if (wear_id)
@@ -32,6 +32,30 @@
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
return
if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove))
var/damage = rand(0, 9)
if(!damage)
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] has attempted to punch [src]!</B>")
return 0
var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(M.mutations & HULK) damage += 5
playsound(loc, "punch", 25, 1, -1)
visible_message("\red <B>[M] has punched [src]!</B>")
apply_damage(damage, HALLOSS, affecting, armor_block)
if(damage >= 9)
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(4, WEAKEN, armor_block)
UpdateDamageIcon()
return
switch(M.a_intent)
if("help")
if(health > 0)
@@ -143,7 +143,7 @@ emp_act
apply_damage(power, I.damtype, affecting, armor, is_cut(I), I.name)
var/bloody = 0
if((I.damtype == BRUTE) && prob(25 + is_sharp(I) * 50 + (I.force * 2)))
if(((I.damtype == BRUTE) || (I.damtype == HALLOSS)) && prob(25 + is_sharp(I) * 50 + (I.force * 2)))
I.add_blood(src) //Make the weapon bloody, not the person.
bloody = 1
var/turf/location = loc
+13 -4
View File
@@ -186,15 +186,24 @@
// a.hallucinate(src)
if(!handling_hal && hallucination > 20)
spawn handle_hallucinations() //The not boring kind!
hallucination = max(hallucination - 2, 0)
hallucination = max(hallucination - 2, 0) // A more compact way of doing it. DMTG
//if(health < 0)
// for(var/obj/a in hallucinations)
// del a
else
halloss = 0
//halloss = 0
for(var/atom/a in hallucinations)
del a
if(halloss > 100)
src << "You're too tired to keep going..."
for(var/mob/O in viewers(src, null))
if(O == src)
continue
O.show_message(text("\red <B>[src] slumps to the ground panting, too weak to continue fighting."), 1)
Paralyse(15)
setHalLoss(99)
if(mutations2 & mSmallsize)
if(!(pass_flags & PASSTABLE))
pass_flags |= PASSTABLE
@@ -927,7 +936,7 @@
if(getOxyLoss() > 50) Paralyse(3)
if(sleeping)
// adjustHalLoss(-5)
adjustHalLoss(-5)
if(paralysis <= 0)
Paralyse(2)
if (prob(10) && health && !hal_crit) spawn(0) emote("snore")
@@ -1483,4 +1492,4 @@ snippets
plcheck = t_plasma
oxcheck = t_oxygen
G.turf_add(T, G.total_moles())
*/
*/
+1 -1
View File
@@ -3,7 +3,7 @@
// proc to find out in how much pain the mob is at the moment
/mob/living/carbon/proc/updateshock()
src.traumatic_shock = src.getOxyLoss() + src.getToxLoss() + src.getFireLoss() + 1.2*src.getBruteLoss() + 2*src.getCloneLoss()
src.traumatic_shock = src.getOxyLoss() + src.getToxLoss() + src.getFireLoss() + 1.2*src.getBruteLoss() + 2*src.getCloneLoss() + src.halloss
if(reagents.has_reagent("alkysine"))
src.traumatic_shock -= 10
if(reagents.has_reagent("inaprovaline"))
+4 -1
View File
@@ -22,18 +22,21 @@
adjustOxyLoss(damage/(blocked+1))
if(CLONE)
adjustCloneLoss(damage/(blocked+1))
if(HALLOSS)
adjustHalLoss(damage/(blocked+1))
UpdateDamageIcon()
updatehealth()
return 1
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0)
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0, var/halloss = 0)
if(blocked >= 2) return 0
if(brute) apply_damage(brute, BRUTE, def_zone, blocked)
if(burn) apply_damage(burn, BURN, def_zone, blocked)
if(tox) apply_damage(tox, TOX, def_zone, blocked)
if(oxy) apply_damage(oxy, OXY, def_zone, blocked)
if(clone) apply_damage(clone, CLONE, def_zone, blocked)
if(halloss) apply_damage(halloss, HALLOSS, def_zone, blocked)
return 1
+94 -1
View File
@@ -93,4 +93,97 @@
/mob/living/silicon/robot/proc/clear_ion_laws()
laws_sanity_check()
laws.clear_ion_laws()
laws.clear_ion_laws()
/mob/living/silicon/robot/proc/statelaws() // -- TLE
// set category = "AI Commands"
// set name = "State Laws"
src.say("Current Active Laws:")
//src.laws_sanity_check()
//src.laws.show_laws(world)
var/number = 1
sleep(10)
if (src.laws.zeroth)
if (src.lawcheck[1] == "Yes") //This line and the similar lines below make sure you don't state a law unless you want to. --NeoFite
src.say("0. [src.laws.zeroth]")
sleep(10)
for (var/index = 1, index <= src.laws.ion.len, index++)
var/law = src.laws.ion[index]
var/num = ionnum()
if (length(law) > 0)
if (src.ioncheck[index] == "Yes")
src.say("[num]. [law]")
sleep(10)
for (var/index = 1, index <= src.laws.inherent.len, index++)
var/law = src.laws.inherent[index]
if (length(law) > 0)
if (src.lawcheck[index+1] == "Yes")
src.say("[number]. [law]")
sleep(10)
number++
for (var/index = 1, index <= src.laws.supplied.len, index++)
var/law = src.laws.supplied[index]
if (length(law) > 0)
if(src.lawcheck.len >= number+1)
if (src.lawcheck[number+1] == "Yes")
src.say("[number]. [law]")
sleep(10)
number++
/mob/living/silicon/robot/verb/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
set category = "Robot Commands"
set name = "State Laws"
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
if (src.laws.zeroth)
if (!src.lawcheck[1])
src.lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
list += {"<A href='byond://?src=\ref[src];lawc=0'>[src.lawcheck[1]] 0:</A> [src.laws.zeroth]<BR>"}
for (var/index = 1, index <= src.laws.ion.len, index++)
var/law = src.laws.ion[index]
if (length(law) > 0)
if (!src.ioncheck[index])
src.ioncheck[index] = "Yes"
list += {"<A href='byond://?src=\ref[src];lawi=[index]'>[src.ioncheck[index]] [ionnum()]:</A> [law]<BR>"}
src.ioncheck.len += 1
var/number = 1
for (var/index = 1, index <= src.laws.inherent.len, index++)
var/law = src.laws.inherent[index]
if (length(law) > 0)
src.lawcheck.len += 1
if (!src.lawcheck[number+1])
src.lawcheck[number+1] = "Yes"
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
number++
for (var/index = 1, index <= src.laws.supplied.len, index++)
var/law = src.laws.supplied[index]
if (length(law) > 0)
src.lawcheck.len += 1
if (!src.lawcheck[number+1])
src.lawcheck[number+1] = "Yes"
list += {"<A href='byond://?src=\ref[src];lawc=[number]'>[src.lawcheck[number+1]] [number]:</A> [law]<BR>"}
number++
list += {"<br><br><A href='byond://?src=\ref[src];laws=1'>State Laws</A>"}
usr << browse(list, "window=laws")
+54 -1
View File
@@ -207,6 +207,20 @@
viewalerts = 1
src << browse(dat, "window=robotalerts&can_close=0")
/mob/living/silicon/robot/proc/ai_roster()
set category = "Robot Commands"
set name = "Show Crew Manifest"
var/dat = "<html><head><title>Crew Roster</title></head><body><b>Crew Roster:</b><br><br>"
for (var/datum/data/record/t in data_core.general)
dat += "[t.fields["name"]] - [t.fields["rank"]]<br>"
dat += "</body></html>"
src << browse(dat, "window=airoster")
onclose(src, "airoster")
/mob/living/silicon/robot/blob_act()
if (stat != 2)
adjustBruteLoss(60)
@@ -937,6 +951,26 @@
else
src << "Module isn't activated"
installed_modules()
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawc"])
switch(lawcheck[L+1])
if ("Yes") lawcheck[L+1] = "No"
if ("No") lawcheck[L+1] = "Yes"
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
checklaws()
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
var/L = text2num(href_list["lawi"])
switch(ioncheck[L])
if ("Yes") ioncheck[L] = "No"
if ("No") ioncheck[L] = "Yes"
// src << text ("Switching Law [L]'s report status to []", lawcheck[L+1])
checklaws()
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
statelaws()
return
/mob/living/silicon/robot/proc/uneq_active()
@@ -1102,7 +1136,26 @@ Frequency:
. = ..()
if ((s_active && !( s_active in contents ) ))
s_active.close(src)
return
if(module)
if(module.type == /obj/item/weapon/robot_module/janitor) //you'd think checking the module would work
var/turf/tile = get_turf(loc)
tile.clean_blood()
for(var/obj/effect/R in tile)
if(istype(R, /obj/effect/rune) || istype(R, /obj/effect/decal/cleanable) || istype(R, /obj/effect/overlay))
del(R)
for(var/obj/item/cleaned_item in tile)
cleaned_item.clean_blood()
for(var/mob/living/carbon/human/cleaned_human in tile) //HUE HUE I CLEAN U
if(cleaned_human.lying)
cleaned_human.clean_blood()
cleaned_human << "\red [src] cleans your face!"
for(var/obj/item/carried_item in cleaned_human.contents)
carried_item.clean_blood()
return
/mob/living/silicon/robot/proc/reset_module()
modtype = "robot"
@@ -163,9 +163,7 @@
New()
..()
src.modules += new /obj/item/weapon/cleaner(src)
src.modules += new /obj/item/weapon/mop(src)
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/trashbag(src)
src.emag = new /obj/item/weapon/cleaner(src)
+63
View File
@@ -1149,3 +1149,66 @@ note dizziness decrements automatically in the mob's Life() proc.
/mob/proc/AdjustParalysis(amount)
paralysis = max(paralysis + amount,0)
return
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching
/mob/proc/getBruteLoss()
return bruteloss
/mob/proc/adjustBruteLoss(var/amount)
bruteloss = max(bruteloss + amount, 0)
/mob/proc/getOxyLoss()
return oxyloss
/mob/proc/adjustOxyLoss(var/amount)
oxyloss = max(oxyloss + amount, 0)
/mob/proc/setOxyLoss(var/amount)
oxyloss = amount
/mob/proc/getToxLoss()
return toxloss
/mob/proc/adjustToxLoss(var/amount)
toxloss = max(toxloss + amount, 0)
/mob/proc/setToxLoss(var/amount)
toxloss = amount
/mob/proc/getFireLoss()
return fireloss
/mob/proc/adjustFireLoss(var/amount)
fireloss = max(fireloss + amount, 0)
/mob/proc/getCloneLoss()
return cloneloss
/mob/proc/adjustCloneLoss(var/amount)
cloneloss = max(cloneloss + amount, 0)
/mob/proc/setCloneLoss(var/amount)
cloneloss = amount
/mob/proc/getHalLoss()
return halloss
/mob/proc/adjustHalLoss(var/amount)
halloss = max(halloss + amount, 0)
/mob/proc/setHalLoss(var/amount)
halloss = amount
/mob/proc/getBrainLoss()
return brainloss
/mob/proc/adjustBrainLoss(var/amount)
brainloss = max(brainloss + amount, 0)
/mob/proc/setBrainLoss(var/amount)
brainloss = amount
// ++++ROCKDTBEN++++ MOB PROCS //END
-55
View File
@@ -288,58 +288,3 @@ the mob is also allowed to move without any sort of restriction. For instance, i
//Singularity wants you!
var/grav_delay = 0
var/being_strangled = 0
// ++++ROCKDTBEN++++ MOB PROCS
/mob/proc/getBruteLoss()
return bruteloss
/mob/proc/adjustBruteLoss(var/amount)
bruteloss = max(bruteloss + amount, 0)
/mob/proc/getOxyLoss()
return oxyloss
/mob/proc/adjustOxyLoss(var/amount)
oxyloss = max(oxyloss + amount, 0)
/mob/proc/setOxyLoss(var/amount)
oxyloss = amount
/mob/proc/getToxLoss()
return toxloss
/mob/proc/adjustToxLoss(var/amount)
toxloss = max(toxloss + amount, 0)
/mob/proc/setToxLoss(var/amount)
toxloss = amount
/mob/proc/getFireLoss()
return fireloss
/mob/proc/adjustFireLoss(var/amount)
fireloss = max(fireloss + amount, 0)
/mob/proc/getCloneLoss()
return cloneloss
/mob/proc/adjustCloneLoss(var/amount)
cloneloss = max(cloneloss + amount, 0)
/mob/proc/setCloneLoss(var/amount)
cloneloss = amount
/mob/proc/getBrainLoss()
return brainloss
/mob/proc/adjustBrainLoss(var/amount)
brainloss = max(brainloss + amount, 0)
/mob/proc/setBrainLoss(var/amount)
brainloss = amount
// ++++ROCKDTBEN++++ MOB PROCS //END
+3 -1
View File
@@ -212,6 +212,8 @@
O << "To use something, simply click or double-click it."
O << {"Use say ":s to speak to fellow cyborgs and the AI through binary."}
O.verbs += /mob/living/silicon/robot/proc/ai_roster
O.job = "Cyborg"
O.mmi = new /obj/item/device/mmi(O)
@@ -412,4 +414,4 @@
del(src)
return O
return O
+2 -4
View File
@@ -55,18 +55,16 @@
hot_air.temperature = hot_air.temperature - energy_transfer/hot_air_heat_capacity
cold_air.temperature = cold_air.temperature + heat/cold_air_heat_capacity
world << "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]"
if(input1.network)
input1.network.update = 1
if(input2.network)
input2.network.update = 1
add_avail(lastgen)
add_avail(lastgen/5)
// update icon overlays only if displayed level has changed
var/genlev = max(0, min( round(11*lastgen / 100000), 11))
var/genlev = max(0, min( round(11*lastgen / 500000), 11))
if(genlev != lastgenlev)
lastgenlev = genlev
updateicon()
+2 -1
View File
@@ -14,6 +14,7 @@
last_power = 0
active = 0
locked = 0
drainratio = 1
process()
if(P)
@@ -21,7 +22,7 @@
P.air_contents.toxins = 0
eject()
else
P.air_contents.toxins -= 0.001
P.air_contents.toxins -= 0.001*drainratio
return
@@ -12,12 +12,15 @@
active_power_usage = 300
var
frequency = 1
active = 0
fire_delay = 100
last_shot = 0
shot_number = 0
state = 0
locked = 0
energy = 0
mega_energy = 0
verb/rotate()
@@ -76,7 +76,8 @@ field_generator power level display
power = field_generator_max_power
anchored = 1
warming_up = 3
turn_on()
start_fields()
update_icon()
Varedit_start = 0
if(src.active == 2)
@@ -7,8 +7,9 @@
density = 1
var
movement_range = 10
energy = 10 //energy in eV?
energy = 10 //energy in eV
mega_energy = 0 //energy in MeV
frequency = 1
ionizing = 0
particle_type
additional_particles = 0
@@ -41,13 +42,15 @@
var/obj/machinery/rust/particle_catcher/collided_catcher = A
if(particle_type && particle_type != "neutron")
if(collided_catcher.AddParticles(particle_type, 1 + additional_particles))
collided_catcher.AddEnergy(energy,mega_energy)
collided_catcher.parent.AddEnergy(energy,mega_energy)
del (src)
if( istype(A,/obj/machinery/rust/core) )
var/obj/machinery/rust/core/collided_core = A
if(particle_type && particle_type != "neutron")
if(collided_core.AddParticles(particle_type, 1 + additional_particles))
collided_core.AddEnergy(energy,mega_energy)
var/energy_loss_ratio = abs(collided_core.owned_field.frequency - frequency) / 1e9
collided_core.owned_field.mega_energy += mega_energy - mega_energy * energy_loss_ratio
collided_core.owned_field.energy += energy - energy * energy_loss_ratio
del (src)
return
+2 -2
View File
@@ -111,14 +111,14 @@
#define TURBGENG 0.8
/obj/machinery/power/turbine/process()
if(!compressor.starter)
return
overlays = null
if(stat & BROKEN)
return
if(!compressor)
stat |= BROKEN
return
if(!compressor.starter)
return
lastgen = ((compressor.rpm / TURBGENQ)**TURBGENG) *TURBGENQ
add_avail(lastgen)
+78 -3
View File
@@ -1,5 +1,5 @@
/obj/item/weapon/gun/energy/laser
name = "\improper Laser Gun"
name = "laser gun"
desc = "a basic weapon designed kill with concentrated energy bolts"
icon_state = "laser"
item_state = "laser"
@@ -17,7 +17,7 @@
obj/item/weapon/gun/energy/laser/retro
name ="\improper Retro Laser"
name ="retro laser"
icon_state = "retro"
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
@@ -68,9 +68,84 @@ obj/item/weapon/gun/energy/laser/retro
/obj/item/weapon/gun/energy/lasercannon
name = "\improper Laser Cannon"
name = "laser cannon"
desc = "With the L.A.S.E.R. cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
icon_state = "lasercannon"
fire_sound = 'lasercannonfire.ogg'
origin_tech = "combat=4;materials=3;powerstorage=3"
projectile_type = "/obj/item/projectile/beam/heavylaser"
////////Laser Tag////////////////////
/obj/item/weapon/gun/energy/laser/bluetag
name = "laser tag gun"
icon_state = "bluetag"
desc = "Standard issue weapon of the Imperial Guard"
projectile_type = "/obj/item/projectile/bluetag"
special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
return 1
M << "\red You need to be wearing your laser tag vest!"
return 0
var/charge_tick = 0
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
process()
charge_tick++
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
power_supply.give(100)
update_icon()
return 1
/obj/item/weapon/gun/energy/laser/redtag
name = "laser tag gun"
icon_state = "redtag"
desc = "Standard issue weapon of the Imperial Guard"
projectile_type = "/obj/item/projectile/redtag"
var/charge_tick = 0
special_check(var/mob/living/carbon/human/M)
if(ishuman(M))
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
return 1
M << "\red You need to be wearing your laser tag vest!"
return 0
New()
..()
processing_objects.Add(src)
Del()
processing_objects.Remove(src)
..()
process()
charge_tick++
if(charge_tick < 4) return 0
charge_tick = 0
if(!power_supply) return 0
power_supply.give(100)
update_icon()
return 1
+34 -4
View File
@@ -1,11 +1,12 @@
/obj/item/projectile/beam
name = "\improper Laser"
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 40
damage_type = BURN
flag = "laser"
eyeblur = 4
var/frequency = 1
var/ID = 0
var/main = 0
@@ -56,20 +57,21 @@
flag = "laser"
eyeblur = 2
/obj/item/projectile/beam/heavylaser
name = "\improper Heavy Laser"
name = "heavy laser"
icon_state = "heavylaser"
damage = 60
/obj/item/projectile/beam/pulse
name = "\improper Pulse"
name = "pulse"
icon_state = "u_laser"
damage = 40
/obj/item/projectile/beam/deathlaser
name = "\improper Death Laser"
name = "death laser"
icon_state = "heavylaser"
damage = 60
@@ -79,4 +81,32 @@
/obj/item/projectile/bluetag
name = "lasertag beam"
icon_state = "ice_2"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
M.Weaken(5)
return 1
/obj/item/projectile/redtag
name = "lasertag beam"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
M.Weaken(5)
return 1
+1 -1
View File
@@ -511,7 +511,7 @@
for (var/mob/V in viewers(usr))
V.show_message("[user] dunks [GM.name] into the toilet!", 3)
if(do_after(user, 30))
if(G.state>1&&!GM.internal)
if(G && G.state>1 && !GM.internal)
GM.oxyloss += 5
else if(I.w_class < 4)
+10 -11
View File
@@ -2,7 +2,7 @@
desc = "A big wrapped package."
name = "large parcel"
icon = 'storage.dmi'
icon_state = "deliverycrate"
icon_state = "deliverycloset"
var/tmp/obj/wrapped = null
density = 1
var/sortTag = null
@@ -18,10 +18,10 @@
return unwrap()
proc/unwrap()
if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
src.wrapped.loc = (get_turf(src.loc))
if (istype(src.wrapped,/obj/structure/closet))
var/obj/structure/closet/O = src.wrapped
if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
wrapped.loc = (get_turf(src.loc))
if(istype(wrapped, /obj/structure/closet))
var/obj/structure/closet/O = wrapped
O.welded = waswelded
del(src)
return
@@ -172,9 +172,9 @@
afterattack(var/obj/target as obj, mob/user as mob)
if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) || istype(target,/obj/item/smallDelivery))
if(!(istype(target, /obj))) //this really shouldn't be necessary (but it is). -Pete
return
if(!istype(target,/obj))
if(istype(target, /obj/structure/table) || istype(target, /obj/structure/rack) || istype(target,/obj/item/smallDelivery))
return
if(target.anchored)
return
@@ -197,10 +197,11 @@
var/obj/structure/closet/crate/O = target
if (src.amount > 3 && !O.opened)
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.icon_state = "deliverycrate"
P.wrapped = O
O.loc = P
src.amount -= 3
else if(src.amount > 3)
else if(src.amount < 3)
user << "\blue You need more paper."
else if (istype (target, /obj/structure/closet))
var/obj/structure/closet/O = target
@@ -208,17 +209,15 @@
var/obj/structure/bigDelivery/P = new /obj/structure/bigDelivery(get_turf(O.loc))
P.wrapped = O
P.waswelded = O.welded
O.opened = 0
O.welded = 1
O.loc = P
src.amount -= 3
else if(src.amount > 3)
else if(src.amount < 3)
user << "\blue You need more paper."
else
user << "\blue The object you are trying to wrap is unsuitable for the sorting machinery!"
if (src.amount <= 0)
new /obj/item/weapon/c_tube( src.loc )
//SN src = null
del(src)
return
return
+2
View File
@@ -281,3 +281,5 @@ var/static/list/scarySounds = list('thudswoosh.ogg','Taser.ogg','armbomb.ogg','h
#define SEC_LEVEL_BLUE 1
#define SEC_LEVEL_RED 2
#define SEC_LEVEL_DELTA 3
#define TRANSITIONEDGE 7 //Distance from edge to move to another z-level
+2
View File
@@ -615,3 +615,5 @@ Doing this because FindTurfs() isn't even used
playsound(pt.loc, 'explosionfar.ogg', 100, 1,10)
pt.gas.temperature = 500+T0C
pt.ignite()
+1 -1
View File
@@ -409,7 +409,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"])]))