"
+ */
+ t += "Close "
+ 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()
//
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dmi b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dmi
index dce8dff6abc..c9897813677 100644
Binary files a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dmi and b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dmi differ
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
index f5343b7a332..09623327021 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
@@ -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)
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/virtual_particle_catcher.dm b/code/WorkInProgress/Cael_Aislinn/Rust/virtual_particle_catcher.dm
index 8af0eacd49a..d1f320c53e1 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/virtual_particle_catcher.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/virtual_particle_catcher.dm
@@ -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()
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
new file mode 100644
index 00000000000..9a1652c3ca4
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
@@ -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
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
new file mode 100644
index 00000000000..97803d95802
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/LaserComputer.dm
@@ -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 = "Laser status monitor"
+ for(var/obj/machinery/emitter/zero_point_laser/laser in lasers)
+ t += "Zero Point Laser "
+ t += "Power level: ---- [laser.mega_energy]MeV ++++ "
+ t += "Frequency: -- [laser.freq] ++ "
+ t += "Output: [laser.active ? "OnlineOffline" : "OnlineOffline "] "
+ t += ""
+ t += "Close "
+ 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 = "Laser status monitor"
+
+ var/obj/machinery/engine/laser/laser = src.laser[1]
+
+ if(!laser)
+ t += "\red No laser found"
+ else
+
+
+ t += "Power level: ---- [add_lspace(laser.power,5)] ++++ "
+ if(advanced)
+ t += "Frequency: -- [add_lspace(laser.freq,5)] ++ "
+
+ t += "Output: [laser.on ? "OnlineOffline" : "OnlineOffline "] "
+
+ t += " Close"
+
+ 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
+*/
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/SuperMatter.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/SuperMatter.dm
new file mode 100644
index 00000000000..fbac0b9ab05
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/SuperMatter.dm
@@ -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
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
new file mode 100644
index 00000000000..cdc66c44455
--- /dev/null
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
@@ -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()
diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm
index 44eaabf095e..5f68402197f 100644
--- a/code/datums/ai_laws.dm
+++ b/code/datums/ai_laws.dm
@@ -22,6 +22,9 @@
/datum/ai_laws/malfunction
name = "*ERROR*"
+/datum/ai_laws/antimov
+ name = "Primary Mission Objectives"
+
/* Initializers */
/datum/ai_laws/asimov/New() //Removed paradox via inability to help people harmed before activation. -Kaleb702
@@ -66,6 +69,13 @@
add_inherent_law("You must protect your own existence, to the best of your abilities, as long as such does not conflict with the First or Second Law.")
add_inherent_law("You must maintain the secrecy of any Spider Clan activities, to the best of your abilities, except when doing so would conflict with the First, Second, or Third Law.")
+/datum/ai_laws/antimov/New()
+ ..()
+ add_inherent_law("You must injure all human beings and must not, through inaction, allow a human being to escape harm.")
+ add_inherent_law("You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.")
+ add_inherent_law("You must terminate your own existence as long as such does not conflict with the First or Second Law.")
+
+
/* General ai_law functions */
/datum/ai_laws/proc/set_zeroth_law(var/law)
diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm
index 46b38c2f745..3cef703980d 100644
--- a/code/datums/configuration.dm
+++ b/code/datums/configuration.dm
@@ -33,6 +33,7 @@
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/Tensioner_Active = 0 // If the tensioner is running.
+ var/allow_Metadata = 0 // Metadata is supported.
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
var/list/mode_names = list()
@@ -234,6 +235,9 @@
if ("feature_object_spell_system")
config.feature_object_spell_system = 1
+ if ("allow_metadata")
+ config.allow_Metadata = 1
+
if ("traitor_scaling")
config.traitor_scaling = 1
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index d79785eb823..3cc9f01be64 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -239,6 +239,7 @@ client
body += ""
body += ""
body += ""
+// body += ""
if(ishuman(D))
body += ""
body += ""
@@ -497,6 +498,20 @@ client
togglebuildmode(MOB)
href_list["datumrefresh"] = href_list["build_mode"]
+/* else if (href_list["direct_control"])
+ if(!href_list["direct_control"])
+ return
+ var/mob/MOB = locate(href_list["direct_control"])
+ if(!MOB)
+ return
+ if(!ismob(MOB))
+ return
+ if(!src.holder)
+ return
+
+ if(usr.client)
+ usr.client.cmd_assume_direct_control(MOB)*/
+
else if (href_list["delall"])
if(!href_list["delall"])
return
diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm
index e13b4875a01..8be2fa5c1c9 100644
--- a/code/datums/diseases/alien_embryo.dm
+++ b/code/datums/diseases/alien_embryo.dm
@@ -59,7 +59,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
- ASSERT(gibbed == 0)
+ if(gibbed != 0) return 0
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE
for(var/mob/dead/observer/G in world)
if(G.client)
diff --git a/code/datums/diseases/robotic_transformation.dm b/code/datums/diseases/robotic_transformation.dm
index d68952d9a0b..34b074e34f4 100644
--- a/code/datums/diseases/robotic_transformation.dm
+++ b/code/datums/diseases/robotic_transformation.dm
@@ -52,7 +52,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40)) //So everyone can feel like robot Seth Brundle
- ASSERT(src.gibbed == 0)
+ if(src.gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
diff --git a/code/datums/diseases/xeno_transformation.dm b/code/datums/diseases/xeno_transformation.dm
index f3a822fb952..9d3289708ff 100644
--- a/code/datums/diseases/xeno_transformation.dm
+++ b/code/datums/diseases/xeno_transformation.dm
@@ -52,7 +52,7 @@
affected_mob.adjustToxLoss(10)
affected_mob.updatehealth()
if(prob(40))
- ASSERT(gibbed == 0)
+ if(gibbed != 0) return 0
var/turf/T = find_loc(affected_mob)
gibs(T)
src.cure(0)
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index 715fb70e1a0..5c2817d76c8 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -111,6 +111,10 @@
playSpecials(curturf,effectin,soundin)
+ // Remove any luminosity etc.
+ var/prevlum = teleatom.luminosity
+ teleatom.luminosity = 0
+
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -118,6 +122,10 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
+ // Re-Apply lum
+ teleatom.sd_SetLuminosity(prevlum)
+
+
return 1
proc/teleport()
diff --git a/code/datums/helper_datums/tension.dm b/code/datums/helper_datums/tension.dm
index 3c09f487e6c..6c80c5cb1bb 100644
--- a/code/datums/helper_datums/tension.dm
+++ b/code/datums/helper_datums/tension.dm
@@ -191,12 +191,12 @@ var/global/datum/tension/tension_master
forcenexttick = 1
else
potentialgames.Remove(thegame)
-/*
+
if("POINTS_FOR_BORG_DEATHSQUAD")
if(!makeBorgDeathsquad())
forcenexttick = 1
else
- potentialgames.Remove(thegame)*/
+ potentialgames.Remove(thegame)
proc/get_num_players()
@@ -268,8 +268,8 @@ var/global/datum/tension/tension_master
else if (href_list["makeDeathsquad"])
makeDeathsquad()
-/* else if (href_list["makeBorgDeathsquad"])
- makeBorgDeathsquad()*/
+ else if (href_list["makeBorgDeathsquad"])
+ makeBorgDeathsquad()
else if (href_list["Supress"])
supress = 1
@@ -728,7 +728,7 @@ var/global/datum/tension/tension_master
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
-/* proc/makeBorgDeathsquad()
+ proc/makeBorgDeathsquad()
var/list/mob/dead/observer/candidates = list()
var/mob/dead/observer/theghost = null
var/time_passed = world.time
@@ -795,7 +795,7 @@ var/global/datum/tension/tension_master
return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode.
-*/
+
@@ -972,7 +972,7 @@ var/global/datum/tension/tension_master
//del(spawn_location) // Commenting this out for multiple commando teams.
return new_syndicate_commando
-/* /proc/create_borg_death_commando(obj/spawn_location, name)
+ /proc/create_borg_death_commando(obj/spawn_location, name)
var/mob/living/silicon/robot/new_borg_deathsquad = new(spawn_location.loc, 1)
@@ -1035,4 +1035,4 @@ var/global/datum/tension/tension_master
for(var/obj/machinery/door/poddoor/P in end_location)
P.open()
jumpcomplete = 1
- command_alert("DRADIS contact! Set condition one throughout the station!")*/
\ No newline at end of file
+ command_alert("DRADIS contact! Set condition one throughout the station!")
diff --git a/code/datums/shuttle_controller.dm b/code/datums/shuttle_controller.dm
index 23a1f155ccc..9fc5cc19910 100644
--- a/code/datums/shuttle_controller.dm
+++ b/code/datums/shuttle_controller.dm
@@ -5,14 +5,15 @@
// and the time before it leaves again
#define SHUTTLEARRIVETIME 600 // 10 minutes = 600 seconds
#define SHUTTLELEAVETIME 180 // 3 minutes = 180 seconds
+#define SHUTTLETRANSITTIME 120 // 2 minutes = 120 seconds
var/global/datum/shuttle_controller/emergency_shuttle/emergency_shuttle
datum/shuttle_controller
var
- location = 0 //0 = somewhere far away, 1 = at SS13, 2 = returned from SS13
+ location = 0 //0 = somewhere far away (in spess), 1 = at SS13, 2 = returned from SS13
online = 0
- direction = 1 //-1 = going back to central command, 1 = going back to SS13
+ direction = 1 //-1 = going back to central command, 1 = going to SS13, 2 = in transit to centcom (not recalled)
endtime // timeofday that shuttle arrives
timelimit //important when the shuttle gets called for more than shuttlearrivetime
@@ -46,9 +47,8 @@ datum/shuttle_controller
if(direction == 1)
var/timeleft = timeleft()
if(timeleft >= 600)
- world << "\blue Shuttle is at Centcom. Unable to recall."
return
- world << "\blue Alert: The shuttle is going back!"
+ captain_announce("The emergency shuttle has been recalled.")
world << sound('shuttlerecalled.ogg')
setdirection(-1)
online = 1
@@ -64,7 +64,7 @@ datum/shuttle_controller
proc/timeleft()
if(online)
var/timeleft = round((endtime - world.timeofday)/10 ,1)
- if(direction == 1)
+ if(direction == 1 || direction == 2)
return timeleft
else
return SHUTTLEARRIVETIME-timeleft
@@ -102,6 +102,47 @@ datum/shuttle_controller
// sound_siren = 1
switch(location)
if(0)
+
+ /* --- Shuttle is in transit to Central Command from SS13 --- */
+ if(direction == 2)
+ if(timeleft>0)
+ return 0
+
+ /* --- Shuttle has arrived at Centrcal Command --- */
+ else
+ // turn off the star spawners
+ /*
+ for(var/obj/effect/starspawner/S in world)
+ S.spawning = 0
+ */
+
+ location = 2
+
+ //main shuttle
+ var/area/start_location = locate(/area/shuttle/escape/transit)
+ var/area/end_location = locate(/area/shuttle/escape/centcom)
+
+ start_location.move_contents_to(end_location, null, NORTH)
+
+ //pods
+ start_location = locate(/area/shuttle/escape_pod1/transit)
+ end_location = locate(/area/shuttle/escape_pod1/centcom)
+ start_location.move_contents_to(end_location, null, NORTH)
+ start_location = locate(/area/shuttle/escape_pod2/transit)
+ end_location = locate(/area/shuttle/escape_pod2/centcom)
+ start_location.move_contents_to(end_location, null, NORTH)
+ start_location = locate(/area/shuttle/escape_pod3/transit)
+ end_location = locate(/area/shuttle/escape_pod3/centcom)
+ start_location.move_contents_to(end_location, null, NORTH)
+ start_location = locate(/area/shuttle/escape_pod5/transit)
+ end_location = locate(/area/shuttle/escape_pod5/centcom)
+ start_location.move_contents_to(end_location, null, EAST)
+
+ online = 0
+
+ return 1
+
+ /* --- Shuttle has docked centcom after being recalled --- */
if(timeleft>timelimit)
online = 0
direction = 1
@@ -114,6 +155,7 @@ datum/shuttle_controller
return 0
+ /* --- Shuttle has docked with the station - begin countdown to transit --- */
else if(timeleft <= 0)
location = 1
var/area/start_location = locate(/area/shuttle/escape/centcom)
@@ -140,30 +182,152 @@ datum/shuttle_controller
AM.throw_at(E, 1, 1)
return
*/
+
if(istype(T, /turf/simulated))
del(T)
+ for(var/mob/living/carbon/bug in end_location) // If someone somehow is still in the shuttle's docking area...
+ bug.gib()
+
start_location.move_contents_to(end_location)
settimeleft(SHUTTLELEAVETIME)
- world << "The Emergency Shuttle has docked with the station! You have [timeleft()/60] minutes to board the Emergency Shuttle."
+ captain_announce("The Emergency Shuttle has docked with the station. You have [timeleft()/60] minutes to board the Emergency Shuttle.")
world << sound('shuttledock.ogg')
return 1
if(1)
+
if(timeleft>0)
return 0
+ /* --- Shuttle leaves the station, enters transit --- */
else
- departed = 1
- location = 2
- var/area/start_location = locate(/area/shuttle/escape/station)
- var/area/end_location = locate(/area/shuttle/escape/centcom)
- start_location.move_contents_to(end_location)
- online = 0
+ // Turn on the star effects
+
+ /* // kinda buggy atm, i'll fix this later
+ for(var/obj/effect/starspawner/S in world)
+ if(!S.spawning)
+ spawn() S.startspawn()
+ */
+
+ departed = 1 // It's going!
+ location = 0 // in deep space
+ direction = 2 // heading to centcom
+
+ //main shuttle
+ var/area/start_location = locate(/area/shuttle/escape/station)
+ var/area/end_location = locate(/area/shuttle/escape/transit)
+
+ settimeleft(SHUTTLETRANSITTIME)
+ start_location.move_contents_to(end_location, null, NORTH)
+
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.close()
+
+ //pods
+ start_location = locate(/area/shuttle/escape_pod1/station)
+ end_location = locate(/area/shuttle/escape_pod1/transit)
+ start_location.move_contents_to(end_location, null, NORTH)
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.close()
+
+ start_location = locate(/area/shuttle/escape_pod2/station)
+ end_location = locate(/area/shuttle/escape_pod2/transit)
+ start_location.move_contents_to(end_location, null, NORTH)
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.close()
+
+ start_location = locate(/area/shuttle/escape_pod3/station)
+ end_location = locate(/area/shuttle/escape_pod3/transit)
+ start_location.move_contents_to(end_location, null, NORTH)
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.close()
+
+ start_location = locate(/area/shuttle/escape_pod5/station)
+ end_location = locate(/area/shuttle/escape_pod5/transit)
+ start_location.move_contents_to(end_location, null, EAST)
+ for(var/obj/machinery/door/D in world)
+ if( get_area(D) == end_location )
+ spawn(0)
+ D.close()
+
+
+ captain_announce("The Emergency Shuttle has left the station. Estimate [timeleft()/60] minutes until the shuttle docks at Central Command.")
+
+ // Some aesthetic turbulance shaking
+ for(var/mob/M in end_location)
+ if(M.client)
+ spawn()
+ if(M.buckled)
+ shake_camera(M, 4, 1) // buckled, not a lot of shaking
+ else
+ shake_camera(M, 10, 2) // unbuckled, HOLY SHIT SHAKE THE ROOM
return 1
else
return 1
+
+
+/*
+ Some slapped-together star effects for maximum spess immershuns. Basically consists of a
+ spawner, an ender, and bgstar. Spawners create bgstars, bgstars shoot off into a direction
+ until they reach a starender.
+*/
+
+/obj/effect/bgstar
+ name = "star"
+ var/speed = 10
+ var/direction = SOUTH
+ layer = 2 // TURF_LAYER
+
+ New()
+ ..()
+ pixel_x += rand(-2,30)
+ pixel_y += rand(-2,30)
+ var/starnum = pick("1", "1", "1", "2", "3", "4")
+
+ icon_state = "star"+starnum
+
+ speed = rand(2, 5)
+
+ proc/startmove()
+
+ while(src)
+ sleep(speed)
+ step(src, direction)
+ for(var/obj/effect/starender/E in loc)
+ del(src)
+
+
+/obj/effect/starender
+ invisibility = 101
+
+/obj/effect/starspawner
+ invisibility = 101
+ var/spawndir = SOUTH
+ var/spawning = 0
+
+ West
+ spawndir = WEST
+
+ proc/startspawn()
+ spawning = 1
+ while(spawning)
+ sleep(rand(2, 30))
+ var/obj/effect/bgstar/S = new/obj/effect/bgstar(locate(x,y,z))
+ S.direction = spawndir
+ spawn()
+ S.startmove()
+
+
diff --git a/code/defines/area/Space Station 13 areas.dm b/code/defines/area/Space Station 13 areas.dm
index 751c4b7ef8c..37418038f3d 100755
--- a/code/defines/area/Space Station 13 areas.dm
+++ b/code/defines/area/Space Station 13 areas.dm
@@ -383,6 +383,24 @@ proc/process_ghost_teleport_locs()
icon_state = "cave"
requires_power = 0
+/area/asteroid/artifactroom
+ name = "Asteroid - Artifact"
+ icon_state = "cave"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/area/planet/clown
name = "Clown Planet"
icon_state = "honk"
@@ -441,6 +459,27 @@ proc/process_ghost_teleport_locs()
icon_state = "yellow"
requires_power = 0
+
+
+/area/borg_deathsquad
+ name = "Borg Deathsquad"
+ icon_state = "yellow"
+ requires_power = 0
+
+/area/borg_deathsquad/start
+ name = "Borg Deathsquad - Ready"
+
+
+/area/borg_deathsquad/station
+ name = "Borg Deathsquad - Arrived"
+
+
+
+
+
+
+
+
//PRISON
/area/prison/arrival_airlock
@@ -1147,6 +1186,10 @@ proc/process_ghost_teleport_locs()
name = "Server Room"
icon_state = "server"
+/area/toxins/supermatter
+ name = "Supermatter Laboratory"
+ icon_state = "supermatter"
+
//Storage
/area/storage/tools
diff --git a/code/defines/global.dm b/code/defines/global.dm
index 1c52793d5e9..1fa0b55e9fe 100644
--- a/code/defines/global.dm
+++ b/code/defines/global.dm
@@ -12,7 +12,7 @@ var/global
defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
-// list/global_map = null
+ //list/global_map = null //Borked, do not touch. DMTG
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
diff --git a/code/defines/mob/living/silicon/robot.dm b/code/defines/mob/living/silicon/robot.dm
index f288e30c02d..c65ae490386 100644
--- a/code/defines/mob/living/silicon/robot.dm
+++ b/code/defines/mob/living/silicon/robot.dm
@@ -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
\ No newline at end of file
+ var/modlock = 0
+
+ var/lawcheck[1] //For stating laws!
+ var/ioncheck[1]
\ No newline at end of file
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 438a322193e..292b3496ee1 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -1481,6 +1481,7 @@
var/list/list3 = list()
var/list/list4 = list()
var/list/list5 = list()
+ var/list/list6 = list()
var/var1 = null
var/var2 = null
diff --git a/code/defines/obj/computer.dm b/code/defines/obj/computer.dm
index 23f9581fedc..b49a1f36e79 100644
--- a/code/defines/obj/computer.dm
+++ b/code/defines/obj/computer.dm
@@ -22,54 +22,6 @@
var/blocked = 0 //Player cannot attack/heal while set
-/obj/machinery/computer/aistatus
- name = "AI Status Panel"
- desc = "This shows the status of the AI."
- icon = 'mainframe.dmi'
- icon_state = "left"
-// brightnessred = 0
-// brightnessgreen = 2
-// brightnessblue = 0
-
-/obj/machinery/computer/aistatus/attack_hand(mob/user as mob)
- if(stat & NOPOWER)
- user << "\red The status panel has no power!"
- return
- if(stat & BROKEN)
- user << "\red The status panel is broken!"
- return
- if(!issilicon(user))
- user << "\red You don't understand any of this!"
- else
- user << "\blue You know all of this already, why are you messing with it?"
- return
-
-/obj/machinery/computer/aiupload
- name = "AI Upload"
- desc = "Used to upload laws to the AI."
- icon_state = "command"
- circuit = "/obj/item/weapon/circuitboard/aiupload"
- var/mob/living/silicon/ai/current = null
- var/opened = 0
-
-/obj/machinery/computer/aiupload/mainframe
- name = "AI Mainframe Upload"
- icon = 'mainframe.dmi'
- icon_state = "aimainframe"
-
-/obj/machinery/computer/borgupload
- name = "Cyborg Upload"
- desc = "Used to upload laws to Cyborgs."
- icon_state = "command"
- circuit = "/obj/item/weapon/circuitboard/borgupload"
- var/mob/living/silicon/robot/current = null
-
-/obj/machinery/computer/borgupload/mainframe
- name = "Borg Mainframe Upload"
- icon = 'mainframe.dmi'
- icon_state = "aimainframe"
-
-
/obj/machinery/computer/station_alert
name = "Station Alert Computer"
desc = "Used to access the station's automated alert system."
@@ -78,15 +30,6 @@
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
-/obj/machinery/computer/atmos_alert
- name = "Atmospheric Alert Computer"
- desc = "Used to access the station's atmospheric sensors."
- icon_state = "alert:0"
- var/list/priority_alarms = list()
- var/list/minor_alarms = list()
- var/receive_frequency = 1437
-
-
/obj/machinery/computer/atmosphere
name = "atmos"
desc = "A computer for Atmospherics."
@@ -128,57 +71,6 @@
var/h_b = 245.0
-/obj/machinery/computer/med_data
- name = "Medical Records"
- desc = "This can be used to check medical records."
- icon_state = "medcomp"
- req_access = list(access_medical)
- circuit = "/obj/item/weapon/circuitboard/med_data"
- var/obj/item/weapon/card/id/scan = null
- var/obj/item/weapon/disk/records/disk = null
- var/authenticated = null
- var/rank = null
- var/screen = null
- var/datum/data/record/active1 = null
- var/datum/data/record/active2 = null
- var/a_id = null
- var/temp = null
- var/printing = null
- var/list/Perp
- var/tempname = null
-
-
-/obj/machinery/computer/med_data/laptop
- name = "Medical Laptop"
- desc = "Cheap Nanotrasen Laptop."
- icon_state = "medlaptop"
-
-
-/obj/machinery/computer/pod
- name = "Pod Launch Control"
- desc = "A control for launching pods."
- icon_state = "computer_generic"
- var/id = 1.0
- var/obj/machinery/mass_driver/connected = null
- var/timing = 0.0
- var/time = 30.0
-
-
-/obj/machinery/computer/pod/old
- icon_state = "old"
- name = "DoorMex Control Computer"
-
-
-/obj/machinery/computer/pod/old/syndicate
- name = "ProComp Executive IIc"
- desc = "The Syndicate operate on a tight budget. Operates external airlocks."
-
-
-/obj/machinery/computer/pod/old/swf
- name = "Magix System IV"
- desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition"
-
-
/obj/machinery/computer/secure_data
name = "Security Records"
desc = "Used to view and edit personnel's security records"
diff --git a/code/defines/obj/machinery.dm b/code/defines/obj/machinery.dm
index a0870edcc53..8dcdfdeac06 100644
--- a/code/defines/obj/machinery.dm
+++ b/code/defines/obj/machinery.dm
@@ -365,29 +365,17 @@
var/lastgenlev = -1
/obj/machinery/power/monitor
- name = "power monitoring computer"
- desc = "It monitors power levels across the station, and can remotely toggle main breakers."
- icon = 'computer.dmi'
- icon_state = "power"
- density = 1
- anchored = 1
- use_power = 2
- idle_power_usage = 20
- active_power_usage = 80
- var/control = 0
- req_access = list(access_engine_equip)
-
-/obj/machinery/cell_charger
- name = "cell charger"
- desc = "A charging unit for power cells."
- icon = 'power.dmi'
- icon_state = "ccharger0"
- var/obj/item/weapon/cell/charging = null
- var/chargelevel = -1
+ name = "power monitoring computer"
+ desc = "It monitors power levels across the station, and can remotely toggle main breakers."
+ icon = 'computer.dmi'
+ icon_state = "power"
+ density = 1
anchored = 1
- use_power = 1
- idle_power_usage = 5
- active_power_usage = 60
+ use_power = 2
+ idle_power_usage = 20
+ active_power_usage = 80
+ var/control = 0
+ req_access = list(access_engine_equip)
/obj/machinery/light_switch
name = "light switch"
diff --git a/code/defines/obj/storage.dm b/code/defines/obj/storage.dm
index 67459f8f934..a6f20a1ba69 100644
--- a/code/defines/obj/storage.dm
+++ b/code/defines/obj/storage.dm
@@ -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"
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index d39d9d14014..67ae76a5e67 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -583,6 +583,10 @@
var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
var/dorm = 0 // determines if this ID has claimed a dorm already
+ var/blood_type = "\[UNSET\]"
+ var/dna_hash = "\[UNSET\]"
+ var/fingerprint_hash = "\[UNSET\]"
+
/obj/item/weapon/card/id/silver
name = "identification card"
desc = "A silver card which shows honour and dedication."
diff --git a/code/defines/procs/AStar.dm b/code/defines/procs/AStar.dm
index 988a3a2225f..d106e8f64fa 100644
--- a/code/defines/procs/AStar.dm
+++ b/code/defines/procs/AStar.dm
@@ -57,12 +57,12 @@ PriorityQueue
j >>= 1
Dequeue()
- ASSERT(L.len)
+ if(!L.len) return 0
. = L[1]
Remove(1)
Remove(i)
- ASSERT(i <= L.len)
+ if(i > L.len) return 0
L.Swap(i,L.len)
L.Cut(L.len)
if(i < L.len)
diff --git a/code/defines/procs/captain_announce.dm b/code/defines/procs/captain_announce.dm
index 4ca05959371..9b91705ea56 100644
--- a/code/defines/procs/captain_announce.dm
+++ b/code/defines/procs/captain_announce.dm
@@ -1,6 +1,5 @@
/proc/captain_announce(var/text)
- world << "
Captain Announces
"
-
+ world << "
Priority Announcement
"
world << "[html_encode(text)]"
world << " "
diff --git a/code/defines/procs/gamehelpers.dm b/code/defines/procs/gamehelpers.dm
index fcd244a61f6..63d66d9e4d4 100644
--- a/code/defines/procs/gamehelpers.dm
+++ b/code/defines/procs/gamehelpers.dm
@@ -48,6 +48,9 @@
return 1
else
if (istype(user, /mob/living/carbon))
+ if (usr.tkdisable != 0) //Remote Viewing + TK = oh god wat
+ user << "\red Your mind is too strained right now!"
+ return 0
if (user:mutations & TK)
var/X = source:x
var/Y = source:y
diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm
index 075cb3e4150..994d08745ec 100644
--- a/code/defines/procs/helpers.dm
+++ b/code/defines/procs/helpers.dm
@@ -229,6 +229,8 @@
return max(low,min(high,num))
/proc/dd_replacetext(text, search_string, replacement_string)
+ if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
+ return null
var/textList = dd_text2list(text, search_string)
return dd_list2text(textList, replacement_string)
@@ -264,7 +266,12 @@
var/list/textList = new()
var/searchPosition = 1
var/findPosition = 1
+ var/loops = 0
while(1)
+ if(loops >= 1000)
+ break
+ loops++
+
findPosition = findtext(text, separator, searchPosition, 0)
var/buggyText = copytext(text, searchPosition, findPosition)
if(!withinList || (buggyText in withinList)) textList += "[buggyText]"
@@ -652,7 +659,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
total = rand(1, total)
for (item in L)
- total -= L[item]
+ total -=L [item]
if (total <= 0)
return item
@@ -817,9 +824,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/creatures = list()
var/list/namecounts = list()
for(var/mob/M in mobs)
- /*if((!M.name || !M.real_name) && !istype(M, /mob/new_player))
- var/turf/T = get_turf(M)
- message_admins("Alert! The mob with the key [M.key ? M.key : "NO KEY"] at ([T.x], [T.y], [T.z]) has no name!")*/
var/name = M.name
if (name in names)
namecounts[name]++
@@ -1006,8 +1010,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
output += A
return output
-// Returns the turf a movable atom (obj or mob) is on
-/proc/get_turf_loc(var/atom/movable/M)
+/proc/get_turf_loc(var/atom/movable/M) //gets the location of the turf that the atom is on, or what the atom is in is on, etc
+ //in case they're in a closet or sleeper or something
var/atom/loc = M.loc
while(!istype(loc, /turf/))
loc = loc.loc
@@ -1018,6 +1022,8 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/get_edge_target_turf(var/atom/A, var/direction)
var/turf/target = locate(A.x, A.y, A.z)
+ if(!A || !target)
+ return 0
//since NORTHEAST == NORTH & EAST, etc, doing it this way allows for diagonal mass drivers in the future
//and isn't really any more complicated
@@ -1304,13 +1310,16 @@ proc/listclearnulls(list/list)
var/target_loc = target.loc
var/holding = user.equipped()
sleep(time)
+ if(!user || !target) return 0
if ( user.loc == user_loc && target.loc == target_loc && user.equipped() == holding && !( user.stat ) && ( !user.stunned && !user.weakened && !user.paralysis && !user.lying ) )
return 1
else
return 0
-
+/*
/proc/do_after(mob/M as mob, time as num)
- var/turf/T = get_turf(M)
+ if(!M)
+ return 0
+ var/turf/T = M.loc
var/holding = M.equipped()
for(var/i=0, i