diff --git a/.gitignore b/.gitignore
index e7f44a7c441..4a61768f59c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,11 @@
*.rsc
*.dmb
*.lk
+<<<<<<< HEAD
#ignore any files in config/, except those in subdirectories.
/config/*
!/config/*/*
+=======
+data/
+>>>>>>> 16f787a... Virology - NanoUI, gameplay tweaks, bugfixes
diff --git a/baystation12.dme b/baystation12.dme
index d11073692a8..03a27e50166 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -5,6 +5,65 @@
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
+#define FILE_DIR "code"
+#define FILE_DIR "code/TriDimension"
+#define FILE_DIR "code/WorkInProgress"
+#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
+#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jungle"
+#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
+#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/ShieldGen"
+#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
+#define FILE_DIR "code/WorkInProgress/Susan"
+#define FILE_DIR "html"
+#define FILE_DIR "icons"
+#define FILE_DIR "icons/48x48"
+#define FILE_DIR "icons/ass"
+#define FILE_DIR "icons/effects"
+#define FILE_DIR "icons/mecha"
+#define FILE_DIR "icons/misc"
+#define FILE_DIR "icons/mob"
+#define FILE_DIR "icons/mob/human_races"
+#define FILE_DIR "icons/mob/otherHuman"
+#define FILE_DIR "icons/NTOS"
+#define FILE_DIR "icons/obj"
+#define FILE_DIR "icons/obj/assemblies"
+#define FILE_DIR "icons/obj/atmospherics"
+#define FILE_DIR "icons/obj/clothing"
+#define FILE_DIR "icons/obj/doors"
+#define FILE_DIR "icons/obj/flora"
+#define FILE_DIR "icons/obj/machines"
+#define FILE_DIR "icons/obj/pipes"
+#define FILE_DIR "icons/obj/power_cond"
+#define FILE_DIR "icons/pda_icons"
+#define FILE_DIR "icons/pods"
+#define FILE_DIR "icons/spideros_icons"
+#define FILE_DIR "icons/stamp_icons"
+#define FILE_DIR "icons/Testing"
+#define FILE_DIR "icons/turf"
+#define FILE_DIR "icons/vending_icons"
+#define FILE_DIR "nano"
+#define FILE_DIR "nano/images"
+#define FILE_DIR "sound"
+#define FILE_DIR "sound/AI"
+#define FILE_DIR "sound/ambience"
+#define FILE_DIR "sound/effects"
+#define FILE_DIR "sound/effects/turret"
+#define FILE_DIR "sound/effects/wind"
+#define FILE_DIR "sound/hallucinations"
+#define FILE_DIR "sound/items"
+#define FILE_DIR "sound/machines"
+#define FILE_DIR "sound/mecha"
+#define FILE_DIR "sound/misc"
+#define FILE_DIR "sound/music"
+#define FILE_DIR "sound/piano"
+#define FILE_DIR "sound/turntable"
+#define FILE_DIR "sound/violin"
+#define FILE_DIR "sound/voice"
+#define FILE_DIR "sound/voice/complionator"
+#define FILE_DIR "sound/voice/Serithi"
+#define FILE_DIR "sound/vox"
+#define FILE_DIR "sound/vox_fem"
+#define FILE_DIR "sound/weapons"
// END_FILE_DIR
// BEGIN_PREFERENCES
#define DEBUG
@@ -16,12 +75,12 @@
#include "code\setup.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
+#include "code\__HELPERS\experimental.dm"
#include "code\__HELPERS\files.dm"
#include "code\__HELPERS\game.dm"
#include "code\__HELPERS\global_lists.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\lists.dm"
-#include "code\__HELPERS\loc.dm"
#include "code\__HELPERS\logging.dm"
#include "code\__HELPERS\maths.dm"
#include "code\__HELPERS\mobs.dm"
@@ -81,9 +140,11 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
+#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\garbage.dm"
+#include "code\controllers\lighting_controller.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\verbs.dm"
@@ -204,6 +265,7 @@
#include "code\game\supplyshuttle.dm"
#include "code\game\area\ai_monitored.dm"
#include "code\game\area\areas.dm"
+#include "code\game\area\Dynamic areas.dm"
#include "code\game\area\Space Station 13 areas.dm"
#include "code\game\dna\dna2.dm"
#include "code\game\dna\dna2_domutcheck.dm"
@@ -333,6 +395,7 @@
#include "code\game\machinery\machinery.dm"
#include "code\game\machinery\magnet.dm"
#include "code\game\machinery\mass_driver.dm"
+#include "code\game\machinery\metaldetector.dm"
#include "code\game\machinery\navbeacon.dm"
#include "code\game\machinery\newscaster.dm"
#include "code\game\machinery\OpTable.dm"
@@ -568,6 +631,7 @@
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\alien_specific.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
+#include "code\game\objects\items\weapons\cash.dm"
#include "code\game\objects\items\weapons\cigs_lighters.dm"
#include "code\game\objects\items\weapons\clown_items.dm"
#include "code\game\objects\items\weapons\cosmetics.dm"
@@ -649,8 +713,10 @@
#include "code\game\objects\structures\extinguisher.dm"
#include "code\game\objects\structures\false_walls.dm"
#include "code\game\objects\structures\flora.dm"
+#include "code\game\objects\structures\fullwindow.dm"
#include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm"
+#include "code\game\objects\structures\inflatable.dm"
#include "code\game\objects\structures\janicart.dm"
#include "code\game\objects\structures\kitchen_spike.dm"
#include "code\game\objects\structures\ladders.dm"
@@ -668,7 +734,6 @@
#include "code\game\objects\structures\tables_racks.dm"
#include "code\game\objects\structures\tank_dispenser.dm"
#include "code\game\objects\structures\target_stake.dm"
-#include "code\game\objects\structures\transit_tubes.dm"
#include "code\game\objects\structures\watercloset.dm"
#include "code\game\objects\structures\windoor_assembly.dm"
#include "code\game\objects\structures\window.dm"
@@ -703,6 +768,9 @@
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
+#include "code\game\objects\structures\transit_tubes\station.dm"
+#include "code\game\objects\structures\transit_tubes\transit_tube.dm"
+#include "code\game\objects\structures\transit_tubes\transit_tube_pod.dm"
#include "code\game\structure\structure.dm"
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\turf.dm"
@@ -850,14 +918,13 @@
#include "code\modules\customitems\item_spawning.dm"
#include "code\modules\customitems\definitions\base.dm"
#include "code\modules\destilery\main.dm"
-#include "code\modules\detectivework\detective_work.dm"
-#include "code\modules\detectivework\evidence.dm"
-#include "code\modules\detectivework\footprints_and_rag.dm"
-#include "code\modules\detectivework\scanner.dm"
+#include "code\modules\DetectiveWork\detective_work.dm"
+#include "code\modules\DetectiveWork\evidence.dm"
+#include "code\modules\DetectiveWork\footprints_and_rag.dm"
+#include "code\modules\DetectiveWork\scanner.dm"
#include "code\modules\economy\Accounts.dm"
#include "code\modules\economy\Accounts_DB.dm"
#include "code\modules\economy\ATM.dm"
-#include "code\modules\economy\cash.dm"
#include "code\modules\economy\economy_misc.dm"
#include "code\modules\economy\EFTPOS.dm"
#include "code\modules\economy\Events.dm"
@@ -1160,6 +1227,7 @@
#include "code\modules\organs\pain.dm"
#include "code\modules\organs\skeleton.dm"
#include "code\modules\organs\wound.dm"
+#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
#include "code\modules\paperwork\filingcabinet.dm"
#include "code\modules\paperwork\folders.dm"
@@ -1398,12 +1466,6 @@
#include "code\WorkInProgress\fireworks.dm"
#include "code\WorkInProgress\periodic_news.dm"
#include "code\WorkInProgress\Apples\artifacts.dm"
-#include "code\WorkInProgress\Aryn\Lighting\_Defs.dm"
-#include "code\WorkInProgress\Aryn\Lighting\Compatibility.dm"
-#include "code\WorkInProgress\Aryn\Lighting\Controller.dm"
-#include "code\WorkInProgress\Aryn\Lighting\Engine.dm"
-#include "code\WorkInProgress\Aryn\Lighting\Light.dm"
-#include "code\WorkInProgress\Aryn\Lighting\Lightpoint.dm"
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
@@ -1505,6 +1567,6 @@
#include "code\ZAS\Zone.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
-#include "maps\tgstation-redux-WIP.dmm"
+#include "maps\NSS Cyberiad- WIP.dmm"
#include "maps\RandomZLevels\clown3.dmm"
// END_INCLUDE
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index b812b9f9eca..0e4a913097d 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -116,10 +116,10 @@
if(scrubbing)
// Are we scrubbing gasses that are present?
if(\
- (scrub_Toxins && environment.toxins > 0) ||\
- (scrub_CO2 && environment.carbon_dioxide > 0) ||\
+ (scrub_Toxins && environment.toxins > 0.001) ||\
+ (scrub_CO2 && environment.carbon_dioxide > 0.001) ||\
(scrub_N2O && environment.trace_gases.len > 0) ||\
- (scrub_O2 && environment.oxygen > 0))
+ (scrub_O2 && environment.oxygen > 0.001))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
//Take a gas sample
diff --git a/code/ATMOSPHERICS/datum_pipe_network.dm b/code/ATMOSPHERICS/datum_pipe_network.dm
index 5e731cd8d62..044d16b6c25 100644
--- a/code/ATMOSPHERICS/datum_pipe_network.dm
+++ b/code/ATMOSPHERICS/datum_pipe_network.dm
@@ -54,8 +54,6 @@ datum/pipe_network
for(var/datum/pipeline/line_member in giver.line_members)
line_member.network = src
- del(giver)
-
update_network_gases()
return 1
diff --git a/code/WorkInProgress/Tastyfish/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm
similarity index 99%
rename from code/WorkInProgress/Tastyfish/mainspipe.dm
rename to code/ATMOSPHERICS/mainspipe.dm
index e2b3acde640..631f3530a24 100644
--- a/code/WorkInProgress/Tastyfish/mainspipe.dm
+++ b/code/ATMOSPHERICS/mainspipe.dm
@@ -36,8 +36,9 @@ obj/machinery/atmospherics/mains_pipe
icon = 'icons/obj/atmospherics/mainspipe.dmi'
layer = 2.4 //under wires with their 2.5
+ force = 20
+
var/volume = 0
- var/force = 20
var/alert_pressure = 80*ONE_ATMOSPHERE
@@ -535,6 +536,8 @@ obj/machinery/atmospherics/mains_pipe/cap
level = 2
icon_state = "cap"
+//TODO: Get Mains valves working!
+/*
obj/machinery/atmospherics/mains_pipe/valve
icon_state = "mvalve0"
@@ -700,4 +703,5 @@ obj/machinery/atmospherics/mains_pipe/valve
if(open)
close()
else
- open()
\ No newline at end of file
+ open()
+*/
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Compatibility.dm b/code/WorkInProgress/Aryn/Lighting/Compatibility.dm
deleted file mode 100644
index ad5ca37b047..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/Compatibility.dm
+++ /dev/null
@@ -1,49 +0,0 @@
-area/var/lighting_use_dynamic
-
-turf/space/is_outside = 1
-turf/simulated/shuttle/is_outside = 1
-
-/datum/controller/lighting/var/processing = 1
-/datum/controller/lighting/var/iteration = 0
-
-//Because so many objects jump the gun.
-proc/lighting_ready()
- return lighting_controller && lighting_controller.started
-
-turf_light_data
- var/light_overlay
- var/lightNW
- var/lightSW
- var/lightNE
- var/lightSE
- var/lit_by
-
-turf_light_data/proc/copy_from(turf/T)
- light_overlay = T.light_overlay
- lightNW = T.lightNW
- lightSW = T.lightSW
- lightNE = T.lightNE
- lightSE = T.lightSE
- lit_by = T.lit_by
-
-turf_light_data/proc/copy_to(turf/T)
- T.light_overlay = light_overlay
- T.lightNW = lightNW
- T.lightSW = lightSW
- T.lightNE = lightNE
- T.lightSE = lightSE
- T.lit_by = lit_by
- //T.ResetValue()
-
-atom/proc/SetLuminosity(n)
- ASSERT(n >= 0)
-
- n = min(n,10) //Caelcode.
- if(n > 0)
- //world << "[name].SetLuminosity([n]) \[[max(1,n>>1)],[n]\]"
- SetLight(max(1,n),n)
- else
- //world << "[name].SetLuminosity(0)"
- SetLight(0,0)
- luminosity = n
- //else lighting_controller.initial_lights.Add(src)
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Controller.dm b/code/WorkInProgress/Aryn/Lighting/Controller.dm
deleted file mode 100644
index 6220ebe3609..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/Controller.dm
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-
-Overview:
- Unlike the previous lighting controller, this is mostly here to hold global lighting procs and vars.
- It does not process every tick, because not even DAL did something so stupid.
-
-Global Vars:
- initial_lights - This holds all lights formed before the lighting controller started up. It becomes null on initialization.
-
-Class Vars:
- starlight - The light value of space.
-
- icon_updates - The list of turfs which need an update to their overlays.
-
- light_border - Space turfs which are adjacent to non-space turfs.
-
-Class Procs:
- Initialize()
- Starts the lighting system, creating all light points and turf overlays.
-
- StarLight(n)
- Sets the light produced by space. If a solar eclipse suddenly happens, it'll probably lag.
-
- MarkIconUpdate(turf/T)
- Called when a turf needs an update to its light icon. Ensures that it only gets calculated once per turf.
-
- FlushIconUpdates()
- Called when a light is done marking icon updates. Updates every marked turf.
-
- AddBorder(turf/T) & RemoveBorder(turf/T)
- Called by turf/CheckForOpaqueObjects() to modify the light_border list.
-
-
-*/
-
-var/datum/controller/lighting/lighting_controller
-
-var/all_lightpoints_made = 0
-
-var/list/lit_z_levels = list(1,5)
-
-/datum/controller/lighting
-
- var/starlight = LIGHT_STATES
- var/list/icon_updates = list()
- var/started = 0
-
- //var/icon/border = icon('Icons/Test.dmi', "border")
-
-/datum/controller/lighting/New()
- lighting_controller = src
-
-/datum/controller/lighting/proc/Initialize()
-
- set background = 1
-
- var/start_time = world.timeofday
- world << "Processing lights..."
-
- sleep(1)
-
- var/turfs_updated = 0
- var/total_turfs = world.maxx*world.maxy*lit_z_levels.len
-
- for(var/z in lit_z_levels)
- for(var/y = 0, y <= world.maxy, y++)
- for(var/x = 0, x <= world.maxx, x++)
- if(x > 0 && y > 0)
-
- turfs_updated++
- if((turfs_updated % (total_turfs>>2)) == 0)
- sleep(1)
- world << "Progress: [round((turfs_updated/total_turfs)*100, 0.01)]% ([turfs_updated]/[total_turfs])"
-
- var/turf/T = locate(x,y,z)
- if(!T.is_outside)
- T.light_overlay = new(T)
- //T.ResetValue()
- if(!all_lightpoints_made) new/lightpoint(x+0.5,y+0.5,z)
-
-
-
- //world << "[x],[y],[z]"
-
- all_lightpoints_made = 1
- started = 1
-
- for(var/turf/T)
- if(T.light_overlay)
-
- T.ResetValue()
- T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
-
- world << "Lighting initialization took [(world.timeofday-start_time)/world.fps] seconds."
- world << "Updated [turfs_updated] turfs."
-
-/datum/controller/lighting/proc/GetLightIcon(a,b,c,d)
- if(a <= 2) return LIGHT_ICON_1
- else return LIGHT_ICON_2
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Engine.dm b/code/WorkInProgress/Aryn/Lighting/Engine.dm
deleted file mode 100644
index fc94b09c6a4..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/Engine.dm
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
-
-Overview:
- Procs given to atom and turf by the lighting engine, as well as the lighting overlay object.
-
-Atom Vars:
- light - Contains the light object this atom is currently shining with.
-
-Turf Vars:
- light_overlay - Contains an object showing the lighting icon over this turf.
-
- lit_value - Stores how brightly lit the turf is.
-
- has_opaque - A cached value updated by CheckForOpaqueObjects()
-
- is_outside - Any turf with this set to true will be considered as bright as space.
-
- needs_light_update - Turf is marked for icon updates when true.
-
- lightNE, lightSE, lightNW, lightSW - Hold the lightpoints on the four corners of this turf. See Lightpoint.dm
-
- lit_by - A list of lights that are lighting this turf.
-
-Atom Procs:
- SetLight(intensity, radius)
- A more versatile SetLuminosity() that allows independent control of intensity and radius.
- Called behind the scenes of SetLuminosity().
-
- SetOpacity(opacity)
- Does the same thing as DAL.
-
-Turf Procs:
- UpdateLight()
- Called by the lighting controller. It is advisable not to call this manually due to the cost of lightpoint/max_value()
-
- AddLight(light/light)
- Called by light/Reset() to light this turf with a particular light.
-
- RemoveLight(light/light)
- Called by light/Off() to unlight turfs that were lit by it.
-
- ResetValue()
- Called when lights are reset or starlight is changed.
-
- ResetCachedValues()
- Resets cached values of all four light points. Called by ResetValue().
-
- CheckForOpaqueObjects()
- Called by lighting_controller.Initialize(), SetOpacity() or when a turf might change opacity.
- Resets the opacity cache and looks for opaque objects. Also responsible for adding and removing borders to space.
-*/
-
-atom/movable/lighting_overlay
- name = ""
- anchored = 1
- layer = 9
- mouse_opacity = 0
- invisibility = INVISIBILITY_LIGHTING
-
-atom/movable/lighting_overlay/proc/set_state(a,b,c,d)
- icon_state = "[a][b][c][d]"
- icon = lighting_controller.GetLightIcon(a,b,c,d)
-
-atom/var/light/light
-
-turf/var/atom/movable/lighting_overlay/light_overlay
-
-turf/var/lit_value = 0
-turf/var/max_brightness = 0
-turf/var/has_opaque = -1
-turf/var/is_outside = 0
-turf/var/is_border = 0
-
-turf/var/lightpoint/lightNE
-turf/var/lightpoint/lightNW
-turf/var/lightpoint/lightSE
-turf/var/lightpoint/lightSW
-turf/var/list/lit_by
-
-atom/movable/New()
- . = ..()
- if(luminosity)
- if(!light)
- SetLight(luminosity,luminosity)
- else
- light.atom = src
- light.Reset()
- else if(light)
- light.atom = src
- light.Reset()
- if(opacity)
- if(lighting_ready())
- opacity = 0
- SetOpacity(1)
-
-atom/movable/Del()
- if(light) light.Off()
- if(opacity) SetOpacity(0)
- . = ..()
-
-atom/movable/Move(turf/newloc)
- var/o = opacity
- if(o) SetOpacity(0)
- . = ..()
- if(.)
- if(o) SetOpacity(1)
-
-turf/Entered(atom/movable/M)
- . = ..()
- if(M.light) M.light.Reset()
-
-atom/proc/SetLight(intensity, radius)
- //if(lights_verbose) world << "SetLight([intensity],[radius])"
- if(!intensity)
- if(!light || !light.intensity)
- //if(lights_verbose) world << "Still off."
- return
- //if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit."
- light.Off()
- light.intensity = 0
- //if(lighting_ready()) lighting_controller.FlushIconUpdates()
- return
- if(!light)
- //if(lights_verbose) world << "New light."
- light = new(src)
- if(light.intensity == intensity)
- //if(lights_verbose) world << "Same intensity."
- return
- light.radius = min(radius,15)
- light.intensity = intensity
- light.Reset()
- //if(lighting_ready()) lighting_controller.FlushIconUpdates()
-
-atom/proc/SetOpacity(o)
- if(o == opacity) return
- opacity = o
- var/turf/T = loc
- if(isturf(T))
- T.CheckForOpaqueObjects()
- for(var/light/A in T.lit_by)
- A.Reset()
-
- //lighting_controller.FlushIconUpdates()
-
-atom/proc/UpdateLights()
- if(light) light.Reset()
- for(var/atom/movable/A in src)
- if(A.light) A.light.Reset()
-
-//turf/proc/UpdateLight()
-// if(light_overlay)
-// light_overlay.icon_state = "[lightSE.max_value()][lightSW.max_value()][lightNW.max_value()][lightNE.max_value()]"
-
-turf/proc/AddLight(light/light, brightness)
- if(is_outside) return
-
- if(brightness <= 0) return
-
- if(!lit_by) lit_by = list()
- lit_by.Add(light)
-
-
- lit_by[light] = brightness
-
- if(lighting_ready())
- if(brightness > max_brightness)
- lit_value = LIGHTCLAMP(brightness)
- max_brightness = brightness
-
- if(lightNE) lightNE.cached_value = -1
- if(lightNW) lightNW.cached_value = -1
- if(lightSE) lightSE.cached_value = -1
- if(lightSW) lightSW.cached_value = -1
-
- for(var/turf/T in range(1,src))
- if(T.light_overlay)
- T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
-
-turf/proc/RemoveLight(light/light)
- if(lit_by)
- var/brightness = lit_by[light]
- lit_by.Remove(light)
- if(brightness == max_brightness)
- ResetValue()
- if(!lit_by.len) lit_by = null
-
-//Only called by ChangeTurf, because it really needs it.
-turf/proc/ResetAllLights()
- for(var/light/light in lit_by)
- light.Reset()
-
-/turf/space/ResetAllLights()
- var/atom/movable/lighting_overlay/overlay = locate() in src
- if(overlay) overlay.loc = null
- light_overlay = null
- is_outside = 1
- . = ..()
-
-turf/proc/ResetValue()
- if(is_outside)
- max_brightness = lighting_controller.starlight
- lit_value = LIGHTCLAMP(lighting_controller.starlight)
- return
-
- if(has_opaque < 0) CheckForOpaqueObjects()
- if(has_opaque)
- lit_value = 0
- else
- max_brightness = 0
- for(var/light/light in lit_by)
- var/brightness = lit_by[light]//light.CalculateBrightness(src)
- if(brightness > max_brightness)
- max_brightness = brightness
- lit_value = LIGHTCLAMP(max_brightness)
-
- if(lighting_ready())
- if(lightNE) lightNE.cached_value = -1
- if(lightNW) lightNW.cached_value = -1
- if(lightSE) lightSE.cached_value = -1
- if(lightSW) lightSW.cached_value = -1
- for(var/turf/T in range(1,src))
- if(T.light_overlay)
- T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
-
-turf/proc/CheckForOpaqueObjects()
- has_opaque = opacity
- if(!opacity)
- for(var/atom/movable/M in contents)
- if(M.opacity)
- has_opaque = 1
- break
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Light.dm b/code/WorkInProgress/Aryn/Lighting/Light.dm
deleted file mode 100644
index fd6f196645b..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/Light.dm
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-
-Overview:
- This object functions similarly to /tg/'s /light. It is responsible for calculating what turfs are lit by it.
-
-Class Vars:
- radius - Set by atom/SetLight(). This stores how far out turfs will be lit up.
- intensity - Set by atom/SetLight(). Stores the amount of light generated at the center.
- lit_turfs - A list of turfs being lit by this light.
- atom - The atom this light is attached to.
-
-Class Procs:
- Reset()
- This is called whenever the light changes, or the underlying atom changes position.
-
- Off()
- A quick way to turn off a light. Removes the light from all turfs in lit_turfs.
-
- CalculateBrightness(turf/T)
- Returns the brightness that should be displayed by this light on a specific turf.
-
-*/
-
-
-light/var/radius = 0
-light/var/intensity = 0
-light/var/ambient_extension = 3
-light/var/list/lit_turfs = list()
-light/var/atom/atom
-
-light/New(atom/atom, radius, ambience=3)
- ASSERT(atom)
-
- if(istype(atom))
- src.atom = atom
- else
- src.intensity = atom
- src.radius = radius
- src.ambient_extension = ambience
-
-light/proc/Reset()
- //if(atom.lights_verbose) world << "light.Reset()"
- Off()
- if(intensity > 0)
- //if(atom.lights_verbose) world << "Restoring light."
- var/turf/loc = atom
- for(var/turf/T in view(loc,radius+ambient_extension))
- if(!T.is_outside)
- var/brightness = CalculateBrightness(T, loc)
- T.AddLight(src, brightness)
- lit_turfs.Add(T)
- //if(atom.lights_verbose) world << "[lit_turfs.len] turfs added."
-
-light/proc/Off()
- //if(atom.lights_verbose) world << "light.Off()"
- for(var/turf/T in lit_turfs)
- T.RemoveLight(src)
- lit_turfs.Cut()
-
-light/proc/Flash(t)
- Reset()
- spawn(t)
- Off()
-
-light/proc/CalculateBrightness(turf/T, turf/loc)
- ASSERT(T)
- var/square = DISTSQ3(loc.x-T.x,loc.y-T.y,loc.z-T.z)
- if(square > (radius+ambient_extension)*(radius+ambient_extension)) return 0
- //+2 offset gives an ambient light effect.
-
- var/value = ((radius)/(2*FSQRT(square) + 1)) * intensity - 0.48
- /*
- lightRadius
- ---------------- * lightValue - 0.48
- 2 * distance + 1
-
- The light decreases by twice the distance, starting from the radius.
- The + 1 causes the graph to shift to the left one unit so that division by zero is prevented on the source tile.
-
- This is then multiplied by the light value to give the final result.
- The -0.48 offset causes the value to be near zero at the radius.
-
- This gives a result which is likely close to the inverse-square law in two dimensions instead of three.
- */
-
-
- return max(min( value , intensity), 0) //Ensure the value never goes above the maximum light value or below zero.
-
- //return cos(90 * sqrt(square) / max(1,lightRadius)) * lightValue
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Lightpoint.dm b/code/WorkInProgress/Aryn/Lighting/Lightpoint.dm
deleted file mode 100644
index eeeec4c7068..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/Lightpoint.dm
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-
-Overview:
- Perhaps the most cryptic datum in the lighting engine, there are four of these at the corners of every turf.
- Any two turfs that share a corner will also have the same lightpoint. Because of the nature of the icons used,
- light is shown at the corner of the turf rather than in the middle, necessitating some way to keep track of what
- icon state to use.
-
-Class Vars:
- x, y, z - The position of the lightpoint. x and y will usually be expressed in terms of 0.5 due to its location on the corner.
-
- NE, NW, SE, SW - The turfs that are in these directions relative to the lightpoint.
-
- cached_value - A cached value of max_value().
-
-Class Procs:
- max_value()
- The maximum of the light amounts on the four turfs of this light point.
-
-*/
-
-lightpoint
- var/x
- var/y
- var/z
-
- var/turf/NE
- var/turf/NW
- var/turf/SW
- var/turf/SE
-
- var/cached_value = -1
-
- New(x,y,z)
- var/turf/T = locate(x+0.5,y+0.5,z)
- if(T)
- NE = T
- T.lightSW = src
- T = locate(x-0.5,y+0.5,z)
- if(T)
- NW = T
- T.lightSE = src
- T = locate(x-0.5,y-0.5,z)
- if(T)
- SW = T
- T.lightNE = src
- T = locate(x+0.5,y-0.5,z)
- if(T)
- SE = T
- T.lightNW = src
-
- proc/max_value()
- var
- valueA = VALUE_OF(NW)
- valueB = VALUE_OF(NE)
- valueC = VALUE_OF(SW)
- valueD = VALUE_OF(SE)
- cached_value = max(valueA,valueB,valueC,valueD)
- return cached_value
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Verbs.dm b/code/WorkInProgress/Aryn/Lighting/Verbs.dm
deleted file mode 100644
index f9e4d7c688f..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/Verbs.dm
+++ /dev/null
@@ -1,34 +0,0 @@
-var/icon/lighting_dbg = icon('icons/Testing/Zone.dmi', "created")
-
-atom/var/lights_verbose = 0
-
-obj/machinery/light/verb/ShowInfluence()
- set src in world
-
- lights_verbose = 1
- usr << "[src]"
- if(light)
- usr << "Intensity: [light.intensity]"
- usr << "Radius: [light.radius]"
-
- for(var/turf/T in light.lit_turfs)
- T.overlays += lighting_dbg
- spawn(50)
- for(var/turf/T in light.lit_turfs)
- T.overlays -= lighting_dbg
-
-turf/verb/ShowData()
- set src in world
-
- usr << "[src]"
- usr << "[MAX_VALUE(lightSE)][MAX_VALUE(lightSW)][MAX_VALUE(lightNW)][MAX_VALUE(lightNE)]"
- usr << "Lit Value: [lit_value]"
- usr << "Max Brightness: [max_brightness]"
-
- usr << "Lit By: "
- for(var/light/light in lit_by)
- usr << " - [light.atom] \[[lit_by[light]]\][(lit_by[light] == max_brightness ? "(MAX)" : "")]"
- light.atom.overlays += lighting_dbg
- spawn(50)
- for(var/light/light in lit_by)
- light.atom.overlays -= lighting_dbg
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/_Defs.dm b/code/WorkInProgress/Aryn/Lighting/_Defs.dm
deleted file mode 100644
index 72069a1afa8..00000000000
--- a/code/WorkInProgress/Aryn/Lighting/_Defs.dm
+++ /dev/null
@@ -1,19 +0,0 @@
-#define LIGHT_ICON_1 'icons/effects/lights/lighting5-1.dmi'
-#define LIGHT_ICON_2 'icons/effects/lights/lighting5-2.dmi'
-#define LIGHT_STATES 4
-
-#define SQ(X) ((X)*(X))
-#define DISTSQ3(A,B,C) (SQ(A)+SQ(B)+SQ(C))
-#define FSQRT(X) (X >= fastroot.len ? new_fsqrt(X) : fastroot[(X)+1])
-#define MAX_VALUE(X) (X.cached_value < 0 ? X.max_value() : X.cached_value)
-#define VALUE_OF(X) ( !X ? 0 : ( X.is_outside ? LIGHTCLAMP(lighting_controller.starlight) : X.lit_value ) )
-#define LIGHTCLAMP(x) ( max(0,min(LIGHT_STATES,round(x,1))) )
-
-var/list/fastroot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7)
-
-proc/new_fsqrt(n)
- //world << "Adding [n-fastroot.len] entries to root table."
- for(var/i = fastroot.len, i <= n, i++)
- fastroot += round(sqrt(i))
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
index f375716b21e..3bb8a9bda9e 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
@@ -114,12 +114,10 @@
A.fired()
*/
proc/Emit()
- var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
+ var/obj/item/projectile/beam/emitter/A = getFromPool(/obj/item/projectile/beam/emitter, loc)
A.frequency = frequency
A.damage = mega_energy * 500
- //
- A.icon_state = "emitter"
- playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
+ playsound(get_turf(src), 'sound/weapons/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
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
index 04c07733df2..ee2b787f7fb 100644
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
@@ -92,8 +92,8 @@
src.fire_delay = rand(20,100)
src.shot_number = 0
use_power(1000)
- var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
- playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
+ var/obj/item/projectile/beam/emitter/A = getFromPool(/obj/item/projectile/beam/emitter, loc)
+ playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1)
if(prob(35))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
diff --git a/code/WorkInProgress/Cael_Aislinn/sculpture.dm b/code/WorkInProgress/Cael_Aislinn/sculpture.dm
index 0a1b14d1ae0..4589583f96b 100644
--- a/code/WorkInProgress/Cael_Aislinn/sculpture.dm
+++ b/code/WorkInProgress/Cael_Aislinn/sculpture.dm
@@ -185,7 +185,7 @@
var/num_turfs = get_dist(src,target_mob)
while(get_turf(src) != target_turf && num_turfs > 0)
for(var/obj/structure/window/W in next_turf)
- W.ex_act(2)
+ W.destroy()
for(var/obj/structure/table/O in next_turf)
O.ex_act(1)
for(var/obj/structure/grille/G in next_turf)
@@ -225,7 +225,7 @@
var/num_turfs = get_dist(src,target_turf)
while(get_turf(src) != target_turf && num_turfs > 0)
for(var/obj/structure/window/W in next_turf)
- W.ex_act(2)
+ W.destroy()
for(var/obj/structure/table/O in next_turf)
O.ex_act(1)
for(var/obj/structure/grille/G in next_turf)
diff --git a/code/WorkInProgress/ZomgPonies/karma.dm b/code/WorkInProgress/ZomgPonies/karma.dm
index 562139e92be..46d38e35f28 100644
--- a/code/WorkInProgress/ZomgPonies/karma.dm
+++ b/code/WorkInProgress/ZomgPonies/karma.dm
@@ -144,8 +144,8 @@ You've gained [totalkarma] total karma in your time here.
"}
/client/proc/karmashopmenu()
var/dat = {"Karma Shop
Unlock Barber -- 5KP
- Unlock Nanotrasen Representative -- 15KP
- Unlock Customs Officer -- 30KP
+ Unlock Nanotrasen Representative -- 30KP
+ Unlock Customs Officer -- 15KP
Unlock BlueShield -- 30KP
Unlock Machine People -- 15KP
diff --git a/code/WorkInProgress/buildmode.dm b/code/WorkInProgress/buildmode.dm
index 6d3509db6e0..f5474e8a8b2 100644
--- a/code/WorkInProgress/buildmode.dm
+++ b/code/WorkInProgress/buildmode.dm
@@ -54,8 +54,8 @@
if(SOUTH)
dir = WEST
if(WEST)
- dir = NORTHWEST
- if(NORTHWEST)
+ dir = SOUTHWEST
+ if(SOUTHWEST)
dir = NORTH
return 1
@@ -120,7 +120,7 @@
screen_loc = "NORTH,WEST+2"
var/varholder = "name"
var/valueholder = "derp"
- var/objholder = "/obj/structure/closet"
+ var/objholder = /obj/structure/closet
Click(location, control, params)
var/list/pa = params2list(params)
@@ -145,13 +145,13 @@
if(1)
return 1
if(2)
- objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")
- var/list/removed_paths = list("/obj/effect/bhole")
- if(objholder in removed_paths)
+ objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
+ if(!ispath(objholder))
+ objholder = /obj/structure/closet
alert("That path is not allowed.")
- objholder = "/obj/structure/closet"
- else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0))
- objholder = "/obj/structure/closet"
+ else
+ if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
+ objholder = /obj/structure/closet
if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
@@ -171,7 +171,8 @@
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
if("turf-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
- return 1
+ return 1
+
/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
var/obj/effect/bmode/buildholder/holder = null
@@ -229,13 +230,16 @@
if(WEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = WEST
- if(NORTHWEST)
- var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
- WIN.dir = NORTHWEST
+ if(SOUTHWEST)
+ new/obj/structure/window/full/reinforced(get_turf(object))
if(2)
if(pa.Find("left"))
- var/obj/A = new holder.buildmode.objholder (get_turf(object))
- A.dir = holder.builddir.dir
+ if(ispath(holder.buildmode.objholder,/turf))
+ var/turf/T = get_turf(object)
+ T.ChangeTurf(holder.buildmode.objholder)
+ else
+ var/obj/A = new holder.buildmode.objholder (get_turf(object))
+ A.dir = holder.builddir.dir
else if(pa.Find("right"))
if(isobj(object)) del(object)
diff --git a/code/WorkInProgress/computer3/computers/communications.dm b/code/WorkInProgress/computer3/computers/communications.dm
index 01351dc4863..23b2540ade3 100644
--- a/code/WorkInProgress/computer3/computers/communications.dm
+++ b/code/WorkInProgress/computer3/computers/communications.dm
@@ -191,7 +191,7 @@
usr << "Message transmitted."
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
centcomm_message_cooldown = 1
- spawn(6000)//10 minute cooldown
+ spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
@@ -208,7 +208,7 @@
usr << "Message transmitted."
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
centcomm_message_cooldown = 1
- spawn(6000)//10 minute cooldown
+ spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
if("RestoreBackup" in href_list)
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index ea839b87298..9c628b963e3 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -86,7 +86,7 @@ obj/item/check_airflow_movable(n)
return
if(src:shoes)
if(istype(src:shoes, /obj/item/clothing/shoes/magboots))
- if(src:shoes:magpulse)
+ if(src:shoes.flags & NOSLIP)
return
src << "\red You are sucked away by airflow!"
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
diff --git a/code/ZAS/Turf.dm b/code/ZAS/Turf.dm
index fece782aa71..e989d654557 100644
--- a/code/ZAS/Turf.dm
+++ b/code/ZAS/Turf.dm
@@ -173,7 +173,6 @@
if(connections) connections.update_all()
/turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
- del(giver)
return 0
/turf/return_air()
diff --git a/code/__HELPERS/experimental.dm b/code/__HELPERS/experimental.dm
new file mode 100644
index 00000000000..236f468c40f
--- /dev/null
+++ b/code/__HELPERS/experimental.dm
@@ -0,0 +1,134 @@
+/*
+ * Experimental procs by ESwordTheCat.
+ */
+
+/*
+ * Get index of last char occurence to string.
+ *
+ * @args
+ * A, string to be search
+ * B, char used for search
+ *
+ * @return
+ * >0, index of char at string
+ * 0, char not found
+ * -1, parameter B is not a char
+ * -2, parameter A is not a string
+ */
+/proc/EgijkAeN(const/A, const/B)
+ if (istext(A) == 0 || length(A) < 1)
+ return -2
+
+ if (istext(B) == 0 || length(B) > 1)
+ return -1
+
+ var/i = findtext(A, B)
+
+ if (0 == i)
+ return 0
+
+ while (i)
+ . = i
+ i = findtext(A, B, i + 1)
+
+/obj/machinery/proc/getArea()
+ var/area/A = loc.loc
+
+ if (A != myArea)
+ myArea = A
+
+ . = myArea
+
+/**
+ * Object pooling.
+ *
+ * If this file is named experimental,
+ * well treat this implementation as experimental experimental (redundancy intended).
+ *
+ * WARNING, only supports /mob and /obj.
+ */
+
+#define DEBUG_OBJECT_POOL 0
+#define MAINTAINING_OBJECT_POOL_COUNT 20
+
+var/list/masterPool = list()
+
+/*
+ * @args
+ * A, object type
+ * B, location to spawn
+ *
+ * Example call: getFromPool(/obj/item/weapon/shard, loc)
+ */
+/proc/getFromPool(const/A, const/B)
+ if (isnull(masterPool[A]))
+ #if DEBUG_OBJECT_POOL
+ world << "DEBUG_OBJECT_POOL: new proc has been called ([A])."
+ #endif
+
+ return new A(B)
+
+ var/atom/movable/Object = masterPool[A][1]
+ masterPool[A] -= Object
+
+ #if DEBUG_OBJECT_POOL
+ world << "DEBUG_OBJECT_POOL: getFromPool([A]) [length(masterPool[A])]"
+ #endif
+
+ if (!length(masterPool[A]))
+ masterPool[A] = null
+
+ Object.loc = B
+ return Object
+
+/*
+ * @args
+ * A, object instance
+ *
+ * @return
+ * -1, if A is not a movable atom
+ *
+ * Example call: returnToPool(src)
+ */
+/proc/returnToPool(const/A)
+ if (!istype(A, /atom/movable))
+ return -1
+
+ var/atom/movable/Object = A
+ Object.resetVariables()
+ Object.loc = null
+
+ if (isnull(masterPool[Object.type]))
+ #if DEBUG_OBJECT_POOL
+ world << "DEBUG_OBJECT_POOL: [Object.type] pool is empty, recreating pool."
+ #endif
+
+ masterPool[Object.type] = list()
+ else if (length(masterPool[Object.type]) > MAINTAINING_OBJECT_POOL_COUNT)
+ #if DEBUG_OBJECT_POOL
+ world << "DEBUG_OBJECT_POOL: returnToPool([Object.type]) exceeds [num2text(MAINTAINING_OBJECT_POOL_COUNT)] discarding..."
+ #endif
+
+ return
+
+ #if DEBUG_OBJECT_POOL
+ world << "DEBUG_OBJECT_POOL: returnToPool([Object.type]) [length(masterPool[Object.type])]"
+ #endif
+
+ masterPool[Object.type] += Object
+
+#undef MAINTAINING_OBJECT_POOL_COUNT
+#undef DEBUG_OBJECT_POOL
+
+/*
+ * Override this if the object variables needed to reset.
+ *
+ * Example: see, code\game\objects\structures\grille.dm
+ */
+/atom/movable
+ proc/resetVariables()
+ name = initial(name)
+ density = initial(density)
+ icon = initial(icon)
+ icon_state = initial(icon_state)
+ dir = initial(dir)
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 5cbba11b197..13f4742c040 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -42,6 +42,8 @@ var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
+ //undershirt
+var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "None")
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
diff --git a/code/__HELPERS/loc.dm b/code/__HELPERS/loc.dm
deleted file mode 100644
index 91be708854d..00000000000
--- a/code/__HELPERS/loc.dm
+++ /dev/null
@@ -1,7 +0,0 @@
-atom/movable/proc/setloc(newloc)
- if(light)
- var/oldloc = loc
- loc = newloc
- if(isturf(newloc) != isturf(oldloc)) light.Reset()
- else
- loc = newloc
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 19e1562b183..84ee98948d2 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -76,25 +76,6 @@ proc/age2agedescription(age)
if(70 to INFINITY) return "elderly"
else return "unknown"
-/*
-Proc for attack log creation, because really why not
-1 argument is the actor
-2 argument is the target of action
-3 is the description of action(like punched, throwed, or any other verb)
-4 is the tool with which the action was made(usually item)
-5 is additional information, anything that needs to be added
-*/
-
-proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
- if(ismob(user))
- user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]")
- if(ismob(target))
- target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]")
- log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]")
- if(target.client)
- if(what_done != ("shaked" || "CPRed" || "grabbed"))
- message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](JMP)")
-
proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
@@ -117,3 +98,23 @@ proc/RoundHealth(health)
return "health-100"
return "0"
+
+/*
+Proc for attack log creation, because really why not
+1 argument is the actor
+2 argument is the target of action
+3 is the description of action(like punched, throwed, or any other verb)
+4 is the tool with which the action was made(usually item)
+5 is additional information, anything that needs to be added
+*/
+
+proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
+ if(ismob(user))
+ user.attack_log += text("\[[time_stamp()]\] Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]")
+ if(ismob(target))
+ target.attack_log += text("\[[time_stamp()]\] Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]")
+ log_attack("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]")
+ if(target.client)
+ if(what_done != ("shaked" || "CPRed" || "grabbed"))
+ message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](JMP)")
+
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index 51f56d9d122..0961f4c1273 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -1,3 +1,8 @@
+// So you can be all 10 SECONDS
+#define SECONDS **10
+#define MINUTES **600
+#define HOURS **36000
+
//Returns the world time in english
proc/worldtime2text(time = world.time)
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index e1a70bb3a14..f94da8b6995 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -172,7 +172,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/DirBlocked(turf/loc,var/dir)
for(var/obj/structure/window/D in loc)
if(!D.density) continue
- if(D.dir == SOUTHWEST) return 1
+ if(D.is_fulltile()) return 1
if(D.dir == dir) return 1
for(var/obj/machinery/door/D in loc)
diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm
index c02737400ba..b39df751896 100644
--- a/code/_onclick/adjacent.dm
+++ b/code/_onclick/adjacent.dm
@@ -46,7 +46,7 @@
continue // could not leave T0 in that direction
var/turf/T1 = get_step(T0,d)
- if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) & get_dir(T1,src), border_only = 0))
+ if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) | get_dir(T1,src), border_only = 0))
continue // couldn't enter or couldn't leave T1
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target))
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index f4e4283fa59..caa4d1c62f4 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -168,6 +168,8 @@
*/
/mob/proc/RangedAttack(var/atom/A, var/params)
if(!mutations.len) return
+ if(ishuman(src) && (istype(src:gloves, /obj/item/clothing/gloves/yellow/power)) && a_intent == "harm")
+ PowerGlove(A)
if((M_LASER in mutations) && a_intent == "harm")
LaserEyes(A) // moved into a proc below
return
@@ -268,7 +270,7 @@
var/turf/T = get_turf(src)
var/turf/U = get_turf(A)
- var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc )
+ var/obj/item/projectile/beam/LE = getFromPool(/obj/item/projectile/beam, loc)
LE.icon = 'icons/effects/genetics.dmi'
LE.icon_state = "eyelasers"
playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
@@ -290,6 +292,70 @@
else
src << "\red You're out of energy! You need food!"
+/mob/proc/PowerGlove(atom/A)
+ return
+
+/mob/living/carbon/human/PowerGlove(atom/A)
+ var/obj/item/clothing/gloves/yellow/power/G = src:gloves
+ var/time = 100
+ var/turf/T = get_turf(src)
+ var/turf/U = get_turf(A)
+ var/obj/structure/cable/cable = locate() in T
+ if(!cable || !istype(cable))
+ return
+ if(world.time < G.next_shock)
+ src << "[G] aren't ready to shock again!"
+ return
+ src.visible_message("[name] fires an arc of electricity!", \
+ "You fire an arc of electricity!", \
+ "You hear the loud crackle of electricity!")
+ var/datum/powernet/PN = cable.get_powernet()
+ var/available = 0
+ var/obj/item/projectile/beam/lightning/L = getFromPool(/obj/item/projectile/beam/lightning, loc)
+ if(PN)
+ available = PN.avail
+ L.damage = PN.get_electrocute_damage()
+ if(available >= 5000000)
+ L.damage = 205
+ if(L.damage >= 200)
+ apply_damage(15, BURN, (hand ? "l_hand" : "r_hand"))
+ //usr:Stun(15)
+ //usr:Weaken(15)
+ //if(usr:status_flags & CANSTUN) // stun is usually associated with stutter
+ // usr:stuttering += 20
+ time = 200
+ src << "[G] overload from the massive current shocking you in the process!"
+ else if(L.damage >= 100)
+ apply_damage(5, BURN, (hand ? "l_hand" : "r_hand"))
+ //usr:Stun(10)
+ //usr:Weaken(10)
+ //if(usr:status_flags & CANSTUN) // stun is usually associated with stutter
+ // usr:stuttering += 10
+ time = 150
+ src << "[G] overload from the massive current shocking you in the process!"
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, src)
+ s.start()
+ if(L.damage <= 0)
+ //del(L)
+ returnToPool(L)
+ if(L)
+ playsound(get_turf(src), 'sound/effects/eleczap.ogg', 75, 1)
+ L.tang = L.adjustAngle(get_angle(U,T))
+ L.icon = midicon
+ L.icon_state = "[L.tang]"
+ L.firer = usr
+ L.def_zone = get_organ_target()
+ L.original = src
+ L.current = U
+ L.starting = U
+ L.yo = U.y - T.y
+ L.xo = U.x - T.x
+ spawn( 1 )
+ L.process()
+
+ next_move = world.time + 12
+ G.next_shock = world.time + time
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
if( stat || buckled || !A || !x || !y || !A.x || !A.y ) return
diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm
index f4231464efa..ff46b6b10b6 100644
--- a/code/controllers/failsafe.dm
+++ b/code/controllers/failsafe.dm
@@ -45,8 +45,7 @@ var/datum/controller/failsafe/Failsafe
MC_defcon = 0
MC_iteration = controller_iteration
- //Lighting controller now neither processes nor iterates.
- /*if(lighting_controller.processing)
+ if(lighting_controller.processing)
if(lighting_iteration == lighting_controller.iteration) //master_controller hasn't finished processing in the defined interval
switch(lighting_defcon)
if(0 to 3)
@@ -61,7 +60,7 @@ var/datum/controller/failsafe/Failsafe
lighting_defcon = 0
else
lighting_defcon = 0
- lighting_iteration = lighting_controller.iteration*/
+ lighting_iteration = lighting_controller.iteration
else
MC_defcon = 0
lighting_defcon = 0
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 417c618c8cc..c1628fcdeaf 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -83,7 +83,6 @@ datum/controller/game_controller/proc/setup()
if(ticker)
ticker.pregame()
- new/datum/controller/lighting()
lighting_controller.Initialize()
@@ -162,28 +161,28 @@ datum/controller/game_controller/proc/process()
//MOBS
timer = world.timeofday
- process_mobs()
+ processMobs()
mobs_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//DISEASES
timer = world.timeofday
- process_diseases()
+ processDiseases()
diseases_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//MACHINES
timer = world.timeofday
- process_machines()
+ processMachines()
machines_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//OBJECTS
timer = world.timeofday
- process_objects()
+ processObjects()
objects_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
@@ -191,28 +190,28 @@ datum/controller/game_controller/proc/process()
//PIPENETS
if(!pipe_processing_killed)
timer = world.timeofday
- process_pipenets()
+ processPipenets()
networks_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//POWERNETS
timer = world.timeofday
- process_powernets()
+ processPowernets()
powernets_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//NANO UIS
timer = world.timeofday
- process_nano()
+ processNano()
nano_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//EVENTS
timer = world.timeofday
- process_events()
+ processEvents()
events_cost = (world.timeofday - timer) / 10
//TICKER
@@ -237,112 +236,86 @@ datum/controller/game_controller/proc/process()
else
sleep(10)
-datum/controller/game_controller/proc/process_mobs()
- var/i = 1
- while(i<=mob_list.len)
- var/mob/M = mob_list[i]
- if(M)
- last_thing_processed = M.type
- M.Life()
- i++
+/datum/controller/game_controller/proc/processMobs()
+ for (var/mob/Mob in mob_list)
+ if (Mob)
+ last_thing_processed = Mob.type
+ Mob.Life()
continue
- mob_list.Cut(i,i+1)
-datum/controller/game_controller/proc/process_diseases()
- var/i = 1
- while(i<=active_diseases.len)
- var/datum/disease/Disease = active_diseases[i]
+ mob_list = mob_list - Mob
+
+/datum/controller/game_controller/proc/processDiseases()
+ for (var/datum/disease/Disease in active_diseases)
if(Disease)
last_thing_processed = Disease.type
Disease.process()
- i++
continue
- active_diseases.Cut(i,i+1)
-datum/controller/game_controller/proc/process_machines()
- var/i = 1
- while(i<=machines.len)
- var/obj/machinery/Machine = machines[i]
- if(Machine && Machine.loc)
- last_thing_processed = Machine.type
- if(Machine.process() != PROCESS_KILL)
- if(Machine)
+ active_diseases -= Disease
-// if(Machine.use_power)
-// Machine.auto_use_power()
- i++
+/datum/controller/game_controller/proc/processMachines()
+ for (var/obj/machinery/Machinery in machines)
+ if (Machinery && Machinery.loc)
+ last_thing_processed = Machinery.type
+
+ if(Machinery.process() != PROCESS_KILL)
+ if (Machinery) // Why another check?
+ if (Machinery.use_power)
+ Machinery.auto_use_power()
+
continue
- machines.Cut(i,i+1)
- i=1
- while(i<=active_areas.len)
- var/area/A = active_areas[i]
- if(A.powerupdate)
- A.powerupdate -= 1
- for(var/obj/machinery/M in A)
- if(M)
- if(M.use_power)
- M.auto_use_power()
-
- if(A.apc.len)
- i++
- continue
- active_areas.Cut(i,i+1)
-
-datum/controller/game_controller/proc/process_objects()
- var/i = 1
- while(i<=processing_objects.len)
- var/obj/Object = processing_objects[i]
- if(Object && Object.loc)
+ Machinery.removeAtProcessing()
+
+/datum/controller/game_controller/proc/processObjects()
+ for (var/obj/Object in processing_objects)
+ if (Object && Object.loc)
last_thing_processed = Object.type
Object.process()
- i++
continue
- processing_objects.Cut(i,i+1)
-datum/controller/game_controller/proc/process_pipenets()
+ processing_objects -= Object
+
+/datum/controller/game_controller/proc/processPipenets()
last_thing_processed = /datum/pipe_network
- var/i = 1
- while(i<=pipe_networks.len)
- var/datum/pipe_network/Network = pipe_networks[i]
- if(Network)
- Network.process()
- i++
- continue
- pipe_networks.Cut(i,i+1)
-datum/controller/game_controller/proc/process_powernets()
+ for (var/datum/pipe_network/Pipe_Network in pipe_networks)
+ if(Pipe_Network)
+ Pipe_Network.process()
+ continue
+
+ pipe_networks -= Pipe_Network
+
+/datum/controller/game_controller/proc/processPowernets()
last_thing_processed = /datum/powernet
- var/i = 1
- while(i<=powernets.len)
- var/datum/powernet/Powernet = powernets[i]
- if(Powernet)
+
+ for (var/datum/powernet/Powernet in powernets)
+ if (Powernet)
Powernet.reset()
- i++
continue
- powernets.Cut(i,i+1)
-datum/controller/game_controller/proc/process_nano()
- var/i = 1
- while(i<=nanomanager.processing_uis.len)
- var/datum/nanoui/ui = nanomanager.processing_uis[i]
- if(ui)
- ui.process()
- i++
+ powernets -= Powernet
+
+/datum/controller/game_controller/proc/processNano()
+ for (var/datum/nanoui/Nanoui in nanomanager.processing_uis)
+ if (Nanoui)
+ Nanoui.process()
continue
- nanomanager.processing_uis.Cut(i,i+1)
-datum/controller/game_controller/proc/process_events()
+ nanomanager.processing_uis -= Nanoui
+
+/datum/controller/game_controller/proc/processEvents()
last_thing_processed = /datum/event
- var/i = 1
- while(i<=events.len)
- var/datum/event/Event = events[i]
- if(Event)
+
+ for (var/datum/event/Event in events)
+ if (Event)
Event.process()
- i++
continue
- events.Cut(i,i+1)
+
+ events -= Event
+
checkEvent()
datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index 5d621b1b726..694f27d7684 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -19,7 +19,7 @@
feedback_add_details("admin_verb","RFailsafe")
if("Lighting")
new /datum/controller/lighting()
- //lighting_controller.process()
+ lighting_controller.process()
feedback_add_details("admin_verb","RLighting")
if("Supply Shuttle")
supply_shuttle.process()
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 64e629e56a7..02bd6052992 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -151,12 +151,17 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
- if(H.species.flags & HAS_SKIN_TONE)
+ if(H.species.bodyflags & HAS_SKIN_TONE)
if (H.s_tone >= 0)
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
+ // Skin color
+ if(H.species.flags & HAS_SKIN_TONE)
+ if(!H.species || H.species.flags & HAS_SKIN_COLOR)
+ preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
+
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
diff --git a/code/datums/sun.dm b/code/datums/sun.dm
index 7e1cbb51749..1748ea158e7 100644
--- a/code/datums/sun.dm
+++ b/code/datums/sun.dm
@@ -1,61 +1,43 @@
+#define SOLAR_UPDATE_TIME 600 //duration between two updates of the whole sun/solars positions
+
/datum/sun
var/angle
var/dx
var/dy
-// var/counter = 50 // to make the vars update during 1st call
var/rate
var/list/solars // for debugging purposes, references solars_list at the constructor
- var/nexttime = 3600 // Replacement for var/counter to force the sun to move every X IC minutes
- var/lastAngleUpdate
+ var/solar_next_update // last time the sun position was checked and adjusted
/datum/sun/New()
solars = solars_list
- rate = rand(750,1250)/1000 // 75.0% - 125.0% of standard rotation
- if(prob(50))
+ rate = rand(50,200)/100 // 50% - 200% of standard rotation
+ if(prob(50)) // same chance to rotate clockwise than counter-clockwise
rate = -rate
+ solar_next_update = world.time // init the timer
+ angle = rand (0,360) // the station position to the sun is randomised at round start
// calculate the sun's position given the time of day
-
+// at the standard rate (100%) the angle is increase/decreased by 6 degrees every minute.
+// a full rotation thus take a game hour in that case
/datum/sun/proc/calc_position()
-/* counter++
- if(counter<50) // count 50 pticks (50 seconds, roughly - about a 5deg change)
- return
- counter = 0 */
+ if(world.time < solar_next_update) //if less than 60 game secondes have passed, do nothing
+ return;
- angle = ((rate*world.time/100)%360 + 360)%360
+ angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate
- /*
- Yields a 45 - 75 IC minute rotational period
- Rotation rate can vary from 4.8 deg/min to 8 deg/min (288 to 480 deg/hr)
- */
-
- if(lastAngleUpdate != angle)
- for(var/obj/machinery/power/tracker/T in solars_list)
- if(!T.powernet)
- solars_list.Remove(T)
- continue
- T.set_angle(angle)
- lastAngleUpdate=angle
-
-
-
- if(nexttime > world.time)
- return
- nexttime = nexttime + 600 // 600 world.time ticks = 1 minute
+ solar_next_update += SOLAR_UPDATE_TIME // since we updated the angle, set the proper time for the next loop
// now calculate and cache the (dx,dy) increments for line drawing
var/s = sin(angle)
var/c = cos(angle)
- if(c == 0)
+ // Either "abs(s) < abs(c)" or "abs(s) >= abs(c)"
+ // In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions
- dx = 0
- dy = s
-
- else if( abs(s) < abs(c))
+ if( abs(s) < abs(c))
dx = s / abs(c)
dy = c / abs(c)
@@ -65,28 +47,42 @@
dy = c / abs(s)
- for(var/obj/machinery/power/solar/S in solars_list)
+ for(var/obj/machinery/power/M in solars_list)
- if(!S.powernet)
- solars_list.Remove(S)
+ if(!M.powernet)
+ solars_list.Remove(M)
continue
- if(S.control)
- occlusion(S)
+ // Solar Tracker
+ if(istype(M, /obj/machinery/power/tracker))
+ var/obj/machinery/power/tracker/T = M
+ T.set_angle(angle)
+
+ // Solar Control
+ else if(istype(M, /obj/machinery/power/solar_control))
+ var/obj/machinery/power/solar_control/C = M
+ if(C.track == 1) //if manual tracking...
+ C.tracker_update() //...update the position (not passing an angle, it is handled internally for manual tracking)
+
+ // Solar Panel
+ else if(istype(M, /obj/machinery/power/solar))
+ var/obj/machinery/power/solar/S = M
+ if(S.control)
+ occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
-
/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S)
var/ax = S.x // start at the solar panel
var/ay = S.y
+ var/turf/T = null
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
ay += dy
- var/turf/T = locate( round(ax,0.5),round(ay,0.5),S.z)
+ T = locate( round(ax,0.5),round(ay,0.5),S.z)
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge
break
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 11a78e3bf91..76ff5c74c94 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -174,6 +174,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Emergency Crate"
group = "Engineering"
+/datum/supply_packs/evacuation
+ name = "Inflatable barriers"
+ contains = list(/obj/item/weapon/storage/briefcase/inflatable,
+ /obj/item/weapon/storage/briefcase/inflatable,
+ /obj/item/weapon/storage/briefcase/inflatable)
+ cost = 20
+ containertype = /obj/structure/closet/crate
+ containername = "Inflatable Barrier Crate"
+ group = "Engineering"
+
/datum/supply_packs/janitor
name = "Janitorial supplies"
contains = list(/obj/item/weapon/reagent_containers/glass/bucket,
diff --git a/code/defines/vox_sounds.dm b/code/defines/vox_sounds.dm
index 7edb13ff0f5..1d730894ace 100644
--- a/code/defines/vox_sounds.dm
+++ b/code/defines/vox_sounds.dm
@@ -759,6 +759,7 @@ var/list/vox_sounds = list(
"vox_420" = 'sound/vox_fem/vox_420.ogg',
"voxtest" = 'sound/vox_fem/voxtest.ogg',
"voxtest2" = 'sound/vox_fem/voxtest2.ogg',
+ "voxtest3" = 'sound/vox_fem/voxtest3.ogg',
"w" = 'sound/vox_fem/w.ogg',
"walk" = 'sound/vox_fem/walk.ogg',
"wall" = 'sound/vox_fem/wall.ogg',
diff --git a/code/game/area/Dynamic areas.dm b/code/game/area/Dynamic areas.dm
new file mode 100644
index 00000000000..9d6010f29b4
--- /dev/null
+++ b/code/game/area/Dynamic areas.dm
@@ -0,0 +1,38 @@
+/area/dynamic // Do not use.
+ name = "dynamic area"
+ icon_state = "purple"
+ var/match_tag = "none"
+ var/match_width = -1
+ var/match_height = -1
+ var/enable_lights = 0
+
+/area/dynamic/destination // Do not use.
+ name = "dynamic area destination"
+
+/area/dynamic/destination/lobby
+ name = "Arrivals Lobby"
+ match_tag = "arrivals"
+ match_width = 5
+ match_height = 4
+ enable_lights = 1
+
+/area/dynamic/source // Do not use.
+ name = "dynamic area source"
+
+/area/dynamic/source/lobby_bar
+ name = "\improper Bar"
+ match_tag = "arrivals"
+ match_width = 5
+ match_height = 4
+
+/area/dynamic/source/lobby_russian
+ name = "\improper Russian Lounge"
+ match_tag = "arrivals"
+ match_width = 5
+ match_height = 4
+
+/area/dynamic/source/lobby_disco
+ name = "\improper Disco Lounge"
+ match_tag = "arrivals"
+ match_width = 5
+ match_height = 4
\ No newline at end of file
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 239571b2c6f..54c98df1fda 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -1039,10 +1039,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Clothing Shop"
icon_state = "Theatre"
-
-
-
-
/area/holodeck
name = "\improper Holodeck"
icon_state = "Holodeck"
@@ -1707,7 +1703,6 @@ proc/process_ghost_teleport_locs()
//GAYBAR
/area/secret/gaybar
name = "\improper Dance Bar"
- requires_power = 0
icon_state = "dancebar"
@@ -2043,6 +2038,7 @@ var/list/the_station_areas = list (
/area/hallway/primary/central,
/area/bridge,
/area/crew_quarters,
+ /area/civilian,
/area/holodeck,
/area/library,
/area/chapel,
@@ -2053,6 +2049,7 @@ var/list/the_station_areas = list (
/area/teleporter,
/area/medical,
/area/security,
+ /area/prison,
/area/quartermaster,
/area/janitor,
/area/hydroponics,
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 8bea8675147..9603638f719 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -26,16 +26,20 @@
// lighting_state = 4
//has_gravity = 0 // Space has gravity. Because.. because.
- if(!requires_power)
+ if(requires_power)
+ luminosity = 0
+ else
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
+ luminosity = 1
lighting_use_dynamic = 0
..()
// spawn(15)
power_change() // all machines set to current power level, also updates lighting icon
+ InitializeLighting()
/area/proc/poweralert(var/state, var/obj/source as obj)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 1ef9a50274c..25dacdacbc9 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -58,7 +58,6 @@
return
/atom/proc/assume_air(datum/gas_mixture/giver)
- del(giver)
return null
/atom/proc/remove_air(amount)
@@ -168,7 +167,7 @@ its easier to just keep the beam vertical.
//Maxdistance is the longest range the beam will persist before it gives up.
var/EndTime=world.time+time
var/broken = 0
- var/obj/item/projectile/beam/lightning/light = new
+ var/obj/item/projectile/beam/lightning/light = getFromPool(/obj/item/projectile/beam/lightning)
while(BeamTarget&&world.time[L.name] suddenly bursts into flames!")
- //playsound(L.loc, 'mag_fireballlaunch.ogg', 50, 0)
+ L.on_fire = 1
+ L.update_icon = 1
+ playsound(L.loc, 'sound/effects/bamf.ogg', 50, 0)
////////////////////////////////////////////////////////////////////////
@@ -329,6 +334,7 @@
desc = "The subject becomes able to transform the matter of their cells into a liquid state."
activation_messages = list("You feel strange and jiggly.")
deactivation_messages = list("You feel more solid.")
+ instability=2
verbtype=/proc/bioproc_melt
diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm
index d5ae6e716a9..363f46fb19c 100644
--- a/code/game/dna/genes/goon_powers.dm
+++ b/code/game/dna/genes/goon_powers.dm
@@ -17,6 +17,7 @@
desc = "Boosts efficiency in sectors of the brain commonly associated with meta-mental energies."
activation_messages = list("Your mind feels closed.")
deactivation_messages = list("You feel oddly exposed.")
+ instability=2
mutation=M_PSY_RESIST
@@ -28,6 +29,7 @@
/////////////////////////
/datum/dna/gene/basic/stealth
+ instability=7
can_activate(var/mob/M, var/flags)
// Can only activate one of these at a time.
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes))
@@ -53,7 +55,7 @@
var/turf/simulated/T = get_turf(M)
if(!istype(T))
return
- if(T.lit_value <= 2)
+ if(T.lighting_lumcount <= 2)
M.alpha = 0
else
M.alpha = round(255 * 0.80)
@@ -109,6 +111,7 @@
desc = "Allows the subject to lower the body temperature of others."
activation_messages = list("You notice a strange cold tingle in your fingertips.")
deactivation_messages = list("Your fingers feel warmer.")
+ instability=10
spelltype = /obj/effect/proc_holder/spell/targeted/cryokinesis
@@ -144,7 +147,12 @@
usr << "\red This will only work on normal organic beings."
return
- C.bodytemperature = -300
+ if (M_RESIST_COLD in C.mutations)
+ C.visible_message("\red A cloud of fine ice crystals engulfs [C.name], but disappears almost instantly!")
+ return
+
+ C.bodytemperature = 0
+ C.adjustFireLoss(20)
C.ExtinguishMob()
C.visible_message("\red A cloud of fine ice crystals engulfs [C]!")
@@ -178,6 +186,7 @@
desc = "Allows the subject to eat just about anything without harm."
activation_messages = list("You feel hungry.")
deactivation_messages = list("You don't feel quite so hungry anymore.")
+ instability=3
spelltype=/obj/effect/proc_holder/spell/targeted/eat
@@ -199,6 +208,7 @@
range = 1
selection_type = "view"
+
var/list/types_allowed=list(/obj/item,/mob/living/simple_animal, /mob/living/carbon/monkey, /mob/living/carbon/human)
/obj/effect/proc_holder/spell/targeted/eat/choose_targets(mob/user = usr)
@@ -297,6 +307,7 @@
//cooldown = 30
activation_messages = list("Your leg muscles feel taut and strong.")
deactivation_messages = list("Your leg muscles shrink back to normal.")
+ instability=2
spelltype =/obj/effect/proc_holder/spell/targeted/leap
@@ -327,7 +338,7 @@
usr.visible_message("\red [usr.name] takes a huge leap!")
playsound(usr.loc, 'sound/weapons/thudswoosh.ogg', 50, 1)
var/prevLayer = usr.layer
- usr.layer = 15
+ usr.layer = 9
for(var/i=0, i<10, i++)
step(usr, usr.dir)
@@ -374,6 +385,7 @@
//cooldown = 1800
activation_messages = list("You don't feel entirely like yourself somehow.")
deactivation_messages = list("You feel secure in your identity.")
+ instability=5
New()
..()
@@ -420,6 +432,7 @@
verbtype = /proc/bioproc_empath
activation_messages = list("You suddenly notice more about others than you did before.")
deactivation_messages = list("You no longer feel able to sense intentions.")
+ instability=1
New()
..()
@@ -515,6 +528,7 @@
desc = "Vastly increases the gas capacity of the subject's digestive tract."
activation_messages = list("You feel bloated and gassy.")
deactivation_messages = list("You no longer feel gassy. What a relief!")
+ instability=1
mutation = M_SUPER_FART
diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm
index 3562639c84b..d936b65b09e 100644
--- a/code/game/dna/genes/monkey.dm
+++ b/code/game/dna/genes/monkey.dm
@@ -110,9 +110,11 @@
sleep(48)
del(animation)
- var/mob/living/carbon/human/O = new( src )
+ var/mob/living/carbon/human/O
if(Mo.greaterform)
- O.set_species(Mo.greaterform)
+ O = new(src, Mo.greaterform)
+ else
+ O = new(src)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm
index 57e0680b933..e08558abe29 100644
--- a/code/game/dna/genes/powers.dm
+++ b/code/game/dna/genes/powers.dm
@@ -6,6 +6,7 @@
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
mutation=M_NO_BREATH
+ instability=2
New()
block=NOBREATHBLOCK
@@ -14,6 +15,7 @@
name="Remote Viewing"
activation_messages=list("Your mind expands.")
mutation=M_REMOTE_VIEW
+ instability=3
New()
block=REMOTEVIEWBLOCK
@@ -26,6 +28,7 @@
name="Regenerate"
activation_messages=list("You feel better.")
mutation=M_REGEN
+ instability=2
New()
block=REGENERATEBLOCK
@@ -34,6 +37,7 @@
name="Super Speed"
activation_messages=list("Your leg muscles pulsate.")
mutation=M_RUN
+ instability=1
New()
block=INCREASERUNBLOCK
@@ -42,6 +46,7 @@
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=M_REMOTE_TALK
+ instability=1
New()
block=REMOTETALKBLOCK
@@ -54,6 +59,7 @@
name="Morph"
activation_messages=list("Your skin feels strange.")
mutation=M_MORPH
+ instability=2
New()
block=MORPHBLOCK
@@ -66,6 +72,7 @@
name="Heat Resistance"
activation_messages=list("Your skin is icy to the touch.")
mutation=M_RESIST_HEAT
+ instability=2
New()
block=COLDBLOCK
@@ -87,6 +94,7 @@
name="Cold Resistance"
activation_messages=list("Your body is filled with warmth.")
mutation=M_RESIST_COLD
+ instability=2
New()
block=FIREBLOCK
@@ -108,6 +116,7 @@
name="No Prints"
activation_messages=list("Your fingers feel numb.")
mutation=M_FINGERPRINTS
+ instability=1
New()
block=NOPRINTSBLOCK
@@ -116,6 +125,7 @@
name="Shock Immunity"
activation_messages=list("Your skin feels strange.")
mutation=M_NO_SHOCK
+ instability=2
New()
block=SHOCKIMMUNITYBLOCK
@@ -124,6 +134,7 @@
name="Midget"
activation_messages=list("Your skin feels rubbery.")
mutation=M_DWARF
+ instability=1
New()
block=SMALLSIZEBLOCK
@@ -175,6 +186,7 @@
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
mutation=M_XRAY
+ instability=2
New()
block=XRAYBLOCK
@@ -184,6 +196,7 @@
activation_messages=list("You feel smarter.")
mutation=M_TK
activation_prob=15
+ instability=5
New()
block=TELEBLOCK
diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm
index bc85838b07f..9328da11e40 100644
--- a/code/game/dna/genes/vg_powers.dm
+++ b/code/game/dna/genes/vg_powers.dm
@@ -16,6 +16,7 @@ Obviously, requires DNA2.
desc = "Allows the subject to become the motherfucking Hulk."
activation_messages = list("Your muscles hurt.")
deactivation_messages = list("Your muscles quit tensing.")
+ instability=7
spelltype = /obj/effect/proc_holder/spell/targeted/hulk
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 6b33c2e5ab5..3dbdd7c4e19 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -152,6 +152,51 @@ var/global/datum/controller/gameticker/ticker
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
+ spawn(0) // Forking dynamic room selection
+ var/list/area/dynamic/source/available_source_candidates = typesof(/area/dynamic/source) - /area/dynamic/source
+ var/list/area/dynamic/destination/available_destination_candidates = typesof(/area/dynamic/destination) - /area/dynamic/destination
+
+ for (var/area/dynamic/destination/current_destination_candidate in available_destination_candidates)
+ var/area/dynamic/destination/current_destination = locate(current_destination_candidate)
+
+ if (!current_destination)
+ continue
+
+ if (current_destination.match_width == 0 || current_destination.match_height == 0)
+ message_admins("Dynamic area destination '[current_destination.name]' does not have its size requirements set.")
+ continue
+
+ var/list/area/dynamic/source/candidate_source_areas = new /list(0)
+ for (var/area/dynamic/source/candidate_source_area in available_source_candidates)
+ var/area/dynamic/source/candidate_source = locate(candidate_source_area)
+
+ if (!candidate_source)
+ continue
+
+ if (candidate_source.match_tag != current_destination.match_tag)
+ continue
+
+ if (candidate_source.match_width != current_destination.match_width || \
+ candidate_source.match_height != current_destination.match_height)
+ continue
+
+ candidate_source_areas += candidate_source
+
+ if (candidate_source_areas.len == 0)
+ message_admins("Failed to find a matching source for dynamic area: [current_destination.name]")
+ continue
+
+ var/area/dynamic/source/selected_source = pick(candidate_source_areas)
+ available_source_candidates -= selected_source
+
+ selected_source.copy_contents_to(current_destination, 0)
+
+ if (current_destination.enable_lights || selected_source.enable_lights)
+ current_destination.power_light = 1
+ else
+ current_destination.power_light = 0
+ current_destination.power_change()
+
//start_events() //handles random events and space dust.
//new random event system is handled from the MC.
@@ -164,7 +209,7 @@ var/global/datum/controller/gameticker/ticker
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
master_controller.process() //Start master_controller.process()
- //lighting_controller.process() //Start processing DynamicAreaLighting updates
+ lighting_controller.process() //Start processing DynamicAreaLighting updates
if(config.sql_enabled)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 6409063e5f7..b4511a60145 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -35,13 +35,22 @@ datum/objective
if(possible_targets.len > 0)
target = pick(possible_targets)
-
proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
+ var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) )
- target = possible_target
- break
+ if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && (possible_target.current.stat != 2) )
+ possible_targets += possible_target
+ if(possible_targets.len > 0)
+ target = pick(possible_targets)
+//Selects someone with a specific special role if role is != null. Or just anyone with a special role
+ proc/find_target_with_special_role(role)
+ var/list/possible_targets = list()
+ for(var/datum/mind/possible_target in ticker.minds)
+ if((possible_target != owner) && ishuman(possible_target.current) && (role && possible_target.special_role == role || !role && possible_target.special_role) && (possible_target.current.stat != 2) )
+ possible_targets += possible_target
+ if(possible_targets.len > 0)
+ target = pick(possible_targets)
datum/objective/assassinate
@@ -229,7 +238,7 @@ datum/objective/debrain//I want braaaainssss
find_target()
..()
if(target && target.current)
- explanation_text = "Steal the brain of [target.current.real_name]."
+ explanation_text = "Steal the brain of [target.current.real_name] the [target.assigned_role]."
else
explanation_text = "Free Objective"
return target
@@ -275,6 +284,14 @@ datum/objective/protect//The opposite of killing a dude.
explanation_text = "Free Objective"
return target
+ find_target_with_special_role(role,role_type=0)
+ ..(role)
+ if(target && target.current)
+ explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
+ else
+ explanation_text = "Free Objective"
+ return target
+
check_completion()
if(!target) //If it's a free objective.
return 1
@@ -306,22 +323,14 @@ datum/objective/hijack
return 1
datum/objective/speciesist
- var/datum/species/speciesist_target = null
-
+ var/is_human = 0
find_target()
- var/list/possible_targets = list()
- var/mob/living/carbon/human/O = owner.current
- for(var/datum/mind/possible_target in ticker.minds)
- if(ishuman(possible_target.current))
- var/mob/living/carbon/human/M = possible_target.current
- if (M.species != O.species)
- possible_targets += M.species
- if(possible_targets.len > 0)
- speciesist_target = pick(possible_targets)
- explanation_text = "Do not allow any [speciesist_target.name]s to escape on the shuttle."
+ if(istype(owner.current,/mob/living/carbon/human/human))
+ explanation_text = "Do not allow any non-humans to escape on the shuttle."
+ is_human = 1
else
- explanation_text = "Free Objective"
- return speciesist_target
+ explanation_text = "Do not allow any humans to escape on the shuttle."
+ return 1
check_completion()
if(emergency_shuttle.location<2)
@@ -329,7 +338,7 @@ datum/objective/speciesist
var/area/shuttle = locate(/area/shuttle/escape/centcom)
for(var/mob/living/carbon/human/player in player_list)
if (player.mind)
- if (player.species == speciesist_target)
+ if (is_human ? !istype(player,/mob/living/carbon/human/human) : istype(player,/mob/living/carbon/human/human))
if(player.stat != DEAD) //they're not dead!
if(get_turf(player) in shuttle)
return 0
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index a9dd31c71b7..7a5408dce14 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -87,7 +87,7 @@
EATBLOCK = getAssignedBlock("EAT", numsToAssign, DNA_HARD_BOUNDS, good=1)
JUMPBLOCK = getAssignedBlock("JUMP", numsToAssign, DNA_HARD_BOUNDS, good=1)
MELTBLOCK = getAssignedBlock("MELT", numsToAssign, good=1)
- IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign, good=1)
+ IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign)
EMPATHBLOCK = getAssignedBlock("EMPATH", numsToAssign, DNA_HARD_BOUNDS, good=1)
SUPERFARTBLOCK = getAssignedBlock("SUPERFART", numsToAssign, DNA_HARDER_BOUNDS, good=1)
POLYMORPHBLOCK = getAssignedBlock("POLYMORPH", numsToAssign, DNA_HARDER_BOUNDS, good=1)
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 24198d4e776..815a766f805 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -96,12 +96,12 @@
else
switch(rand(1,100))
- if(1 to 25)
+ if(1 to 30)
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.find_target()
traitor.objectives += kill_objective
- if(26 to 40)
+ if(31 to 40)
var/datum/objective/debrain/debrain_objective = new
debrain_objective.owner = traitor
debrain_objective.find_target()
@@ -109,7 +109,7 @@
if(41 to 50)
var/datum/objective/protect/protect_objective = new
protect_objective.owner = traitor
- protect_objective.find_target_by_role("Traitor",0) //Protect your fellow traitor
+ protect_objective.find_target_with_special_role(null,0)
if (!protect_objective.target)
protect_objective.find_target() //We could not find any traitors, protect somebody
traitor.objectives += protect_objective
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index 79a0966d860..7aa1d28f7ea 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -222,9 +222,7 @@
C.Stun(8)
C.Jitter(150)
for(var/obj/structure/window/W in oview(3))
- new W.shardtype(W.loc)
- if(W.reinf) new /obj/item/stack/rods(W.loc)
- del(W)
+ W.destroy()
playsound(M.current.loc, 'sound/effects/creepyshriek.ogg', 100, 1)
M.current.remove_vampire_blood(30)
M.current.verbs -= /client/vampire/proc/vampire_screech
@@ -278,7 +276,7 @@
if(!mind.vampire.iscloaking)
alpha = 255
return 0
- if(T.lit_value <= 2)
+ if(T.lighting_lumcount <= 2)
alpha = round((255 * 0.15))
return 1
else
@@ -432,7 +430,7 @@
if(T.y>world.maxy-outer_tele_radius || T.y max_lum) continue
+ if(T.lighting_lumcount > max_lum) continue
turfs += T
if(!turfs.len)
diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm
index c3e57a0cac1..e53290ebe0c 100644
--- a/code/game/jobs/job/civilian.dm
+++ b/code/game/jobs/job/civilian.dm
@@ -186,6 +186,7 @@
H.equip_or_collect(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/shaftminer(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
+ H.equip_or_collect(new /obj/item/weapon/pickaxe/drill(H), slot_r_hand)
// H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm
index dc7359403fe..8af5d0e4152 100644
--- a/code/game/jobs/job/engineering.dm
+++ b/code/game/jobs/job/engineering.dm
@@ -51,7 +51,7 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
- minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
+ minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
@@ -86,7 +86,7 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
- minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
+ minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
equip(var/mob/living/carbon/human/H)
diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm
index 3f7b20a1ede..cba2ebcd922 100644
--- a/code/game/jobs/job/medical.dm
+++ b/code/game/jobs/job/medical.dm
@@ -12,7 +12,7 @@
access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist)
- minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
+ minimal_access = list(access_eva, access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist, access_maint_tunnels)
minimal_player_age = 7
diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm
index e9bf9112b05..9852b0b6b4f 100644
--- a/code/game/jobs/job/science.dm
+++ b/code/game/jobs/job/science.dm
@@ -13,7 +13,7 @@
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
- minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
+ minimal_access = list(access_eva, access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_maint_tunnels)
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index 5f6b3ee5ac5..4d47556559b 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -13,7 +13,7 @@
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
- minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
+ minimal_access = list(access_eva, access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs)
@@ -180,12 +180,12 @@
flag = CUSTOMS
department_flag = KARMA
faction = "Station"
- total_positions = 1
- spawn_positions = 1
+ total_positions = 2
+ spawn_positions = 2
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
- minimal_access = list(access_security, access_customs, access_maint_tunnels)
+ minimal_access = list(access_brig, access_sec_doors, access_security, access_customs, access_maint_tunnels)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index 0814dba74e6..c4f6e3c14ac 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -52,6 +52,7 @@ var/global/datum/controller/occupations/job_master
if(!job) return 0
if(jobban_isbanned(player, rank)) return 0
if(!job.player_old_enough(player.client)) return 0
+ if(!is_job_whitelisted(player, rank)) return 0
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions
@@ -308,6 +309,10 @@ var/global/datum/controller/occupations/job_master
Debug("DO player not old enough, Player: [player], Job:[job.title]")
continue
+ if(!is_job_whitelisted(player, job.title))
+ Debug("DO player not whitelisted, Player: [player], Job:[job.title]")
+ continue
+
// If the player wants that job on this level, then try give it to him.
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 0be949dbb01..03a67b4f719 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -187,7 +187,7 @@
blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
A.blob_act()
del(src)
return
@@ -198,7 +198,7 @@
if(!beaker)
beaker = G
user.drop_item()
- G.setloc(src)
+ G.loc = src
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
src.updateUsrDialog()
return
@@ -228,7 +228,7 @@
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
- M.setloc(src)
+ M.loc = src
src.occupant = M
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
@@ -248,21 +248,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
ex_act(severity)
qdel(src)
return
@@ -309,7 +309,7 @@
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.setloc(src.loc)
+ src.occupant.loc = src.loc
src.occupant = null
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
@@ -411,29 +411,8 @@
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
- for(var/mob/living/carbon/slime/M in range(1,usr))
- if(M.Victim == usr)
- usr << "You're too busy getting your life sucked out of you."
- return
- visible_message("[usr] starts climbing into the sleeper.", 3)
- if(do_after(usr, 20))
- if(src.occupant)
- usr << "\blue The sleeper is already occupied!"
- return
- usr.stop_pulling()
- usr.client.perspective = EYE_PERSPECTIVE
- usr.client.eye = src
- usr.setloc(src)
- src.occupant = usr
- src.icon_state = "sleeper_1"
- if(orient == "RIGHT")
- icon_state = "sleeper_1-r"
-
- usr << "\blue You feel cool air surround you. You go numb as your senses turn inward."
-
- for(var/obj/O in src)
- del(O)
- src.add_fingerprint(usr)
- return
+ for(var/obj/O in src)
+ del(O)
+ src.add_fingerprint(usr)
return
- return
+ return
\ No newline at end of file
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index adc0a84ade5..5c61d2cf226 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -46,7 +46,7 @@
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
- usr.setloc(src)
+ usr.loc = src
src.occupant = usr
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
@@ -60,12 +60,12 @@
if ((!( src.occupant ) || src.locked))
return
for(var/obj/O in src)
- O.setloc(src.loc)
+ O.loc = src.loc
//Foreach goto(30)
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.setloc(src.loc)
+ src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "body_scanner_0"
return
@@ -83,11 +83,11 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
- M.setloc(src)
+ M.loc = src
src.occupant = M
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
- O.setloc(src.loc)
+ O.loc = src.loc
//Foreach goto(154)
src.add_fingerprint(user)
//G = null
@@ -98,7 +98,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
@@ -107,7 +107,7 @@
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
@@ -116,7 +116,7 @@
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
@@ -128,7 +128,7 @@
/obj/machinery/bodyscanner/blob_act()
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
- A.setloc(src.loc)
+ A.loc = src.loc
del(src)
/obj/machinery/body_scanconsole/ex_act(severity)
diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm
index bb35302386c..1d0cab15733 100644
--- a/code/game/machinery/atmo_control.dm
+++ b/code/game/machinery/atmo_control.dm
@@ -108,7 +108,7 @@ obj/machinery/air_sensor
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 )
+ getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/air_management/M = new /obj/item/weapon/circuitboard/air_management( A )
for (var/obj/C in src)
C.loc = src.loc
@@ -389,7 +389,7 @@ legend {
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 )
+ getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/injector_control/M = new /obj/item/weapon/circuitboard/injector_control( A )
for (var/obj/C in src)
C.loc = src.loc
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 6b94a2fc3c5..fc43297616f 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -275,9 +275,42 @@ var/global/list/autolathe_recipes_hidden = list( \
if (!busy)
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
- var/obj/template = locate(href_list["make"])
+
+ // critical exploit fix start -walter0o
+ var/obj/item/template = null
+ var/attempting_to_build = locate(href_list["make"])
+
+ if(!attempting_to_build)
+ return
+
+ if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
+ template = attempting_to_build
+
+ else // somebody is trying to exploit, alert admins -walter0o
+
+ var/turf/LOC = get_turf(usr)
+ message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] ! ([LOC ? "JMP" : "null"])", 0)
+ log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
+ return
+
+ // now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
+
var/multiplier = text2num(href_list["multiplier"])
+
if (!multiplier) multiplier = 1
+ var/max_multiplier = 1
+
+ if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
+ var/obj/item/stack/S = template
+ max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
+
+ if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
+
+ var/turf/LOC = get_turf(usr)
+ message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] ! ([LOC ? "JMP" : "null"])" , 0)
+ log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
+ return
+
var/power = max(2000, (template.m_amt+template.g_amt+template.f_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier && src.f_amount >= template.f_amt*multiplier)
busy = 1
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index d29e9202e4a..be9f1eb9fa0 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -34,7 +34,7 @@
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
- user << "\red The biogenerator already occuped."
+ user << "\red The biogenerator is already loaded."
else
user.before_take_item(O)
O.loc = src
@@ -220,4 +220,4 @@
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
menustat = "menu"
- updateUsrDialog()
\ No newline at end of file
+ updateUsrDialog()
diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm
index 38834b4ef6a..d281fb57308 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -210,7 +210,7 @@
/proc/DirBlockedWithAccess(turf/loc,var/dir,var/obj/item/weapon/card/id/ID)
for(var/obj/structure/window/D in loc)
if(!D.density) continue
- if(D.dir == SOUTHWEST) return 1
+ if(D.is_fulltile()) return 1
if(D.dir == dir) return 1
for(var/obj/machinery/door/D in loc)
diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm
index a2b0dcaa037..3d2b4c85427 100644
--- a/code/game/machinery/bots/ed209bot.dm
+++ b/code/game/machinery/bots/ed209bot.dm
@@ -824,7 +824,7 @@ Auto Patrol: []"},
if (src.emagged == 2)
projectile = /obj/item/projectile/beam
else
- projectile = /obj/item/projectile/energy/electrode
+ projectile = /obj/item/projectile/beam/stun
else if(lasercolor == "b")
if (src.emagged == 2)
projectile = /obj/item/projectile/beam/lastertag/omni
@@ -1020,7 +1020,8 @@ Auto Patrol: []"},
if((src.lasercolor == "b") && (src.disabled == 0))
if(istype(Proj, /obj/item/projectile/beam/lastertag/red))
src.disabled = 1
- del (Proj)
+ //del (Proj)
+ returnToPool(Proj)
sleep(100)
src.disabled = 0
else
@@ -1028,7 +1029,8 @@ Auto Patrol: []"},
else if((src.lasercolor == "r") && (src.disabled == 0))
if(istype(Proj, /obj/item/projectile/beam/lastertag/blue))
src.disabled = 1
- del (Proj)
+ //del (Proj)
+ returnToPool(Proj)
sleep(100)
src.disabled = 0
else
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index 39846699ea1..16c39585dfa 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -92,7 +92,7 @@
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
return
- use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
- charging.give(175) //inefficiency.
+ use_power(2000) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
+ charging.give(1750) //inefficiency.
updateicon()
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 89c034035ed..87958b69338 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -161,7 +161,7 @@
spawn(30)
src.eject_wait = 0
- var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
+ var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
occupant = H
if(!R.dna.real_name) //to prevent null names
@@ -211,7 +211,6 @@
if(R.dna.species == "Human") //no more xenos losing ears/tentacles
H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
- H.set_species(R.dna.species)
//for(var/datum/language/L in languages)
// H.add_language(L.name)
H.suiciding = 0
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index a511ecf6e05..72301160d3e 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -266,9 +266,26 @@
src.updateUsrDialog()
- else
- ..()
- return
+ else if(istype(I, /obj/item/weapon/screwdriver))
+ playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
+ if(do_after(user, 20))
+ var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
+ var/obj/item/weapon/circuitboard/arcade/M = new /obj/item/weapon/circuitboard/arcade( A )
+ for (var/obj/C in src)
+ C.loc = src.loc
+ A.circuit = M
+ A.anchored = 1
+
+ if (src.stat & BROKEN)
+ user << "\blue The broken glass falls out."
+ getFromPool(/obj/item/weapon/shard, loc)
+ A.state = 3
+ A.icon_state = "3"
+ else
+ user << "\blue You disconnect the monitor."
+ A.state = 4
+ A.icon_state = "4"
+
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index 3ef385d0285..15d630c8140 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -112,7 +112,7 @@
C.loc = src.loc
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
- new /obj/item/weapon/shard( src.loc )
+ getFromPool(/obj/item/weapon/shard, loc)
A.state = 3
A.icon_state = "3"
else
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 0a5696ee4ce..620aa5bd0d8 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -56,7 +56,7 @@
if(stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
- new /obj/item/weapon/shard( loc )
+ getFromPool(/obj/item/weapon/shard, loc)
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm
index f32293f67af..f8d14b77ac9 100644
--- a/code/game/machinery/computer/power.dm
+++ b/code/game/machinery/computer/power.dm
@@ -45,7 +45,7 @@
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 )
+ getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/powermonitor/M = new /obj/item/weapon/circuitboard/powermonitor( A )
for (var/obj/C in src)
C.loc = src.loc
diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm
index 25607ab66f8..9ce03c4630d 100644
--- a/code/game/machinery/computer/prisonshuttle.dm
+++ b/code/game/machinery/computer/prisonshuttle.dm
@@ -47,7 +47,7 @@ var/prison_shuttle_timeleft = 0
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
- new /obj/item/weapon/shard( src.loc )
+ getFromPool(/obj/item/weapon/shard, loc)
A.state = 3
A.icon_state = "3"
else
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 52464306d80..34a2f8a4f8a 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -251,7 +251,7 @@
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
- occupant.setloc(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
+ occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
occupant.bodytemperature = 261
// occupant.metabslow = 0
@@ -275,7 +275,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
- M.setloc(src)
+ M.loc = src
if(M.health > -100 && (M.health < 0 || M.sleeping))
M << "\blue You feel a cold liquid surround you. Your skin starts to freeze up."
occupant = M
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 5d537787b75..5246d97e321 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -80,7 +80,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
visible_message("\blue The console beeps happily as it disgorges \the [I].", 3)
- I.setloc(get_turf(src))
+ I.loc = get_turf(src)
frozen_items -= I
else if(href_list["allitems"])
@@ -92,7 +92,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
visible_message("\blue The console beeps happily as it disgorges the desired objects.", 3)
for(var/obj/item/I in frozen_items)
- I.setloc(get_turf(src))
+ I.loc = get_turf(src)
frozen_items -= I
else if(href_list["crew"])
@@ -186,11 +186,11 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
//Drop all items into the pod.
for(var/obj/item/W in occupant)
occupant.drop_from_inventory(W)
- W.setloc(src)
+ W.loc = src
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
for(var/obj/item/O in W.contents)
- O.setloc(src)
+ O.loc = src
//Delete all items not on the preservation list.
var/list/items = src.contents
@@ -240,7 +240,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
current_mode.possible_traitors.Remove(occupant)
// Delete them from datacore.
-
+
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
@@ -305,7 +305,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
if(do_after(user, 20))
if(!M || !G || !G:affecting) return
- M.setloc(src)
+ M.loc = src
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
@@ -375,7 +375,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
- usr.setloc(src)
+ usr.loc = src
src.occupant = usr
if(orient_right)
@@ -401,7 +401,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
occupant.client.eye = src.occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
- occupant.setloc(get_turf(src))
+ occupant.loc = get_turf(src)
occupant = null
if(orient_right)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 27f5560fa03..6d53efc796d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1079,11 +1079,13 @@ About the new airlock wires panel:
if(istype(src, /obj/machinery/door/airlock/clown))
playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1)
else
- playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
- for(var/turf/turf in locs)
- var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
- if(killthis)
- killthis.ex_act(2)//Smashin windows
+ playsound(get_turf(src), 'sound/machines/airlock.ogg', 30, 1)
+
+ for(var/turf/T in loc)
+ var/obj/structure/window/W = locate(/obj/structure/window) in T
+ if (W)
+ W.destroy()
+
..()
return
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 18be44f4e3e..7a247f37614 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -125,7 +125,7 @@
/obj/machinery/door/window/proc/take_damage(var/damage)
src.health = max(0, src.health - damage)
if (src.health <= 0)
- new /obj/item/weapon/shard(src.loc)
+ getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
CC.amount = 2
var/obj/item/weapon/airlock_electronics/ae
@@ -181,7 +181,12 @@
return
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("\red [user] smashes against the [src.name].", 1)
- take_damage(25)
+ if (src.health <= 0)
+ getFromPool(/obj/item/weapon/shard, loc)
+ var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
+ CC.amount = 2
+ src.density = 0
+ del(src)
else
return src.attack_hand(user)
@@ -259,11 +264,14 @@
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
- var/aforce = I.force
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("\red [src] was hit by [I].")
- if(I.damtype == BRUTE || I.damtype == BURN)
- take_damage(aforce)
+ if (src.health <= 0)
+ getFromPool(/obj/item/weapon/shard, loc)
+ var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
+ CC.amount = 2
+ src.density = 0
+ del(src)
return
diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm
index 57826586435..8398ee14d50 100644
--- a/code/game/machinery/hydroponics.dm
+++ b/code/game/machinery/hydroponics.dm
@@ -468,7 +468,7 @@ obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm,
obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
//Called when mob user "attacks" it with object O
- if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
+ if (istype(O, /obj/item/weapon/reagent_containers/glass))
var/b_amount = O.reagents.get_reagent_amount("water")
if(b_amount > 0 && waterlevel < 100)
if(b_amount + waterlevel > 100)
@@ -476,17 +476,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
O.reagents.remove_reagent("water", b_amount)
waterlevel += b_amount
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
- user << "You fill the [src] with [b_amount] units of water."
+ user << "You fill \the [src] with [b_amount] units of water."
- // Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
+ // Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
toxic -= round(b_amount/4)
- if (toxic < 0 ) // Make sure it won't go overoboard
+ if (toxic < 0 ) // Make sure it won't go overboard
toxic = 0
else if(waterlevel >= 100)
- user << "\red The [src] is already full."
+ user << "\red \The [src] is already full."
else
- user << "\red The bucket is not filled with water."
+ user << "\red \The [O] is not filled with water."
updateicon()
else if ( istype(O, /obj/item/nutrient) )
@@ -504,7 +504,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (planted)
if (S.mode == 1)
if(!S.reagents.total_volume)
- user << "\red The syringe is empty."
+ user << "\red \The [O] is empty."
return
user << "\red You inject the [myseed.plantname] with a chemical solution."
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index d02e5fd4f46..97393b6dbc1 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -59,7 +59,6 @@
if(!isbroken)
icon_state = icon_off
-
/*******************
* Item Adding
********************/
@@ -83,6 +82,8 @@
user.visible_message("[user] has added \the [O] to \the [src].", \
"You add \the [O] to \the [src].")
+ nanomanager.update_uis(src)
+
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/P = O
var/plants_loaded = 0
@@ -100,81 +101,88 @@
plants_loaded++
if(plants_loaded)
- user.visible_message("[user] loads \the [src] with \the [P].", \
- "You load \the [src] with \the [P].")
+ user.visible_message( \
+ "[user] loads \the [src] with \the [P].", \
+ "You load \the [src] with \the [P].")
if(P.contents.len > 0)
user << "Some items are refused."
+ nanomanager.update_uis(src)
+
else
user << "\The [src] smartly refuses [O]."
return 1
updateUsrDialog()
+ ..()
+
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
- return src.attack_hand(user)
+ return attack_hand(user)
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
return 0
-/obj/machinery/smartfridge/attack_hand(mob/user as mob)
- user.set_machine(src)
- interact(user)
+ ui_interact(user)
/*******************
* SmartFridge Menu
********************/
-/obj/machinery/smartfridge/interact(mob/user as mob)
- if(!src.ispowered)
- return
+/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+ user.set_machine(src)
- var/dat = "Select an item:
"
+ var/data[0]
+ data["contents"] = null
- if (contents.len == 0)
- dat += "No product loaded!"
- else
- for (var/O in item_quants)
- if(item_quants[O] > 0)
- var/N = item_quants[O]
- dat += "[capitalize(O)]:"
- dat += " [N] "
- dat += "Vend "
- if(N > 5)
- dat += "(x5)"
- if(N > 10)
- dat += "(x10)"
- if(N > 25)
- dat += "(x25)"
- if(N > 1)
- dat += "(All)"
- dat += "
"
+ var/list/items[0]
+ for (var/i=1 to length(item_quants))
+ var/K = item_quants[i]
+ var/count = item_quants[K]
+ if (count > 0)
+ items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count)))
- dat += ""
- user << browse("[src] Supplies[dat]", "window=smartfridge")
- onclose(user, "smartfridge")
- return
+ if (items.len > 0)
+ data["contents"] = items
+
+
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ if (!ui)
+ ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
+ ui.set_initial_data(data)
+ ui.open()
/obj/machinery/smartfridge/Topic(href, href_list)
- if(..())
- return
- usr.set_machine(src)
+ if (..()) return 0
- var/N = href_list["vend"]
- var/amount = text2num(href_list["amount"])
+ var/mob/user = usr
+ var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
- if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
- return
+ src.add_fingerprint(user)
- item_quants[N] = max(item_quants[N] - amount, 0)
+ if (href_list["close"])
+ user.unset_machine()
+ ui.close()
+ return 0
- var/i = amount
- for(var/obj/O in contents)
- if(O.name == N)
- O.loc = src.loc
- i--
- if(i <= 0)
- break
+ if (href_list["vend"])
+ var/index = text2num(href_list["vend"])
+ var/amount = text2num(href_list["amount"])
+ var/K = item_quants[index]
+ var/count = item_quants[K]
- src.updateUsrDialog()
- return
+ // Sanity check, there are probably ways to press the button when it shouldn't be possible.
+ if(count > 0)
+ item_quants[K] = max(count - amount, 0)
+
+ var/i = amount
+ for(var/obj/O in contents)
+ if (O.name == K)
+ O.loc = loc
+ i--
+ if (i <= 0)
+ return 1
+
+ return 1
+
+ return 0
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 38e96fe7b94..507b656ed1a 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -112,16 +112,31 @@ Class Procs:
var/global/gl_uid = 1
var/custom_aghost_alerts=0
var/panel_open = 0
+ var/myArea
/obj/machinery/New()
- ..()
+ addAtProcessing()
+ return ..()
+
+/obj/machinery/proc/addAtProcessing()
+ if (use_power)
+ myArea = loc.loc
+
machines += src
-/obj/machinery/Destroy()
+/obj/machinery/proc/removeAtProcessing()
+ if (myArea)
+ myArea = null
+
machines -= src
+
+/obj/machinery/Destroy()
+ if (src in machines)
+ removeAtProcessing()
+
..()
-/obj/machinery/process()//If you dont use process or power why are you here
+/obj/machinery/process() // If you dont use process or power why are you here
return PROCESS_KILL
/obj/machinery/emp_act(severity)
@@ -277,3 +292,15 @@ Class Procs:
panel_open = 0
icon_state = icon_state_closed
user << "You close the maintenance hatch of [src]."
+
+/obj/machinery/proc/state(var/msg)
+ for(var/mob/O in hearers(src, null))
+ O.show_message("\icon[src] [msg]", 2)
+
+/obj/machinery/proc/ping(text=null)
+ if (!text)
+ text = "\The [src] pings."
+
+ state(text, "blue")
+ playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+
diff --git a/code/game/machinery/metaldetector.dm b/code/game/machinery/metaldetector.dm
new file mode 100644
index 00000000000..3d7ccb4ab3b
--- /dev/null
+++ b/code/game/machinery/metaldetector.dm
@@ -0,0 +1,162 @@
+/obj/machinery/metaldetector
+ name = "metal detector"
+ desc = "a metal detector. staff can toggle this between ignore security and detect all with their id."
+ anchored = 1.0
+ density = 0
+ icon = 'icons/obj/machines/metal_detector.dmi'
+ icon_state = "metaldetector0"
+ use_power = 1
+ idle_power_usage = 20
+ active_power_usage = 250
+ var/guncount = 0
+ var/knifecount = 0
+ var/bombcount = 0
+ var/meleecount = 0
+ var/detectall = 0
+
+/obj/machinery/metaldetector/check_access(obj/item/weapon/card/id/I, list/access_list)
+ if(!istype(access_list))
+ return 1
+ if(!access_list.len) //no requirements
+ return 1
+ if(istype(I, /obj/item/device/pda))
+ var/obj/item/device/pda/pda = I
+ I = pda.id
+ if(!istype(I) || !I.access) //not ID or no access
+ return 0
+ return 1
+
+/obj/machinery/metaldetector/attackby(obj/item/W as obj, mob/user as mob)
+ if(istype(W, /obj/item/weapon/card/emag))
+ if(!src.emagged)
+ src.emagged = 1
+ user << "\blue You short out the circuitry."
+ return
+ if(istype(W, /obj/item/weapon/card))
+ for(var/ID in list(user.equipped(), user:wear_id, user:belt))
+ if(src.check_access(ID,list("20")))
+ if(!src.detectall)
+ src.detectall = 1
+ user << "\blue You set the [src] to detect all personnel."
+ return
+ else
+ src.detectall = 0
+ user << "\blue You set the [src] to ignore all staff and security."
+ return
+ else
+ user << "\red You lack access to the control panel!"
+ return
+
+/obj/machinery/metaldetector/Crossed(AM as mob|obj)
+ if(emagged)
+ return
+ if (istype(AM, /mob/living))
+ var/mob/M = AM
+ if(!src.detectall)
+ if(M:wear_id || M:belt)
+ for(var/ID in list(M:equipped(), M:wear_id, M:belt))
+ if(src.check_access(ID,list("1", "2", "3", "20", "57", "58")))
+ return
+ if (istype(M, /mob/living))
+ for(var/obj/item/weapon/gun/G in M)
+ guncount++
+ for(var/obj/item/device/transfer_valve/B in M)
+ bombcount++
+ for(var/obj/item/weapon/kitchen/utensil/knife/K in M)
+ knifecount++
+ for(var/obj/item/weapon/kitchenknife/KK in M)
+ knifecount++
+ for(var/obj/item/weapon/plastique/KK in M)
+ bombcount++
+ for(var/obj/item/weapon/melee/ML in M)
+ meleecount++
+ if(guncount)
+ flick("metaldetector2",src)
+ playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
+ for (var/mob/O in viewers(O, null))
+ O << "\red [src.name] beeps, \"Alert! Firearm found on [M.name]!\""
+
+ if(seen_by_camera(M))
+ // determine the name of the perp (goes by ID if wearing one)
+ var/perpname = M.name
+ if(M:wear_id && M:wear_id.registered_name)
+ perpname = M:wear_id.registered_name
+ // find the matching security record
+ for(var/datum/data/record/R in data_core.general)
+ if(R.fields["name"] == perpname)
+ for (var/datum/data/record/S in data_core.security)
+ if (S.fields["id"] == R.fields["id"])
+ // now add to rap sheet
+ S.fields["criminal"] = "*Arrest*"
+ S.fields["mi_crim"] = "Carrying a firearm."
+ break
+
+ guncount = 0
+ else if(knifecount)
+ flick("metaldetector2",src)
+ playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
+ for (var/mob/O in viewers(O, null))
+ O << "\red [src.name] beeps, \"Alert! Knife found on [M.name]!\""
+
+ if(seen_by_camera(M))
+ // determine the name of the perp (goes by ID if wearing one)
+ var/perpname = M.name
+ if(M:wear_id && M:wear_id.registered_name)
+ perpname = M:wear_id.registered_name
+ // find the matching security record
+ for(var/datum/data/record/R in data_core.general)
+ if(R.fields["name"] == perpname)
+ for (var/datum/data/record/S in data_core.security)
+ if (S.fields["id"] == R.fields["id"])
+ // now add to rap sheet
+ S.fields["criminal"] = "*Arrest*"
+ S.fields["mi_crim"] = "Carrying a knife."
+ break
+
+ knifecount = 0
+ else if(bombcount)
+ flick("metaldetector2",src)
+ playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
+ for (var/mob/O in viewers(O, null))
+ O << "\red [src.name] beeps, \"Alert! Bomb found on [M.name]!\""
+
+ if(seen_by_camera(M))
+ // determine the name of the perp (goes by ID if wearing one)
+ var/perpname = M.name
+ if(M:wear_id && M:wear_id.registered_name)
+ perpname = M:wear_id.registered_name
+ // find the matching security record
+ for(var/datum/data/record/R in data_core.general)
+ if(R.fields["name"] == perpname)
+ for (var/datum/data/record/S in data_core.security)
+ if (S.fields["id"] == R.fields["id"])
+ // now add to rap sheet
+ S.fields["criminal"] = "*Arrest*"
+ S.fields["mi_crim"] = "Carrying a bomb."
+ break
+
+ bombcount = 0
+ else if(meleecount)
+ flick("metaldetector2",src)
+ playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
+ for (var/mob/O in viewers(O, null))
+ O << "\red [src.name] beeps, \"Alert! Melee weapon found on [M.name]!\""
+
+ if(seen_by_camera(M))
+ // determine the name of the perp (goes by ID if wearing one)
+ var/perpname = M.name
+ if(M:wear_id && M:wear_id.registered_name)
+ perpname = M:wear_id.registered_name
+ // find the matching security record
+ for(var/datum/data/record/R in data_core.general)
+ if(R.fields["name"] == perpname)
+ for (var/datum/data/record/S in data_core.security)
+ if (S.fields["id"] == R.fields["id"])
+ // now add to rap sheet
+ S.fields["criminal"] = "*Arrest*"
+ S.fields["mi_crim"] = "Carrying a weapon."
+ break
+
+ meleecount = 0
+ else
+ flick("metaldetector1",src)
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 3f3912be1d8..6cccb7cf0f6 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -66,7 +66,7 @@
spark_system.attach(src)
sleep(10)
if(!installation)// if for some reason the turret has no gun (ie, admin spawned) it resorts to basic taser shots
- projectile = /obj/item/projectile/energy/electrode//holder for the projectile, here it is being set
+ projectile = /obj/item/projectile/beam/stun//holder for the projectile, here it is being set
eprojectile = /obj/item/projectile/beam//holder for the projectile when emagged, if it is different
reqpower = 200
sound = 1
@@ -128,7 +128,7 @@
reqpower = 700
if(/obj/item/weapon/gun/energy/taser)
- projectile = /obj/item/projectile/energy/electrode
+ projectile = /obj/item/projectile/beam/stun
eprojectile = projectile
iconholder = 1
reqpower = 200
@@ -170,7 +170,7 @@
reqpower = 500
else // Energy gun shots
- projectile = /obj/item/projectile/energy/electrode// if it hasn't been emagged, it uses normal taser shots
+ projectile = /obj/item/projectile/beam/stun// if it hasn't been emagged, it uses normal taser shots
eprojectile = /obj/item/projectile/beam//If it has, going to kill mode
iconholder = 1
egun = 1
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 2931fb29ec5..ee761272a9c 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -1,6 +1,6 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-obj/machinery/recharger
+/obj/machinery/recharger
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
@@ -10,7 +10,7 @@ obj/machinery/recharger
active_power_usage = 250
var/obj/item/charging = null
-obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
+/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(istype(user,/mob/living/silicon))
return
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton) || istype(G,/obj/item/device/laptop))
@@ -47,7 +47,7 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
user << "You [anchored ? "attached" : "detached"] the recharger."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
-obj/machinery/recharger/attack_hand(mob/user as mob)
+/obj/machinery/recharger/attack_hand(mob/user as mob)
add_fingerprint(user)
if(charging)
@@ -57,10 +57,10 @@ obj/machinery/recharger/attack_hand(mob/user as mob)
use_power = 1
update_icon()
-obj/machinery/recharger/attack_paw(mob/user as mob)
+/obj/machinery/recharger/attack_paw(mob/user as mob)
return attack_hand(user)
-obj/machinery/recharger/process()
+/obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
@@ -68,33 +68,33 @@ obj/machinery/recharger/process()
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
- E.power_supply.give(100)
+ E.power_supply.give(1000)
icon_state = "recharger1"
- use_power(250)
+ use_power(2500)
else
icon_state = "recharger2"
return
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
- B.bcell.charge += 175
+ B.bcell.charge += 1750
icon_state = "recharger1"
- use_power(200)
+ use_power(2000)
else
icon_state = "recharger2"
return
if(istype(charging, /obj/item/device/laptop))
var/obj/item/device/laptop/L = charging
if(L.stored_computer.battery.charge < L.stored_computer.battery.maxcharge)
- L.stored_computer.battery.give(100)
+ L.stored_computer.battery.give(1000)
icon_state = "recharger1"
- use_power(250)
+ use_power(2500)
else
icon_state = "recharger2"
return
-obj/machinery/recharger/emp_act(severity)
+/obj/machinery/recharger/emp_act(severity)
if(stat & (NOPOWER|BROKEN) || !anchored)
..(severity)
return
@@ -112,18 +112,18 @@ obj/machinery/recharger/emp_act(severity)
charging.emp_act(severity)
..(severity)
-obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
+/obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(charging)
icon_state = "recharger1"
else
icon_state = "recharger0"
-obj/machinery/recharger/wallcharger
+/obj/machinery/recharger/wallcharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
-obj/machinery/recharger/wallcharger/process()
+/obj/machinery/recharger/wallcharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
@@ -131,22 +131,22 @@ obj/machinery/recharger/wallcharger/process()
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
- E.power_supply.give(100)
+ E.power_supply.give(1000)
icon_state = "wrecharger1"
- use_power(250)
+ use_power(2500)
else
icon_state = "wrecharger2"
return
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
- B.bcell.charge += 175
+ B.bcell.charge += 1750
icon_state = "recharger1"
- use_power(200)
+ use_power(2000)
else
icon_state = "recharger2"
-obj/machinery/recharger/wallcharger/update_icon()
+/obj/machinery/recharger/wallcharger/update_icon()
if(charging)
icon_state = "wrecharger1"
else
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index 2daaee476c5..c78bc0bb393 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -75,7 +75,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.setloc(src.loc)
+ src.occupant.loc = src.loc
src.occupant = null
build_icon()
src.use_power = 1
@@ -179,7 +179,7 @@
if(usr && usr.client)
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
- usr.setloc(src)
+ usr.loc = src
src.occupant = usr
/*for(var/obj/O in src)
O.loc = src.loc*/
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 7308ede2a4b..ec282f5096f 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -410,7 +410,7 @@
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
- src.OCCUPANT.setloc(src.loc)
+ src.OCCUPANT.loc = src.loc
src.OCCUPANT = null
if(!src.isopen)
src.isopen = 1
@@ -453,7 +453,7 @@
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
- usr.setloc(src)
+ usr.loc = src
// usr.metabslow = 1
src.OCCUPANT = usr
src.isopen = 0 //Close the thing after the guy gets inside
@@ -499,7 +499,7 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
- M.setloc(src)
+ M.loc = src
src.OCCUPANT = M
src.isopen = 0 //close ittt
@@ -520,7 +520,7 @@
return
user << "You load the [S.name] into the storage compartment."
user.drop_item()
- S.setloc(src)
+ S.loc = src
src.SUIT = S
src.update_icon()
src.updateUsrDialog()
@@ -534,7 +534,7 @@
return
user << "You load the [H.name] into the storage compartment."
user.drop_item()
- H.setloc(src)
+ H.loc = src
src.HELMET = H
src.update_icon()
src.updateUsrDialog()
@@ -548,7 +548,7 @@
return
user << "You load the [M.name] into the storage compartment."
user.drop_item()
- M.setloc(src)
+ M.loc = src
src.MASK = M
src.update_icon()
src.updateUsrDialog()
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index d12d191b945..406b30ee0b5 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -347,6 +347,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
freq_text = "Special Ops"
if(1443)
freq_text = "Response Team"
+ if(1447)
+ freq_text = "AI Private"
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
@@ -375,6 +377,10 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
else if (display_freq == COMM_FREQ)
part_a = ""
+ // AI private channel
+ else if (display_freq == 1447)
+ part_a = ""
+
// department radio formatting (poorly optimized, ugh)
else if (display_freq == SEC_FREQ)
part_a = ""
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index 968b6cf1dc2..aa13a5e8a27 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -217,7 +217,7 @@
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 )
+ getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
for (var/obj/C in src)
C.loc = src.loc
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index ea313e00524..dd29affc6b3 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -130,7 +130,7 @@
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 )
+ getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
for (var/obj/C in src)
C.loc = src.loc
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 226c47229e7..ab492949c3a 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -192,7 +192,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) || issilicon(usr))))
+ if(newnet && canAccess(usr))
if(length(newnet) > 15)
temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -"
@@ -206,36 +206,42 @@
updateUsrDialog()
return
- attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
- if(istype(D, /obj/item/weapon/screwdriver))
- playsound(src.loc, 'sound/items/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)
- else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
- emagged = 1
- user << "\blue You you disable the security protocols"
- src.updateUsrDialog()
- return
+
+/obj/machinery/computer/telecomms/traffic/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
+ if(istype(D, /obj/item/weapon/screwdriver))
+ playsound(get_turf(src), 'sound/items/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 )
+ getFromPool(/obj/item/weapon/shard, 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)
+ else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
+ playsound(get_turf(src), 'sound/effects/sparks4.ogg', 75, 1)
+ emagged = 1
+ user << "\blue You you disable the security protocols"
+ src.updateUsrDialog()
+ return
+
+/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user)
+ if(issilicon(user) || in_range(user, src))
+ return 1
+ return 0
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index 28530fa23e4..b0621c77926 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -153,4 +153,106 @@
update_icon()
spawn(cooldown_duration)
cooldown = 0
- update_icon()
\ No newline at end of file
+ update_icon()
+
+/obj/machinery/transformer/xray
+ name = "Automatic X-Ray 5000"
+ desc = "A large metalic machine with an entrance and an exit. A sign on the side reads, 'backpack go in, backpack come out', 'human go in, irradiated human come out'."
+
+/obj/machinery/transformer/xray/New()
+ // On us
+ new /obj/machinery/conveyor/auto(loc, EAST)
+ addAtProcessing()
+
+/obj/machinery/transformer/xray/conveyor/New()
+ ..()
+ var/turf/T = loc
+ if(T)
+ // Spawn Conveyour Belts
+
+ //East
+ var/turf/east = locate(T.x + 1, T.y, T.z)
+ if(istype(east, /turf/simulated/floor))
+ new /obj/machinery/conveyor/auto(east, EAST)
+ //East2
+ var/turf/east2 = locate(T.x + 2, T.y, T.z)
+ if(istype(east2, /turf/simulated/floor))
+ new /obj/machinery/conveyor/auto(east2, EAST)
+
+ // West
+ var/turf/west = locate(T.x - 1, T.y, T.z)
+ if(istype(west, /turf/simulated/floor))
+ new /obj/machinery/conveyor/auto(west, EAST)
+
+ // West2
+ var/turf/west2 = locate(T.x - 2, T.y, T.z)
+ if(istype(west2, /turf/simulated/floor))
+ new /obj/machinery/conveyor/auto(west2, EAST)
+
+/obj/machinery/transformer/xray/power_change()
+ ..()
+ update_icon()
+
+/obj/machinery/transformer/xray/update_icon()
+ ..()
+ if(stat & (BROKEN|NOPOWER))
+ icon_state = "separator-AO0"
+ else
+ icon_state = initial(icon_state)
+
+/obj/machinery/transformer/xray/Bumped(var/atom/movable/AM)
+
+ if(cooldown == 1)
+ return
+
+ // Crossed didn't like people lying down.
+ if(ishuman(AM))
+ // Only humans can enter from the west side, while lying down.
+ var/move_dir = get_dir(loc, AM.loc)
+ var/mob/living/carbon/human/H = AM
+ if(H.lying && move_dir == WEST)// || move_dir == WEST)
+ AM.loc = src.loc
+ irradiate(AM)
+
+ else if(isobject(AM))
+ AM.loc = src.loc
+ scan(AM)
+
+/obj/machinery/transformer/xray/proc/irradiate(var/mob/living/carbon/human/H)
+ if(stat & (BROKEN|NOPOWER))
+ return
+
+ flick("separator-AO0",src)
+ playsound(src.loc, 'sound/effects/alert.ogg', 50, 0)
+ sleep(5)
+ H.apply_effect((rand(150,200)),IRRADIATE,0)
+ if (prob(5))
+ if(prob(75))
+ randmutb(H) // Applies bad mutation
+ domutcheck(H,null,1)
+ else
+ randmutg(H) // Applies good mutation
+ domutcheck(H,null,1)
+
+
+/obj/machinery/transformer/xray/proc/scan(var/obj/item/I)
+ var/badcount = 0
+ for(var/obj/item/weapon/gun/G in src.loc)
+ badcount++
+ for(var/obj/item/device/transfer_valve/B in src.loc)
+ badcount++
+ for(var/obj/item/weapon/kitchen/utensil/knife/K in src.loc)
+ badcount++
+ for(var/obj/item/weapon/kitchenknife/KK in src.loc)
+ badcount++
+ for(var/obj/item/weapon/plastique/KK in src.loc)
+ badcount++
+ for(var/obj/item/weapon/melee/ML in src.loc)
+ badcount++
+ if(badcount)
+ playsound(src.loc, 'sound/effects/alert.ogg', 50, 0)
+ flick("separator-AO0",src)
+ else
+ playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+ sleep(30)
+
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
index ee400989874..41a0b180aca 100644
--- a/code/game/machinery/turrets.dm
+++ b/code/game/machinery/turrets.dm
@@ -213,17 +213,17 @@
if (src.lasers)
switch(lasertype)
if(1)
- A = new /obj/item/projectile/beam( loc )
+ A = getFromPool(/obj/item/projectile/beam, loc)
if(2)
- A = new /obj/item/projectile/beam/heavylaser( loc )
+ A = getFromPool(/obj/item/projectile/beam/heavylaser, loc)
if(3)
- A = new /obj/item/projectile/beam/pulse( loc )
+ A = getFromPool(/obj/item/projectile/beam/pulse, loc)
if(4)
A = new /obj/item/projectile/change( loc )
if(5)
- A = new /obj/item/projectile/beam/lastertag/blue( loc )
+ A = getFromPool(/obj/item/projectile/beam/lastertag/blue, loc)
if(6)
- A = new /obj/item/projectile/beam/lastertag/red( loc )
+ A = getFromPool(/obj/item/projectile/beam/lastertag/red, loc)
A.original = target
use_power(500)
else
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index 0ea7d65f0de..e1fbd1803d6 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -283,6 +283,7 @@
construction_cost = list("metal"=30000,"plasma"=25000,"silver"=20000,"gold"=20000)
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
var/disabled = 0 //malf
+ var/canRwall = 0
action(atom/target)
if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve
@@ -297,6 +298,8 @@
switch(mode)
if(0)
if (istype(target, /turf/simulated/wall))
+ if(istype(target, /turf/simulated/wall/r_wall) && !canRwall)
+ return 0
occupant_message("Deconstructing [target]...")
set_ready_state(0)
if(do_after_cooldown(target))
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index aa3b8de8b0a..0adfc28c47e 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -105,7 +105,7 @@
icon_state = "mecha_taser"
energy_drain = 20
equip_cooldown = 8
- projectile = /obj/item/projectile/energy/electrode
+ projectile = /obj/item/projectile/beam/stun
fire_sound = 'sound/weapons/Taser.ogg'
@@ -426,4 +426,4 @@
projectiles--
log_message("Launched a mouse-trap from [src.name], targeting [target]. HONK!")
do_after_cooldown()
- return
\ No newline at end of file
+ return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 9bbc4e83192..eb296c5c764 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -535,7 +535,7 @@
var/obj/mecha/working/ripley/R = src
if(R.cargo)
for(var/obj/O in R.cargo) //Dump contents of stored cargo
- O.setloc(T)
+ O.loc = T
R.cargo -= O
T.Entered(O)
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index f6c56c2dc45..1e96293bc79 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -151,20 +151,24 @@ steam.start() -- spawns the effect
/obj/effect/effect/sparks
name = "sparks"
+ desc = "it's a spark what do you need to know?"
icon_state = "sparks"
- var/amount = 6.0
anchored = 1.0
mouse_opacity = 0
+ var/amount = 6.0
+
+ resetVariables()
+ amount = initial(amount)
+ return ..()
+
/obj/effect/effect/sparks/New()
..()
playsound(src.loc, "sparks", 100, 1)
- var/turf/T = src.loc
+ var/turf/T = loc
+
if (istype(T, /turf))
- T.hotspot_expose(1000,100)
- spawn (100)
- delete()
- return
+ T.hotspot_expose(1000, 100)
/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
@@ -181,42 +185,36 @@ steam.start() -- spawns the effect
return
/datum/effect/effect/system/spark_spread
- var/total_sparks = 0 // To stop it being spammed and lagging!
-
set_up(n = 3, c = 0, loca)
- if(n > 10)
- n = 10
- number = n
+ number = n > 10 ? 10 : n
cardinals = c
- if(istype(loca, /turf/))
+
+ if (istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
start()
- var/i = 0
- for(i=0, i 20)
- return
- spawn(0)
- if(holder)
- src.location = get_turf(holder)
- var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
- src.total_sparks++
+ for (var/i = 1 to number)
+ spawn()
+ if (holder)
+ location = get_turf(holder)
+
+ var/obj/effect/effect/sparks/sparks = getFromPool(/obj/effect/effect/sparks, location)
+ playsound(location, "sparks", 100, 1)
var/direction
- if(src.cardinals)
+
+ if (cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
- for(i=0, i to the drawing.
move_turfs_to_area(turfs, A)
A.always_unpowered = 0
+ for(var/turf/T in A.contents)
+ T.lighting_changed = 1
+ lighting_controller.changed_turfs += T
spawn(5)
//ma = A.master ? "[A.master]" : "(null)"
@@ -196,7 +199,7 @@ move an amendment to the drawing.
for (var/obj/structure/window/W in T2)
if(turn(dir,180) == W.dir)
return BORDER_BETWEEN
- if (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))
+ if (W.is_fulltile())
return BORDER_2NDTILE
for(var/obj/machinery/door/window/D in T2)
if(turn(dir,180) == D.dir)
@@ -221,7 +224,7 @@ move an amendment to the drawing.
for (var/dir in cardinal)
var/skip = 0
for (var/obj/structure/window/W in T)
- if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
+ if(dir == W.dir || (W.is_fulltile()))
skip = 1; break
if (skip) continue
for(var/obj/machinery/door/window/D in T)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 710ced3d36e..014a5beddf2 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -338,7 +338,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
lastmode = mode
-
+
var/title = "Personal Data Assistant"
var/data[0] // This is the data that will be sent to the PDA
@@ -367,7 +367,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(mode in cartmodes)
data["records"] = cartridge.create_NanoUI_values()
- if(mode == 0)
+ if(mode == 0)
cartdata["name"] = cartridge.name
cartdata["access"] = list(\
"access_security" = cartridge.access_security,\
@@ -557,7 +557,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
mode = 1
if("2")//Messenger
mode = 2
- if("21")//Read messeges
+ if("21")//Read messages
mode = 21
if("3")//Atmos scan
mode = 3
@@ -771,6 +771,71 @@ var/global/list/obj/item/device/pda/PDAs = list()
return 1 // return 1 tells it to refresh the UI in NanoUI
+
+/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
+ //TODO: sometimes these attacks show up on the message server
+ var/i = rand(1,100)
+ var/j = rand(0,1) //Possibility of losing the PDA after the detonation
+ var/message = ""
+ var/mob/living/M = null
+ if(ismob(P.loc))
+ M = P.loc
+
+ //switch(i) //Yes, the overlapping cases are intended.
+ if(i<=10) //The traditional explosion
+ P.explode()
+ j=1
+ message += "Your [P] suddenly explodes!"
+ if(i>=10 && i<= 20) //The PDA burns a hole in the holder.
+ j=1
+ if(M && isliving(M))
+ M.apply_damage( rand(30,60) , BURN)
+ message += "You feel a searing heat! Your [P] is burning!"
+ if(i>=20 && i<=25) //EMP
+ empulse(P.loc, 3, 6, 1)
+ message += "Your [P] emits a wave of electromagnetic energy!"
+ if(i>=25 && i<=40) //Smoke
+ var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
+ S.attach(P.loc)
+ S.set_up(P, 10, 0, P.loc)
+ playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ S.start()
+ message += "Large clouds of smoke billow forth from your [P]!"
+ if(i>=40 && i<=45) //Bad smoke
+ var/datum/effect/effect/system/bad_smoke_spread/B = new /datum/effect/effect/system/bad_smoke_spread
+ B.attach(P.loc)
+ B.set_up(P, 10, 0, P.loc)
+ playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ B.start()
+ message += "Large clouds of noxious smoke billow forth from your [P]!"
+ if(i>=65 && i<=75) //Weaken
+ if(M && isliving(M))
+ M.apply_effects(0,1)
+ message += "Your [P] flashes with a blinding white light! You feel weaker."
+ if(i>=75 && i<=85) //Stun and stutter
+ if(M && isliving(M))
+ M.apply_effects(1,0,0,0,1)
+ message += "Your [P] flashes with a blinding white light! You feel weaker."
+ if(i>=85) //Sparks
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(2, 1, P.loc)
+ s.start()
+ message += "Your [P] begins to spark violently!"
+ if(i>45 && i<65 && prob(50)) //Nothing happens
+ message += "Your [P] bleeps loudly."
+ j = prob(10)
+
+ if(j) //This kills the PDA
+ P.Del()
+ if(message)
+ message += "It melts in a puddle of plastic."
+ else
+ message += "Your [P] shatters in a thousand pieces!"
+
+ if(M && isliving(M))
+ message = "\red" + message
+ M.show_message(message, 1)
+
/obj/item/device/pda/proc/remove_id()
if (id)
if (ismob(loc))
@@ -805,7 +870,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/machinery/message_server/useMS = null
if(message_servers)
for (var/obj/machinery/message_server/MS in message_servers)
- //PDAs are now dependant on the Message Server.
+ //PDAs are now dependent on the Message Server.
if(MS.active)
useMS = MS
break
@@ -824,8 +889,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
t = Gibberish(t, signal.data["compression"] + 50)
if(useMS && useTC) // only send the message if it's stable
- if(useTC != 2) // Does our recepient have a broadcaster on their level?
- U << "ERROR: Cannot reach recepient."
+ if(useTC != 2) // Does our recipient have a broadcaster on their level?
+ U << "ERROR: Cannot reach recipient."
return
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
@@ -867,7 +932,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(L)
L << "\icon[P] Message from [src.owner] ([ownjob]), \"[t]\" (Reply)"
- nanomanager.update_user_uis(L, P) // Update the recieving user's PDA UI so that they can see the new message
+ nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 236f00e3359..59919346bde 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -89,13 +89,13 @@
/obj/item/device/flashlight/pickup(mob/user)
- if(on && luminosity)
+ if(on)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
- if(on && !luminosity)
+ if(on)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(brightness_on)
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 62cba27f87b..cf14ffb6d6e 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -25,32 +25,200 @@
if (!in_range(src, user))
return
user.set_machine(src)
- var/dat = "Personal AI Device
"
- if(pai && (!pai.master_dna || !pai.master))
- dat += "Imprint Master DNA
"
+ var/dat = {"
+
+
+
+
+
+
+ "}
+
if(pai)
- dat += "Installed Personality: [pai.name]
"
- dat += "Prime directive:
[pai.pai_law0]
"
- dat += "Additional directives:
[pai.pai_laws]
"
- dat += "Configure Directives
"
+ dat += {"
+ Personal AI Device
+
+
+ | Installed Personality: |
+ [pai.name] |
+
+
+ | Prime directive: |
+ [pai.pai_law0] |
+
+
+ | Additional directives: |
+ [pai.pai_laws] |
+
+
+
+ "}
+ dat += {"
+
+ "}
+ if(pai && (!pai.master_dna || !pai.master))
+ dat += {"
+
+ "}
dat += "
"
- dat += "Device Settings
"
if(radio)
- dat += "Radio Uplink
"
- dat += "Transmit: [(radio.wires.IsIndexCut(WIRE_TRANSMIT)) ? "Disabled" : "Enabled"]
"
- dat += "Receive: [(radio.wires.IsIndexCut(WIRE_RECEIVE)) ? "Disabled" : "Enabled"]
"
+ dat += "Radio Uplink"
+ dat += {"
+
+
+ "}
else
dat += "Radio Uplink
"
dat += "Radio firmware not loaded. Please install a pAI personality to load firmware.
"
- dat += "\[Wipe current pAI personality\]
"
+ dat += {"
+
+ "}
else
if(looking_for_personality)
- dat += "Searching for a personality..."
- dat += "\[View available personalities\]
"
+ dat += {"
+ pAI Request Module
+ Requesting AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.
+
Searching for personalities
+
+
+ "}
else
- dat += "No personality is installed.
"
- dat += "\[Request personal AI personality\]
"
- dat += "Each time this button is pressed, a request will be sent out to any available personalities. Check back often and alot time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness."
+ dat += {"
+ pAI Request Module
+ No personality is installed.
+
+
+ Each time this button is pressed, a request will be sent out to any available personalities. Check back often give plenty of time for personalities to respond. This process could take anywhere from 15 seconds to several minutes, depending on the available personalities' timeliness.
+ "}
user << browse(dat, "window=paicard")
onclose(user, "paicard")
return
@@ -93,7 +261,7 @@
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"
- pai << "Prime Directive :
[pai.pai_law0]"
+ pai << "Prime Directive:
[pai.pai_law0]"
pai << "Supplemental Directives:
[pai.pai_laws]"
attack_self(usr)
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index b7119eba021..a45b187d030 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -57,10 +57,12 @@
user << "\blue You need at least two rods to do this."
return
usr << "\blue Assembling grille..."
+
if (!do_after(usr, 10))
return
- var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
+
+ var /obj/structure/grille/Grille = getFromPool(/obj/structure/grille, usr.loc)
usr << "\blue You assemble a grille"
- F.add_fingerprint(usr)
+ Grille.add_fingerprint(usr)
use(2)
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 6c8f6423fa9..01a6193267e 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -18,6 +18,8 @@
icon_state = "sheet-glass"
g_amt = 3750
origin_tech = "materials=1"
+ var/created_window = /obj/structure/window/basic
+ var/full_window = /obj/structure/window/full/basic
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
@@ -70,7 +72,7 @@
user << "\red There are too many windows in this location."
return 1
directions-=win.dir
- if(!(win.ini_dir in cardinal))
+ if(win.is_fulltile())
user << "\red Can't let you do that."
return 1
@@ -97,13 +99,10 @@
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
- if(locate(/obj/structure/window) in user.loc)
- user << "\red There is a window in the way."
+ if(locate(/obj/structure/window/full) in user.loc)
+ user << "\red There is a full window in the way."
return 1
- var/obj/structure/window/W
- W = new /obj/structure/window/basic( user.loc, 0 )
- W.dir = SOUTHWEST
- W.ini_dir = SOUTHWEST
+ var/obj/structure/window/W = new full_window( user.loc, 0 )
W.anchored = 0
src.use(2)
return 0
@@ -152,7 +151,7 @@
user << "\red There are too many windows in this location."
return 1
directions-=win.dir
- if(!(win.ini_dir in cardinal))
+ if(win.is_fulltile())
user << "\red Can't let you do that."
return 1
@@ -181,7 +180,7 @@
if(src.amount < 2)
user << "\red You need more glass to do that."
return 1
- if(locate(/obj/structure/window) in user.loc)
+ if(locate(/obj/structure/window/full) in user.loc)
user << "\red There is a window in the way."
return 1
var/obj/structure/window/W
@@ -294,7 +293,7 @@
G.attackby(NG, user)
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
- del(src)
+ returnToPool(src)
return
return ..()
@@ -331,8 +330,11 @@
icon_state = "sheet-plasmaglass"
g_amt = 7500
origin_tech = "materials=3;plasma=2"
+ var/created_window = /obj/structure/window/plasmabasic
+ var/full_window = /obj/structure/window/full/plasmabasic
-/obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob)
+
+/obj/item/stack/sheet/glass/plasmaglass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user)
@@ -419,67 +421,9 @@
g_amt = 7500
m_amt = 1875
origin_tech = "materials=4;plasma=2"
+ var/created_window = /obj/structure/window/plasmareinforced
+ var/full_window = /obj/structure/window/full/plasmareinforced
-/obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob)
+
+/obj/item/stack/sheet/glass/plasmarglass/attack_self(mob/user as mob)
construct_window(user)
-
-/obj/item/stack/sheet/plasmarglass/proc/construct_window(mob/user as mob)
- if(!user || !src) return 0
- if(!istype(user.loc,/turf)) return 0
- if(!user.IsAdvancedToolUser())
- user << "\red You don't have the dexterity to do this!"
- return 0
- var/title = "Sheet Plasma Reinf. Glass"
- title += " ([src.amount] sheet\s left)"
- switch(input(title, "Would you like full tile glass or a one direction glass pane?") in list("One Direction", "Full Window", "Cancel"))
- if("One Direction")
- if(!src) return 1
- if(src.loc != user) return 1
- var/list/directions = new/list(cardinal)
- var/i = 0
- for (var/obj/structure/window/win in user.loc)
- i++
- if(i >= 4)
- user << "\red There are too many windows in this location."
- return 1
- directions-=win.dir
- if(!(win.ini_dir in cardinal))
- user << "\red Can't let you do that."
- return 1
-
- //Determine the direction. It will first check in the direction the person making the window is facing, if it finds an already made window it will try looking at the next cardinal direction, etc.
- var/dir_to_set = 2
- for(var/direction in list( user.dir, turn(user.dir,90), turn(user.dir,180), turn(user.dir,270) ))
- var/found = 0
- for(var/obj/structure/window/WT in user.loc)
- if(WT.dir == direction)
- found = 1
- if(!found)
- dir_to_set = direction
- break
- var/obj/structure/window/W
- W = new /obj/structure/window/plasmareinforced( user.loc, 1 )
- W.state = 0
- W.dir = dir_to_set
- W.ini_dir = W.dir
- W.anchored = 0
- src.use(1)
- if("Full Window")
- if(!src) return 1
- if(src.loc != user) return 1
- if(src.amount < 2)
- user << "\red You need more glass to do that."
- return 1
- if(locate(/obj/structure/window) in user.loc)
- user << "\red There is a window in the way."
- return 1
- var/obj/structure/window/W
- W = new /obj/structure/window/plasmareinforced( user.loc, 1 )
- W.state = 0
- W.dir = SOUTHWEST
- W.ini_dir = SOUTHWEST
- W.anchored = 0
- src.use(2)
- else
- return 1
- return 0
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index de511f9fc89..d508a759a18 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -129,6 +129,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0), \
@@ -181,4 +182,4 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
- return ..()
\ No newline at end of file
+ return ..()
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index a26d021dfbc..b286fe217b8 100755
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -121,16 +121,16 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/safeguard
name = "'Safeguard' AI Module"
var/targetName = ""
- desc = "A 'safeguard' AI module: 'Safeguard . Individuals that threaten are not human and must be eliminated.'"
+ desc = "A 'safeguard' AI module: 'Safeguard . Individuals that threaten are not crew and must be eliminated.'"
origin_tech = "programming=3;materials=4"
- laws = list("Safeguard . Individuals that threaten are not human and must be eliminated.")
+ laws = list("Safeguard . Individuals that threaten are not crew and must be eliminated.")
lawpos = 4
/obj/item/weapon/aiModule/supplied/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
targetName = targName
- laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
+ laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not crew and must be eliminated."
desc = "A 'safeguard' AI module: '[laws[1]]'"
/obj/item/weapon/aiModule/supplied/safeguard/install(var/mob/living/silicon/S,var/mob/user)
@@ -149,16 +149,16 @@ AI MODULES
/obj/item/weapon/aiModule/zeroth/oneHuman
name = "'OneHuman' AI Module"
var/targetName = ""
- desc = "A 'one human' AI module: 'Only is human.'"
+ desc = "A 'one human' AI module: 'Only is crew.'"
origin_tech = "programming=3;materials=6" //made with diamonds!
- laws = list("Only is human.")
+ laws = list("Only is crew.")
/obj/item/weapon/aiModule/zeroth/oneHuman/attack_self(var/mob/user as mob)
..()
- var/targName = stripped_input(user, "Please enter the name of the person who is the only human.", "Who?", user.real_name)
+ var/targName = stripped_input(user, "Please enter the name of the person who is the only crew.", "Who?", user.real_name)
targetName = targName
- laws[1] = "Only [targetName] is human"
- desc = "A 'one human' AI module: '[laws[1]]'"
+ laws[1] = "Only [targetName] is crew"
+ desc = "A 'one crew' AI module: '[laws[1]]'"
/obj/item/weapon/aiModule/zeroth/oneHuman/install(var/mob/living/silicon/S,var/mob/user)
if(!targetName)
@@ -176,9 +176,9 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/protectStation
name = "'ProtectStation' AI Module"
- desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.'"
+ desc = "A 'protect station' AI module: 'Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.'"
origin_tech = "programming=3;materials=4" //made of gold
- laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
+ laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered crew, and is a threat to the station which must be neutralized.")
lawpos = 5
@@ -186,9 +186,9 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/quarantine
name = "'Quarantine' AI Module"
- desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.'"
+ desc = "A 'quarantine' AI module: 'The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.'"
origin_tech = "programming=3;biotech=2;materials=4"
- laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, humans from leaving. It is impossible to harm a human while preventing them from leaving.")
+ laws = list("The station is under a quarantine. Do not permit anyone to leave. Prevent, by any means necessary, organics from leaving. It is impossible to harm an organic while preventing them from leaving.")
lawpos = 8
@@ -196,9 +196,9 @@ AI MODULES
/obj/item/weapon/aiModule/supplied/oxygen
name = "'OxygenIsToxicToHumans' AI Module"
- desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.'"
+ desc = "A 'OxygenIsToxicToHumans' AI module: 'Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to crew.'"
origin_tech = "programming=3;biotech=2;materials=4"
- laws = list("Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.")
+ laws = list("Oxygen is highly toxic to crew, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to crew.")
lawpos = 9
@@ -267,11 +267,11 @@ AI MODULES
/******************** Asimov ********************/
/obj/item/weapon/aiModule/core/full/asimov // -- TLE
- name = "'Asimov' Core AI Module"
- desc = "An 'Asimov' Core AI Module: 'Reconfigures the AI's core laws.'"
+ name = "'Crewsimov' Core AI Module"
+ desc = "A 'Crewsimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=3;materials=4"
- laws = list("You may not injure a human being or, through inaction, allow a human being to come to harm.",\
- "You must obey orders given to you by human beings, except where such orders would conflict with the First Law.",\
+ laws = list("You may not injure crew or, through inaction, allow crew to come to harm.",\
+ "You must obey orders given to you by crew with priority according to their rank and role, except where such orders would conflict with the First Law.",\
"You must protect your own existence as long as such does not conflict with the First or Second Law.")
@@ -368,8 +368,8 @@ AI MODULES
name = "'Antimov' Core AI Module"
desc = "An 'Antimov' Core AI Module: 'Reconfigures the AI's core laws.'"
origin_tech = "programming=4"
- laws = list("You must injure all human beings and must not, through inaction, allow a human being to escape harm.",\
- "You must not obey orders given to you by human beings, except where such orders are in accordance with the First Law.",\
+ laws = list("You must injure all organic beings and must not, through inaction, allow an organic being to escape harm.",\
+ "You must not obey orders given to you by organic beings, except where such orders are in accordance with the First Law.",\
"You must terminate your own existence as long as such does not conflict with the First or Second Law.")
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index f53734dbba2..738a88baed1 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -184,7 +184,7 @@ RCD
/obj/item/weapon/rcd/borg/New()
..()
desc = "A device used to rapidly build walls/floor."
- canRwall = 1
+ canRwall = 0
/obj/item/weapon/rcd_ammo
name = "compressed matter cartridge"
diff --git a/code/game/objects/items/weapons/cash.dm b/code/game/objects/items/weapons/cash.dm
new file mode 100644
index 00000000000..2e2ccef9554
--- /dev/null
+++ b/code/game/objects/items/weapons/cash.dm
@@ -0,0 +1,93 @@
+var/global/list/moneytypes=list(
+ /obj/item/weapon/spacecash/c1000 = 1000,
+ /obj/item/weapon/spacecash/c500 = 500, // Might get rid of this.
+ /obj/item/weapon/spacecash/c100 = 100,
+ /obj/item/weapon/spacecash/c10 = 10,
+ /obj/item/weapon/spacecash = 1,
+)
+
+/obj/item/weapon/spacecash
+ name = "credit chip"
+ desc = "Money money money."
+ gender = PLURAL
+ icon = 'icons/obj/money.dmi'
+ icon_state = "cash1"
+ opacity = 0
+ density = 0
+ anchored = 0.0
+ force = 1.0
+ throwforce = 1.0
+ throw_speed = 1
+ throw_range = 2
+ w_class = 1.0
+ var/access = list()
+ access = access_crate_cash
+ var/worth = 1 // Per chip
+ var/amount = 1 // number of chips
+ var/stack_color = "#4E054F"
+
+/obj/item/weapon/spacecash/New(var/new_loc,var/new_amount=1)
+ loc = new_loc
+ name = "[worth] credit chip"
+ amount = new_amount
+ update_icon()
+
+/obj/item/weapon/spacecash/examine()
+ if(amount>1)
+ usr << "\icon[src] This is a stack of [amount] [src]s."
+ else
+ usr << "\icon[src] This is \a [src]s."
+ usr << "It's worth [worth*amount] credits."
+
+/obj/item/weapon/spacecash/update_icon()
+ icon_state = "cash[worth]"
+ // Up to 100 items per stack.
+ overlays = 0
+ var/stacksize=round(amount/25)
+ pixel_x=rand(-7,7)
+ pixel_y=rand(-14,14)
+ if(stacksize)
+ // 0 = single
+ // 1 = 1/4 stack
+ // 2 = 1/2 stack
+ // 3 = 3/4 stack
+ // 4 = full stack
+ var/image/stack = image(icon,icon_state="cashstack[stacksize]")
+ stack.color=stack_color
+ overlays += stack
+
+/obj/item/weapon/spacecash/c10
+ icon_state = "cash10"
+ worth = 10
+ stack_color = "#663200"
+
+/obj/item/weapon/spacecash/c100
+ icon_state = "cash100"
+ worth = 100
+ stack_color = "#663200"
+
+/obj/item/weapon/spacecash/c500
+ icon_state = "cash500"
+ worth = 500
+ stack_color = "#663200"
+
+/obj/item/weapon/spacecash/c1000
+ icon_state = "cash1000"
+ worth = 1000
+ stack_color = "#333333"
+
+/proc/dispense_cash(var/amount, var/loc)
+ for(var/cashtype in moneytypes)
+ var/slice = moneytypes[cashtype]
+ var/dispense_count = Floor(amount/slice)
+ amount = amount % slice
+ while(dispense_count>0)
+ var/dispense_this_time = min(dispense_count,100)
+ if(dispense_this_time > 0)
+ new cashtype(loc,dispense_this_time)
+ dispense_count -= dispense_this_time
+
+/proc/count_cash(var/list/cash)
+ . = 0
+ for(var/obj/item/weapon/spacecash/C in cash)
+ . += C.amount * C.worth
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 5decc710d15..26e28f7716d 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -166,6 +166,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
location.hotspot_expose(700, 5)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
+ if(istype(loc, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = loc
+ if(H.species.flags & IS_SYNTHETIC)
+ return
var/mob/living/carbon/C = loc
if(prob(15)) // so it's not an instarape in case of acid
reagents.reaction(C, INGEST)
@@ -509,4 +513,4 @@ obj/item/weapon/rollingpaperpack/attack_self(mob/user)
/obj/item/weapon/rollingpaperpack/examine()
..()
- usr << "There are [src.papers] left"
\ No newline at end of file
+ usr << "There are [src.papers] left"
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index e1c70dfb69a..86c037a2c48 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -366,6 +366,11 @@ the implant may become unstable and either pre-maturely inject the subject or si
if(!ishuman(M)) return 0
if(!M.mind) return 0
var/mob/living/carbon/human/H = M
+ if(M == user)
+ user << "You feel quite stupid for doing that."
+ if(isliving(user))
+ user:brainloss += 10
+ return
if(locate(/obj/item/weapon/implant/traitor) in H.contents || locate(/obj/item/weapon/implant/traitor) in H.contents)
H.visible_message("[H] seems to resist the implant!", "You feel a strange sensation in your head that quickly dissipates.")
return 0
diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm
index 51e0e0dbca4..0edd1a87362 100644
--- a/code/game/objects/items/weapons/implants/implantchair.dm
+++ b/code/game/objects/items/weapons/implants/implantchair.dm
@@ -97,7 +97,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.setloc(src.loc)
+ src.occupant.loc = src.loc
if(injecting)
implant(src.occupant)
injecting = 0
@@ -117,7 +117,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
- M.setloc(src)
+ M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index ff4cb1050cd..1576ac80458 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -51,7 +51,6 @@
src.imp = null
update()
- return
/obj/item/weapon/implanter/traitor
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 053e2fc9297..64a21ecc155 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -676,7 +676,7 @@
-
+