diff --git a/.gitignore b/.gitignore
index 7daab15618..8a1fc47c9d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.rsc
*.dmb
*.lk
+data/
diff --git a/README.md b/README.md
index 2c1859126c..01fec91ca6 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,13 @@ The more complicated and easier to update method is using git. You'll need to d
This will take a while to download, but it provides an easier method for updating.
+Once the repository is in place, run this command:
+```bash
+cd Baystation12
+git update-index --assume-unchanged baystation12.int
+```
+Now git will ignore changes to the file baystation12.int.
+
### INSTALLATION
First-time installation should be fairly straightforward. First, you'll need BYOND installed. You can get it from [here](http://www.byond.com/).
diff --git a/baystation12.dme b/baystation12.dme
index 30450fa38a..f0c649295c 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -74,11 +74,13 @@
#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\autotransfer.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\hooks-defs.dm"
#include "code\controllers\hooks.dm"
+#include "code\controllers\lighting_controller.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\verbs.dm"
@@ -579,6 +581,7 @@
#include "code\game\objects\structures\flora.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"
@@ -1284,12 +1287,6 @@
#include "code\WorkInProgress\explosion_particles.dm"
#include "code\WorkInProgress\periodic_news.dm"
#include "code\WorkInProgress\Apples\artifacts.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\Aryn\Lighting\Math.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
@@ -1331,6 +1328,7 @@
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
+#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"
#include "code\ZAS\_docs.dm"
#include "code\ZAS\_gas_mixture.dm"
#include "code\ZAS\Airflow.dm"
diff --git a/baystation12.int b/baystation12.int
index b82874fded..28f433f0ff 100644
--- a/baystation12.int
+++ b/baystation12.int
@@ -3,4 +3,4 @@
MAP_ICON_TYPE: 0
AUTO_FILE_DIR: OFF
*/
-// END_INTERNALS
+// END_INTERNALS
\ 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 9c98f5f6c9..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Compatibility.dm
+++ /dev/null
@@ -1,45 +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)
- n = min(n,10) //Caelcode.
- if(n > 0)
- SetLight(max(1,n>>1),n)
- else
- 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 c5a0fee140..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Controller.dm
+++ /dev/null
@@ -1,120 +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 = 4
- var/list/icon_updates = list()
-
- var/list/light_border = 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.is_outside && T.light_overlay)
-
- T.ResetValue()
- T.UpdateLight()
-
- world << "Lighting initialization took [(world.timeofday-start_time)/world.fps] seconds. "
- world << "Updated [turfs_updated] turfs. "
-
-/datum/controller/lighting/proc/MarkIconUpdate(turf/T)
- if(!T.needs_light_update)
- icon_updates.Add(T)
- T.needs_light_update = 1
-
-/datum/controller/lighting/proc/FlushIconUpdates()
- for(var/turf/T in icon_updates)
- T.UpdateLight()
- T.needs_light_update = 0
- icon_updates = list()
-
-/datum/controller/lighting/proc/AddBorder(turf/T)
- if(!T.is_border)
- light_border.Add(T)
- T.is_border = 1
- //T.overlays.Add(border)
-
-/datum/controller/lighting/proc/RemoveBorder(turf/T)
- if(T.is_border)
- light_border.Remove(T)
- T.is_border = 0
diff --git a/code/WorkInProgress/Aryn/Lighting/Engine.dm b/code/WorkInProgress/Aryn/Lighting/Engine.dm
deleted file mode 100644
index 061918b414..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Engine.dm
+++ /dev/null
@@ -1,227 +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.
-*/
-
-
-#define LIGHTCLAMP(x) ( max(0,min(3,round(x,1))) )
-
-atom/movable/lighting_overlay
- name = ""
- anchored = 1
- layer = 9
- mouse_opacity = 0
- icon = 'icons/effects/ArynLights.dmi'
- icon_state = "0000"
- invisibility = INVISIBILITY_LIGHTING
-
-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 = 0
-turf/var/is_outside = 0
-turf/var/is_border = 0
-turf/var/needs_light_update = 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.Reset()
- if(opacity)
- if(lighting_ready())
- opacity = 0
- SetOpacity(1)
-
-atom/movable/Move()
- var/o = opacity
- if(o) SetOpacity(0)
- . = ..()
- if(.)
- if(o) SetOpacity(1)
- if(light)
- light.Reset()
- if(lighting_ready()) lighting_controller.FlushIconUpdates()
-
-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))
- for(var/light/A in T.lit_by)
- A.Reset()
- lighting_controller.FlushIconUpdates()
-
-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)
- if(is_outside) return
-
- var/brightness = light.CalculateBrightness(src)
- if(brightness <= 0) return
-
- if(!lit_by) lit_by = list()
- lit_by.Add(light)
-
-
- lit_by[light] = brightness
-
- if(!has_opaque && lighting_ready())
- if(brightness > max_brightness)
- lit_value = LIGHTCLAMP(brightness)
- max_brightness = brightness
- ResetCachedValues()
- for(var/turf/T in range(1,src))
- lighting_controller.MarkIconUpdate(T)
-
-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
-
- CheckForOpaqueObjects()
- if(has_opaque)
- lit_value = 0
- else
- the_part_where_I_calculate_brightness()
-
- if(lighting_ready())
- the_part_where_I_use_range()
-
-turf/proc
- the_part_where_I_calculate_brightness()
- 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)
-
- the_part_where_I_use_range()
- ResetCachedValues()
- for(var/turf/T in range(1,src))
- lighting_controller.MarkIconUpdate(T)
-
-turf/proc/ResetCachedValues()
- if(lightNE)
- lightNE.cached_value = -1
- if(lightNW)
- lightNW.cached_value = -1
- if(lightSE)
- lightSE.cached_value = -1
- if(lightSW)
- lightSW.cached_value = -1
-
-turf/proc/CheckForOpaqueObjects()
- has_opaque = opacity
- if(!opacity)
- for(var/atom/movable/M in contents)
- if(M.opacity)
- has_opaque = 1
- break
-
-#undef LIGHTCLAMP
\ 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 e354154180..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Light.dm
+++ /dev/null
@@ -1,75 +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/list/lit_turfs
-light/var/atom/atom
-
-light/New(atom/atom)
- src.atom = atom
-
-light/proc/Reset()
- //if(atom.lights_verbose) world << "light.Reset()"
- Off()
- if(intensity > 0)
- //if(atom.lights_verbose) world << "Restoring light."
- for(var/turf/T in view(get_turf(atom),radius+1))
- if(!T.is_outside)
- T.AddLight(src)
- 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 = list()
-
-light/proc/CalculateBrightness(turf/T)
- if (!atom)
- return 0
- var/square = get_square_dist(atom.x,atom.y,atom.z,T.x,T.y,T.z)
- if(square > (radius+2)*(radius+2)) 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 5b9aade35e..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Lightpoint.dm
+++ /dev/null
@@ -1,65 +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()
- if(cached_value < 0)
- 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
-
- proc/value_of(turf/T)
- if(!T) return 0
- if(T.is_outside) return min(lighting_controller.starlight,3)
- return T.lit_value
\ No newline at end of file
diff --git a/code/WorkInProgress/Aryn/Lighting/Math.dm b/code/WorkInProgress/Aryn/Lighting/Math.dm
deleted file mode 100644
index cd8716373b..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Math.dm
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-
-Some math procs used by lighting, including ul's fastroot.
-
-*/
-
-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/get_square_dist(Ax,Ay,Az,Bx,By,Bz)
- var/X = (Ax - Bx)
- var/Y = (Ay - By)
- var/Z = (Az - Bz)
- return (X * X + Y * Y + Z * Z)
-
-proc/fsqrt(n)
- if (n > fastroot.len)
- //world << "Adding [n-fastroot.len] entries to root table."
- for(var/i = fastroot.len, i <= n, i++)
- fastroot += round(sqrt(i))
- return fastroot[n + 1]
\ 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 bf1b40f1ba..0000000000
--- a/code/WorkInProgress/Aryn/Lighting/Verbs.dm
+++ /dev/null
@@ -1,33 +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 << "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/Cael_Aislinn/Jungle/jungle_temple.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
index 20009c0a64..3581c9fff6 100644
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
@@ -210,7 +210,7 @@
/obj/item/weapon/reagent_containers/food/snacks/candiedapple, \
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar, \
/obj/item/weapon/reagent_containers/food/snacks/cookie, \
- /obj/item/weapon/reagent_containers/food/snacks/faggot, \
+ /obj/item/weapon/reagent_containers/food/snacks/meatball, \
/obj/item/weapon/reagent_containers/food/snacks/plump_pie, \
)
for(var/i=0,iAdd Language"
body += "Remove Language "
+ body += "Fix NanoUI "
+
body += "Add Verb "
body += "Remove Verb "
if(ishuman(D))
@@ -859,6 +861,25 @@ client
H.verbs -= verb
+ else if(href_list["fix_nano"])
+ if(!check_rights(R_DEBUG)) return
+
+ var/mob/H = locate(href_list["fix_nano"])
+
+ if(!istype(H) || !H.client)
+ usr << "This can only be done on mobs with clients"
+ return
+
+
+
+ nanomanager.send_resources(H.client)
+
+ usr << "Resource files sent"
+ H << "Your NanoUI Resource files have been refreshed"
+
+ log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
+
+
else if(href_list["regenerateicons"])
if(!check_rights(0)) return
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 512e9f02dc..c25133b443 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -63,7 +63,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
s_archive = s
if(!revision)
abort()
- diary << "Revision info loaded succesfully"
+ log_misc("Revision info loaded succesfully")
return
return abort()
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 71b7bab041..ee2f220d9f 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -52,6 +52,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/storage/fancy/egg_box,
+ /obj/item/weapon/reagent_containers/food/snacks/tofu,
+ /obj/item/weapon/reagent_containers/food/snacks/tofu,
+ /obj/item/weapon/reagent_containers/food/snacks/meat,
+ /obj/item/weapon/reagent_containers/food/snacks/meat,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana)
cost = 10
@@ -125,6 +129,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
name = "Party equipment"
contains = list(/obj/item/weapon/storage/box/drinkingglasses,
/obj/item/weapon/reagent_containers/food/drinks/shaker,
+ /obj/item/weapon/reagent_containers/food/drinks/flask/barflask,
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron,
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
@@ -174,6 +179,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,
@@ -288,9 +303,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/seeds/cornseed,
/obj/item/seeds/eggplantseed,
/obj/item/seeds/tomatoseed,
+ /obj/item/seeds/appleseed,
/obj/item/seeds/soyaseed,
/obj/item/seeds/wheatseed,
/obj/item/seeds/carrotseed,
+ /obj/item/seeds/harebell,
+ /obj/item/seeds/lemonseed,
+ /obj/item/seeds/orangeseed,
+ /obj/item/seeds/grassseed,
/obj/item/seeds/sunflowerseed,
/obj/item/seeds/chantermycelium,
/obj/item/seeds/potatoseed,
@@ -324,6 +344,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/seeds/amanitamycelium,
/obj/item/seeds/reishimycelium,
/obj/item/seeds/bananaseed,
+ /obj/item/seeds/riceseed,
+ /obj/item/seeds/eggplantseed,
+ /obj/item/seeds/limeseed,
+ /obj/item/seeds/grapeseed,
/obj/item/seeds/eggyseed)
cost = 15
containertype = /obj/structure/closet/crate/hydroponics
@@ -763,7 +787,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
group = "Security"
/datum/supply_packs/randomised
- var/num_contained = 3 //number of items picked to be contained in a randomised crate
+ var/num_contained = 4 //number of items picked to be contained in a randomised crate
contains = list(/obj/item/clothing/head/collectable/chef,
/obj/item/clothing/head/collectable/paper,
/obj/item/clothing/head/collectable/tophat,
@@ -895,22 +919,36 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/randomised/costume
num_contained = 2
contains = list(/obj/item/clothing/suit/pirate,
- /obj/item/clothing/suit/johnny_coat,
/obj/item/clothing/suit/judgerobe,
/obj/item/clothing/suit/wcoat,
/obj/item/clothing/suit/hastur,
+ /obj/item/clothing/suit/holidaypriest,
+ /obj/item/clothing/suit/nun,
/obj/item/clothing/suit/imperium_monk,
/obj/item/clothing/suit/ianshirt,
/obj/item/clothing/under/gimmick/rank/captain/suit,
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit,
/obj/item/clothing/under/lawyer/purpsuit,
+ /obj/item/clothing/under/rank/mailman,
+ /obj/item/clothing/under/dress/dress_saloon,
/obj/item/clothing/suit/suspenders,
/obj/item/clothing/suit/storage/labcoat/mad,
- /obj/item/clothing/suit/bio_suit/plaguedoctorsuit)
- name = "Standard Costume crate"
+ /obj/item/clothing/suit/bio_suit/plaguedoctorsuit,
+ /obj/item/clothing/under/schoolgirl,
+ /obj/item/clothing/under/owl,
+ /obj/item/clothing/under/waiter,
+ /obj/item/clothing/under/gladiator,
+ /obj/item/clothing/under/soviet,
+ /obj/item/clothing/under/scratch,
+ /obj/item/clothing/under/wedding/bride_white,
+ /obj/item/clothing/suit/chef,
+ /obj/item/clothing/suit/apron/overalls,
+ /obj/item/clothing/under/redcoat,
+ /obj/item/clothing/under/kilt)
+ name = "Costumes crate"
cost = 10
containertype = /obj/structure/closet/crate/secure
- containername = "Standard Costumes"
+ containername = "Actor Costumes"
access = access_theatre
group = "Operations"
@@ -923,8 +961,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/under/suit_jacket/female,
/obj/item/clothing/under/suit_jacket/really_black,
/obj/item/clothing/under/suit_jacket/red,
+ /obj/item/clothing/under/lawyer/bluesuit,
+ /obj/item/clothing/under/lawyer/purpsuit,
/obj/item/clothing/shoes/black,
/obj/item/clothing/shoes/black,
+ /obj/item/clothing/shoes/leather,
/obj/item/clothing/suit/wcoat)
name = "Formalwear closet"
cost = 30
@@ -1052,13 +1093,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/bee_keeper
name = "Beekeeping Crate"
contains = list(/obj/item/beezeez,
- /obj/item/beezeez,
/obj/item/weapon/bee_net,
/obj/item/apiary,
- /obj/item/queen_bee,
- /obj/item/queen_bee,
/obj/item/queen_bee)
- cost = 20
+ cost = 40
+ contraband = 1
containertype = /obj/structure/closet/crate/hydroponics
containername = "Beekeeping crate"
access = access_hydroponics
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 197e3433d7..25a5242c07 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -297,7 +297,7 @@ var/global/list/PDA_Manifest = list()
item_state = "beachball"
density = 0
anchored = 0
- w_class = 1.0
+ w_class = 2.0
force = 0.0
throwforce = 0.0
throw_speed = 1
diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm
index 2b57dbeffa..9357b7f308 100644
--- a/code/defines/obj/hydro.dm
+++ b/code/defines/obj/hydro.dm
@@ -18,7 +18,7 @@
icon = 'icons/obj/seeds.dmi'
icon_state = "seed" // unknown plant seed - these shouldn't exist in-game
flags = FPRINT | TABLEPASS
- w_class = 1.0 // Makes them pocketable
+ w_class = 2.0 // Makes them pocketable
var/mypath = "/obj/item/seeds"
var/plantname = "Plants"
var/productname = ""
@@ -1205,7 +1205,7 @@
force = 0
flags = TABLEPASS
throwforce = 1
- w_class = 1.0
+ w_class = 2.0
throw_speed = 1
throw_range = 3
plant_type = 1
@@ -1229,7 +1229,7 @@
force = 15
flags = TABLEPASS
throwforce = 1
- w_class = 1.0
+ w_class = 2.0
throw_speed = 1
throw_range = 3
plant_type = 1
@@ -1251,7 +1251,7 @@
force = 30
flags = TABLEPASS
throwforce = 1
- w_class = 1.0
+ w_class = 2.0
throw_speed = 1
throw_range = 3
plant_type = 1
@@ -1417,7 +1417,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle16"
flags = FPRINT | TABLEPASS
- w_class = 1.0
+ w_class = 2.0
var/mutmod = 0
var/yieldmod = 0
New()
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 4e7beba1dd..7ca5bdbe80 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -31,7 +31,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "banana_peel"
item_state = "banana_peel"
- w_class = 1.0
+ w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20
@@ -42,7 +42,7 @@
icon = 'icons/obj/harvest.dmi'
icon_state = "corncob"
item_state = "corncob"
- w_class = 1.0
+ w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20
@@ -53,7 +53,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "soap"
- w_class = 1.0
+ w_class = 2.0
throwforce = 0
throw_speed = 4
throw_range = 20
@@ -90,7 +90,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "c_tube"
throwforce = 1
- w_class = 1.0
+ w_class = 2.0
throw_speed = 4
throw_range = 5
@@ -117,7 +117,7 @@
desc = "Better keep this safe."
icon_state = "nucleardisk"
item_state = "card-id"
- w_class = 1.0
+ w_class = 2.0
/*
/obj/item/weapon/game_kit
@@ -229,7 +229,7 @@
icon_state = "large"
sharp = 1
desc = "Could probably be used as ... a throwing weapon?"
- w_class = 1.0
+ w_class = 2.0
force = 5.0
throwforce = 8.0
item_state = "shard-glass"
@@ -400,8 +400,8 @@
/obj/item/weapon/module/power_control
name = "power control module"
icon_state = "power_mod"
- desc = "Heavy-duty switching circuits for power control."
- m_amt = 50
+ desc = "Heavy-duty switching circuits for power control."
+ m_amt = 50
g_amt = 50
/obj/item/weapon/module/id_auth
@@ -461,7 +461,7 @@
icon = 'icons/obj/food.dmi'
icon_state = "meat"
flags = FPRINT | TABLEPASS | CONDUCT
- w_class = 1.0
+ w_class = 2.0
origin_tech = "biotech=2"
/obj/item/weapon/hatchet
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index d8d9ab5719..bfe3393359 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -860,7 +860,7 @@ var/list/ghostteleportlocs = list()
icon_state = "chapeloffice"
/area/lawoffice
- name = "\improper Law Office"
+ name = "\improper Internal Affairs"
icon_state = "law"
@@ -977,6 +977,10 @@ var/list/ghostteleportlocs = list()
name = "\improper Engineering Hallway"
icon_state = "engine_hallway"
+ engine_eva
+ name = "\improper Engine EVA"
+ icon_state = "engine_eva"
+
workshop
name = "\improper Engineering Workshop"
icon_state = "engine_storage"
@@ -1238,6 +1242,11 @@ var/list/ghostteleportlocs = list()
name = "\improper Firing Range"
icon_state = "firingrange"
+/area/security/tactical
+ name = "\improper Tactical Equipment"
+ icon_state = "Tactical"
+
+
/*
New()
..()
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 7a9ac8aa37..21b86f5bcc 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)
@@ -240,7 +244,6 @@
return used
/area/proc/clear_usage()
-
master.used_equip = 0
master.used_light = 0
master.used_environ = 0
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 26497410fa..22bdac77a9 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -44,7 +44,7 @@ Stealthy and Inconspicuous Weapons;
/obj/item/weapon/cartridge/syndicate:3:Detomatix PDA Cartridge;
Whitespace:Seperator;
Stealth and Camouflage Items;
-/obj/item/clothing/under/chameleon:3:Chameleon Jumpsuit;
+/obj/item/weapon/storage/box/syndie_kit/chameleon:3:Chameleon Kit;
/obj/item/clothing/shoes/syndigaloshes:2:No-Slip Syndicate Shoes;
/obj/item/weapon/card/id/syndicate:2:Agent ID card;
/obj/item/clothing/mask/gas/voice:4:Voice Changer;
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index f0361f2245..d42f88e891 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -57,7 +57,12 @@ var/global/datum/controller/gameticker/ticker
if(going)
pregame_timeleft--
if(pregame_timeleft == config.vote_autogamemode_timeleft)
- vote.autogamemode()
+ if(!vote.time_remaining)
+ vote.autogamemode() //Quit calling this over and over and over and over.
+ while(vote.time_remaining)
+ for(var/i=0, i<10, i++)
+ sleep(1)
+ vote.process()
if(pregame_timeleft <= 0)
current_state = GAME_STATE_SETTING_UP
while (!setup())
@@ -148,7 +153,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
for(var/obj/multiz/ladder/L in world) L.connect() //Lazy hackfix for ladders. TODO: move this to an actual controller. ~ Z
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 1fb1aff61a..eccf013fff 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -30,7 +30,7 @@
/datum/game_mode/malfunction/pre_setup()
for(var/mob/new_player/player in player_list)
- if(player.mind && player.mind.assigned_role == "AI")
+ if(player.mind && player.mind.assigned_role == "AI" && (player.client.prefs.be_special & BE_MALF))
malf_ai+=player.mind
if(malf_ai.len)
return 1
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index ff19ce7764..cd70a392de 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -5,7 +5,7 @@
icon_state ="book"
throw_speed = 1
throw_range = 5
- w_class = 1.0
+ w_class = 2.0
flags = FPRINT | TABLEPASS
var/uses = 5
var/temp = null
diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm
index 2feb525441..2aaad4bde6 100644
--- a/code/game/jobs/whitelist.dm
+++ b/code/game/jobs/whitelist.dm
@@ -26,7 +26,7 @@ var/list/whitelist = list()
/proc/load_alienwhitelist()
var/text = file2text("config/alienwhitelist.txt")
if (!text)
- diary << "Failed to load config/alienwhitelist.txt\n"
+ log_misc("Failed to load config/alienwhitelist.txt")
else
alien_whitelist = text2list(text, "\n")
@@ -51,4 +51,4 @@ var/list/whitelist = list()
return 0
-#undef WHITELISTFILE
\ No newline at end of file
+#undef WHITELISTFILE
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index 5bb6f1559e..14f0151a21 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
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index e088103fab..b019c4ee86 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -77,10 +77,8 @@
//Cameras can't track people wearing an agent card or a ninja hood.
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
continue
- if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
- var/obj/item/clothing/head/helmet/space/space_ninja/hood = H.head
- if(!hood.canremove)
- continue
+ if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
+ continue
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
if(!near_camera(M))
@@ -137,8 +135,8 @@
U << "Follow camera mode terminated."
U.cameraFollow = null
return
- if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && !H.head.canremove)
- U << "Follow camera mode terminated."
+ if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
+ U << "Follow camera mode terminated."
U.cameraFollow = null
return
if(H.digitalcamo)
@@ -199,4 +197,4 @@
else
if (sorttext(a.c_tag, b.c_tag) < 0)
L.Swap(j, j + 1)
- return L
\ No newline at end of file
+ return L
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 6bd2fb6a6f..15d0b2d61c 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -29,7 +29,7 @@
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
item_state = "card-id"
- w_class = 1.0
+ w_class = 2.0
var/datum/dna2/record/buf=null
var/read_only = 0 //Well,it's still a floppy disk
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index bdd313853f..e02d0de1f0 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -662,4 +662,23 @@
del(W)
for(var/mob/M in currentarea)
- M << "FIGHT!"
\ No newline at end of file
+ M << "FIGHT!"
+
+//Holorack
+
+/obj/structure/rack/holorack
+ name = "rack"
+ desc = "Different from the Middle Ages version."
+ icon = 'icons/obj/objects.dmi'
+ icon_state = "rack"
+
+/obj/structure/rack/holorack/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
+ return attack_hand(user)
+
+/obj/structure/rack/holorack/attack_hand(mob/user as mob)
+ return
+
+/obj/structure/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/wrench))
+ user << "It's a holorack! You can't unwrench it!"
+ return
\ No newline at end of file
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index ccb53acc44..3168fe4e7d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -1203,6 +1203,8 @@ About the new airlock wires panel:
var/obj/item/weapon/airlock_electronics/ae
if(!electronics)
ae = new/obj/item/weapon/airlock_electronics( src.loc )
+ if(!src.req_access)
+ src.check_access()
if(src.req_access.len)
ae.conf_access = src.req_access
else if (src.req_one_access.len)
@@ -1329,4 +1331,4 @@ About the new airlock wires panel:
src.locked = 0
src.open()
src.locked = 1
- return
+ return
\ No newline at end of file
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 3fd77b8b34..05a5fc1324 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -98,7 +98,7 @@
"\The [src]", "Yes, [density ? "open" : "close"]", "No")
if(answer == "No")
return
- if(user.stat || !user.canmove || user.stunned || user.weakened || user.paralysis || get_dist(src, user) > 1)
+ if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user)))
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
return
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 152d6de60c..61d26340a5 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -130,6 +130,8 @@
var/obj/item/weapon/airlock_electronics/ae
if(!electronics)
ae = new/obj/item/weapon/airlock_electronics( src.loc )
+ if(!src.req_access)
+ src.check_access()
if(src.req_access.len)
ae.conf_access = src.req_access
else if (src.req_one_access.len)
@@ -227,6 +229,8 @@
var/obj/item/weapon/airlock_electronics/ae
if(!electronics)
ae = new/obj/item/weapon/airlock_electronics( src.loc )
+ if(!src.req_access)
+ src.check_access()
if(src.req_access.len)
ae.conf_access = src.req_access
else if (src.req_one_access.len)
@@ -342,5 +346,4 @@
/obj/machinery/door/window/brigdoor/southright
dir = SOUTH
icon_state = "rightsecure"
- base_state = "rightsecure"
-
+ base_state = "rightsecure"
diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm
index a0f8c371e4..97621cd30a 100644
--- a/code/game/machinery/hydroponics.dm
+++ b/code/game/machinery/hydroponics.dm
@@ -448,7 +448,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)
@@ -456,17 +456,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) )
@@ -484,7 +484,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/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index b0861395f5..4b2fce70cd 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -30,7 +30,7 @@
break
if(!input_plate)
- diary << "a [src] didn't find an input plate."
+ log_misc("a [src] didn't find an input plate.")
return
Bumped(var/atom/A)
diff --git a/code/game/machinery/kitchen/processor.dm b/code/game/machinery/kitchen/processor.dm
index 2107bbd039..161dfc01ce 100644
--- a/code/game/machinery/kitchen/processor.dm
+++ b/code/game/machinery/kitchen/processor.dm
@@ -1,4 +1,3 @@
-
/obj/machinery/processor
name = "Food Processor"
icon = 'icons/obj/kitchen.dmi'
@@ -27,23 +26,23 @@
/* objs */
meat
input = /obj/item/weapon/reagent_containers/food/snacks/meat
- output = /obj/item/weapon/reagent_containers/food/snacks/faggot
+ output = /obj/item/weapon/reagent_containers/food/snacks/meatball
meat2
input = /obj/item/weapon/syntiflesh
- output = /obj/item/weapon/reagent_containers/food/snacks/faggot
+ output = /obj/item/weapon/reagent_containers/food/snacks/meatball
/*
monkeymeat
input = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
- output = /obj/item/weapon/reagent_containers/food/snacks/faggot
+ output = /obj/item/weapon/reagent_containers/food/snacks/meatball
humanmeat
input = /obj/item/weapon/reagent_containers/food/snacks/meat/human
- output = /obj/item/weapon/reagent_containers/food/snacks/faggot
+ output = /obj/item/weapon/reagent_containers/food/snacks/meatball
*/
potato
input = /obj/item/weapon/reagent_containers/food/snacks/grown/potato
- output = /obj/item/weapon/reagent_containers/food/snacks/fries
+ output = /obj/item/weapon/reagent_containers/food/snacks/rawsticks
carrot
input = /obj/item/weapon/reagent_containers/food/snacks/grown/carrot
@@ -159,4 +158,3 @@
src.visible_message("\blue \the [src] finished processing.", \
"You hear the food processor stopping/")
-
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index 86bcf6e9ab..841ac36d9b 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -130,12 +130,25 @@
if(!isbroken)
icon_state = icon_off
-
/*******************
* Item Adding
********************/
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ if(istype(O, /obj/item/weapon/screwdriver))
+ panel_open = !panel_open
+ user << "You [panel_open ? "open" : "close"] the maintenance panel."
+ overlays.Cut()
+ if(panel_open)
+ overlays += image(icon, icon_panel)
+ nanomanager.update_uis(src)
+ return
+
+ if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters))
+ if(panel_open)
+ attack_hand(user)
+ return
+
if(!src.ispowered)
user << "\The [src] is unpowered and useless. "
return
@@ -154,6 +167,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
@@ -171,147 +186,155 @@
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/secure/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/weapon/card/emag))
- src.emagged = 1
- user << "You short out the product lock on [src]"
- return
- else if(istype(O, /obj/item/weapon/screwdriver))
- src.panel_open = !src.panel_open
- user << "You [src.panel_open ? "open" : "close"] the maintenance panel."
- src.overlays.Cut()
- if(src.panel_open)
- src.overlays += image(src.icon, src.icon_panel)
- src.updateUsrDialog()
- return
- else if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters))
- if(src.panel_open)
- attack_hand(user)
+ emagged = 1
+ locked = -1
+ user << "You short out the product lock on [src]."
return
+
..()
- return
/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)
- if(src.seconds_electrified != 0)
- if(src.shock(user, 100))
+ if(!ispowered) return
+ if(seconds_electrified != 0)
+ if(shock(user, 100))
return
- 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/is_secure = istype(src,/obj/machinery/smartfridge/secure)
- if (contents.len == 0)
- dat += "No product loaded! "
+ var/data[0]
+ data["contents"] = null
+ data["wires"] = null
+ data["panel_open"] = panel_open
+ data["electrified"] = seconds_electrified > 0
+ data["shoot_inventory"] = shoot_inventory
+ data["locked"] = locked
+ data["secure"] = is_secure
+
+ 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)))
+
+ if (items.len > 0)
+ data["contents"] = items
+
+ var/list/vendwires = null
+ if (is_secure)
+ vendwires = list(
+ "Violet" = 1,
+ "Orange" = 2,
+ "Green" = 3)
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 += " "
-
- dat += " "
- if(panel_open)
- //One of the wires does absolutely nothing.
- var/list/vendwires = list(
+ vendwires = list(
"Blue" = 1,
"Red" = 2,
- "Black" = 3
- )
- dat += "Access Panel "
- for(var/wiredesc in vendwires)
- var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
- dat += "[wiredesc] wire: "
- if(!is_uncut)
- dat += "Mend "
- else
- dat += "Cut "
- dat += "Pulse "
- dat += " "
+ "Black" = 3)
- dat += " "
- dat += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"]. "
- dat += "The red light is [src.shoot_inventory ? "off" : "blinking"]. "
- user << browse("[src] Supplies [dat] ", "window=smartfridge")
- return
+ var/list/vendor_wires[0]
+ for (var/wire in vendwires)
+ var is_uncut = wires & APCWireColorToFlag[vendwires[wire]]
+ vendor_wires.Add(list(list("wire" = wire, "cut" = !is_uncut, "index" = vendwires[wire])))
+
+ if (vendor_wires.len > 0)
+ data["wires"] = vendor_wires
+
+ 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
- if ((href_list["cutwire"]) && (src.panel_open))
- var/twire = text2num(href_list["cutwire"])
- if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
- usr << "You need wirecutters!"
- return
- if (src.isWireColorCut(twire))
- src.mend(twire)
- else
- src.cut(twire)
- else if ((href_list["pulsewire"]) && (src.panel_open))
- var/twire = text2num(href_list["pulsewire"])
- if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
- usr << "You need a multitool!"
- return
- if (src.isWireColorCut(twire))
- usr << "You can't pulse a cut wire."
- return
- else
- src.pulse(twire)
- else if (href_list["vend"])
- var/N = href_list["vend"]
+ var/mob/user = usr
+ var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
+
+ src.add_fingerprint(user)
+
+ if (href_list["close"])
+ user.unset_machine()
+ ui.close()
+ return 0
+
+ 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]
- if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
- 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)
- item_quants[N] = max(item_quants[N] - amount, 0)
+ var/i = amount
+ for(var/obj/O in contents)
+ if (O.name == K)
+ O.loc = loc
+ i--
+ if (i <= 0)
+ return 1
- var/i = amount
- for(var/obj/O in contents)
- if(O.name == N)
- O.loc = src.loc
- i--
- if(i <= 0)
- break
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
+ return 1
+
+ if (panel_open)
+ if (href_list["cutwire"])
+ if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
+ user << "You need wirecutters!"
+ return 1
+
+ var/wire_index = text2num(href_list["cutwire"])
+ if (isWireColorCut(wire_index))
+ mend(wire_index)
+ else
+ cut(wire_index)
+ return 1
+
+ if (href_list["pulsewire"])
+ if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
+ usr << "You need a multitool!"
+ return 1
+
+ var/wire_index = text2num(href_list["pulsewire"])
+ if (isWireColorCut(wire_index))
+ usr << "You can't pulse a cut wire."
+ return 1
+
+ pulse(wire_index)
+ return 1
+
+ return 0
/*************
* Hacking
@@ -332,7 +355,7 @@
/obj/machinery/smartfridge/proc/mend(var/wireColor)
var/wireFlag = APCWireColorToFlag[wireColor]
- var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function
+ var/wireIndex = APCWireColorToIndex[wireColor]
src.wires |= wireFlag
switch(wireIndex)
if(WIRE_SHOCK)
@@ -347,7 +370,7 @@
switch(wireIndex)
if(WIRE_SHOCK)
src.seconds_electrified = 30
- if (WIRE_SHOOTINV)
+ if(WIRE_SHOOTINV)
src.shoot_inventory = !src.shoot_inventory
if(WIRE_SCANID)
src.locked = -1
@@ -385,80 +408,23 @@
return 1
/obj/machinery/smartfridge/proc/shock(mob/user, prb)
- if(!src.ispowered) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0
+ if(!ispowered) return 0
+ if(!prob(prb)) return 0
+
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
- if (electrocute_mob(user, get_area(src), src, 0.7))
- return 1
- else
- return 0
+
+ return electrocute_mob(user, get_area(src), src, 0.7)
/************************
* Secure SmartFridges
*************************/
/obj/machinery/smartfridge/secure/Topic(href, href_list)
- usr.set_machine(src)
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
- if ((!src.allowed(usr)) && (!src.emagged) && (src.locked != -1) && href_list["vend"]) //For SECURE VENDING MACHINES YEAH
- usr << "\red Access denied." //Unless emagged of course
- return
- ..()
- return
-
-/obj/machinery/smartfridge/secure/interact(mob/user as mob)
-
- if(!src.ispowered)
- return
-
- var/dat = "Select an item: "
-
- 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 += " "
-
- dat += " "
- if(panel_open)
- var/list/vendwires = list(
- "Violet" = 1,
- "Orange" = 2,
- "Green" = 3
- )
- dat += "Access Panel "
- for(var/wiredesc in vendwires)
- var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
- dat += "[wiredesc] wire: "
- if(!is_uncut)
- dat += "Mend "
- else
- dat += "Cut "
- dat += "Pulse "
- dat += " "
-
- dat += " "
- dat += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"]. "
- //dat += "The red light is [src.shoot_inventory ? "off" : "blinking"]. "
- dat += "The green light is [src.locked == 1 ? "off" : "[src.locked == -1 ? "blinking" : "on"]"]. "
- user << browse("[src] Supplies [dat] ", "window=smartfridge")
- return
-
-//TODO: Make smartfridges hackable. - JoeyJo0
+ if(!ispowered) return 0
+ if (usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
+ if (!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
+ usr << "\red Access denied."
+ return 0
+ return ..()
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index d92df433bf..99308ddab4 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -193,7 +193,7 @@ Class Procs:
src.add_fingerprint(usr)
var/area/A = get_area(src)
- A.powerupdate = 1
+ A.master.powerupdate = 1
return 0
@@ -236,7 +236,7 @@ Class Procs:
src.add_fingerprint(user)
var/area/A = get_area(src)
- A.powerupdate = 1
+ A.master.powerupdate = 1
return 0
@@ -248,3 +248,13 @@ Class Procs:
uid = gl_uid
gl_uid++
+/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/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 7775e3aa20..94b8ac1d47 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -350,6 +350,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
freq_text = "Special Ops"
if(1345)
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
@@ -378,6 +380,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/vending.dm b/code/game/machinery/vending.dm
index fe8ac9c751..5eb4601be8 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -766,7 +766,7 @@
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
icon_state = "nutri"
icon_deny = "nutri-deny"
- products = list(/obj/item/beezeez = 45,/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
+ products = list(/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
/obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5)
premium = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5)
diff --git a/code/game/objects/effects/decals/posters/bs12.dm b/code/game/objects/effects/decals/posters/bs12.dm
index 8629c4fb73..3d6261fb9a 100644
--- a/code/game/objects/effects/decals/posters/bs12.dm
+++ b/code/game/objects/effects/decals/posters/bs12.dm
@@ -91,8 +91,8 @@
/datum/poster/bay_19
icon_state="bsposter19"
- name = "Respect a Soghun"
- desc = "This poster depicts a well dressed looking Soghun receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
+ name = "Respect a Unathi"
+ desc = "This poster depicts a well dressed looking Unathi receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
/datum/poster/bay_20
icon_state="bsposter20"
@@ -142,4 +142,4 @@
/datum/poster/bay_29
icon_state="bsposter29"
name = "Winter Is Coming"
- desc = "On the poster is a frighteningly large wolf, he warns: \"Only YOU can keep the station from freezing during planetary occultation!\""
\ No newline at end of file
+ desc = "On the poster is a frighteningly large wolf, he warns: \"Only YOU can keep the station from freezing during planetary occultation!\""
diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm
index c024b49831..c48d062e9e 100644
--- a/code/game/objects/explosion.dm
+++ b/code/game/objects/explosion.dm
@@ -26,9 +26,37 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
epicenter = get_turf(epicenter)
if(!epicenter) return
+ var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flash_range)
+ //playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
+ //playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
- playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
- playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
+// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
+
+// Stereo users will also hear the direction of the explosion!
+
+// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
+
+// 3/7/14 will calculate to 80 + 35
+ var/far_dist = 0
+ far_dist += heavy_impact_range * 5
+ far_dist += devastation_range * 20
+ var/frequency = get_rand_frequency()
+ for(var/mob/M in player_list)
+ // Double check for client
+ if(M && M.client)
+ var/turf/M_turf = get_turf(M)
+ if(M_turf && M_turf.z == epicenter.z)
+ var/dist = get_dist(M_turf, epicenter)
+ // If inside the blast radius + world.view - 2
+ if(dist <= round(max_range + world.view - 2, 1))
+ M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
+
+ //You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
+
+ else if(dist <= far_dist)
+ var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
+ far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
+ M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
var/close = range(world.view+round(devastation_range,1), epicenter)
// to all distanced mobs play a different sound
@@ -55,7 +83,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/y0 = epicenter.y
var/z0 = epicenter.z
- for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
+ for(var/turf/T in range(epicenter, max_range))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range) dist = 1
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 92ed4e9244..5c5b1b6fd8 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -133,6 +133,9 @@ move an amendment 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)"
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index ec1e6195d2..3a10e94f3c 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -10,7 +10,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
- w_class = 1.0
+ w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_ID | SLOT_BELT
@@ -330,14 +330,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
ui_tick++
+ var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main")
var/auto_update = 1
if(mode in no_auto_update)
auto_update = 0
- if(mode == lastmode && ui_tick % 5 && mode in update_every_five)
+ if(old_ui && (mode == lastmode && ui_tick % 5 && mode in update_every_five))
return
lastmode = mode
-
+
var/title = "Personal Data Assistant"
var/data[0] // This is the data that will be sent to the PDA
@@ -366,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,\
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 2adadfd94b..152aa2fa34 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -4,7 +4,7 @@
icon_state = "flash"
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
throwforce = 5
- w_class = 1.0
+ w_class = 2.0
throw_speed = 4
throw_range = 10
flags = FPRINT | TABLEPASS| CONDUCT
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index a89a4573ea..bb8132744f 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -107,6 +107,7 @@
item_state = ""
flags = FPRINT | TABLEPASS | CONDUCT
brightness_on = 2
+ w_class = 1
// the desk lamps are a bit special
diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm
index ec8075e85b..371fe3b8c4 100644
--- a/code/game/objects/items/devices/megaphone.dm
+++ b/code/game/objects/items/devices/megaphone.dm
@@ -3,7 +3,7 @@
desc = "A device used to project your voice. Loudly."
icon_state = "megaphone"
item_state = "radio"
- w_class = 1.0
+ w_class = 2.0
flags = FPRINT | TABLEPASS | CONDUCT
var/spamcheck = 0
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index bd3eeb495d..ea3a216878 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -742,20 +742,25 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
src.channels = list()
src.syndie = 0
+ var/mob/living/silicon/robot/D = src.loc
+ if(D.module)
+ for(var/ch_name in D.module.channels)
+ if(ch_name in src.channels)
+ continue
+ src.channels += ch_name
+ src.channels[ch_name] += D.module.channels[ch_name]
if(keyslot)
for(var/ch_name in keyslot.channels)
if(ch_name in src.channels)
continue
src.channels += ch_name
- src.channels[ch_name] = keyslot.channels[ch_name]
-
+ src.channels[ch_name] += keyslot.channels[ch_name]
+
if(keyslot.syndie)
src.syndie = 1
- var/mob/living/silicon/robot/Ro = usr
- if(Ro.module)
- src.config(Ro.module.channels)
+
- for (var/ch_name in channels)
+ for (var/ch_name in src.channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 7e616a8f35..d3f7523988 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -68,7 +68,7 @@ REAGENT SCANNER
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
- w_class = 1.0
+ w_class = 2.0
throw_speed = 5
throw_range = 10
m_amt = 200
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 555dbe1cae..188787f83b 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -3,7 +3,7 @@
name = "universal recorder"
icon_state = "taperecorderidle"
item_state = "analyzer"
- w_class = 1.0
+ w_class = 2.0
m_amt = 60
g_amt = 30
var/emagged = 0.0
diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm
index 6e1c608cb2..5ad758015e 100644
--- a/code/game/objects/items/latexballoon.dm
+++ b/code/game/objects/items/latexballoon.dm
@@ -5,7 +5,7 @@
item_state = "lgloves"
force = 0
throwforce = 0
- w_class = 1.0
+ w_class = 2.0
throw_speed = 1
throw_range = 15
var/state
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 47175e20d1..868e2d4b8d 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/items.dmi'
amount = 5
max_amount = 5
- w_class = 1
+ w_class = 2
throw_speed = 4
throw_range = 20
var/heal_brute = 0
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 3a157aa618..14bad64262 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -131,7 +131,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 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), \
+// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)
/obj/item/stack/sheet/wood
diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm
index 9b955195db..756812ccb1 100644
--- a/code/game/objects/items/trash.dm
+++ b/code/game/objects/items/trash.dm
@@ -4,7 +4,7 @@
//Added by Jack Rost
/obj/item/trash
icon = 'icons/obj/trash.dmi'
- w_class = 1.0
+ w_class = 2.0
desc = "This is rubbish."
raisins
name = "4no raisins"
diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade.dm b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
index efb6ac1e75..31b06ef5b7 100644
--- a/code/game/objects/items/weapons/grenades/spawnergrenade.dm
+++ b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
@@ -17,7 +17,7 @@
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
- flick("e_flash", M.flash) // flash dose faggots
+ flick("e_flash", M.flash)
for(var/i=1, i<=deliveryamt, i++)
var/atom/movable/x = new spawner_type
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 30d199cf97..21a4650f35 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -41,7 +41,7 @@
throwforce = 5.0
throw_speed = 1
throw_range = 4
- w_class = 1
+ w_class = 2
origin_tech = "materials=4;magnets=3;syndicate=4"
attack_verb = list("shoved", "bashed")
var/active = 0
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 2219619720..f7da60688e 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -94,7 +94,7 @@
storage_slots = 50; //the number of plant pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
- w_class = 1
+ w_class = 2
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown")
@@ -252,5 +252,5 @@
storage_slots = 50; //the number of cash pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
max_w_class = 3
- w_class = 1
+ w_class = 2
can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash")
diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm
index 6fa791782d..126d60e1e4 100644
--- a/code/game/objects/items/weapons/storage/briefcase.dm
+++ b/code/game/objects/items/weapons/storage/briefcase.dm
@@ -2,6 +2,7 @@
name = "briefcase"
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
icon_state = "briefcase"
+ item_state = "briefcase"
flags = FPRINT | TABLEPASS| CONDUCT
force = 8.0
throw_speed = 1
diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm
index ea7c9bdd90..776062c1b9 100644
--- a/code/game/objects/items/weapons/storage/uplink_kits.dm
+++ b/code/game/objects/items/weapons/storage/uplink_kits.dm
@@ -117,3 +117,20 @@
new /obj/item/clothing/suit/space/syndicate(src)
new /obj/item/clothing/head/helmet/space/syndicate(src)
return
+/obj/item/weapon/storage/box/syndie_kit/chameleon
+ name = "Chameleon Kit"
+ desc = "Comes with all the clothes you need to impersonate most people. Acting lessons sold seperately."
+ storage_slots = 10
+
+/obj/item/weapon/storage/box/syndie_kit/chameleon/New()
+ ..()
+ new /obj/item/clothing/under/chameleon(src)
+ new /obj/item/clothing/head/chameleon(src)
+ new /obj/item/clothing/suit/chameleon(src)
+ new /obj/item/clothing/shoes/chameleon(src)
+ new /obj/item/weapon/storage/backpack/chameleon(src)
+ new /obj/item/clothing/gloves/chameleon(src)
+ new /obj/item/clothing/mask/chameleon(src)
+ new /obj/item/clothing/glasses/chameleon(src)
+ new /obj/item/weapon/gun/projectile/chameleon(src)
+ new /obj/item/ammo_magazine/chameleon(src)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index bbfb940ec9..3e67925994 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -113,7 +113,7 @@
//Telescopic baton
/obj/item/weapon/melee/telebaton
name = "telescopic baton"
- desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
+ desc = "A compact yet rebalanced personal defense weapon. Can be concealed when folded."
icon = 'icons/obj/weapons.dmi'
icon_state = "telebaton_0"
item_state = "telebaton_0"
@@ -178,7 +178,6 @@
return
if(..())
playsound(src.loc, "swing_hit", 50, 1, -1)
- target.Weaken(4)
return
else
return ..()
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 922d926376..77a9d1267b 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -6,7 +6,7 @@
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
throwforce = 0
- w_class = 1.0
+ w_class = 2.0
throw_speed = 7
throw_range = 15
attack_verb = list("banned")
@@ -26,7 +26,7 @@
throw_speed = 1
throw_range = 4
throwforce = 10
- w_class = 1
+ w_class = 2
suicide_act(mob/user)
viewers(user) << "\red [user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide. "
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 4ea23ec085..8e47b6479c 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -14,7 +14,7 @@ LINEN BINS
throwforce = 1
throw_speed = 1
throw_range = 2
- w_class = 1.0
+ w_class = 2.0
item_color = "white"
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
index 5e5b4206f4..cef66a61c6 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
@@ -87,6 +87,9 @@
new /obj/item/weapon/weldingtool/largetank(src)
new /obj/item/weapon/weldingtool/largetank(src)
new /obj/item/weapon/weldingtool/largetank(src)
+ new /obj/item/weapon/weldpack(src)
+ new /obj/item/weapon/weldpack(src)
+ new /obj/item/weapon/weldpack(src)
return
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm
index a8024b0cd5..6a6a1eee09 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/hydroponics.dm
@@ -23,5 +23,5 @@
new /obj/item/clothing/head/greenbandana(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/hatchet(src)
- new /obj/item/weapon/bee_net(src)
+// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
return
\ No newline at end of file
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index 9713c7c9eb..cfcc3c1176 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -28,6 +28,13 @@
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user) || isalien(user))
return
+ if (hasorgans(user))
+ var/datum/organ/external/temp = user:organs_by_name["r_hand"]
+ if (user.hand)
+ temp = user:organs_by_name["l_hand"]
+ if(temp && !temp.is_usable())
+ user << "You try to move your [temp.display_name], but cannot!"
+ return
if(has_extinguisher)
user.put_in_hands(has_extinguisher)
user << "You take [has_extinguisher] from [src]. "
@@ -62,4 +69,4 @@
else
icon_state = "extinguisher_full"
else
- icon_state = "extinguisher_empty"
\ No newline at end of file
+ icon_state = "extinguisher_empty"
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
new file mode 100644
index 0000000000..bc0f907a58
--- /dev/null
+++ b/code/game/objects/structures/inflatable.dm
@@ -0,0 +1,304 @@
+/obj/item/inflatable
+ name = "inflatable wall"
+ desc = "A folded membrane which rapidly expands into a large cubical shape on activation."
+ icon = 'icons/obj/inflatable.dmi'
+ icon_state = "folded_wall"
+ w_class = 3.0
+
+ attack_self(mob/user)
+ playsound(loc, 'sound/items/zip.ogg', 75, 1)
+ user << "\blue You inflate [src]."
+ var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
+ src.transfer_fingerprints_to(R)
+ R.add_fingerprint(user)
+ del(src)
+
+/obj/structure/inflatable
+ name = "inflatable wall"
+ desc = "An inflated membrane. Do not puncture."
+ density = 1
+ anchored = 1
+ opacity = 0
+
+ icon = 'icons/obj/inflatable.dmi'
+ icon_state = "wall"
+
+ var/health = 50.0
+
+
+ New(location)
+ ..()
+ update_nearby_tiles(need_rebuild=1)
+
+ Del()
+ update_nearby_tiles()
+ ..()
+
+ proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
+ if(!air_master)
+ return 0
+ air_master.mark_for_update(get_turf(src))
+ return 1
+
+
+
+ CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+ return 0
+
+ bullet_act(var/obj/item/projectile/Proj)
+ health -= Proj.damage
+ ..()
+ if(health <= 0)
+ deflate(1)
+ return
+
+
+ ex_act(severity)
+ switch(severity)
+ if(1.0)
+ del(src)
+ return
+ if(2.0)
+ deflate(1)
+ return
+ if(3.0)
+ if(prob(50))
+ deflate(1)
+ return
+
+
+ blob_act()
+ deflate(1)
+
+
+ meteorhit()
+ //world << "glass at [x],[y],[z] Mhit"
+ deflate(1)
+
+ attack_paw(mob/user as mob)
+ return attack_generic(user, 15)
+
+ attack_hand(mob/user as mob)
+ add_fingerprint(user)
+ return
+
+
+ proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
+ health -= damage
+ if(health <= 0)
+ user.visible_message("[user] tears open [src]! ")
+ deflate(1)
+ else //for nicer text~
+ user.visible_message("[user] tears at [src]! ")
+
+ attack_alien(mob/user as mob)
+ if(islarva(user)) return
+ attack_generic(user, 15)
+
+ attack_animal(mob/user as mob)
+ if(!isanimal(user)) return
+ var/mob/living/simple_animal/M = user
+ if(M.melee_damage_upper <= 0) return
+ attack_generic(M, M.melee_damage_upper)
+
+
+ attack_slime(mob/user as mob)
+ if(!isslimeadult(user)) return
+ attack_generic(user, rand(10, 15))
+
+
+ attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if(!istype(W)) return
+
+ if (is_sharp(W))
+ visible_message("\red [user] pierces [src] with [W]! ")
+ deflate(1)
+ if(W.damtype == BRUTE || W.damtype == BURN)
+ hit(W.force)
+ ..()
+ return
+
+ proc/hit(var/damage, var/sound_effect = 1)
+ health = max(0, health - damage)
+ if(sound_effect)
+ playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ if(health <= 0)
+ deflate(1)
+
+
+ proc/deflate(var/violent=0)
+ playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ if(violent)
+ visible_message("[src] rapidly deflates!")
+ var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc)
+ src.transfer_fingerprints_to(R)
+ del(src)
+ else
+ //user << "\blue You slowly deflate the inflatable wall."
+ visible_message("[src] slowly deflates.")
+ spawn(50)
+ var/obj/item/inflatable/R = new /obj/item/inflatable(loc)
+ src.transfer_fingerprints_to(R)
+ del(src)
+
+ verb/hand_deflate()
+ set name = "Deflate"
+ set category = "Object"
+ set src in oview(1)
+
+ deflate()
+
+/obj/item/inflatable/door/
+ name = "inflatable door"
+ desc = "A folded membrane which rapidly expands into a simple door on activation."
+ icon = 'icons/obj/inflatable.dmi'
+ icon_state = "folded_door"
+
+ attack_self(mob/user)
+ playsound(loc, 'sound/items/zip.ogg', 75, 1)
+ user << "\blue You inflate [src]."
+ var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
+ src.transfer_fingerprints_to(R)
+ R.add_fingerprint(user)
+ del(src)
+
+/obj/structure/inflatable/door //Based on mineral door code
+ name = "inflatable door"
+ density = 1
+ anchored = 1
+ opacity = 0
+
+ icon = 'icons/obj/inflatable.dmi'
+ icon_state = "door_closed"
+
+ var/state = 0 //closed, 1 == open
+ var/isSwitchingStates = 0
+
+ //Bumped(atom/user)
+ // ..()
+ // if(!state)
+ // return TryToSwitchState(user)
+ // return
+
+ attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
+ if(isAI(user)) //so the AI can't open it
+ return
+ else if(isrobot(user)) //but cyborgs can
+ if(get_dist(user,src) <= 1) //not remotely though
+ return TryToSwitchState(user)
+
+ attack_paw(mob/user as mob)
+ return TryToSwitchState(user)
+
+ attack_hand(mob/user as mob)
+ return TryToSwitchState(user)
+
+ CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
+ if(air_group)
+ return state
+ if(istype(mover, /obj/effect/beam))
+ return !opacity
+ return !density
+
+ proc/TryToSwitchState(atom/user)
+ if(isSwitchingStates) return
+ if(ismob(user))
+ var/mob/M = user
+ if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
+ if(M.client)
+ if(iscarbon(M))
+ var/mob/living/carbon/C = M
+ if(!C.handcuffed)
+ SwitchState()
+ else
+ SwitchState()
+ else if(istype(user, /obj/mecha))
+ SwitchState()
+
+ proc/SwitchState()
+ if(state)
+ Close()
+ else
+ Open()
+ update_nearby_tiles()
+
+ proc/Open()
+ isSwitchingStates = 1
+ //playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
+ flick("door_opening",src)
+ sleep(10)
+ density = 0
+ opacity = 0
+ state = 1
+ update_icon()
+ isSwitchingStates = 0
+
+ proc/Close()
+ isSwitchingStates = 1
+ //playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
+ flick("door_closing",src)
+ sleep(10)
+ density = 1
+ opacity = 0
+ state = 0
+ update_icon()
+ isSwitchingStates = 0
+
+ update_icon()
+ if(state)
+ icon_state = "door_open"
+ else
+ icon_state = "door_closed"
+
+ deflate(var/violent=0)
+ playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ if(violent)
+ visible_message("[src] rapidly deflates!")
+ var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc)
+ src.transfer_fingerprints_to(R)
+ del(src)
+ else
+ //user << "\blue You slowly deflate the inflatable wall."
+ visible_message("[src] slowly deflates.")
+ spawn(50)
+ var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc)
+ src.transfer_fingerprints_to(R)
+ del(src)
+
+
+/obj/item/inflatable/torn
+ name = "torn inflatable wall"
+ desc = "A folded membrane which rapidly expands into a large cubical shape on activation. It is too torn to be usable."
+ icon = 'icons/obj/inflatable.dmi'
+ icon_state = "folded_wall_torn"
+
+ attack_self(mob/user)
+ user << "\blue The inflatable wall is too torn to be inflated!"
+ add_fingerprint(user)
+
+/obj/item/inflatable/door/torn
+ name = "torn inflatable door"
+ desc = "A folded membrane which rapidly expands into a simple door on activation. It is too torn to be usable."
+ icon = 'icons/obj/inflatable.dmi'
+ icon_state = "folded_door_torn"
+
+ attack_self(mob/user)
+ user << "\blue The inflatable door is too torn to be inflated!"
+ add_fingerprint(user)
+
+/obj/item/weapon/storage/briefcase/inflatable
+ name = "inflatable barrier box"
+ desc = "Contains inflatable walls and doors."
+ icon_state = "inf_box"
+ item_state = "syringe_kit"
+ max_combined_w_class = 21
+
+ New()
+ ..()
+ new /obj/item/inflatable/door(src)
+ new /obj/item/inflatable/door(src)
+ new /obj/item/inflatable/door(src)
+ new /obj/item/inflatable(src)
+ new /obj/item/inflatable(src)
+ new /obj/item/inflatable(src)
+ new /obj/item/inflatable(src)
\ No newline at end of file
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index c9bcbda3e5..425c03ad8c 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -204,7 +204,11 @@
if("Cn9") soundfile = 'sound/piano/Cn9.ogg'
else return
- hearers(15, src) << sound(soundfile)
+ //hearers(15, src) << sound(soundfile)
+ var/turf/source = get_turf(src)
+ for(var/mob/M in hearers(15, source))
+ M.playsound_local(source, file(soundfile), 100, falloff = 5)
+
/obj/structure/device/piano/proc/playsong()
do
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 237ee6c92f..60b7d200a9 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -323,15 +323,23 @@
anchored = 1
var/busy = 0 //Something's being washed at the moment
-/obj/structure/sink/attack_hand(mob/M as mob)
- if(isrobot(M) || isAI(M))
+/obj/structure/sink/attack_hand(mob/user as mob)
+ if (hasorgans(user))
+ var/datum/organ/external/temp = user:organs_by_name["r_hand"]
+ if (user.hand)
+ temp = user:organs_by_name["l_hand"]
+ if(temp && !temp.is_usable())
+ user << "You try to move your [temp.display_name], but cannot!"
+ return
+
+ if(isrobot(user) || isAI(user))
return
- if(!Adjacent(M))
+ if(!Adjacent(user))
return
if(busy)
- M << "\red Someone's already washing here."
+ user << "\red Someone's already washing here."
return
usr << "\blue You start washing your hands."
@@ -340,13 +348,14 @@
sleep(40)
busy = 0
- if(!Adjacent(M)) return //Person has moved away from the sink
+ if(!Adjacent(user)) return //Person has moved away from the sink
- M.clean_blood()
- if(ishuman(M))
- M:update_inv_gloves()
+ user.clean_blood()
+ if(ishuman(user))
+ user:update_inv_gloves()
for(var/mob/V in viewers(src, null))
- V.show_message("\blue [M] washes their hands using \the [src].")
+ V.show_message("\blue [user] washes their hands using \the [src].")
+
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
if(busy)
@@ -415,4 +424,4 @@
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
icon_state = "puddle-splash"
..()
- icon_state = "puddle"
\ No newline at end of file
+ icon_state = "puddle"
diff --git a/code/game/sound.dm b/code/game/sound.dm
index 67062e64f3..b79504bf1d 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -1,79 +1,41 @@
-/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num)
- //Frequency stuff only works with 45kbps oggs.
+var/list/shatter_sound = list('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
+var/list/explosion_sound = list('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
+var/list/spark_sound = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
+var/list/rustle_sound = list('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
+var/list/punch_sound = list('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
+var/list/clown_sound = list('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
+var/list/swing_hit_sound = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
+var/list/hiss_sound = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
+var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
+//var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
- switch(soundin)
- if ("shatter") soundin = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
- if ("explosion") soundin = pick('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
- if ("sparks") soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
- if ("rustle") soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
- if ("punch") soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
- if ("clownstep") soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
- if ("swing_hit") soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
- if ("hiss") soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
- if ("pageturn") soundin = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
+/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff)
- var/sound/S = sound(soundin)
- S.wait = 0 //No queue
- S.channel = 0 //Any channel
- S.volume = vol
+ soundin = get_sfx(soundin) // same sound for everyone
- if (vary)
- S.frequency = rand(32000, 55000)
+ if(isarea(source))
+ error("[source] is an area and is trying to make the sound: [soundin]")
+ return
- for (var/A in range(world.view+extrarange, source)) // Plays for people in range.
+ var/frequency = get_rand_frequency() // Same frequency for everybody
+ var/turf/turf_source = get_turf(source)
- if(ismob(A))
- var/mob/M = A
- var/mob/M2 = locate(/mob/, M)
- if (M2 && M2.client)
- if(M2.ear_deaf <= 0 || !M.ear_deaf)
- if(isturf(source))
- var/dx = source.x - M2.x
- S.pan = max(-100, min(100, dx/8.0 * 100))
+ // Looping through the player list has the added bonus of working for mobs inside containers
+ for (var/P in player_list)
+ var/mob/M = P
+ if(!M || !M.client)
+ continue
+ if(get_dist(M, turf_source) <= world.view + extrarange)
+ var/turf/T = get_turf(M)
+ if(T && T.z == turf_source.z)
+ M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff)
- M2 << S
+var/const/FALLOFF_SOUNDS = 1
+var/const/SURROUND_CAP = 7
- if (M.client)
- if(M.ear_deaf <= 0 || !M.ear_deaf)
- if(isturf(source))
- var/dx = source.x - M.x
- S.pan = max(-100, min(100, dx/8.0 * 100))
-
- M << S
-
- if(istype(A, /obj/structure/closet))
- var/obj/O = A
- for(var/mob/M in O)
- if (M.client)
- if(M.ear_deaf <= 0 || !M.ear_deaf)
- if(isturf(source))
- var/dx = source.x - M.x
- S.pan = max(-100, min(100, dx/8.0 * 100))
-
- M << S
-
- for(var/obj/mecha/mech in range(world.view+extrarange, source))
- var/mob/M = mech.occupant
- if (M && M.client)
- if(M.ear_deaf <= 0 || !M.ear_deaf)
- if(isturf(source))
- var/dx = source.x - M.x
- S.pan = max(-100, min(100, dx/8.0 * 100))
-
- M << S
- // Now plays for people in lockers! -- Polymorph
-
-/mob/proc/playsound_local(var/atom/source, soundin, vol as num, vary, extrarange as num)
+/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff)
if(!src.client || ear_deaf > 0) return
- switch(soundin)
- if ("shatter") soundin = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
- if ("explosion") soundin = pick('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
- if ("sparks") soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
- if ("rustle") soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
- if ("punch") soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
- if ("clownstep") soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
- if ("swing_hit") soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
- if ("hiss") soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
+ soundin = get_sfx(soundin)
var/sound/S = sound(soundin)
S.wait = 0 //No queue
@@ -81,14 +43,46 @@
S.volume = vol
if (vary)
- S.frequency = rand(32000, 55000)
- if(isturf(source))
- var/dx = source.x - src.x
- S.pan = max(-100, min(100, dx/8.0 * 100))
+ if(frequency)
+ S.frequency = frequency
+ else
+ S.frequency = get_rand_frequency()
+
+ if(isturf(turf_source))
+ // 3D sounds, the technology is here!
+ var/turf/T = get_turf(src)
+ var/dx = turf_source.x - T.x // Hearing from the right/left
+
+ S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1)
+
+ var/dz = turf_source.y - T.y // Hearing from infront/behind
+ S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1)
+
+ // The y value is for above your head, but there is no ceiling in 2d spessmens.
+ S.y = 1
+ S.falloff = (falloff ? falloff : FALLOFF_SOUNDS)
src << S
/client/proc/playtitlemusic()
if(!ticker || !ticker.login_music) return
if(prefs.toggles & SOUND_LOBBY)
- src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
\ No newline at end of file
+ src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
+
+/proc/get_rand_frequency()
+ return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
+
+/proc/get_sfx(soundin)
+ if(istext(soundin))
+ switch(soundin)
+ if ("shatter") soundin = pick(shatter_sound)
+ if ("explosion") soundin = pick(explosion_sound)
+ if ("sparks") soundin = pick(spark_sound)
+ if ("rustle") soundin = pick(rustle_sound)
+ if ("punch") soundin = pick(punch_sound)
+ if ("clownstep") soundin = pick(clown_sound)
+ if ("swing_hit") soundin = pick(swing_hit_sound)
+ if ("hiss") soundin = pick(hiss_sound)
+ if ("pageturn") soundin = pick(page_sound)
+ //if ("gunshot") soundin = pick(gun_sound)
+ return soundin
\ No newline at end of file
diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm
index ea9446e2d0..f28b649ba7 100644
--- a/code/game/supplyshuttle.dm
+++ b/code/game/supplyshuttle.dm
@@ -1,8 +1,8 @@
//Config stuff
#define SUPPLY_DOCKZ 2 //Z-level of the Dock.
#define SUPPLY_STATIONZ 1 //Z-level of the Station.
-#define SUPPLY_STATION_AREATYPE /area/supply/station //Type of the supply shuttle area for station
-#define SUPPLY_DOCK_AREATYPE /area/supply/dock //Type of the supply shuttle area for dock
+#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station
+#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock
var/datum/controller/supply_shuttle/supply_shuttle = new()
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 1302f65bdb..57e9aab94c 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -195,8 +195,6 @@
if(L)
del L
-var/turf_light_data/old_lights = new
-
//Creates a new turf
/turf/proc/ChangeTurf(var/turf/N)
if (!N)
@@ -216,12 +214,10 @@ var/turf_light_data/old_lights = new
return W
///// Z-Level Stuff
+ var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
+
//world << "Replacing [src.type] with [N]"
- var/old_opacity = opacity
-
- old_lights.copy_from(src)
-
if(connections) connections.erase_all()
if(istype(src,/turf/simulated))
@@ -242,12 +238,10 @@ var/turf_light_data/old_lights = new
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
//W.Assimilate_Air()
- old_lights.copy_to(W)
- W.ResetAllLights()
-
- if(old_opacity)
- W.opacity = 1
- W.SetOpacity(0)
+ W.lighting_lumcount += old_lumcount
+ if(old_lumcount != W.lighting_lumcount)
+ W.lighting_changed = 1
+ lighting_controller.changed_turfs += W
if (istype(W,/turf/simulated/floor))
W.RemoveLattice()
@@ -265,9 +259,10 @@ var/turf_light_data/old_lights = new
// zone.SetStatus(ZONE_ACTIVE)
var/turf/W = new N( locate(src.x, src.y, src.z) )
-
- old_lights.copy_to(W)
- W.ResetAllLights()
+ W.lighting_lumcount += old_lumcount
+ if(old_lumcount != W.lighting_lumcount)
+ W.lighting_changed = 1
+ lighting_controller.changed_turfs += W
if(air_master)
air_master.mark_for_update(src)
diff --git a/code/global.dm b/code/global.dm
index 3c6704b456..b7f6e3e4c0 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -115,8 +115,8 @@ var/list/reg_dna = list( )
var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
-var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
-var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
+var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
+var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
var/shuttle_z = 2 //default
var/airtunnel_start = 68 // default
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index 4f0c356dc5..9548c279a0 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -34,8 +34,8 @@ world/IsBanned(key,address,computer_id)
var/ckeytext = ckey(key)
if(!establish_db_connection())
- world.log << "Ban database connection failure. Key [ckeytext] not checked"
- diary << "Ban database connection failure. Key [ckeytext] not checked"
+ error("Ban database connection failure. Key [ckeytext] not checked")
+ log_misc("Ban database connection failure. Key [ckeytext] not checked")
return
var/failedcid = 1
diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm
index ea70d02375..efa835b25e 100644
--- a/code/modules/admin/ToRban.dm
+++ b/code/modules/admin/ToRban.dm
@@ -22,7 +22,7 @@
/proc/ToRban_update()
spawn(0)
- diary << "Downloading updated ToR data..."
+ log_misc("Downloading updated ToR data...")
var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses")
var/list/rawlist = file2list(http["CONTENT"])
@@ -36,10 +36,10 @@
if(!cleaned) continue
F[cleaned] << 1
F["last_update"] << world.realtime
- diary << "ToR data updated!"
+ log_misc("ToR data updated!")
if(usr) usr << "ToRban updated."
return 1
- diary << "ToR data update aborted: no data."
+ log_misc("ToR data update aborted: no data.")
return 0
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
@@ -85,4 +85,4 @@
return
#undef TORFILE
-#undef TOR_UPDATE_INTERVAL
\ No newline at end of file
+#undef TOR_UPDATE_INTERVAL
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index 86624e0bd2..5e8af02474 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -103,8 +103,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
establish_db_connection()
if(!dbcon.IsConnected())
- world.log << "Failed to connect to database in load_admins(). Reverting to legacy system."
- diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
+ error("Failed to connect to database in load_admins(). Reverting to legacy system.")
+ log_misc("Failed to connect to database in load_admins(). Reverting to legacy system.")
config.admin_legacy_system = 1
load_admins()
return
@@ -123,8 +123,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
//find the client for a ckey if they are connected and associate them with the new admin datum
D.associate(directory[ckey])
if(!admin_datums)
- world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
- diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
+ error("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
+ log_misc("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
config.admin_legacy_system = 1
load_admins()
return
diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm
index 42326711d3..7819c9a582 100644
--- a/code/modules/admin/banjob.dm
+++ b/code/modules/admin/banjob.dm
@@ -66,8 +66,8 @@ DEBUG
log_admin("jobban_keylist was empty")
else
if(!establish_db_connection())
- world.log << "Database connection failed. Reverting to the legacy ban system."
- diary << "Database connection failed. Reverting to the legacy ban system."
+ error("Database connection failed. Reverting to the legacy ban system.")
+ log_misc("Database connection failed. Reverting to the legacy ban system.")
config.ban_legacy_system = 1
jobban_loadbanfile()
return
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index 8ac25dc9b0..3191614b09 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -35,7 +35,7 @@
icon_state = "night"
item_state = "glasses"
origin_tech = "magnets=2"
- darkness_view = 3
+ darkness_view = 7
/obj/item/clothing/glasses/eyepatch
name = "eyepatch"
diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm
index 385249e925..57420bbfe0 100644
--- a/code/modules/clothing/masks/miscellaneous.dm
+++ b/code/modules/clothing/masks/miscellaneous.dm
@@ -21,7 +21,7 @@
desc = "A sterile mask designed to help prevent the spread of diseases."
icon_state = "sterile"
item_state = "sterile"
- w_class = 1
+ w_class = 2
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
gas_transfer_coefficient = 0.90
permeability_coefficient = 0.01
diff --git a/code/modules/clothing/under/chameleon.dm b/code/modules/clothing/under/chameleon.dm
index 46dbba3838..fe9da8744d 100644
--- a/code/modules/clothing/under/chameleon.dm
+++ b/code/modules/clothing/under/chameleon.dm
@@ -1,3 +1,7 @@
+//*****************
+//**Cham Jumpsuit**
+//*****************
+
/obj/item/clothing/under/chameleon
//starts off as black
name = "black jumpsuit"
@@ -6,60 +10,35 @@
item_color = "black"
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
origin_tech = "syndicate=3"
- siemens_coefficient = 0.8
var/list/clothing_choices = list()
New()
..()
- for(var/U in typesof(/obj/item/clothing/under/color)-(/obj/item/clothing/under/color))
+ var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/cloud,
+ /obj/item/clothing/under/golem, /obj/item/clothing/under/gimmick)//Prevent infinite loops and bad jumpsuits.
+ for(var/U in typesof(/obj/item/clothing/under)-blocked)
var/obj/item/clothing/under/V = new U
- src.clothing_choices += V
-
- for(var/U in typesof(/obj/item/clothing/under/rank)-(/obj/item/clothing/under/rank))
- var/obj/item/clothing/under/V = new U
- src.clothing_choices += V
+ src.clothing_choices[V.name] = U
return
-
- attackby(obj/item/clothing/under/U as obj, mob/user as mob)
- ..()
- if(istype(U, /obj/item/clothing/under/chameleon))
- user << "\red Nothing happens."
- return
- if(istype(U, /obj/item/clothing/under))
- if(src.clothing_choices.Find(U))
- user << "\red Pattern is already recognised by the suit."
- return
- src.clothing_choices += U
- user << "\red Pattern absorbed by the suit."
-
-
emp_act(severity)
name = "psychedelic"
desc = "Groovy!"
icon_state = "psyche"
item_color = "psyche"
- spawn(200)
- name = "Black Jumpsuit"
- icon_state = "bl_suit"
- item_color = "black"
- desc = null
- ..()
-
+ update_icon()
+ usr.update_inv_w_uniform()
verb/change()
- set name = "Change Color"
+ set name = "Change Jumpsuit Appearance"
set category = "Object"
set src in usr
- if(icon_state == "psyche")
- usr << "\red Your suit is malfunctioning"
- return
-
- var/obj/item/clothing/under/A
- A = input("Select Colour to change it to", "BOOYEA", A) in clothing_choices
- if(!A)
+ var/picked = input("Select jumpsuit to change it to", "Chameleon Jumpsuit")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
desc = null
permeability_coefficient = 0.90
@@ -69,14 +48,415 @@
icon_state = A.icon_state
item_state = A.item_state
item_color = A.item_color
- usr.update_inv_w_uniform() //so our overlays update.
+ if(usr)
+ usr.update_inv_w_uniform() //so our overlays update.
+//*****************
+//**Chameleon Hat**
+//*****************
+/obj/item/clothing/head/chameleon
+ name = "grey cap"
+ icon_state = "greysoft"
+ item_state = "greysoft"
+ item_color = "grey"
+ desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
-/obj/item/clothing/under/chameleon/all/New()
- ..()
- var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/chameleon/all)
- //to prevent an infinite loop
- for(var/U in typesof(/obj/item/clothing/under)-blocked)
- var/obj/item/clothing/under/V = new U
- src.clothing_choices += V
+ New()
+ ..()
+ var/blocked = list(/obj/item/clothing/head/chameleon,
+ /obj/item/clothing/head/space/golem, /obj/item/clothing/head/justice,)//Prevent infinite loops and bad hats.
+ for(var/U in typesof(/obj/item/clothing/head)-blocked)
+ var/obj/item/clothing/head/V = new U
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "grey cap"
+ desc = "It's a baseball hat in a tasteful grey colour."
+ icon_state = "greysoft"
+ item_color = "grey"
+ update_icon()
+ usr.update_inv_head()
+
+ verb/change()
+ set name = "Change Hat/Helmet Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select headwear to change it to", "Chameleon Hat")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ item_color = A.item_color
+ flags_inv = A.flags_inv
+ if(usr)
+ usr.update_inv_head() //so our overlays update.
+
+//******************
+//**Chameleon Suit**
+//******************
+
+/obj/item/clothing/suit/chameleon
+ name = "armor"
+ icon_state = "armor"
+ item_state = "armor"
+ desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/space/space_ninja,
+ /obj/item/clothing/suit/golem, /obj/item/clothing/suit/suit, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
+ /obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits.
+ for(var/U in typesof(/obj/item/clothing/suit)-blocked)
+ var/obj/item/clothing/suit/V = new U
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "armor"
+ desc = "An armored vest that protects against some damage."
+ icon_state = "armor"
+ item_color = "armor"
+ update_icon()
+ usr.update_inv_wear_suit()
+
+ verb/change()
+ set name = "Change Exosuit Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select exosuit to change it to", "Chameleon Exosuit")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ item_color = A.item_color
+ flags_inv = A.flags_inv
+ if(usr)
+ usr.update_inv_wear_suit() //so our overlays update.
+
+//*******************
+//**Chameleon Shoes**
+//*******************
+/obj/item/clothing/shoes/chameleon
+ name = "black shoes"
+ icon_state = "black"
+ item_state = "black"
+ item_color = "black"
+ desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/clothing/shoes/chameleon,
+ /obj/item/clothing/shoes/golem, /obj/item/clothing/shoes/syndigaloshes, /obj/item/clothing/shoes/cyborg)//prevent infinite loops and bad shoes.
+ for(var/U in typesof(/obj/item/clothing/shoes)-blocked)
+ var/obj/item/clothing/shoes/V = new U
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "black shoes"
+ desc = "A pair of black shoes."
+ icon_state = "black"
+ item_state = "black"
+ item_color = "black"
+ update_icon()
+ usr.update_inv_shoes()
+
+ verb/change()
+ set name = "Change Footwear Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select shoes to change it to", "Chameleon Shoes")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ item_color = A.item_color
+ if(usr)
+ usr.update_inv_shoes() //so our overlays update.
+
+//**********************
+//**Chameleon Backpack**
+//**********************
+/obj/item/weapon/storage/backpack/chameleon
+ name = "backpack"
+ icon_state = "backpack"
+ item_state = "backpack"
+ desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/weapon/storage/backpack/chameleon, /obj/item/weapon/storage/backpack/satchel/withwallet)
+ for(var/U in typesof(/obj/item/weapon/storage/backpack)-blocked)//Prevent infinite loops and bad backpacks.
+ var/obj/item/weapon/storage/backpack/V = new U
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "backpack"
+ desc = "You wear this on your back and put items into it."
+ icon_state = "backpack"
+ item_state = "backpack"
+ update_icon()
+ usr.update_inv_back()
+
+ verb/change()
+ set name = "Change Backpack Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select backpack to change it to", "Chameleon Backpack")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/weapon/storage/backpack/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ item_color = A.item_color
+ if(usr)
+ usr.update_inv_back() //so our overlays update.
+
+//********************
+//**Chameleon Gloves**
+//********************
+
+/obj/item/clothing/gloves/chameleon
+ name = "black gloves"
+ icon_state = "black"
+ item_state = "bgloves"
+ item_color = "brown"
+ desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/clothing/gloves/chameleon)//Prevent infinite loops and bad hats.
+ for(var/U in typesof(/obj/item/clothing/gloves)-blocked)
+ var/obj/item/clothing/gloves/V = new U
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "black gloves"
+ desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
+ icon_state = "black"
+ item_color = "brown"
+ update_icon()
+ usr.update_inv_gloves()
+
+ verb/change()
+ set name = "Change Gloves Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select gloves to change it to", "Chameleon Gloves")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ item_color = A.item_color
+ flags_inv = A.flags_inv
+ if(usr)
+ usr.update_inv_gloves() //so our overlays update.
+
+//******************
+//**Chameleon Mask**
+//******************
+
+/obj/item/clothing/mask/chameleon
+ name = "gas mask"
+ icon_state = "gas_alt"
+ item_state = "gas_alt"
+ desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/clothing/mask/chameleon)//Prevent infinite loops and bad hats.
+ for(var/U in typesof(/obj/item/clothing/mask)-blocked)
+ var/obj/item/clothing/mask/V = new U
+ if(V)
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "gas mask"
+ desc = "It's a gas mask."
+ icon_state = "gas_alt"
+ update_icon()
+ usr.update_inv_wear_mask()
+ verb/change()
+ set name = "Change Mask Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select mask to change it to", "Chameleon Mask")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ flags_inv = A.flags_inv
+ if(usr)
+ usr.update_inv_wear_mask() //so our overlays update.
+
+//*********************
+//**Chameleon Glasses**
+//*********************
+
+/obj/item/clothing/glasses/chameleon
+ name = "Optical Meson Scanner"
+ icon_state = "meson"
+ item_state = "glasses"
+ desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside."
+ origin_tech = "syndicate=3"
+ var/list/clothing_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/clothing/glasses/chameleon)//Prevent infinite loops and bad hats.
+ for(var/U in typesof(/obj/item/clothing/glasses)-blocked)
+ var/obj/item/clothing/glasses/V = new U
+ src.clothing_choices[V.name] = U
+ return
+
+ emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
+ name = "Optical Meson Scanner"
+ desc = "It's a set of mesons."
+ icon_state = "meson"
+ update_icon()
+ usr.update_inv_glasses()
+
+ verb/change()
+ set name = "Change Glasses Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select glasses to change it to", "Chameleon Glasses")as null|anything in clothing_choices
+ if(!picked || !clothing_choices[picked])
+ return
+ var/newtype = clothing_choices[picked]
+ var/obj/item/clothing/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ flags_inv = A.flags_inv
+ if(usr)
+ usr.update_inv_glasses() //so our overlays update.
+
+//*****************
+//**Chameleon Gun**
+//*****************
+/obj/item/weapon/gun/projectile/chameleon
+ name = "desert eagle"
+ desc = "A fake Desert Eagle with a dial on the side to change the gun's disguise."
+ icon_state = "deagle"
+ w_class = 3.0
+ max_shells = 7
+ caliber = ".45"
+ origin_tech = "combat=2;materials=2;syndicate=8"
+ ammo_type = "/obj/item/ammo_casing/chameleon"
+ var/list/gun_choices = list()
+
+ New()
+ ..()
+ var/blocked = list(/obj/item/weapon/gun/projectile/chameleon)
+ for(var/U in typesof(/obj/item/weapon/gun/)-blocked)
+ var/obj/item/weapon/gun/V = new U
+ src.gun_choices[V.name] = U
+ return
+
+ emp_act(severity)
+ name = "desert eagle"
+ desc = "It's a desert eagle."
+ icon_state = "deagle"
+ update_icon()
+ usr.update_inv_r_hand()
+ usr.update_inv_l_hand()
+
+ verb/change()
+ set name = "Change Gun Appearance"
+ set category = "Object"
+ set src in usr
+
+ var/picked = input("Select gun to change it to", "Chameleon Gun")as null|anything in gun_choices
+ if(!picked || !gun_choices[picked])
+ return
+ var/newtype = gun_choices[picked]
+ var/obj/item/weapon/gun/A = new newtype
+
+ desc = null
+ permeability_coefficient = 0.90
+
+ desc = A.desc
+ name = A.name
+ icon_state = A.icon_state
+ item_state = A.item_state
+ flags_inv = A.flags_inv
+ if(usr)
+ usr.update_inv_r_hand()
+ usr.update_inv_l_hand() //so our overlays update.
\ No newline at end of file
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index 7b18520f3a..f5de6d76f6 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -762,7 +762,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "mara_kilpatrick_1"
flags = FPRINT|TABLEPASS
- w_class = 1
+ w_class = 2
////// Small locket - Altair An-Nasaqan - Serithi
@@ -775,7 +775,7 @@
item_color = "altair_locket"
slot_flags = 0
flags = FPRINT|TABLEPASS
- w_class = 1
+ w_class = 2
slot_flags = SLOT_MASK
////// Silver locket - Konaa Hirano - Konaa_Hirano
@@ -789,7 +789,7 @@
item_color = "konaahirano"
slot_flags = 0
flags = FPRINT|TABLEPASS
- w_class = 1
+ w_class = 2
slot_flags = SLOT_MASK
var/obj/item/held //Item inside locket.
@@ -819,7 +819,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "nasir_khayyam_1"
flags = FPRINT|TABLEPASS
- w_class = 1
+ w_class = 2
slot_flags = SLOT_MASK
////// Emerald necklace - Ty Foster - Nega
@@ -830,7 +830,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "ty_foster"
flags = FPRINT|TABLEPASS
- w_class = 1
+ w_class = 2
////// Apollon Pendant - Michael Guess - Dragor23
/obj/item/clothing/mask/michael_guess_1
@@ -839,7 +839,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "michael_guess_1"
flags = FPRINT|TABLEPASS
- w_class = 1
+ w_class = 2
slot_flags = SLOT_MASK
//////////// Shoes ////////////
diff --git a/code/modules/detectivework/evidence.dm b/code/modules/detectivework/evidence.dm
index 0c41441781..7148a5afed 100644
--- a/code/modules/detectivework/evidence.dm
+++ b/code/modules/detectivework/evidence.dm
@@ -6,7 +6,7 @@
icon = 'icons/obj/storage.dmi'
icon_state = "evidenceobj"
item_state = ""
- w_class = 1
+ w_class = 2
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob, proximity)
if(!proximity) return
diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm
index 356015c6c0..481f9f8b42 100644
--- a/code/modules/economy/cash.dm
+++ b/code/modules/economy/cash.dm
@@ -11,7 +11,7 @@
throwforce = 1.0
throw_speed = 1
throw_range = 2
- w_class = 1.0
+ w_class = 2.0
var/access = list()
access = access_crate_cash
var/worth = 0
diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm
index 594136bb2e..36cd914f27 100644
--- a/code/modules/food/recipes_microwave.dm
+++ b/code/modules/food/recipes_microwave.dm
@@ -207,7 +207,7 @@ I said no!
/datum/recipe/donkpocket
items = list(
/obj/item/weapon/reagent_containers/food/snacks/dough,
- /obj/item/weapon/reagent_containers/food/snacks/faggot
+ /obj/item/weapon/reagent_containers/food/snacks/meatball
)
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
@@ -619,7 +619,7 @@ I said no!
/datum/recipe/meatballsoup
reagents = list("water" = 10)
items = list(
- /obj/item/weapon/reagent_containers/food/snacks/faggot ,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball ,
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot,
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
)
@@ -887,8 +887,8 @@ I said no!
reagents = list("water" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/spagetti,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/meatballspagetti
@@ -896,10 +896,10 @@ I said no!
reagents = list("water" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/spagetti,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/spesslaw
@@ -1084,7 +1084,7 @@ I said no!
/datum/recipe/sausage
items = list(
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
/obj/item/weapon/reagent_containers/food/snacks/cutlet,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sausage
@@ -1185,7 +1185,7 @@ I said no!
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
- /obj/item/weapon/reagent_containers/food/snacks/faggot,
+ /obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
make_food(var/obj/container as obj)
@@ -1215,6 +1215,12 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/tofurkey
+// Fuck Science!
+/datum/recipe/ruinedvirusdish
+ items = list(
+ /obj/item/weapon/virusdish
+ )
+ result = /obj/item/weapon/ruinedvirusdish
//////////////////////////////////////////
// bs12 food port stuff
@@ -1240,11 +1246,11 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/flatbread
-/datum/recipe/faggot
+/datum/recipe/meatball
items = list(
- /obj/item/weapon/reagent_containers/food/snacks/rawfaggot
+ /obj/item/weapon/reagent_containers/food/snacks/rawmeatball
)
- result = /obj/item/weapon/reagent_containers/food/snacks/faggot
+ result = /obj/item/weapon/reagent_containers/food/snacks/meatball
/datum/recipe/cutlet
items = list(
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 3c045350aa..26de93122b 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -247,7 +247,7 @@
icon_state ="scanner"
throw_speed = 1
throw_range = 5
- w_class = 1.0
+ w_class = 2.0
flags = FPRINT | TABLEPASS
var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this
var/obj/item/weapon/book/book // Currently scanned book
diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm
index 313ae1cf1b..01e009232d 100644
--- a/code/modules/mining/machine_processing.dm
+++ b/code/modules/mining/machine_processing.dm
@@ -1,3 +1,12 @@
+#define ORE_PROC_GOLD 1
+#define ORE_PROC_SILVER 2
+#define ORE_PROC_DIAMOND 4
+#define ORE_PROC_GLASS 8
+#define ORE_PROC_PLASMA 16
+#define ORE_PROC_URANIUM 32
+#define ORE_PROC_IRON 64
+#define ORE_PROC_CLOWN 128
+
/**********************Mineral processing unit console**************************/
/obj/machinery/mineral/processing_unit_console
@@ -32,84 +41,83 @@
//iron
if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown || machine.ore_adamantine)
if(machine.ore_iron)
- if (machine.selected_iron==1)
+ if (machine.selected & ORE_PROC_IRON)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Iron: [machine.ore_iron] ")
else
- machine.selected_iron = 0
+ machine.selected &= ~ORE_PROC_IRON
//sand - glass
if(machine.ore_glass)
- if (machine.selected_glass==1)
+ if (machine.selected & ORE_PROC_GLASS)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Sand: [machine.ore_glass] ")
else
- machine.selected_glass = 0
+ machine.selected &= ~ORE_PROC_GLASS
//plasma
if(machine.ore_plasma)
- if (machine.selected_plasma==1)
+ if (machine.selected & ORE_PROC_PLASMA)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Plasma: [machine.ore_plasma] ")
else
- machine.selected_plasma = 0
+ machine.selected &= ~ORE_PROC_PLASMA
//uranium
if(machine.ore_uranium)
- if (machine.selected_uranium==1)
+ if (machine.selected & ORE_PROC_URANIUM)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Uranium: [machine.ore_uranium] ")
else
- machine.selected_uranium = 0
+ machine.selected &= ~ORE_PROC_URANIUM
//gold
if(machine.ore_gold)
- if (machine.selected_gold==1)
+ if (machine.selected & ORE_PROC_GOLD)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Gold: [machine.ore_gold] ")
else
- machine.selected_gold = 0
+ machine.selected &= ~ORE_PROC_GOLD
//silver
if(machine.ore_silver)
- if (machine.selected_silver==1)
+ if (machine.selected & ORE_PROC_SILVER)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Silver: [machine.ore_silver] ")
else
- machine.selected_silver = 0
+ machine.selected &= ~ORE_PROC_SILVER
//diamond
if(machine.ore_diamond)
- if (machine.selected_diamond==1)
+ if (machine.selected & ORE_PROC_DIAMOND)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Diamond: [machine.ore_diamond] ")
else
- machine.selected_diamond = 0
+ machine.selected &= ~ORE_PROC_DIAMOND
//bananium
if(machine.ore_clown)
- if (machine.selected_clown==1)
+ if (machine.selected & ORE_PROC_CLOWN)
dat += text("Smelting ")
else
dat += text("Not smelting ")
dat += text("Bananium: [machine.ore_clown] ")
else
- machine.selected_clown = 0
-
+ machine.selected &= ~ORE_PROC_CLOWN
//On or off
dat += text("Machine is currently ")
@@ -132,44 +140,45 @@
src.add_fingerprint(usr)
if(href_list["sel_iron"])
if (href_list["sel_iron"] == "yes")
- machine.selected_iron = 1
+ machine.selected |= ORE_PROC_IRON
else
- machine.selected_iron = 0
+ machine.selected &= ~ORE_PROC_IRON
if(href_list["sel_glass"])
if (href_list["sel_glass"] == "yes")
- machine.selected_glass = 1
+ machine.selected |= ORE_PROC_GLASS
else
- machine.selected_glass = 0
+ machine.selected &= ~ORE_PROC_GLASS
if(href_list["sel_plasma"])
if (href_list["sel_plasma"] == "yes")
- machine.selected_plasma = 1
+ machine.selected |= ORE_PROC_PLASMA
else
- machine.selected_plasma = 0
+ machine.selected &= ~ORE_PROC_PLASMA
if(href_list["sel_uranium"])
if (href_list["sel_uranium"] == "yes")
- machine.selected_uranium = 1
+ machine.selected |= ORE_PROC_URANIUM
else
- machine.selected_uranium = 0
+ machine.selected &= ~ORE_PROC_URANIUM
if(href_list["sel_gold"])
if (href_list["sel_gold"] == "yes")
- machine.selected_gold = 1
+ machine.selected |= ORE_PROC_GOLD
else
- machine.selected_gold = 0
+ machine.selected &= ~ORE_PROC_GOLD
if(href_list["sel_silver"])
if (href_list["sel_silver"] == "yes")
- machine.selected_silver = 1
+ machine.selected |= ORE_PROC_SILVER
else
- machine.selected_silver = 0
+ machine.selected &= ~ORE_PROC_SILVER
if(href_list["sel_diamond"])
if (href_list["sel_diamond"] == "yes")
- machine.selected_diamond = 1
+ machine.selected |= ORE_PROC_DIAMOND
else
- machine.selected_diamond = 0
+ machine.selected &= ~ORE_PROC_DIAMOND
if(href_list["sel_clown"])
if (href_list["sel_clown"] == "yes")
- machine.selected_clown = 1
+ machine.selected |= ORE_PROC_CLOWN
else
- machine.selected_clown = 0
+ machine.selected &= ~ORE_PROC_CLOWN
+
if(href_list["set_on"])
if (href_list["set_on"] == "on")
machine.on = 1
@@ -187,6 +196,7 @@
icon_state = "furnace"
density = 1
anchored = 1.0
+ luminosity = 3 //Big fire with window, yeah it puts out a little light.
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
var/obj/machinery/mineral/CONSOLE = null
@@ -199,6 +209,8 @@
var/ore_iron = 0;
var/ore_clown = 0;
var/ore_adamantine = 0;
+ var/selected = 0
+/*
var/selected_gold = 0
var/selected_silver = 0
var/selected_diamond = 0
@@ -207,8 +219,10 @@
var/selected_uranium = 0
var/selected_iron = 0
var/selected_clown = 0
+*/
var/on = 0 //0 = off, 1 =... oh you know!
+
/obj/machinery/mineral/processing_unit/New()
..()
spawn( 5 )
@@ -227,14 +241,17 @@
var/i
for (i = 0; i < 10; i++)
if (on)
- if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+
+
+
+ if (selected == ORE_PROC_GLASS)
if (ore_glass > 0)
ore_glass--;
new /obj/item/stack/sheet/glass(output.loc)
else
on = 0
continue
- if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
+ if (selected == ORE_PROC_GLASS + ORE_PROC_IRON)
if (ore_glass > 0 && ore_iron > 0)
ore_glass--;
ore_iron--;
@@ -242,49 +259,49 @@
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ if (selected == ORE_PROC_GOLD)
if (ore_gold > 0)
ore_gold--;
new /obj/item/stack/sheet/mineral/gold(output.loc)
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ if (selected == ORE_PROC_SILVER)
if (ore_silver > 0)
ore_silver--;
new /obj/item/stack/sheet/mineral/silver(output.loc)
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ if (selected == ORE_PROC_DIAMOND)
if (ore_diamond > 0)
ore_diamond--;
new /obj/item/stack/sheet/mineral/diamond(output.loc)
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ if (selected == ORE_PROC_PLASMA)
if (ore_plasma > 0)
ore_plasma--;
new /obj/item/stack/sheet/mineral/plasma(output.loc)
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
+ if (selected == ORE_PROC_URANIUM)
if (ore_uranium > 0)
ore_uranium--;
new /obj/item/stack/sheet/mineral/uranium(output.loc)
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
+ if (selected == ORE_PROC_IRON)
if (ore_iron > 0)
ore_iron--;
new /obj/item/stack/sheet/metal(output.loc)
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
+ if (selected == ORE_PROC_IRON + ORE_PROC_PLASMA)
if (ore_iron > 0 && ore_plasma > 0)
ore_iron--;
ore_plasma--;
@@ -292,20 +309,23 @@
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
+ if (selected == ORE_PROC_CLOWN)
if (ore_clown > 0)
ore_clown--;
new /obj/item/stack/sheet/mineral/clown(output.loc)
else
on = 0
- if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ continue
+ /*
+ if (selected == ORE_PROC_GLASS + ORE_PROC_PLASMA)
if (ore_glass > 0 && ore_plasma > 0)
ore_glass--;
ore_plasma--;
new /obj/item/stack/sheet/glass/plasmaglass(output.loc)
else
on = 0
- if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
+ continue
+ if (selected == ORE_PROC_GLASS + ORE_PROC_IRON + ORE_PROC_PLASMA)
if (ore_glass > 0 && ore_plasma > 0 && ore_iron > 0)
ore_glass--;
ore_iron--;
@@ -314,10 +334,10 @@
else
on = 0
continue
- //THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
- //They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
- //Iamgoofball here, this comment I'm typing right now was made in 11/1/2013. If you're reading this in 2020, then please let me know if the world has gone into a nuclear apocalypse. Also Urist has been tried and hung for how lazy he was. That and he was jaywalking.
- /*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
+ */
+
+
+ if (selected == ORE_PROC_URANIUM + ORE_PROC_DIAMOND)
if (ore_uranium >= 2 && ore_diamond >= 1)
ore_uranium -= 2
ore_diamond -= 1
@@ -325,62 +345,63 @@
else
on = 0
continue
- if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
+ if (selected == ORE_PROC_SILVER + ORE_PROC_PLASMA)
if (ore_silver >= 1 && ore_plasma >= 3)
ore_silver -= 1
ore_plasma -= 3
new /obj/item/stack/sheet/mineral/mythril(output.loc)
else
on = 0
- continue*/
+ continue
+
//if a non valid combination is selected
var/b = 1 //this part checks if all required ores are available
- if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
+ if (!selected)
b = 0
- if (selected_gold == 1)
+ if (selected & ORE_PROC_GOLD)
if (ore_gold <= 0)
b = 0
- if (selected_silver == 1)
+ if (selected & ORE_PROC_SILVER)
if (ore_silver <= 0)
b = 0
- if (selected_diamond == 1)
+ if (selected & ORE_PROC_DIAMOND)
if (ore_diamond <= 0)
b = 0
- if (selected_uranium == 1)
+ if (selected & ORE_PROC_URANIUM)
if (ore_uranium <= 0)
b = 0
- if (selected_plasma == 1)
+ if (selected & ORE_PROC_PLASMA)
if (ore_plasma <= 0)
b = 0
- if (selected_iron == 1)
+ if (selected & ORE_PROC_IRON)
if (ore_iron <= 0)
b = 0
- if (selected_glass == 1)
+ if (selected & ORE_PROC_GLASS)
if (ore_glass <= 0)
b = 0
- if (selected_clown == 1)
+ if (selected & ORE_PROC_CLOWN)
if (ore_clown <= 0)
b = 0
if (b) //if they are, deduct one from each, produce slag and shut the machine off
- if (selected_gold == 1)
+ if (selected & ORE_PROC_GOLD)
ore_gold--
- if (selected_silver == 1)
+ if (selected & ORE_PROC_SILVER)
ore_silver--
- if (selected_diamond == 1)
+ if (selected & ORE_PROC_DIAMOND)
ore_diamond--
- if (selected_uranium == 1)
+ if (selected & ORE_PROC_URANIUM)
ore_uranium--
- if (selected_plasma == 1)
+ if (selected & ORE_PROC_PLASMA)
ore_plasma--
- if (selected_iron == 1)
+ if (selected & ORE_PROC_IRON)
ore_iron--
- if (selected_clown == 1)
+ if (selected & ORE_PROC_CLOWN)
ore_clown--
new /obj/item/weapon/ore/slag(output.loc)
on = 0
@@ -397,44 +418,44 @@
if (istype(O,/obj/item/weapon/ore/iron))
ore_iron++;
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/glass))
ore_glass++;
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/diamond))
ore_diamond++;
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/plasma))
ore_plasma++
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/gold))
ore_gold++
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/silver))
ore_silver++
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/uranium))
ore_uranium++
O.loc = null
- del(O)
+ //del(O)
continue
if (istype(O,/obj/item/weapon/ore/clown))
ore_clown++
O.loc = null
- del(O)
+ //del(O)
continue
O.loc = src.output.loc
else
break
- return
\ No newline at end of file
+ return
diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm
index 86f844f623..138a42aaaa 100644
--- a/code/modules/mining/machine_stacking.dm
+++ b/code/modules/mining/machine_stacking.dm
@@ -242,85 +242,108 @@
/obj/machinery/mineral/stacking_machine/process()
if (src.output && src.input)
- var/obj/item/O
+ var/obj/item/stack/O
while (locate(/obj/item, input.loc))
- O = locate(/obj/item, input.loc)
+ O = locate(/obj/item/stack, input.loc)
+ if(isnull(O))
+ var/obj/item/I = locate(/obj/item, input.loc)
+ if (istype(I,/obj/item/weapon/ore/slag))
+ I.loc = null
+ else
+ I.loc = output.loc
+ continue
if (istype(O,/obj/item/stack/sheet/metal))
- ore_iron+= O:amount;
- del(O)
+ ore_iron+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
- ore_diamond+= O:amount;
- del(O)
+ ore_diamond+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
- ore_plasma+= O:amount
- del(O)
+ ore_plasma+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/gold))
- ore_gold+= O:amount
- del(O)
+ ore_gold+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/silver))
- ore_silver+= O:amount
- del(O)
+ ore_silver+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/clown))
- ore_clown+= O:amount
- del(O)
+ ore_clown+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
- ore_uranium+= O:amount
- del(O)
+ ore_uranium+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass/plasmaglass))
- ore_plasmaglass+= O:amount
- del(O)
+ ore_plasmaglass+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass/plasmarglass))
- ore_plasmarglass+= O:amount
- del(O)
+ ore_plasmarglass+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/glass))
- ore_glass+= O:amount
- del(O)
+ ore_glass+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/rglass))
- ore_rglass+= O:amount
- del(O)
+ ore_rglass+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/plasteel))
- ore_plasteel+= O:amount
- del(O)
+ ore_plasteel+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
- ore_adamantine+= O:amount
- del(O)
+ ore_adamantine+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/mineral/mythril))
- ore_mythril+= O:amount
- del(O)
+ ore_mythril+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/cardboard))
- ore_cardboard+= O:amount
- del(O)
+ ore_cardboard+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/wood))
- ore_wood+= O:amount
- del(O)
+ ore_wood+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/cloth))
- ore_cloth+= O:amount
- del(O)
+ ore_cloth+= O.amount
+ O.loc = null
+ //del(O)
continue
if (istype(O,/obj/item/stack/sheet/leather))
- ore_leather+= O:amount
- del(O)
- continue
- if (istype(O,/obj/item/weapon/ore/slag))
- del(O)
+ ore_leather+= O.amount
+ O.loc = null
+ //del(O)
continue
O.loc = src.output.loc
+
if (ore_gold >= stack_amt)
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold
G.amount = stack_amt
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index b01be5edf9..b59ec2114b 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -81,45 +81,46 @@
throwforce = 0.0
w_class = 1.0
var/string_attached
+ var/sides = 2
/obj/item/weapon/coin/New()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/weapon/coin/gold
- name = "Gold coin"
+ name = "gold coin"
icon_state = "coin_gold"
/obj/item/weapon/coin/silver
- name = "Silver coin"
+ name = "silver coin"
icon_state = "coin_silver"
/obj/item/weapon/coin/diamond
- name = "Diamond coin"
+ name = "diamond coin"
icon_state = "coin_diamond"
/obj/item/weapon/coin/iron
- name = "Iron coin"
+ name = "iron coin"
icon_state = "coin_iron"
/obj/item/weapon/coin/plasma
- name = "Solid plasma coin"
+ name = "solid plasma coin"
icon_state = "coin_plasma"
/obj/item/weapon/coin/uranium
- name = "Uranium coin"
+ name = "uranium coin"
icon_state = "coin_uranium"
/obj/item/weapon/coin/clown
- name = "Bananaium coin"
+ name = "bananaium coin"
icon_state = "coin_clown"
/obj/item/weapon/coin/adamantine
- name = "Adamantine coin"
+ name = "adamantine coin"
icon_state = "coin_adamantine"
/obj/item/weapon/coin/mythril
- name = "Mythril coin"
+ name = "mythril coin"
icon_state = "coin_mythril"
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -150,3 +151,13 @@
string_attached = null
user << "\blue You detach the string from the coin."
else ..()
+
+/obj/item/weapon/coin/attack_self(mob/user as mob)
+ var/result = rand(1, sides)
+ var/comment = ""
+ if(result == 1)
+ comment = "tails"
+ else if(result == 2)
+ comment = "heads"
+ user.visible_message("[user] has thrown the [src]. It lands on [comment]! ", \
+ "You throw the [src]. It lands on [comment]! ")
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index 93f56618a0..5e94ea9bc9 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -5,7 +5,7 @@
icon_state = "brain2"
flags = TABLEPASS
force = 1.0
- w_class = 1.0
+ w_class = 2.0
throwforce = 1.0
throw_speed = 3
throw_range = 5
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index feacbe4a98..0e6d130a56 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -195,17 +195,22 @@
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
- src.sleeping = max(0,src.sleeping-5)
- if(src.sleeping == 0)
- src.resting = 0
+
+ if(lying)
+ src.sleeping = max(0,src.sleeping-5)
+ if(src.sleeping == 0)
+ src.resting = 0
+ M.visible_message("[M] shakes [src] trying to wake [t_him] up!", \
+ "You shake [src] trying to wake [t_him] up!")
+ else
+ M.visible_message("[M] hugs [src] to make [t_him] feel better! ", \
+ "You hug [src] to make [t_him] feel better! ")
+
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
+
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- M.visible_message( \
- "\blue [M] shakes [src] trying to wake [t_him] up!", \
- "\blue You shake [src] trying to wake [t_him] up!", \
- )
/mob/living/carbon/proc/eyecheck()
return 0
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index fb82ca3e7e..018f154b86 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -58,6 +58,12 @@
dizziness = 0
jitteriness = 0
+
+ hud_updateflag |= 1 << HEALTH_HUD
+ hud_updateflag |= 1 << STATUS_HUD
+
+ handle_hud_list()
+
//Handle species-specific deaths.
if(species) species.handle_death(src)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 4efcb8de24..9cc0e22dfc 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -258,8 +258,9 @@
continue
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
- wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name]! \n"
- continue
+ if(!species.flags & IS_SYNTHETIC)
+ wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name]! \n"
+ continue
else
wound_flavor_text["[temp.display_name]"] = "[t_He] has a robot [temp.display_name], it has"
if(temp.brute_dam) switch(temp.brute_dam)
@@ -274,7 +275,8 @@
wound_flavor_text["[temp.display_name]"] += " some burns"
if(21 to INFINITY)
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
- wound_flavor_text["[temp.display_name]"] += "! \n"
+ if(wound_flavor_text["[temp.display_name]"])
+ wound_flavor_text["[temp.display_name]"] += "! \n"
else if(temp.wounds.len > 0)
var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds)
@@ -469,4 +471,4 @@
else
return 0
else
- return 0
\ No newline at end of file
+ return 0
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index aeb78fdeca..9e75b94987 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1096,7 +1096,7 @@
var/tdamage = 0
var/ticks = 0
while (germs < 2501 && ticks < 100000 && round(damage/10)*20)
- diary << "VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]"
+ log_misc("VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]")
ticks++
if (prob(round(damage/10)*20))
germs++
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 3996467013..623ea112b4 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -192,8 +192,9 @@
This function restores the subjects blood to max.
*/
/mob/living/carbon/human/proc/restore_blood()
- var/blood_volume = vessel.get_reagent_amount("blood")
- vessel.add_reagent("blood",560.0-blood_volume)
+ if(!species.flags & NO_BLOOD)
+ var/blood_volume = vessel.get_reagent_amount("blood")
+ vessel.add_reagent("blood",560.0-blood_volume)
/*
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index 4611dda0d8..6926adde9b 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -53,7 +53,10 @@
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
+ var/last_dam = -1 //Used for determining if we need to process all organs or just some or even none.
+ var/list/bad_external_organs = list()// organs we check until they are good.
+
var/xylophone = 0 //For the spoooooooky xylophone cooldown
var/mob/remoteview_target = null
- var/hand_blood_color
\ No newline at end of file
+ var/hand_blood_color
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 415095085f..867ccc72bc 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -104,11 +104,14 @@
handle_stasis_bag()
+ if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle
+ return //We go ahead and process them 5 times for HUD images and other stuff though.
+
//Handle temperature/pressure differences between body and environment
- handle_environment(environment)
+ handle_environment(environment) //Optimized a good bit.
//Status updates, death etc.
- handle_regular_status_updates() //TODO: optimise ~Carn NO SHIT ~Ccomp
+ handle_regular_status_updates() //Optimized a bit
update_canmove()
//Update our name based on whether our face is obscured/disfigured
@@ -182,7 +185,7 @@
if (prob(3))
switch(pick(1,2,3))
if(1)
- say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that faggot traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
+ say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that meatball traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
if(2)
say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!"))
if(3)
@@ -383,7 +386,7 @@
//spread some viruses while we are at it
if (virus2.len > 0)
- if (get_infection_chance(src) && prob(20))
+ if (prob(10) && get_infection_chance(src))
// log_debug("[src] : Exhaling some viruses")
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
@@ -575,25 +578,23 @@
else
loc_temp = environment.temperature
- //world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)] - Heat capacity: [environment_heat_capacity] - Location: [loc] - src: [src]"
+ if(abs(loc_temp - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE)
+ return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
//Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit.
if(stat != 2)
stabilize_temperature_from_calories()
- // log_debug("Adjusting to atmosphere.")
//After then, it reacts to the surrounding atmosphere based on your thermal protection
if(loc_temp < BODYTEMP_COLD_DAMAGE_LIMIT) //Place is colder than we are
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
- // log_debug("[loc_temp] is Cold. Cooling by [amt]")
bodytemperature += amt
else if (loc_temp > BODYTEMP_HEAT_DAMAGE_LIMIT) //Place is hotter than we are
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
if(thermal_protection < 1)
var/amt = min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
- // log_debug("[loc_temp] is Heat. Heating up by [amt]")
bodytemperature += amt
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
@@ -683,7 +684,7 @@
proc/stabilize_temperature_from_calories()
var/body_temperature_difference = 310.15 - bodytemperature
- if (abs(body_temperature_difference) < 0.01)
+ if (abs(body_temperature_difference) < 0.5)
return //fuck this precision
switch(bodytemperature)
if(-INFINITY to 260.15) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
@@ -900,7 +901,7 @@
var/turf/T = loc
var/area/A = T.loc
if(A)
- if(A.lighting_use_dynamic) light_amount = min(10,T.lit_value) - 5 //hardcapped so it's not abused by having a ton of flashlights
+ if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
traumatic_shock -= light_amount
@@ -920,7 +921,7 @@
var/turf/T = loc
var/area/A = T.loc
if(A)
- if(A.lighting_use_dynamic) light_amount = T.lit_value
+ if(A.lighting_use_dynamic) light_amount = T.lighting_lumcount
else light_amount = 10
if(light_amount > 2) //if there's enough light, start dying
take_overall_damage(1,1)
@@ -997,8 +998,8 @@
else //ALIVE. LIGHTS ARE ON
updatehealth() //TODO
if(!in_stasis)
- handle_organs()
- handle_blood()
+ handle_organs() //Optimized.
+ handle_blood()
if(health <= config.health_threshold_dead || brain_op_stage == 4.0)
death()
@@ -1075,7 +1076,7 @@
E = get_visible_implants(0)
if(!E.len)
embedded_flag = 0
-
+
//Eyes
if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own
@@ -1109,23 +1110,28 @@
if(stuttering)
stuttering = max(stuttering-1, 0)
- if (src.slurring)
+ if (slurring)
slurring = max(slurring-1, 0)
if(silent)
silent = max(silent-1, 0)
if(druggy)
druggy = max(druggy-1, 0)
-
+/*
// Increase germ_level regularly
if(prob(40))
germ_level += 1
// If you're dirty, your gloves will become dirty, too.
if(gloves && germ_level > gloves.germ_level && prob(10))
gloves.germ_level += 1
+*/
return 1
proc/handle_regular_hud_updates()
+ if(hud_updateflag)
+ handle_hud_list()
+
+
if(!client) return 0
if(hud_updateflag)
@@ -1136,7 +1142,7 @@
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
client.images.Remove(hud)
- client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
+ client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask, global_hud.nvg)
update_action_buttons()
@@ -1273,10 +1279,13 @@
var/obj/item/clothing/glasses/G = glasses
if(istype(G))
see_in_dark += G.darkness_view
- if(G.vision_flags)
+ if(G.vision_flags) // MESONS
sight |= G.vision_flags
if(!druggy)
see_invisible = SEE_INVISIBLE_MINIMUM
+ if(istype(G,/obj/item/clothing/glasses/night))
+ see_invisible = SEE_INVISIBLE_MINIMUM
+ client.screen += global_hud.nvg
/* HUD shit goes here, as long as it doesn't modify sight flags */
// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
@@ -1294,6 +1303,8 @@
else if(!seer)
see_invisible = SEE_INVISIBLE_LIVING
+
+
if(healths)
if (analgesic)
healths.icon_state = "health_health_numb"
@@ -1400,7 +1411,7 @@
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)
var/turf/currentTurf = loc
- if(!currentTurf.lit_value)
+ if(!currentTurf.lighting_lumcount)
playsound_local(src,pick(scarySounds),50, 1, -1)
proc/handle_virus_updates()
@@ -1412,30 +1423,35 @@
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
- for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
- if(B.virus2.len)
- for (var/ID in B.virus2)
- var/datum/disease2/disease/V = B.virus2[ID]
- infect_virus2(src,V)
+ for(var/obj/effect/decal/cleanable/O in view(1,src))
+ if(istype(O,/obj/effect/decal/cleanable/blood))
+ var/obj/effect/decal/cleanable/blood/B = O
+ if(B.virus2.len)
+ for (var/ID in B.virus2)
+ var/datum/disease2/disease/V = B.virus2[ID]
+ infect_virus2(src,V)
- for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
- if(M.virus2.len)
- for (var/ID in M.virus2)
- var/datum/disease2/disease/V = M.virus2[ID]
- infect_virus2(src,V)
+ else if(istype(O,/obj/effect/decal/cleanable/mucus))
+ var/obj/effect/decal/cleanable/mucus/M = O
+ if(M.virus2.len)
+ for (var/ID in M.virus2)
+ var/datum/disease2/disease/V = M.virus2[ID]
+ infect_virus2(src,V)
- for (var/ID in virus2)
- var/datum/disease2/disease/V = virus2[ID]
- if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
- CRASH("virus2 nulled before calling activate()")
- else
- V.activate(src)
- // activate may have deleted the virus
- if(!V) continue
- // check if we're immune
- if(V.antigen & src.antibodies)
- V.dead = 1
+ if(virus2.len)
+ for (var/ID in virus2)
+ var/datum/disease2/disease/V = virus2[ID]
+ if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
+ CRASH("virus2 nulled before calling activate()")
+ else
+ V.activate(src)
+ // activate may have deleted the virus
+ if(!V) continue
+
+ // check if we're immune
+ if(V.antigen & src.antibodies)
+ V.dead = 1
return
@@ -1587,7 +1603,7 @@
else if(status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
holder2.icon_state = "hudxeno"
- else if(foundVirus)
+ else if(foundVirus)
holder.icon_state = "hudill"
else if(has_brain_worms())
var/mob/living/simple_animal/borer/B = has_brain_worms()
@@ -1628,7 +1644,7 @@
var/obj/item/weapon/card/id/I = wear_id.GetID()
if(I)
perpname = I.registered_name
-
+
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
@@ -1649,7 +1665,7 @@
if(hud_updateflag & 1 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD)
var/image/holder1 = hud_list[IMPTRACK_HUD]
var/image/holder2 = hud_list[IMPLOYAL_HUD]
- var/image/holder3 = hud_list[IMPCHEM_HUD]
+ var/image/holder3 = hud_list[IMPCHEM_HUD]
holder1.icon_state = "hudblank"
holder2.icon_state = "hudblank"
@@ -1671,26 +1687,27 @@
if(hud_updateflag & 1 << SPECIALROLE_HUD)
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
- switch(mind.special_role)
- if("traitor","Syndicate")
- holder.icon_state = "hudsyndicate"
- if("Revolutionary")
- holder.icon_state = "hudrevolutionary"
- if("Head Revolutionary")
- holder.icon_state = "hudheadrevolutionary"
- if("Cultist")
- holder.icon_state = "hudcultist"
- if("Changeling")
- holder.icon_state = "hudchangeling"
- if("Wizard","Fake Wizard")
- holder.icon_state = "hudwizard"
- if("Death Commando")
- holder.icon_state = "huddeathsquad"
- if("Ninja")
- holder.icon_state = "hudninja"
+ if(mind)
- hud_list[SPECIALROLE_HUD] = holder
+ switch(mind.special_role)
+ if("traitor","Syndicate")
+ holder.icon_state = "hudsyndicate"
+ if("Revolutionary")
+ holder.icon_state = "hudrevolutionary"
+ if("Head Revolutionary")
+ holder.icon_state = "hudheadrevolutionary"
+ if("Cultist")
+ holder.icon_state = "hudcultist"
+ if("Changeling")
+ holder.icon_state = "hudchangeling"
+ if("Wizard","Fake Wizard")
+ holder.icon_state = "hudwizard"
+ if("Death Commando")
+ holder.icon_state = "huddeathsquad"
+ if("Ninja")
+ holder.icon_state = "hudninja"
+ hud_list[SPECIALROLE_HUD] = holder
hud_updateflag = 0
diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm
index e9f5761162..adeb4f903a 100644
--- a/code/modules/mob/living/carbon/monkey/inventory.dm
+++ b/code/modules/mob/living/carbon/monkey/inventory.dm
@@ -58,6 +58,8 @@
message = text("\red [] is trying to remove []'s internals ", source, target)
else
message = text("\red [] is trying to set on []'s internals. ", source, target)
+ if("pockets")
+ message = text("\red [] is trying to empty []'s pockets ",source, target)
else
for(var/mob/M in viewers(target, null))
M.show_message(message, 1)
@@ -233,4 +235,4 @@
W.layer = 20
- return
\ No newline at end of file
+ return
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index 30cd98d444..7e2d73abe4 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -22,15 +22,16 @@
if(loc)
environment = loc.return_air()
- if (stat != DEAD && !istype(src,/mob/living/carbon/monkey/diona)) //still breathing
- //First, resolve location and get a breath
- if(air_master.current_cycle%4==2)
- //Only try to take a breath every 4 seconds, unless suffocating
- breathe()
- else //Still give containing object the chance to interact
- if(istype(loc, /obj/))
- var/obj/location_as_object = loc
- location_as_object.handle_internal_lifeform(src, 0)
+ if (stat != DEAD)
+ if(!istype(src,/mob/living/carbon/monkey/diona)) //still breathing
+ //First, resolve location and get a breath
+ if(air_master.current_cycle%4==2)
+ //Only try to take a breath every 4 seconds, unless suffocating
+ breathe()
+ else //Still give containing object the chance to interact
+ if(istype(loc, /obj/))
+ var/obj/location_as_object = loc
+ location_as_object.handle_internal_lifeform(src, 0)
//Updates the number of stored chemicals for powers
@@ -77,6 +78,8 @@
if(prob(1))
emote(pick("scratch","jump","roll","tail"))
+ updatehealth()
+
/mob/living/carbon/monkey/calculate_affecting_pressure(var/pressure)
..()
@@ -131,7 +134,6 @@
heal_overall_damage(rads,rads)
adjustOxyLoss(-(rads))
adjustToxLoss(-(rads))
- updatehealth()
return
if (radiation > 100)
@@ -145,7 +147,6 @@
radiation--
if(prob(25))
adjustToxLoss(1)
- updatehealth()
if(50 to 74)
radiation -= 2
@@ -155,7 +156,6 @@
Weaken(3)
src << "\red You feel weak."
emote("collapse")
- updatehealth()
if(75 to 100)
radiation -= 3
@@ -165,7 +165,6 @@
randmutb(src)
domutcheck(src,null)
emote("gasp")
- updatehealth()
proc/handle_virus_updates()
if(status_flags & GODMODE) return 0 //godmode
@@ -175,30 +174,36 @@
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
+
+ for(var/obj/effect/decal/cleanable/O in view(1,src))
+ if(istype(O,/obj/effect/decal/cleanable/blood))
+ var/obj/effect/decal/cleanable/blood/B = O
+ if(B.virus2.len)
+ for (var/ID in B.virus2)
+ var/datum/disease2/disease/V = B.virus2[ID]
+ infect_virus2(src,V)
- for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
- if(B.virus2.len)
- for (var/ID in B.virus2)
- var/datum/disease2/disease/V = B.virus2[ID]
- infect_virus2(src,V)
- for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
- if(M.virus2.len)
- for (var/ID in M.virus2)
- var/datum/disease2/disease/V = M.virus2[ID]
- infect_virus2(src,V)
+ else if(istype(O,/obj/effect/decal/cleanable/mucus))
+ var/obj/effect/decal/cleanable/mucus/M = O
- for (var/ID in virus2)
- var/datum/disease2/disease/V = virus2[ID]
- if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
- CRASH("virus2 nulled before calling activate()")
- else
- V.activate(src)
- // activate may have deleted the virus
- if(!V) continue
+ if(M.virus2.len)
+ for (var/ID in M.virus2)
+ var/datum/disease2/disease/V = M.virus2[ID]
+ infect_virus2(src,V)
- // check if we're immune
- if(V.antigen & src.antibodies)
- V.dead = 1
+ if(virus2.len)
+ for (var/ID in virus2)
+ var/datum/disease2/disease/V = virus2[ID]
+ if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
+ CRASH("virus2 nulled before calling activate()")
+ else
+ V.activate(src)
+ // activate may have deleted the virus
+ if(!V) continue
+
+ // check if we're immune
+ if(V.antigen & src.antibodies)
+ V.dead = 1
return
@@ -391,6 +396,10 @@
proc/handle_environment(datum/gas_mixture/environment)
if(!environment)
return
+
+ if(abs(environment.temperature - 293.15) < 20 && abs(bodytemperature - 310.14) < 0.5 && environment.toxins < MOLES_PLASMA_VISIBLE)
+ return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
+
var/environment_heat_capacity = environment.heat_capacity()
if(istype(get_turf(src), /turf/space))
var/turf/heat_turf = get_turf(src)
@@ -446,7 +455,7 @@
var/turf/T = loc
var/area/A = T.loc
if(A)
- if(A.lighting_use_dynamic) light_amount = min(10,T.lit_value) - 5 //hardcapped so it's not abused by having a ton of flashlights
+ if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
@@ -459,7 +468,8 @@
adjustToxLoss(-1)
adjustOxyLoss(-1)
- if(reagents) reagents.metabolize(src,alien)
+ if(reagents && reagents.reagent_list.len)
+ reagents.metabolize(src,alien)
if (drowsyness)
drowsyness--
@@ -468,24 +478,23 @@
sleeping += 1
Paralyse(5)
- confused = max(0, confused - 1)
- // decrement dizziness counter, clamped to 0
+ if(confused)
+ confused = max(0, confused - 1)
+
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
- updatehealth()
-
return //TODO: DEFERRED
proc/handle_regular_status_updates()
- updatehealth()
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
blinded = 1
silent = 0
else //ALIVE. LIGHTS ARE ON
+ updatehealth()
if(health < config.health_threshold_dead || brain_op_stage == 4.0)
death()
blinded = 1
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 3ada724051..7f31d737a2 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -359,8 +359,8 @@
return
else
if(Debug)
- diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]"
- diary <<"REPORT THIS"
+ log_debug("pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]")
+ log_debug("REPORT THIS")
/////
if(pulling && pulling.anchored)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 154a7f047f..8fd90aa571 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -94,7 +94,7 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
/mob/living/silicon/ai/proc/toggle_camera_light)
-
+
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
@@ -116,6 +116,10 @@ var/list/ai_list = list()
job = "AI"
+ spawn(5)
+ new /obj/machinery/ai_powersupply(src)
+
+
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
@@ -135,6 +139,37 @@ var/list/ai_list = list()
..()
+/*
+ The AI Power supply is a dummy object used for powering the AI since only machinery should be using power.
+ The alternative was to rewrite a bunch of AI code instead here we are.
+*/
+/obj/machinery/ai_powersupply
+ name="Power Supply"
+ active_power_usage=1000
+ use_power = 2
+ power_channel = EQUIP
+ var/mob/living/silicon/ai/powered_ai = null
+ invisibility = 100
+
+/obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null)
+ powered_ai = ai
+ if(isnull(powered_ai))
+ Del()
+
+ loc = powered_ai.loc
+ use_power(1) // Just incase we need to wake up the power system.
+
+ ..()
+
+/obj/machinery/ai_powersupply/process()
+ if(!powered_ai || powered_ai.stat & DEAD)
+ Del()
+ if(!powered_ai.anchored)
+ loc = powered_ai.loc
+ use_power = 0
+ if(powered_ai.anchored)
+ use_power = 2
+
/mob/living/silicon/ai/verb/pick_icon()
set category = "AI Commands"
set name = "Set AI Core Display"
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index 37f0fdd1f8..c2b6e6e189 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -58,10 +58,20 @@
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
+
+ //Congratulations! You've found a way for AI's to run without using power!
+ //Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior
+ // since mobs are in master_controller before machinery. We also have to do it in a manner where we don't reset the entire area's need to update
+ // the power usage.
+ //
+ // We can probably create a new machine that resides inside of the AI contents that uses power using the idle_usage of 1000 and nothing else and
+ // be fine.
+/*
var/area/home = get_area(src)
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
if(home.powered(EQUIP))
home.use_power(1000, EQUIP)
+*/
if (src:aiRestorePowerRoutine==2)
src << "Alert cancelled. Power has been restored without our assistance."
@@ -168,4 +178,4 @@
if(fire_res_on_core)
health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss()
else
- health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
\ No newline at end of file
+ health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index 1e23637b56..60096d0330 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -164,7 +164,7 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
- w_class = 1.0
+ w_class = 2.0
throw_speed = 5
throw_range = 10
m_amt = 200
diff --git a/code/modules/mob/living/simple_animal/bees.dm b/code/modules/mob/living/simple_animal/bees.dm
index 1fa531070c..76e1de9457 100644
--- a/code/modules/mob/living/simple_animal/bees.dm
+++ b/code/modules/mob/living/simple_animal/bees.dm
@@ -31,7 +31,7 @@
if(stat == CONSCIOUS)
//if we're strong enough, sting some people
var/mob/living/carbon/human/M = target_mob
- var/sting_prob = 100 // Bees will always try to sting.
+ var/sting_prob = 40 // Bees will always try to sting.
if(M in view(src,1)) // Can I see my target?
if(prob(max(feral * 10, 0))) // Am I mad enough to want to sting? And yes, when I initially appear, I AM mad enough
var/obj/item/clothing/worn_suit = M.wear_suit
@@ -42,17 +42,17 @@
sting_prob -= min(worn_helmet.armor["bio"],30) // Is your helmet sealed? I can't get to 30% of your body.
if( prob(sting_prob) && (M.stat == CONSCIOUS || (M.stat == UNCONSCIOUS && prob(25))) ) // Try to sting! If you're not moving, think about stinging.
M.apply_damage(min(strength,2)+mut, BRUTE) // Stinging. The more mutated I am, the harder I sting.
- M.apply_damage((round(feral/5,1)*(max((round(strength/10,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me!
+ M.apply_damage((round(feral/10,1)*(max((round(strength/20,1)),1)))+toxic, TOX) // Bee venom based on how angry I am and how many there are of me!
M << "\red You have been stung!"
M.flash_pain()
//if we're chasing someone, get a little bit angry
- if(target_mob && prob(10))
+ if(target_mob && prob(5))
feral++
//calm down a little bit
if(feral > 0)
- if(prob(feral * 10))
+ if(prob(feral * 20))
feral -= 1
else
//if feral is less than 0, we're becalmed by smoke or steam
diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm
index c3e623271b..c100e74725 100644
--- a/code/modules/organs/blood.dm
+++ b/code/modules/organs/blood.dm
@@ -217,7 +217,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
var/datum/reagent/blood/injected = get_blood(container.reagents)
if (!injected)
return
- src.virus2 |= virus_copylist(injected.data["virus2"])
+ var/list/sniffles = virus_copylist(injected.data["virus2"])
+ for(var/ID in sniffles)
+ var/datum/disease2/disease/sniffle = sniffles[ID]
+ infect_virus2(src,sniffle,1)
if (injected.data["antibodies"] && prob(5))
antibodies |= injected.data["antibodies"]
var/list/chems = list()
diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm
index eec57edea9..3e169f22b6 100644
--- a/code/modules/organs/organ.dm
+++ b/code/modules/organs/organ.dm
@@ -69,54 +69,70 @@
/mob/living/carbon/human/proc/handle_organs()
number_wounds = 0
var/leg_tally = 2
- for(var/datum/organ/external/E in organs)
+ var/force_process = 0
+ var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss()
+ if(damage_this_tick > last_dam)
+ force_process = 1
+ last_dam = damage_this_tick
+ if(!force_process && !bad_external_organs.len)
+ return
+ if(force_process)
+ bad_external_organs.Cut()
+ for(var/datum/organ/external/Ex in organs)
+ bad_external_organs += Ex
+
+ for(var/datum/organ/external/E in bad_external_organs)
if(!E)
continue
- E.process()
- number_wounds += E.number_wounds
+ if(!E.need_process())
+ bad_external_organs -= E
+ continue
+ else
+ E.process()
+ number_wounds += E.number_wounds
- //Robotic limb malfunctions
- var/malfunction = 0
- if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
- malfunction = 1
+ //Robotic limb malfunctions
+ var/malfunction = 0
+ if (E.status & ORGAN_ROBOT && prob(E.brute_dam + E.burn_dam))
+ malfunction = 1
- //Broken limbs hurt too
- var/broken = 0
- if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) )
- broken = 1
+ //Broken limbs hurt too
+ var/broken = 0
+ if(E.status & ORGAN_BROKEN && !(E.status & ORGAN_SPLINTED) )
+ broken = 1
- //Moving around with fractured ribs won't do you any good
- if (broken && E.internal_organs && prob(15))
- if (!lying && world.timeofday - l_move_time < 15)
- var/datum/organ/internal/I = pick(E.internal_organs)
- custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
- I.take_damage(rand(3,5))
+ //Moving around with fractured ribs won't do you any good
+ if (broken && E.internal_organs && prob(15))
+ if (!lying && world.timeofday - l_move_time < 15)
+ var/datum/organ/internal/I = pick(E.internal_organs)
+ custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
+ I.take_damage(rand(3,5))
- //Special effects for limbs.
- if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
- var/obj/item/c_hand //Getting what's in this hand
- if(E.name == "l_hand" || E.name == "l_arm")
- c_hand = l_hand
- if(E.name == "r_hand" || E.name == "r_arm")
- c_hand = r_hand
+ //Special effects for limbs.
+ if(E.name in list("l_hand","l_arm","r_hand","r_arm") && (broken||malfunction))
+ var/obj/item/c_hand //Getting what's in this hand
+ if(E.name == "l_hand" || E.name == "l_arm")
+ c_hand = l_hand
+ if(E.name == "r_hand" || E.name == "r_arm")
+ c_hand = r_hand
- if (c_hand)
- u_equip(c_hand)
+ if (c_hand)
+ u_equip(c_hand)
- if(broken)
- emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
- if(malfunction)
- emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
- var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
- spark_system.set_up(5, 0, src)
- spark_system.attach(src)
- spark_system.start()
- spawn(10)
- del(spark_system)
+ if(broken)
+ emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : "screams in pain and"] drops what they were holding in their [E.display_name?"[E.display_name]":"[E]"]!")
+ if(malfunction)
+ emote("me", 1, "drops what they were holding, their [E.display_name?"[E.display_name]":"[E]"] malfunctioning!")
+ var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
+ spark_system.set_up(5, 0, src)
+ spark_system.attach(src)
+ spark_system.start()
+ spawn(10)
+ del(spark_system)
- else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying)
- if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED)))
- leg_tally-- // let it fail even if just foot&leg
+ else if(E.name in list("l_leg","l_foot","r_leg","r_foot") && !lying)
+ if (!E.is_usable() || malfunction || (broken && !(E.status & ORGAN_SPLINTED)))
+ leg_tally-- // let it fail even if just foot&leg
// standing is poor
if(leg_tally <= 0 && !paralysis && !(lying || resting) && prob(5))
@@ -124,7 +140,7 @@
emote("scream")
emote("collapse")
paralysis = 10
-
+
//Check arms and legs for existence
can_stand = 2 //can stand on both legs
var/datum/organ/external/E = organs_by_name["l_foot"]
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index fb6ed08dc5..5648f7be1c 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -12,6 +12,7 @@
var/burn_dam = 0
var/max_damage = 0
var/max_size = 0
+ var/last_dam = -1
var/display_name
var/list/wounds = list()
@@ -198,7 +199,10 @@ This function completely restores a damaged organ to perfect condition.
*/
/datum/organ/external/proc/rejuvenate()
damage_state = "00"
- status = 0
+ if(status & 128) //Robotic organs stay robotic. Fix because right click rejuvinate makes IPC's organs organic.
+ status = 128
+ else
+ status = 0
perma_injury = 0
brute_dam = 0
burn_dam = 0
@@ -270,6 +274,19 @@ This function completely restores a damaged organ to perfect condition.
PROCESSING & UPDATING
****************************************************/
+//Determines if we even need to process this organ.
+
+/datum/organ/external/proc/need_process()
+ if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
+ return 1
+ if(brute_dam || burn_dam)
+ return 1
+ if(last_dam != brute_dam + burn_dam) // Process when we are fully healed up.
+ last_dam = brute_dam + burn_dam
+ return 1
+ last_dam = brute_dam + burn_dam
+ return 0
+
/datum/organ/external/process()
// Process wounds, doing healing etc. Only do this every few ticks to save processing power
if(owner.life_tick % wound_update_accuracy == 0)
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index 842608c683..4b6a9b3327 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -26,6 +26,13 @@
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
+ if (hasorgans(user))
+ var/datum/organ/external/temp = user:organs_by_name["r_hand"]
+ if (user.hand)
+ temp = user:organs_by_name["l_hand"]
+ if(temp && !temp.is_usable())
+ user << "You try to move your [temp.display_name], but cannot!"
+ return
if(amount >= 1)
amount--
if(amount==0)
@@ -104,4 +111,4 @@
user << "[src] is empty! "
add_fingerprint(user)
- return
\ No newline at end of file
+ return
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index f050a42822..a76b8de25d 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -26,7 +26,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "photo"
item_state = "paper"
- w_class = 1.0
+ w_class = 2.0
var/icon/img //Big photo image
var/scribble //Scribble on the back.
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 41d0396a88..a68c385e35 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -217,7 +217,7 @@
// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/update_icon()
-
+
if (!status_overlays)
status_overlays = 1
status_overlays_lock = new
@@ -235,9 +235,9 @@
status_overlays_lock[1] = image(icon, "apcox-0") // 0=blue 1=red
status_overlays_lock[2] = image(icon, "apcox-1")
- status_overlays_charging[1] = image(icon, "apco3-0")
+ status_overlays_charging[1] = image(icon, "apco3-0")
status_overlays_charging[2] = image(icon, "apco3-1")
- status_overlays_charging[3] = image(icon, "apco3-2")
+ status_overlays_charging[3] = image(icon, "apco3-2")
status_overlays_equipment[1] = image(icon, "apco0-0") // 0=red, 1=green, 2=blue
status_overlays_equipment[2] = image(icon, "apco0-1")
@@ -248,13 +248,13 @@
status_overlays_lighting[2] = image(icon, "apco1-1")
status_overlays_lighting[3] = image(icon, "apco1-2")
status_overlays_lighting[4] = image(icon, "apco1-3")
-
+
status_overlays_environ[1] = image(icon, "apco2-0")
status_overlays_environ[2] = image(icon, "apco2-1")
status_overlays_environ[3] = image(icon, "apco2-2")
status_overlays_environ[4] = image(icon, "apco2-3")
-
+
var/update = check_updates() //returns 0 if no need to update icons.
// 1 if we need to update the icon_state
@@ -280,7 +280,7 @@
icon_state = "apcemag"
else if(update_state & UPSTATE_WIREEXP)
icon_state = "apcewires"
-
+
if(!(update_state & UPSTATE_ALLGOOD))
@@ -291,7 +291,7 @@
if(update & 2)
-
+
if(overlays.len)
overlays = 0
@@ -306,7 +306,7 @@
/obj/machinery/power/apc/proc/check_updates()
- var/last_update_state = update_state
+ var/last_update_state = update_state
var/last_update_overlay = update_overlay
update_state = 0
update_overlay = 0
@@ -349,7 +349,7 @@
update_overlay |= APC_UPOVERLAY_EQUIPMENT1
else if(equipment == 2)
update_overlay |= APC_UPOVERLAY_EQUIPMENT2
-
+
if(!lighting)
update_overlay |= APC_UPOVERLAY_LIGHTING0
else if(lighting == 1)
@@ -649,6 +649,7 @@
user << "\blue You slot your fingers into the APC interface and siphon off some of the stored charge for your own use."
if(src.cell.charge < 0) src.cell.charge = 0
if(H.nutrition > 500) H.nutrition = 500
+ src.charging = 1
else
user << "\blue You are already fully charged."
@@ -1163,6 +1164,7 @@
lastused_equip = area.usage(EQUIP)
lastused_environ = area.usage(ENVIRON)
if(area.powerupdate)
+ if(debug) log_debug("power update in [area.name] / [name]")
area.clear_usage()
lastused_total = lastused_light + lastused_equip + lastused_environ
@@ -1186,16 +1188,16 @@
if(terminal && terminal.powernet)
perapc = terminal.powernet.perapc
- //if(debug)
- //world << "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light]"
+ if(debug)
+ log_debug( "Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light]")
if(cell && !shorted)
- var/cell_charge = cell.charge
+ //var/cell_charge = cell.charge
var/cell_maxcharge = cell.maxcharge
// draw power from cell as before
- var/cellused = min(cell_charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
+ var/cellused = min(cell.charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell
cell.use(cellused)
if(excess > 0 || perapc > lastused_total) // if power excess, or enough anyway, recharge the cell
@@ -1206,10 +1208,9 @@
else // no excess, and not enough per-apc
- if( (cell_charge/CELLRATE+perapc) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
+ if( (cell.charge/CELLRATE+perapc) >= lastused_total) // can we draw enough from cell+grid to cover last usage?
- cell_charge = min(cell_maxcharge, cell_charge + CELLRATE * perapc) //recharge with what we can
- cell.charge = cell_charge
+ cell.give(CELLRATE * perapc) //recharge with what we can
add_load(perapc) // so draw what we can from the grid
charging = 0
@@ -1232,30 +1233,30 @@
longtermpower -= 2
- if(cell_charge >= 1250 || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
+ if(cell.charge >= 1250 || longtermpower > 0) // Put most likely at the top so we don't check it last, effeciency 101
if(autoflag != 3)
equipment = autoset(equipment, 1)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
autoflag = 3
area.poweralert(1, src)
- if(cell_charge >= 4000)
+ if(cell.charge >= 4000)
area.poweralert(1, src)
- else if(cell_charge < 1250 && longtermpower < 0) // <30%, turn off equipment
+ else if(cell.charge < 1250 && cell.charge > 750 && longtermpower < 0) // <30%, turn off equipment
if(autoflag != 2)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 1)
environ = autoset(environ, 1)
area.poweralert(0, src)
autoflag = 2
- else if(cell_charge < 750 && longtermpower < 0) // <15%, turn off lighting & equipment
+ else if(cell.charge < 750 && cell.charge > 10 && longtermpower < 0) // <15%, turn off lighting & equipment
if(autoflag != 1)
equipment = autoset(equipment, 2)
lighting = autoset(lighting, 2)
environ = autoset(environ, 1)
area.poweralert(0, src)
autoflag = 1
- else if(cell_charge <= 0) // zero charge, turn all off
+ else if(cell.charge <= 0) // zero charge, turn all off
if(autoflag != 0)
equipment = autoset(equipment, 0)
lighting = autoset(lighting, 0)
@@ -1268,7 +1269,7 @@
if(chargemode && charging == 1 && operating)
if(excess > 0) // check to make sure we have enough to charge
// Max charge is perapc share, capped to cell capacity, or % per second constant (Whichever is smallest)
- var/ch = min(perapc*CELLRATE, (cell_maxcharge - cell_charge), (cell_maxcharge*CHARGELEVEL))
+ var/ch = min(perapc*CELLRATE, (cell_maxcharge - cell.charge), (cell_maxcharge*CHARGELEVEL))
add_load(ch/CELLRATE) // Removes the power we're taking from the grid
cell.give(ch) // actually recharge the cell
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index f1fa25234a..dd6d971dc4 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -642,7 +642,7 @@
flags = FPRINT | TABLEPASS
force = 2
throwforce = 5
- w_class = 1
+ w_class = 2
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index 83abddb76b..900d0c2b17 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -460,6 +460,7 @@ var/global/list/uneatable = list(
move_self = 1 //Do we move on our own?
grav_pull = 10 //How many tiles out do we pull?
consume_range = 3 //How many tiles out do we eat
+ var/last_boom = 0
/obj/machinery/singularity/narsie/large
name = "Nar-Sie"
@@ -490,9 +491,11 @@ var/global/list/uneatable = list(
return 0
if (istype(A,/mob/living))//Mobs get gibbed
A:gib()
- else if(istype(A,/obj/))
- A:ex_act(1.0)
- if(A) del(A)
+ else if(istype(A,/obj))
+ var/obj/O = A
+ machines -= O
+ processing_objects -= O
+ O.loc = null
else if(isturf(A))
var/turf/T = A
if(T.intact)
@@ -502,6 +505,9 @@ var/global/list/uneatable = list(
if(O.invisibility == 101)
src.consume(O)
A:ChangeTurf(/turf/space)
+ if(last_boom + 100 < world.time && prob(5))
+ explosion(loc, -1, -1, -1, 1, 0) //Since we're not exploding everything in consume() toss out an explosion effect every now and again
+ last_boom = world.time
return
/obj/machinery/singularity/narsie/ex_act() //No throwing bombs at it either. --NEO
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 3c0ec85ce8..e5fe56c9f0 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -218,6 +218,10 @@
if (!istype(src.loc, /turf) && !istype(usr, /mob/living/silicon/))
return 0 // Do not update ui
+ for(var/area/A in active_areas)
+ A.master.powerupdate = 3
+
+
if( href_list["cmode"] )
chargemode = !chargemode
if(!chargemode)
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index ecb7df50cc..7368735b49 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -53,7 +53,7 @@
item_state = "syringe_kit"
m_amt = 50000
throwforce = 2
- w_class = 1.0
+ w_class = 2.0
throw_speed = 4
throw_range = 10
var/list/stored_ammo = list()
diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm
index ecbea58fc2..14622ebb29 100644
--- a/code/modules/projectiles/ammunition/boxes.dm
+++ b/code/modules/projectiles/ammunition/boxes.dm
@@ -135,4 +135,18 @@
icon_state = "a762"
ammo_type = "/obj/item/ammo_casing/a762"
max_ammo = 0
+ multiple_sprites = 1
+
+/obj/item/ammo_magazine/chameleon
+ name = "magazine (.45)"
+ icon_state = "45"
+ ammo_type = "/obj/item/ammo_casing/chameleon"
+ max_ammo = 7
+ multiple_sprites = 1
+
+/obj/item/ammo_magazine/chameleon/empty
+ name = "magazine (.45)"
+ icon_state = "45"
+ ammo_type = "/obj/item/ammo_casing/chameleon"
+ max_ammo = 0
multiple_sprites = 1
\ No newline at end of file
diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm
index 49efd840e6..c600199d43 100644
--- a/code/modules/projectiles/ammunition/bullets.dm
+++ b/code/modules/projectiles/ammunition/bullets.dm
@@ -105,3 +105,9 @@
icon_state = "rocketshell"
projectile_type = "/obj/item/missile"
caliber = "rocket"
+
+/obj/item/ammo_casing/chameleon
+ name = "chameleon bullets"
+ desc = "A set of bullets for the Chameleon Gun."
+ projectile_type = "/obj/item/projectile/bullet/chameleon"
+ caliber = ".45"
diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm
index 43cb24d39a..3e92faf4ef 100644
--- a/code/modules/projectiles/projectile/bullets.dm
+++ b/code/modules/projectiles/projectile/bullets.dm
@@ -58,4 +58,7 @@
embed = 0
/obj/item/projectile/bullet/a762
- damage = 25
\ No newline at end of file
+ damage = 25
+
+/obj/item/projectile/bullet/chameleon
+ damage = 1 // stop trying to murderbone with a fake gun dumbass!!!
\ No newline at end of file
diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm
index 42c2e11f19..5439a92fc6 100644
--- a/code/modules/reagents/Chemistry-Holder.dm
+++ b/code/modules/reagents/Chemistry-Holder.dm
@@ -110,7 +110,7 @@ datum
continue
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
- trans_data = current_reagent.data
+ trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety checks on these so all chemicals are transferred
src.remove_reagent(current_reagent.id, current_reagent_transfer, safety = 1) // to the target container before handling reactions
@@ -183,7 +183,7 @@ datum
for (var/datum/reagent/current_reagent in src.reagent_list)
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
- trans_data = current_reagent.data
+ trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data, safety = 1) //safety check so all chemicals are transferred before reacting
src.update_total()
@@ -207,7 +207,7 @@ datum
for (var/datum/reagent/current_reagent in src.reagent_list)
if(current_reagent.id == reagent)
if(preserve_data)
- trans_data = current_reagent.data
+ trans_data = copy_data(current_reagent)
R.add_reagent(current_reagent.id, amount, trans_data)
src.remove_reagent(current_reagent.id, amount, 1)
break
@@ -600,6 +600,24 @@ datum
if(my_atom)
my_atom.reagents = null
+ copy_data(var/datum/reagent/current_reagent)
+ if (!current_reagent || !current_reagent.data) return null
+ if (!istype(current_reagent.data, /list)) return current_reagent.data
+
+ var/list/trans_data = current_reagent.data.Copy()
+
+ // We do this so that introducing a virus to a blood sample
+ // doesn't automagically infect all other blood samples from
+ // the same donor.
+ //
+ // Technically we should probably copy all data lists, but
+ // that could possibly eat up a lot of memory needlessly
+ // if most data lists are read-only.
+ if (trans_data["virus2"])
+ var/list/v = trans_data["virus2"]
+ trans_data["virus2"] = v.Copy()
+
+ return trans_data
///////////////////////////////////////////////////////////////////////////////////
diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm
index 9518823cec..3f735c9f03 100644
--- a/code/modules/reagents/Chemistry-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents.dm
@@ -949,7 +949,7 @@ datum
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
-
+
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -1835,7 +1835,7 @@ datum
toxin/beer2 //disguised as normal beer for use by emagged brobots
name = "Beer"
id = "beer2"
- description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be imcomplete." //If the players manage to analyze this, they deserve to know something is wrong.
+ description = "An alcoholic beverage made from malted grains, hops, yeast, and water. The fermentation appears to be incomplete." //If the players manage to analyze this, they deserve to know something is wrong.
reagent_state = LIQUID
color = "#664300" // rgb: 102, 67, 0
custom_metabolism = 0.15 // Sleep toxins should always be consumed pretty fast
@@ -3706,4 +3706,4 @@ datum
return
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
-#undef REM
+#undef REM
diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm
index b7ae9d80c9..9ecfa7fe18 100644
--- a/code/modules/reagents/Chemistry-Recipes.dm
+++ b/code/modules/reagents/Chemistry-Recipes.dm
@@ -849,7 +849,7 @@ datum
var/list/flashers = list()
for(var/mob/living/carbon/human/M in viewers(TO, null))
if(M:eyecheck() <= 0)
- flick("e_flash", M.flash) // flash dose faggots
+ flick("e_flash", M.flash)
flashers += M
var/y_distance = TO.y - FROM.y
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 0828e545fc..401d98b7ef 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -3,7 +3,7 @@
desc = "..."
icon = 'icons/obj/chemical.dmi'
icon_state = null
- w_class = 1
+ w_class = 2
var/amount_per_transfer_from_this = 5
var/possible_transfer_amounts = list(5,10,15,25,30)
var/volume = 30
diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm
index 17f8d1ce11..11fd71e620 100644
--- a/code/modules/reagents/reagent_containers/dropper.dm
+++ b/code/modules/reagents/reagent_containers/dropper.dm
@@ -8,6 +8,7 @@
icon_state = "dropper0"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1,2,3,4,5)
+ w_class = 1
volume = 5
var/filled = 0
diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm
index 15e37924a7..2cc1c1ffda 100644
--- a/code/modules/reagents/reagent_containers/food/cans.dm
+++ b/code/modules/reagents/reagent_containers/food/cans.dm
@@ -11,7 +11,7 @@
attack(mob/M as mob, mob/user as mob, def_zone)
if (canopened == 0)
- user << " You need to open the drink! "
+ user << "You need to open the drink! "
return
var/datum/reagents/R = src.reagents
var/fillevel = gulp_size
@@ -24,11 +24,18 @@
M << "\blue You swallow a gulp of [src]."
if(reagents.total_volume)
reagents.trans_to_ingest(M, gulp_size)
+ reagents.reaction(M, INGEST)
+ spawn(5)
+ reagents.trans_to(M, gulp_size)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
else if( istype(M, /mob/living/carbon/human) )
+ if (canopened == 0)
+ user << " You need to open the drink! "
+ return
+ else if (canopened == 1)
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] attempts to feed [M] [src].", 1)
if(!do_mob(user, M)) return
@@ -68,8 +75,10 @@
user << "\red [src] is full."
return
- var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
- user << "\blue You fill [src] with [trans] units of the contents of [target]."
+ var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
+ user << "\blue You fill [src] with [trans] units of the contents of [target]."
+ if (canopened == 0)
+ user << "You need to open the drink! "
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
@@ -259,4 +268,4 @@
icon_state = "sodawater"
New()
..()
- reagents.add_reagent("sodawater", 50)
\ No newline at end of file
+ reagents.add_reagent("sodawater", 50)
diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm
index cef1d890c1..2f61948749 100644
--- a/code/modules/reagents/reagent_containers/food/snacks.dm
+++ b/code/modules/reagents/reagent_containers/food/snacks.dm
@@ -668,10 +668,10 @@
reagents.add_reagent("nutriment", 3)
src.bitesize = 6
-/obj/item/weapon/reagent_containers/food/snacks/faggot
- name = "Faggot"
- desc = "A great meal all round. Not a cord of wood."
- icon_state = "faggot"
+/obj/item/weapon/reagent_containers/food/snacks/meatball
+ name = "meatball"
+ desc = "A great meal all round."
+ icon_state = "meatball"
filling_color = "#DB0000"
New()
@@ -2835,7 +2835,7 @@
/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/weapon/W as obj, mob/user as mob)
// Bun + meatball = burger
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/faggot))
+ if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meatball))
new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src)
user << "You make a burger."
del(W)
@@ -2906,7 +2906,7 @@
..()
reagents.add_reagent("nutriment", 2)
-/obj/item/weapon/reagent_containers/food/snacks/rawfaggot
+/obj/item/weapon/reagent_containers/food/snacks/rawmeatball
name = "raw meatball"
desc = "A raw meatball."
icon = 'icons/obj/food_ingredients.dmi'
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index 6f5c254c01..b4afb8ef37 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -38,7 +38,10 @@
/mob/living/simple_animal/hostile/retaliate/goat,
/obj/machinery/computer/centrifuge,
/obj/machinery/sleeper,
- /obj/machinery/smartfridge/ )
+ /obj/machinery/smartfridge/,
+ /obj/machinery/biogenerator,
+ /obj/machinery/hydroponics,
+ /obj/machinery/constructable_frame)
New()
..()
diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm
index 0500a5d79b..fa9149f3ff 100644
--- a/code/modules/reagents/reagent_containers/pill.dm
+++ b/code/modules/reagents/reagent_containers/pill.dm
@@ -8,6 +8,7 @@
icon_state = null
item_state = "pill"
possible_transfer_amounts = null
+ w_class = 1
volume = 50
New()
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index 2f345463e8..72275227e3 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -15,6 +15,7 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = null //list(5,10,15)
volume = 15
+ w_class = 1
var/mode = SYRINGE_DRAW
on_reagent_change()
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index 28dad70da2..eecba616fb 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -165,7 +165,7 @@
//If you don't want to fuck up disposals, add to this list, and don't change the order.
//If you insist on changing the order, you'll have to change every sort junction to reflect the new order. --Pete
- w_class = 1
+ w_class = 2
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm
index 53b45fcbe5..de35439332 100644
--- a/code/modules/research/designs.dm
+++ b/code/modules/research/designs.dm
@@ -1369,13 +1369,13 @@ datum/design/implant_free
build_path = "/obj/item/weapon/implant/freedom"
datum/design/chameleon
- name = "Chameleon Jumpsuit"
- desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
+ name = "Chameleon Kit"
+ desc = "It's a set of clothes with dials on them."
id = "chameleon"
req_tech = list("syndicate" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 500)
- build_path = "/obj/item/clothing/under/chameleon"
+ build_path = "/obj/item/weapon/storage/box/syndie_kit/chameleon"
datum/design/bluespacebeaker
@@ -1712,7 +1712,7 @@ datum/design/security_hud
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk2"
item_state = "card-id"
- w_class = 1.0
+ w_class = 2.0
m_amt = 30
g_amt = 10
var/datum/design/blueprint
diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm
index 40b534bf0e..1ec9093cfc 100644
--- a/code/modules/research/research.dm
+++ b/code/modules/research/research.dm
@@ -262,7 +262,7 @@ datum/tech/robotics
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk2"
item_state = "card-id"
- w_class = 1.0
+ w_class = 2.0
m_amt = 30
g_amt = 10
var/datum/tech/stored
diff --git a/code/modules/research/xenoarchaeology/artifact/artifact.dm b/code/modules/research/xenoarchaeology/artifact/artifact.dm
index 6300a6d71a..ad79451794 100644
--- a/code/modules/research/xenoarchaeology/artifact/artifact.dm
+++ b/code/modules/research/xenoarchaeology/artifact/artifact.dm
@@ -39,6 +39,7 @@
var/excavation_level = 0
var/datum/geosample/geological_data
var/datum/artifact_find/artifact_find
+ var/last_act = 0
/obj/structure/boulder/New()
icon_state = "boulder[rand(1,4)]"
@@ -68,8 +69,14 @@
if (istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/P = W
+ if(last_act + P.digspeed > world.time)//prevents message spam
+ return
+ last_act = world.time
+
user << "\red You start [P.drill_verb] [src]."
+
+
if(!do_after(user,P.digspeed))
return
@@ -97,3 +104,22 @@
user.visible_message("[src] suddenly crumbles away. ",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
del(src)
+
+/obj/structure/boulder/Bumped(AM)
+ . = ..()
+ if(istype(AM,/mob/living/carbon/human))
+ var/mob/living/carbon/human/H = AM
+ if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
+ attackby(H.l_hand,H)
+ else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
+ attackby(H.r_hand,H)
+
+ else if(istype(AM,/mob/living/silicon/robot))
+ var/mob/living/silicon/robot/R = AM
+ if(istype(R.module_active,/obj/item/weapon/pickaxe))
+ attackby(R.module_active,R)
+
+ else if(istype(AM,/obj/mecha))
+ var/obj/mecha/M = AM
+ if(istype(M.selected,/obj/item/mecha_parts/mecha_equipment/tool/drill))
+ M.selected.action(src)
diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm
index 9e0e646234..13a8367b96 100644
--- a/code/modules/research/xenoarchaeology/chemistry.dm
+++ b/code/modules/research/xenoarchaeology/chemistry.dm
@@ -77,7 +77,7 @@ datum
icon_state = "solution_tray"
m_amt = 0
g_amt = 5
- w_class = 1.0
+ w_class = 2.0
amount_per_transfer_from_this = 1
possible_transfer_amounts = list(1, 2)
volume = 2
diff --git a/code/modules/research/xenoarchaeology/misc.dm b/code/modules/research/xenoarchaeology/misc.dm
index 37bc4c6ccc..6b95d6dfc8 100644
--- a/code/modules/research/xenoarchaeology/misc.dm
+++ b/code/modules/research/xenoarchaeology/misc.dm
@@ -142,6 +142,7 @@ proc/SetupXenoarch()
new /obj/item/weapon/storage/belt/archaeology(src)
new /obj/item/weapon/storage/box/excavation(src)
new /obj/item/device/flashlight/lantern(src)
+ new /obj/item/device/ano_scanner(src)
new /obj/item/device/depth_scanner(src)
new /obj/item/device/core_sampler(src)
new /obj/item/device/gps(src)
diff --git a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm
index f3b1f9583e..257c7389cc 100644
--- a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm
+++ b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm
@@ -5,7 +5,7 @@
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "flashgun"
item_state = "lampgreen"
- w_class = 1.0
+ w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/nearest_artifact_id = "unknown"
diff --git a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm
index ad9a525b71..9f48c7d6a7 100644
--- a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm
+++ b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm
@@ -9,7 +9,7 @@
icon = 'icons/obj/pda.dmi'
icon_state = "crap"
item_state = "analyzer"
- w_class = 1.0
+ w_class = 2.0
flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/list/positive_locations = list()
diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm
index b9b53b274d..fbaf7ed06f 100644
--- a/code/modules/scripting/IDE.dm
+++ b/code/modules/scripting/IDE.dm
@@ -10,7 +10,7 @@ client/verb/tcssave()
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
var/tcscode=winget(src, "tcscode", "text")
var/msg="[mob.name] is adding script to server [Server]: [tcscode]"
- diary << msg
+ log_misc(msg)
message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - JMP )",0,1)
Server.setcode( tcscode ) // this actually saves the code from input to the server
src << output(null, "tcserror") // clear the errors
@@ -208,4 +208,4 @@ client/verb/tcsclearmem()
src << output("Failed to clear memory: Unable to locate machine. ", "tcserror")
else
src << output(null, "tcserror")
- src << output("Failed to clear memory: Unable to locate machine. ", "tcserror")
\ No newline at end of file
+ src << output("Failed to clear memory: Unable to locate machine. ", "tcserror")
diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm
index af422c4f04..b539fbc057 100644
--- a/code/modules/scripting/Implementations/_Logic.dm
+++ b/code/modules/scripting/Implementations/_Logic.dm
@@ -257,7 +257,7 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
var/list/dat = list()
while (i < lenh)
var/found = findtext(haystack, a, i, 0)
- //diary << "findtext([haystack], [a], [i], 0)=[found]"
+ //log_misc("findtext([haystack], [a], [i], 0)=[found]")
if (found == 0) // Not found
break
else
@@ -265,9 +265,9 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
dat+=found
count+=1
else
- //diary << "Script found [a] [count] times, aborted"
+ //log_misc("Script found [a] [count] times, aborted")
break
- //diary << "Found [a] at [found]! Moving up..."
+ //log_misc("Found [a] at [found]! Moving up...")
i = found + lena
if (count == 0)
return haystack
@@ -281,11 +281,11 @@ proc/n_inrange(var/num, var/min=-1, var/max=1)
//CharCopy (dest + targetIndex, src + sourceIndex, count);
//CharCopy (dest + curPos, source + lastReadPos, precopy);
buf+=copytext(haystack,lastReadPos,precopy)
- diary << "buf+=copytext([haystack],[lastReadPos],[precopy])"
- diary<<"[buf]"
+ log_misc("buf+=copytext([haystack],[lastReadPos],[precopy])")
+ log_misc("[buf]")
lastReadPos = dat[i] + lena
//CharCopy (dest + curPos, replace, newValue.length);
buf+=b
- diary<<"[buf]"
+ log_misc("[buf]")
buf+=copytext(haystack,lastReadPos, 0)
- return buf
\ No newline at end of file
+ return buf
diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm
index d9e968f4da..1b3f88cf08 100644
--- a/code/modules/telesci/bscrystal.dm
+++ b/code/modules/telesci/bscrystal.dm
@@ -5,7 +5,7 @@
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
icon = 'icons/obj/telescience.dmi'
icon_state = "bluespace_crystal"
- w_class = 1
+ w_class = 2
origin_tech = "bluespace=4;materials=3"
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
diff --git a/code/modules/virus2/analyser.dm b/code/modules/virus2/analyser.dm
index adec9dd186..8046c48af0 100644
--- a/code/modules/virus2/analyser.dm
+++ b/code/modules/virus2/analyser.dm
@@ -10,43 +10,46 @@
var/obj/item/weapon/virusdish/dish = null
-/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I,/obj/item/weapon/virusdish))
- var/mob/living/carbon/c = user
- if(!dish)
- dish = I
- c.drop_item()
- I.loc = src
- for(var/mob/M in viewers(src))
- if(M == user) continue
- M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3)
- else
- user << "There is already a dish inserted"
- return
+/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/O as obj, var/mob/user as mob)
+ if(!istype(O,/obj/item/weapon/virusdish)) return
+ if(dish)
+ user << "\The [src] is already loaded."
+ return
+
+ dish = O
+ user.drop_item()
+ O.loc = src
+
+ user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
/obj/machinery/disease2/diseaseanalyser/process()
if(stat & (NOPOWER|BROKEN))
return
- //use_power(500)
-
if(scanning)
scanning -= 1
if(scanning == 0)
- var/r = dish.virus2.get_info()
+ if (dish.virus2.addToDB())
+ ping("\The [src] pings, \"New pathogen added to data bank.\"")
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
- P.info = r
+ P.name = "paper - [dish.virus2.name()]"
+
+ var/r = dish.virus2.get_info()
+ P.info = {"
+ [virology_letterhead("Post-Analysis Memo")]
+ [r]
+
+ Additional Notes:
+"}
dish.info = r
dish.analysed = 1
- if (dish.virus2.addToDB())
- src.state("\The [src.name] states, \"Added new pathogen to database.\"")
dish.loc = src.loc
dish = null
- icon_state = "analyser"
- src.state("\The [src.name] prints a sheet of paper")
+ icon_state = "analyser"
+ src.state("\The [src] prints a sheet of paper.")
else if(dish && !scanning && !pause)
if(dish.virus2 && dish.growth > 50)
@@ -58,6 +61,7 @@
spawn(25)
dish.loc = src.loc
dish = null
- src.state("\The [src.name] buzzes")
+
+ src.state("\The [src] buzzes, \"Insufficient growth density to complete analysis.\"")
pause = 0
return
diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm
index d0dc99ddf9..0a239f82df 100644
--- a/code/modules/virus2/centrifuge.dm
+++ b/code/modules/virus2/centrifuge.dm
@@ -9,19 +9,23 @@
var/obj/item/weapon/reagent_containers/glass/beaker/vial/sample = null
var/datum/disease2/disease/virus2 = null
-/obj/machinery/computer/centrifuge/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I, /obj/item/weapon/screwdriver))
- return ..(I,user)
+/obj/machinery/computer/centrifuge/attackby(var/obj/O as obj, var/mob/user as mob)
+ if(istype(O, /obj/item/weapon/screwdriver))
+ return ..(O,user)
- if(istype(I,/obj/item/weapon/reagent_containers/glass/beaker/vial))
- var/mob/living/carbon/C = user
- if(!sample)
- sample = I
- C.drop_item()
- I.loc = src
+ if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial))
+ if(sample)
+ user << "\The [src] is already loaded."
+ return
+
+ sample = O
+ user.drop_item()
+ O.loc = src
+
+ user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
+ nanomanager.update_uis(src)
src.attack_hand(user)
- return
/obj/machinery/computer/centrifuge/update_icon()
..()
@@ -29,126 +33,181 @@
icon_state = "centrifuge_moving"
/obj/machinery/computer/centrifuge/attack_hand(var/mob/user as mob)
- if(..())
- return
- user.set_machine(src)
- var/dat= ""
- if(curing)
- dat = "Antibody isolation in progress"
- else if(isolating)
- dat = "Pathogen isolation in progress"
- else
- dat += " Blood sample:"
- dat += ""
- if(sample)
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if(B)
- dat += "Sample inserted."
- if (B.data["antibodies"])
- dat += " "
- dat += "Antibodies: [antigens2string(B.data["antibodies"])]"
- dat += " Isolate "
+ if(..()) return
+ ui_interact(user)
+/obj/machinery/computer/centrifuge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+ user.set_machine(src)
+
+ var/data[0]
+ data["antibodies"] = null
+ data["pathogens"] = null
+ data["is_antibody_sample"] = null
+
+ if (curing)
+ data["busy"] = "Isolating antibodies..."
+ else if (isolating)
+ data["busy"] = "Isolating pathogens..."
+ else
+ data["sample_inserted"] = !!sample
+
+ if (sample)
+ var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
+ if (B)
+ data["antibodies"] = B.data["antibodies"] ? antigens2string(B.data["antibodies"]) : null
+
+ var/list/pathogens[0]
var/list/virus = B.data["virus2"]
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
- dat += " pathogen [V.name()]"
- dat += " Isolate "
+ pathogens.Add(list(list("name" = V.name(), "spread_type" = V.spreadtype, "reference" = "\ref[V]")))
+
+ if (pathogens.len > 0)
+ data["pathogens"] = pathogens
+
else
- dat += "Please check container contents."
- dat += "Eject container "
- else
- dat = "Please insert a container."
- dat += "
"
+ var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
+ data["antibodies"] = A && A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : null
+ data["is_antibody_sample"] = 1
- dat += " "
-
- user << browse(dat, "window=computer;size=400x500")
- onclose(user, "computer")
- return
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ if (!ui)
+ ui = new(user, src, ui_key, "isolation_centrifuge.tmpl", src.name, 400, 500)
+ ui.set_initial_data(data)
+ ui.open()
/obj/machinery/computer/centrifuge/process()
..()
+ if (stat & (NOPOWER|BROKEN)) return
- if(stat & (NOPOWER|BROKEN))
- return
- //use_power(500)
-
- if(curing)
+ if (curing)
curing -= 1
- if(curing == 0)
- if(sample)
- cure()
- update_icon()
- if(isolating)
+ if (curing == 0)
+ cure()
+
+ if (isolating)
isolating -= 1
if(isolating == 0)
- if(sample)
- isolate()
- update_icon()
-
- src.updateUsrDialog()
- return
+ isolate()
/obj/machinery/computer/centrifuge/Topic(href, href_list)
- if(..())
- return
+ if (..()) return 0
- if(usr) usr.set_machine(src)
+ var/mob/user = usr
+ var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
+
+ src.add_fingerprint(user)
+
+ if (href_list["close"])
+ user.unset_machine()
+ ui.close()
+ return 0
+
+ if (href_list["print"])
+ print(user)
+ return 1
+
+ if(href_list["isolate"])
+ var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
+ if (B)
+ var/datum/disease2/disease/virus = locate(href_list["isolate"])
+ virus2 = virus.getcopy()
+ isolating = 40
+ update_icon()
+ return 1
switch(href_list["action"])
- if("antibody")
+ if ("antibody")
var/delay = 20
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if (!B)
- state("\The [src.name] buzzes, \"No antibody carrier detected.\"", "blue")
+ state("\The [src] buzzes, \"No antibody carrier detected.\"", "blue")
+ return 1
- else if(sample.reagents.has_reagent("toxins"))
- state("\The [src.name] beeps, \"Pathogen purging speed above nominal.\"", "blue")
- delay = delay/2
+ var/has_toxins = locate(/datum/reagent/toxin) in sample.reagents.reagent_list
+ var/has_radium = sample.reagents.has_reagent("radium")
+ if (has_toxins || has_radium)
+ state("\The [src] beeps, \"Pathogen purging speed above nominal.\"", "blue")
+ if (has_toxins)
+ delay = delay/2
+ if (has_radium)
+ delay = delay/2
- else
- curing = delay
- playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
- update_icon()
-
- if("isolate")
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if (B)
- var/list/virus = virus_copylist(B.data["virus2"])
- var/choice = href_list["isolate"]
- if (choice in virus)
- virus2 = virus[choice]
- isolating = 40
- update_icon()
- else
- state("\The [src.name] buzzes, \"No such pathogen detected.\"", "blue")
+ curing = round(delay)
+ playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
+ update_icon()
+ return 1
if("sample")
if(sample)
sample.loc = src.loc
sample = null
+ return 1
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- attack_hand(usr)
- return
-
+ return 0
/obj/machinery/computer/centrifuge/proc/cure()
+ if (!sample) return
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
- if (!B)
- return
+ if (!B) return
var/list/data = list("antibodies" = B.data["antibodies"])
var/amt= sample.reagents.get_reagent_amount("blood")
- sample.reagents.remove_reagent("blood",amt)
- sample.reagents.add_reagent("antibodies",amt,data)
+ sample.reagents.remove_reagent("blood", amt)
+ sample.reagents.add_reagent("antibodies", amt, data)
- state("\The [src.name] pings", "blue")
+ nanomanager.update_uis(src)
+ update_icon()
+ ping("\The [src] pings, \"Antibody isolated.\"")
/obj/machinery/computer/centrifuge/proc/isolate()
- var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(src.loc)
+ if (!sample) return
+ var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(loc)
dish.virus2 = virus2
+ virus2 = null
- state("\The [src.name] pings", "blue")
+ nanomanager.update_uis(src)
+ update_icon()
+ ping("\The [src] pings, \"Pathogen isolated.\"")
+
+/obj/machinery/computer/centrifuge/proc/print(var/mob/user)
+ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
+ P.name = "paper - Pathology Report"
+ P.info = {"
+ [virology_letterhead("Pathology Report")]
+ Sample: [sample.name]
+"}
+
+ if (user)
+ P.info += "Generated By: [user.name] "
+
+ P.info += " "
+
+ var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
+ if (B)
+ P.info += "Antibodies: "
+ P.info += B.data["antibodies"] ? antigens2string(B.data["antibodies"]) : "None"
+ P.info += " "
+
+ var/list/virus = B.data["virus2"]
+ P.info += "Pathogens: "
+ if (virus.len > 0)
+ for (var/ID in virus)
+ var/datum/disease2/disease/V = virus[ID]
+ P.info += "[V.name()] "
+ else
+ P.info += "None "
+
+ else
+ var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
+ if (A)
+ P.info += "The following antibodies have been isolated from the blood sample: "
+ P.info += A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : "None"
+ P.info += " "
+
+ P.info += {"
+
+ Additional Notes:
+"}
+
+ state("The nearby computer prints out a pathology report.")
diff --git a/code/modules/virus2/disease2.dm b/code/modules/virus2/disease2.dm
index bb64a5366d..422ca221f6 100644
--- a/code/modules/virus2/disease2.dm
+++ b/code/modules/virus2/disease2.dm
@@ -10,6 +10,7 @@
var/list/datum/disease2/effectholder/effects = list()
var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
var/max_stage = 4
+ var/list/affected_species = list("Human","Unathi","Skrell","Tajaran")
/datum/disease2/disease/New()
uniqueID = rand(0,10000)
@@ -30,6 +31,24 @@
antigen |= text2num(pick(ANTIGENS))
spreadtype = prob(70) ? "Airborne" : "Contact"
+ if(all_species.len)
+ affected_species = get_infectable_species()
+
+/proc/get_infectable_species()
+ var/list/meat = list()
+ var/list/res = list()
+ for (var/specie in all_species)
+ var/datum/species/S = all_species[specie]
+ if(!(S.flags & IS_SYNTHETIC))
+ meat += S.name
+ if(meat.len)
+ var/num = rand(1,meat.len)
+ for(var/i=0,iInfection rate : [infectionchance * 10]"
- r += " Spread form : [spreadtype]"
- r += " Progress Speed : [stageprob * 10]"
- for(var/datum/disease2/effectholder/E in effects)
- r += " Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]."
+ var/r = {"
+ Analysis determined the existence of a GNAv2-based viral lifeform.
+ Designation: [name()]
+ Antigen: [antigens2string(antigen)]
+ Transmitted By: [spreadtype]
+ Rate of Progression: [stageprob * 10]
+ Species Affected: [list2text(affected_species, ", ")]
+"}
+
+ r += "Symptoms: "
+ for(var/datum/disease2/effectholder/E in effects)
+ r += "([E.stage]) [E.effect.name] "
+ r += "Strength: [E.multiplier >= 3 ? "Severe" : E.multiplier > 1 ? "Above Average" : "Average"] "
+ r += "Verosity: [E.chance * 15] "
- r += " Antigen pattern: [antigens2string(antigen)]"
return r
/datum/disease2/disease/proc/addToDB()
@@ -194,3 +225,10 @@ proc/virus2_greater_infection()
candidates = shuffle(candidates)
infect_mob_random_greater(candidates[1])
+
+proc/virology_letterhead(var/report_name)
+ return {"
+ [report_name]
+ [station_name()] Virology Lab
+
+"}
diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm
index 2c26edc358..a8ba0af399 100644
--- a/code/modules/virus2/diseasesplicer.dm
+++ b/code/modules/virus2/diseasesplicer.dm
@@ -4,144 +4,179 @@
icon_state = "crew"
var/datum/disease2/effectholder/memorybank = null
+ var/list/species_buffer = null
var/analysed = 0
var/obj/item/weapon/virusdish/dish = null
var/burning = 0
-
var/splicing = 0
var/scanning = 0
/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
return ..(I,user)
+
if(istype(I,/obj/item/weapon/virusdish))
var/mob/living/carbon/c = user
- if(!dish)
+ if (dish)
+ user << "\The [src] is already loaded."
+ return
+
+ dish = I
+ c.drop_item()
+ I.loc = src
- dish = I
- c.drop_item()
- I.loc = src
if(istype(I,/obj/item/weapon/diseasedisk))
- user << "You upload the contents of the disk into the buffer"
+ user << "You upload the contents of the disk onto the buffer."
memorybank = I:effect
+ species_buffer = I:species
+ analysed = I:analysed
src.attack_hand(user)
- return
/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob)
-
return src.attack_hand(user)
- return
/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
- if(..())
- return
+ if(..()) return
+ ui_interact(user)
+
+/obj/machinery/computer/diseasesplicer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
- var/dat
- if(splicing)
- dat = "Splicing in progress."
- else if(scanning)
- dat = "Splicing in progress."
- else if(burning)
- dat = "Data disk burning in progress."
+
+ var/data[0]
+ data["dish_inserted"] = !!dish
+ data["growth"] = 0
+ data["affected_species"] = null
+
+ if (memorybank)
+ data["buffer"] = list("name" = (analysed ? memorybank.effect.name : "Unknown Symptom"), "stage" = memorybank.stage)
+ if (species_buffer)
+ data["species_buffer"] = analysed ? list2text(species_buffer, ", ") : "Unknown Species"
+
+ if (splicing)
+ data["busy"] = "Splicing..."
+ else if (scanning)
+ data["busy"] = "Scanning..."
+ else if (burning)
+ data["busy"] = "Copying data to disk..."
+ else if (dish)
+ data["growth"] = min(dish.growth, 100)
+
+ if (dish.virus2)
+ if (dish.virus2.affected_species)
+ data["affected_species"] = dish.analysed ? list2text(dish.virus2.affected_species, ", ") : "Unknown"
+
+ if (dish.growth >= 50)
+ var/list/effects[0]
+ for (var/datum/disease2/effectholder/e in dish.virus2.effects)
+ effects.Add(list(list("name" = (dish.analysed ? e.effect.name : "Unknown"), "stage" = (e.stage), "reference" = "\ref[e]")))
+ data["effects"] = effects
+ else
+ data["info"] = "Insufficient cell growth for gene splicing."
+ else
+ data["info"] = "No virus detected."
else
- if(dish)
- dat = "Virus dish inserted."
+ data["info"] = "No dish loaded."
- dat += " Current DNA strand : "
- if(memorybank)
- dat += ""
- if(analysed)
- dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])"
- else
- dat += "Unknown DNA strand ([5-memorybank.effect.stage])"
- dat += " "
-
- dat += "Burn DNA Sequence to data storage disk "
- else
- dat += "Empty."
-
- dat += " "
-
- if(dish)
- if(dish.virus2)
- if(dish.growth >= 50)
- for(var/datum/disease2/effectholder/e in dish.virus2.effects)
- dat += " DNA strand"
- if(dish.analysed)
- dat += ": [e.effect.name]"
- dat += " (5-[e.effect.stage]) "
- else
- dat += " Insufficent cells to attempt gene splicing."
- else
- dat += " No virus found in dish."
-
- dat += "Eject disk "
- else
- dat += " Please insert dish."
-
- user << browse(dat, "window=computer;size=400x500")
- onclose(user, "computer")
- return
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ if (!ui)
+ ui = new(user, src, ui_key, "disease_splicer.tmpl", src.name, 400, 600)
+ ui.set_initial_data(data)
+ ui.open()
/obj/machinery/computer/diseasesplicer/process()
if(stat & (NOPOWER|BROKEN))
return
- //use_power(500)
if(scanning)
scanning -= 1
if(!scanning)
- state("The [src.name] beeps", "blue")
+ ping("\The [src] pings, \"Analysis complete.\"")
+ nanomanager.update_uis(src)
if(splicing)
splicing -= 1
if(!splicing)
- state("The [src.name] pings", "blue")
+ ping("\The [src] pings, \"Splicing operation complete.\"")
+ nanomanager.update_uis(src)
if(burning)
burning -= 1
if(!burning)
var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc)
+ d.analysed = analysed
if(analysed)
- d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])"
+ if (memorybank)
+ d.name = "[memorybank.effect.name] GNA disk (Stage: [memorybank.effect.stage])"
+ d.effect = memorybank
+ else if (species_buffer)
+ d.name = "[list2text(species_buffer, ", ")] GNA disk"
+ d.species = species_buffer
else
- d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])"
- d.effect = memorybank
- state("The [src.name] zings", "blue")
+ if (memorybank)
+ d.name = "Unknown GNA disk (Stage: [memorybank.effect.stage])"
+ d.effect = memorybank
+ else if (species_buffer)
+ d.name = "Unknown Species GNA disk"
+ d.species = species_buffer
- src.updateUsrDialog()
- return
+ ping("\The [src] pings, \"Backup disk saved.\"")
+ nanomanager.update_uis(src)
/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
- if(..())
- return
+ if(..()) return 0
- if(usr) usr.set_machine(src)
+ var/mob/user = usr
+ var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
+
+ src.add_fingerprint(user)
+
+ if (href_list["close"])
+ user.unset_machine()
+ ui.close()
+ return 0
if (href_list["grab"])
- memorybank = locate(href_list["grab"])
- analysed = dish.analysed
- del(dish)
- dish = null
- scanning = 10
+ if (dish)
+ memorybank = locate(href_list["grab"])
+ species_buffer = null
+ analysed = dish.analysed
+ dish = null
+ scanning = 10
+ return 1
- else if(href_list["eject"])
- dish.loc = src.loc
- dish = null
+ if (href_list["affected_species"])
+ if (dish)
+ memorybank = null
+ species_buffer = dish.virus2.affected_species
+ analysed = dish.analysed
+ dish = null
+ scanning = 10
+ return 1
- else if(href_list["splice"])
+ if(href_list["eject"])
+ if (dish)
+ dish.loc = src.loc
+ dish = null
+ return 1
+
+ if(href_list["splice"])
if(dish)
- for(var/datum/disease2/effectholder/e in dish.virus2.effects)
- if(e.stage == memorybank.stage)
- e.effect = memorybank.effect
+ if (memorybank)
+ for(var/datum/disease2/effectholder/e in dish.virus2.effects)
+ if(e.stage == memorybank.stage)
+ e.effect = memorybank.effect
+
+ if (species_buffer)
+ dish.virus2.affected_species = species_buffer
+
splicing = 10
-// dish.virus2.spreadtype = "Blood"
+ dish.virus2.uniqueID = rand(0,10000)
+ return 1
- else if(href_list["disk"])
+ if(href_list["disk"])
burning = 10
+ return 1
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
+ return 0
diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm
index 74d5470ec1..53f6688ef8 100644
--- a/code/modules/virus2/dishincubator.dm
+++ b/code/modules/virus2/dishincubator.dm
@@ -14,120 +14,79 @@
var/foodsupply = 0
var/toxins = 0
- var/virusing
+/obj/machinery/disease2/incubator/attackby(var/obj/O as obj, var/mob/user as mob)
+ if(istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/syringe))
-/obj/machinery/disease2/incubator/attackby(var/obj/B as obj, var/mob/user as mob)
- if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
-
- if(src.beaker)
- if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
- user << "A syringe is already loaded into the machine."
- else
- user << "A beaker is already loaded into the machine."
+ if(beaker)
+ user << "\The [src] is already loaded."
return
- src.beaker = B
+ beaker = O
user.drop_item()
- B.loc = src
- if(istype(B,/obj/item/weapon/reagent_containers/syringe))
- user << "You add the syringe to the machine!"
- src.updateUsrDialog()
- else
- user << "You add the beaker to the machine!"
- src.updateUsrDialog()
- else
- if(istype(B,/obj/item/weapon/virusdish))
- if(src.dish)
- user << "A dish is already loaded into the machine."
- return
+ O.loc = src
- src.dish = B
- user.drop_item()
- B.loc = src
- if(istype(B,/obj/item/weapon/virusdish))
- user << "You add the dish to the machine!"
- src.updateUsrDialog()
+ user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
+ nanomanager.update_uis(src)
-/obj/machinery/disease2/incubator/Topic(href, href_list)
- if(..()) return
-
- if(usr) usr.set_machine(src)
-
- if (href_list["ejectchem"])
- if(beaker)
- beaker.loc = src.loc
- beaker = null
- if(!dish)
+ src.attack_hand(user)
return
- if (href_list["power"])
- on = !on
- if(on)
- icon_state = "incubator_on"
- else
- icon_state = "incubator"
- if (href_list["ejectdish"])
+
+ if(istype(O, /obj/item/weapon/virusdish))
+
if(dish)
- dish.loc = src.loc
- dish = null
- if (href_list["rad"])
- radiation += 10
- if (href_list["flush"])
- radiation = 0
- toxins = 0
- foodsupply = 0
+ user << "The dish tray is aleady full!"
+ return
- if(href_list["virus"])
- if (!dish)
- state("\The [src.name] buzzes, \"No viral culture sample detected.\"", "blue")
- else
- var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
- if (!B)
- state("\The [src.name] buzzes, \"No suitable breeding enviroment detected.\"", "blue")
- else
- if (!B.data["virus2"])
- B.data["virus2"] = list()
- var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy())
- B.data["virus2"] = virus
+ dish = O
+ user.drop_item()
+ O.loc = src
- state("\The [src.name] pings, \"Injection complete.\"", "blue")
+ user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
+ nanomanager.update_uis(src)
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
+ src.attack_hand(user)
/obj/machinery/disease2/incubator/attack_hand(mob/user as mob)
- if(stat & BROKEN)
- return
+ if(stat & (NOPOWER|BROKEN)) return
+ ui_interact(user)
+
+/obj/machinery/disease2/incubator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
- var/dat = ""
- if(!dish)
- dat = "Please insert dish into the incubator. "
- var/string = "Off"
- if(on)
- string = "On"
- dat += "Power status : [string] "
- dat += " "
- dat += "Food supply : [foodsupply]"
- dat += " "
- dat += "Radiation Levels : [radiation] RADS : Radiate "
- dat += " "
- dat += "Toxins : [toxins]"
- dat += " "
- if(beaker)
- dat += "Eject chemicals : Eject "
- dat += " "
- if(dish)
- dat += "Eject Virus dish : Eject "
- dat += " "
- if(beaker)
- dat += "Breed viral culture in beaker : Start "
- dat += " "
- dat += " "
- dat += "Flush system "
- dat += "Close "
- user << browse("Pathogenic incubator incubator menu: [dat]", "window=incubator;size=575x400")
- onclose(user, "incubator")
- return
+
+ var/data[0]
+ data["chemicals_inserted"] = !!beaker
+ data["dish_inserted"] = !!dish
+ data["food_supply"] = foodsupply
+ data["radiation"] = radiation
+ data["toxins"] = min(toxins, 100)
+ data["on"] = on
+ data["system_in_use"] = foodsupply > 0 || radiation > 0 || toxins > 0
+ data["chemical_volume"] = beaker ? beaker.reagents.total_volume : 0
+ data["max_chemical_volume"] = beaker ? beaker.volume : 1
+ data["virus"] = dish ? dish.virus2 : null
+ data["growth"] = dish ? min(dish.growth, 100) : 0
+ data["infection_rate"] = dish && dish.virus2 ? dish.virus2.infectionchance * 10 : 0
+ data["analysed"] = dish && dish.analysed ? 1 : 0
+ data["can_breed_virus"] = null
+ data["blood_already_infected"] = null
+
+ if (beaker)
+ var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
+ data["can_breed_virus"] = dish && dish.virus2 && B
+
+ if (B)
+ if (!B.data["virus2"])
+ B.data["virus2"] = list()
+
+ var/list/virus = B.data["virus2"]
+ for (var/ID in virus)
+ data["blood_already_infected"] = virus[ID]
+
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ if (!ui)
+ ui = new(user, src, ui_key, "dish_incubator.tmpl", src.name, 400, 600)
+ ui.set_initial_data(data)
+ ui.open()
/obj/machinery/disease2/incubator/process()
if(dish && on && dish.virus2)
@@ -135,34 +94,105 @@
if(!powered(EQUIP))
on = 0
icon_state = "incubator"
+
if(foodsupply)
+ if(dish.growth + 3 >= 100 && dish.growth < 100)
+ ping("\The [src] pings, \"Sufficient viral growth density achieved.\"")
+
foodsupply -= 1
dish.growth += 3
- if(dish.growth >= 100)
- state("The [src.name] pings", "blue")
+ nanomanager.update_uis(src)
+
if(radiation)
if(radiation > 50 & prob(5))
dish.virus2.majormutate()
if(dish.info)
dish.info = "OUTDATED : [dish.info]"
dish.analysed = 0
- state("The [src.name] beeps", "blue")
-
+ ping("\The [src] pings, \"Mutant viral strain detected.\"")
else if(prob(5))
dish.virus2.minormutate()
radiation -= 1
+ nanomanager.update_uis(src)
if(toxins && prob(5))
dish.virus2.infectionchance -= 1
+ nanomanager.update_uis(src)
if(toxins > 50)
+ dish.growth = 0
dish.virus2 = null
+ nanomanager.update_uis(src)
else if(!dish)
on = 0
icon_state = "incubator"
+ nanomanager.update_uis(src)
if(beaker)
if(!beaker.reagents.remove_reagent("virusfood",5))
foodsupply += 10
- if(!beaker.reagents.remove_reagent("toxin",1))
- toxins += 1
+ nanomanager.update_uis(src)
- src.updateUsrDialog()
\ No newline at end of file
+ if (locate(/datum/reagent/toxin) in beaker.reagents.reagent_list)
+ for(var/datum/reagent/toxin/T in beaker.reagents.reagent_list)
+ toxins += max(T.toxpwr,1)
+ beaker.reagents.remove_reagent(T.id,1)
+ nanomanager.update_uis(src)
+
+/obj/machinery/disease2/incubator/Topic(href, href_list)
+ if (..()) return 0
+
+ var/mob/user = usr
+ var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
+
+ src.add_fingerprint(user)
+
+ if (href_list["close"])
+ user.unset_machine()
+ ui.close()
+ return 0
+
+ if (href_list["ejectchem"])
+ if(beaker)
+ beaker.loc = src.loc
+ beaker = null
+ return 1
+
+ if (href_list["power"])
+ if (dish)
+ on = !on
+ icon_state = on ? "incubator_on" : "incubator"
+ return 1
+
+ if (href_list["ejectdish"])
+ if(dish)
+ dish.loc = src.loc
+ dish = null
+ return 1
+
+ if (href_list["rad"])
+ radiation += 10
+ return 1
+
+ if (href_list["flush"])
+ radiation = 0
+ toxins = 0
+ foodsupply = 0
+ return 1
+
+ if(href_list["virus"])
+ if (!dish)
+ return 1
+
+ var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
+ if (!B)
+ return 1
+
+ if (!B.data["virus2"])
+ B.data["virus2"] = list()
+
+ var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy())
+ B.data["virus2"] += virus
+
+ ping("\The [src] pings, \"Injection complete.\"")
+ return 1
+
+ return 0
diff --git a/code/modules/virus2/effect.dm b/code/modules/virus2/effect.dm
index a1d93744b2..e5600b7633 100644
--- a/code/modules/virus2/effect.dm
+++ b/code/modules/virus2/effect.dm
@@ -22,7 +22,8 @@
if(f.stage == src.stage)
list += f
effect = pick(list)
- chance = rand(1,6)
+ chance = rand(0,effect.chance_maxm)
+ multiplier = rand(1,effect.maxm)
/datum/disease2/effectholder/proc/minormutate()
switch(pick(1,2,3,4,5))
@@ -47,23 +48,6 @@
proc/activate(var/mob/living/carbon/mob,var/multiplier)
proc/deactivate(var/mob/living/carbon/mob)
-////////////////////////SPECIAL/////////////////////////////////
-/*/datum/disease2/effect/alien
- name = "Unidentified Foreign Body"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob << "\red You feel something tearing its way out of your stomach..."
- mob.adjustToxLoss(10)
- mob.updatehealth()
- if(prob(40))
- if(mob.client)
- mob.client.mob = new/mob/living/carbon/alien/larva(mob.loc)
- else
- new/mob/living/carbon/alien/larva(mob.loc)
- var/datum/disease2/disease/D = mob:virus2
- mob:gib()
- del D*/
-
/datum/disease2/effect/invisible
name = "Waiting Syndrome"
stage = 1
@@ -219,7 +203,8 @@
if(istype(mob, /mob/living/carbon/human))
var/mob/living/carbon/human/H = mob
var/datum/organ/internal/brain/B = H.internal_organs["brain"]
- B.take_damage(5)
+ if (B.damage < B.min_broken_damage)
+ B.take_damage(5)
else
mob.setBrainLoss(50)
@@ -334,7 +319,12 @@
name = "Coldingtons Effect"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
+ if (prob(30))
+ mob << "You feel like you are about to sneeze! "
+ sleep(5)
mob.say("*sneeze")
+ for(var/mob/living/carbon/M in get_step(mob,mob.dir))
+ mob.spread_disease_to(M)
if (prob(50))
var/obj/effect/decal/cleanable/mucus/M = new(get_turf(mob))
M.virus2 = virus_copylist(mob.virus2)
diff --git a/code/modules/virus2/helpers.dm b/code/modules/virus2/helpers.dm
index 1748d20b50..93acbd6ef4 100644
--- a/code/modules/virus2/helpers.dm
+++ b/code/modules/virus2/helpers.dm
@@ -13,14 +13,19 @@ proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
score += 5
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
score += 10
- if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space)) score += 15
- if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood)) score += 15
+ if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
+ score += 20
+ if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
+ score += 30
if (vector == "Contact")
if(M:gloves) score += 15
- if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
- if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
+ if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
+ score += 15
+ if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
+ score += 15
+
// log_debug("[M]'s resistance to [vector] viruses: [score]")
@@ -47,7 +52,7 @@ proc/airborne_can_reach(turf/source, turf/target)
for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break
- var/rval = (dummy.loc in range(1,target))
+ var/rval = dummy.Adjacent(target)
dummy.loc = null
dummy = null
return rval
@@ -65,10 +70,18 @@ proc/airborne_can_reach(turf/source, turf/target)
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
if(M.antibodies & disease.antigen != 0)
return
- if(istype(M,/mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
- if (H.species.flags & IS_SYNTHETIC)
+ if(M.reagents.has_reagent("spaceacillin"))
+ return
+ if(istype(M,/mob/living/carbon/monkey))
+ var/mob/living/carbon/monkey/chimp = M
+ if (!(chimp.greaterform in disease.affected_species))
return
+
+ if(istype(M,/mob/living/carbon/human))
+ var/mob/living/carbon/human/chump = M
+ if (!(chump.species.name in disease.affected_species))
+ return
+
// log_debug("Infecting [M]")
if(prob(disease.infectionchance) || forced)
@@ -87,14 +100,14 @@ proc/airborne_can_reach(turf/source, turf/target)
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom()
D.infectionchance = 1
- M.virus2["[D.uniqueID]"] = D
+ infect_virus2(M,D,1)
M.hud_updateflag |= 1 << STATUS_HUD
//Infects mob M with random greated disease, if he doesn't have one
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom(1)
- M.virus2["[D.uniqueID]"] = D
+ infect_virus2(M,D,1)
M.hud_updateflag |= 1 << STATUS_HUD
//Fancy prob() function.
diff --git a/code/modules/virus2/isolator.dm b/code/modules/virus2/isolator.dm
index 53b47b95e1..e3a68c9949 100644
--- a/code/modules/virus2/isolator.dm
+++ b/code/modules/virus2/isolator.dm
@@ -1,97 +1,233 @@
+// UI menu navigation
+#define HOME "home"
+#define LIST "list"
+#define ENTRY "entry"
+
/obj/machinery/disease2/isolator/
name = "Pathogenic Isolator"
density = 1
anchored = 1
icon = 'icons/obj/virology.dmi'
icon_state = "isolator"
- var/datum/disease2/disease/virus2 = null
var/isolating = 0
- var/beaker = null
+ var/state = HOME
+ var/datum/disease2/disease/virus2 = null
+ var/datum/data/record/entry = null
+ var/obj/item/weapon/reagent_containers/syringe/sample = null
-/obj/machinery/disease2/isolator/attackby(var/W as obj, var/mob/user)
- if(!istype(W,/obj/item/weapon/reagent_containers/syringe))
- return
-
- var/obj/item/weapon/reagent_containers/syringe/B = W
-
- if(src.beaker)
- user << "A syringe is already loaded into the machine."
- return
-
- src.beaker = B
- user.drop_item()
- B.loc = src
- if(istype(B,/obj/item/weapon/reagent_containers/syringe))
- user << "You add the syringe to the machine!"
- src.updateUsrDialog()
- icon_state = "isolator_in"
-
-/obj/machinery/disease2/isolator/Topic(href, href_list)
- if(..()) return
-
- usr.machine = src
- if(!beaker) return
- var/datum/reagents/R = beaker:reagents
-
- if (href_list["isolate"])
- var/datum/reagent/blood/Blood
- for(var/datum/reagent/blood/B in R.reagent_list)
- if(B)
- Blood = B
- break
- var/list/virus = virus_copylist(Blood.data["virus2"])
- var/choice = text2num(href_list["isolate"]);
- for (var/datum/disease2/disease/V in virus)
- if (V.uniqueID == choice)
- virus2 = virus
- isolating = 40
- icon_state = "isolator_processing"
- src.updateUsrDialog()
- return
-
- else if (href_list["main"])
- attack_hand(usr)
- return
- else if (href_list["eject"])
- beaker:loc = src.loc
- beaker = null
+/obj/machinery/disease2/isolator/update_icon()
+ if (stat & (BROKEN|NOPOWER))
icon_state = "isolator"
- src.updateUsrDialog()
return
+ if (isolating)
+ icon_state = "isolator_processing"
+ else if (sample)
+ icon_state = "isolator_in"
+ else
+ icon_state = "isolator"
+
+/obj/machinery/disease2/isolator/attackby(var/obj/O as obj, var/mob/user)
+ if(!istype(O,/obj/item/weapon/reagent_containers/syringe)) return
+ var/obj/item/weapon/reagent_containers/syringe/S = O
+
+ if(sample)
+ user << "\The [src] is already loaded."
+ return
+
+ sample = S
+ user.drop_item()
+ S.loc = src
+
+ user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
+ nanomanager.update_uis(src)
+ update_icon()
+
+ src.attack_hand(user)
+
/obj/machinery/disease2/isolator/attack_hand(mob/user as mob)
- if(stat & BROKEN)
- return
- user.machine = src
- var/dat = ""
- if(!beaker)
- dat = "Please insert sample into the isolator. "
- dat += "Close "
- else if(isolating)
- dat = "Isolating"
- else
- var/datum/reagents/R = beaker:reagents
- dat += "Eject "
- if(!R.total_volume)
- dat += "[beaker] is empty."
- else
- dat += "Contained reagents: "
- for(var/datum/reagent/blood/G in R.reagent_list)
- if(G.data["virus2"])
- var/list/virus = G.data["virus2"]
- for (var/datum/disease2/disease/V in virus)
- dat += " [G.name]: Isolate pathogen #[V.uniqueID] "
- else
- dat += " No pathogen "
- user << browse("Pathogenic Isolator Isolator menu: [dat]", "window=isolator;size=575x400")
- onclose(user, "isolator")
- return
+ if(stat & (NOPOWER|BROKEN)) return
+ ui_interact(user)
+
+/obj/machinery/disease2/isolator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+ user.set_machine(src)
+
+ var/data[0]
+ data["syringe_inserted"] = !!sample
+ data["isolating"] = isolating
+ data["pathogen_pool"] = null
+ data["state"] = state
+ data["entry"] = entry
+ data["can_print"] = (state != HOME || sample) && !isolating
+
+ switch (state)
+ if (HOME)
+ if (sample)
+ var/list/pathogen_pool[0]
+ for(var/datum/reagent/blood/B in sample.reagents.reagent_list)
+ var/list/virus = B.data["virus2"]
+ for (var/ID in virus)
+ var/datum/disease2/disease/V = virus[ID]
+ var/datum/data/record/R = null
+ if (ID in virusDB)
+ R = virusDB[ID]
+
+ var/mob/living/carbon/human/D = B.data["donor"]
+ pathogen_pool.Add(list(list(\
+ "name" = "[D.get_species()] [B.name]", \
+ "dna" = B.data["blood_DNA"], \
+ "unique_id" = V.uniqueID, \
+ "reference" = "\ref[V]", \
+ "is_in_database" = !!R, \
+ "record" = "\ref[R]")))
+
+ if (pathogen_pool.len > 0)
+ data["pathogen_pool"] = pathogen_pool
+
+ if (LIST)
+ var/list/db[0]
+ for (var/ID in virusDB)
+ var/datum/data/record/r = virusDB[ID]
+ db.Add(list(list("name" = r.fields["name"], "record" = "\ref[r]")))
+
+ if (db.len > 0)
+ data["database"] = db
+
+ if (ENTRY)
+ if (entry)
+ var/desc = entry.fields["description"]
+ data["entry"] = list(\
+ "name" = entry.fields["name"], \
+ "description" = replacetext(desc, "\n", ""))
+
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ if (!ui)
+ ui = new(user, src, ui_key, "pathogenic_isolator.tmpl", src.name, 400, 500)
+ ui.set_initial_data(data)
+ ui.open()
/obj/machinery/disease2/isolator/process()
- if(isolating > 0)
+ if (isolating > 0)
isolating -= 1
- if(isolating == 0)
- var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
- d.virus2 = virus2.getcopy()
- virus2 = null
- icon_state = "isolator_in"
+ if (isolating == 0)
+ if (virus2)
+ var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
+ d.virus2 = virus2.getcopy()
+ virus2 = null
+ ping("\The [src] pings, \"Viral strain isolated.\"")
+
+ nanomanager.update_uis(src)
+ update_icon()
+
+/obj/machinery/disease2/isolator/Topic(href, href_list)
+ if (..()) return 0
+
+ var/mob/user = usr
+ var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
+
+ src.add_fingerprint(user)
+
+ if (href_list["close"])
+ user.unset_machine()
+ ui.close()
+ return 0
+
+ if (href_list[HOME])
+ state = HOME
+ return 1
+
+ if (href_list[LIST])
+ state = LIST
+ return 1
+
+ if (href_list[ENTRY])
+ if (istype(locate(href_list["view"]), /datum/data/record))
+ entry = locate(href_list["view"])
+
+ state = ENTRY
+ return 1
+
+ if (href_list["print"])
+ print(user)
+ return 1
+
+ if(!sample) return 1
+
+ if (href_list["isolate"])
+ var/datum/disease2/disease/V = locate(href_list["isolate"])
+ if (V)
+ virus2 = V
+ isolating = 20
+ update_icon()
+ return 1
+
+ if (href_list["eject"])
+ sample.loc = src.loc
+ sample = null
+ update_icon()
+ return 1
+
+/obj/machinery/disease2/isolator/proc/print(var/mob/user)
+ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
+
+ switch (state)
+ if (HOME)
+ if (!sample) return
+ P.name = "paper - Patient Diagnostic Report"
+ P.info = {"
+ [virology_letterhead("Patient Diagnostic Report")]
+ CONFIDENTIAL MEDICAL REPORT
+ Sample: [sample.name]
+"}
+
+ if (user)
+ P.info += "Generated By: [user.name] "
+
+ P.info += " "
+
+ for(var/datum/reagent/blood/B in sample.reagents.reagent_list)
+ var/mob/living/carbon/human/D = B.data["donor"]
+ P.info += "[D.get_species()] [B.name]: [B.data["blood_DNA"]] "
+
+ var/list/virus = B.data["virus2"]
+ P.info += "Pathogens: "
+ if (virus.len > 0)
+ for (var/ID in virus)
+ var/datum/disease2/disease/V = virus[ID]
+ P.info += "[V.name()] "
+ else
+ P.info += "None "
+
+ P.info += {"
+
+ Additional Notes:
+"}
+
+ if (LIST)
+ P.name = "paper - Virus List"
+ P.info = {"
+ [virology_letterhead("Virus List")]
+"}
+
+ var/i = 0
+ for (var/ID in virusDB)
+ i++
+ var/datum/data/record/r = virusDB[ID]
+ P.info += "[i]. " + r.fields["name"]
+ P.info += " "
+
+ P.info += {"
+
+ Additional Notes:
+"}
+
+ if (ENTRY)
+ P.name = "paper - Viral Profile"
+ P.info = {"
+ [virology_letterhead("Viral Profile")]
+ [entry.fields["description"]]
+
+ Additional Notes:
+"}
+
+ state("The nearby computer prints out a report.")
diff --git a/code/modules/virus2/items_devices.dm b/code/modules/virus2/items_devices.dm
index 98e0dab2a1..f8c8596141 100644
--- a/code/modules/virus2/items_devices.dm
+++ b/code/modules/virus2/items_devices.dm
@@ -1,33 +1,42 @@
-/obj/machinery/proc/state(var/msg)
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] [msg] ", 2)
-
///////////////ANTIBODY SCANNER///////////////
/obj/item/device/antibody_scanner
- name = "Antibody Scanner"
- desc = "Used to scan living beings for antibodies in their blood."
+ name = "\improper Antibody Scanner"
+ desc = "Scans living beings for antibodies in their blood."
icon_state = "health"
w_class = 2.0
item_state = "electronic"
flags = FPRINT | TABLEPASS | CONDUCT
+/obj/item/device/antibody_scanner/attack(mob/M as mob, mob/user as mob)
+ if(!istype(M,/mob/living/carbon/))
+ report("Scan aborted: Incompatible target.", user)
+ return
-/obj/item/device/antibody_scanner/attack(mob/living/carbon/M as mob, mob/user as mob)
- if(!istype(M))
- user << "Incompatible object, scan aborted. "
- return
var/mob/living/carbon/C = M
+ if (istype(C,/mob/living/carbon/human/))
+ var/mob/living/carbon/human/H = C
+ if(H.species && H.species.flags & NO_BLOOD)
+ report("Scan aborted: The target does not have blood.", user)
+ return
+
if(!C.antibodies)
- user << "Unable to detect antibodies. "
+ report("Scan Complete: No antibodies detected.", user)
return
- var/code = antigens2string(M.antibodies)
- user << "[src] The antibody scanner displays a cryptic set of data: [code] "
+
+ if (CLUMSY in user.mutations && prob(50))
+ // I was tempted to be really evil and rot13 the output.
+ report("Antibodies detected: [reverse_text(antigens2string(C.antibodies))]", user)
+ else
+ report("Antibodies detected: [antigens2string(C.antibodies)]", user)
+
+/obj/item/device/antibody_scanner/proc/report(var/text, mob/user as mob)
+ user << "\blue \icon[src] \The [src] beeps, \"[text]\""
///////////////VIRUS DISH///////////////
/obj/item/weapon/virusdish
- name = "Virus containment/growth dish"
+ name = "virus containment/growth dish"
icon = 'icons/obj/items.dmi'
icon_state = "implantcase-b"
var/datum/disease2/disease/virus2 = null
@@ -35,10 +44,8 @@
var/info = 0
var/analysed = 0
- reagents = list()
-
/obj/item/weapon/virusdish/random
- name = "Virus Sample"
+ name = "virus sample"
/obj/item/weapon/virusdish/random/New()
..()
@@ -51,7 +58,7 @@
return
..()
if(prob(50))
- user << "The dish shatters"
+ user << "\The [src] shatters!"
if(virus2.infectionchance > 0)
for(var/mob/living/carbon/target in view(1, get_turf(src)))
if(airborne_can_reach(get_turf(src), get_turf(target)))
@@ -60,22 +67,38 @@
del src
/obj/item/weapon/virusdish/examine()
- usr << "This is a virus containment dish"
+ usr << "This is a virus containment dish."
if(src.info)
- usr << "It has the following information about its contents"
+ usr << "It has the following information about its contents:"
usr << src.info
+/obj/item/weapon/ruinedvirusdish
+ name = "ruined virus sample"
+ icon = 'icons/obj/items.dmi'
+ icon_state = "implantcase-b"
+ desc = "The bacteria in the dish are completely dead."
+
+/obj/item/weapon/ruinedvirusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
+ if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
+ return ..()
+
+ if(prob(50))
+ user << "\The [src] shatters!"
+ del src
+
///////////////GNA DISK///////////////
/obj/item/weapon/diseasedisk
- name = "Blank GNA disk"
+ name = "blank GNA disk"
icon = 'icons/obj/cloning.dmi'
icon_state = "datadisk0"
var/datum/disease2/effectholder/effect = null
+ var/list/species = null
var/stage = 1
+ var/analysed = 1
/obj/item/weapon/diseasedisk/premade/New()
- name = "Blank GNA disk (stage: [5-stage])"
+ name = "blank GNA disk (stage: [stage])"
effect = new /datum/disease2/effectholder
effect.effect = new /datum/disease2/effect/invisible
- effect.stage = stage
\ No newline at end of file
+ effect.stage = stage
diff --git a/code/stylesheet.dm b/code/stylesheet.dm
index f6bdc0057e..cb03607e8f 100644
--- a/code/stylesheet.dm
+++ b/code/stylesheet.dm
@@ -30,6 +30,7 @@ em {font-style: normal; font-weight: bold;}
.comradio {color: #193A7A;}
.syndradio {color: #6D3F40;}
.centradio {color: #5C5C8A;}
+.airadio {color: #FF00FF;}
.secradio {color: #A30000;}
.engradio {color: #A66300;}
diff --git a/code/unused/disease2/analyser.dm b/code/unused/disease2/analyser.dm
deleted file mode 100644
index abc123369a..0000000000
--- a/code/unused/disease2/analyser.dm
+++ /dev/null
@@ -1,75 +0,0 @@
-/obj/machinery/disease2/diseaseanalyser
- name = "Disease Analyser"
- icon = 'icons/obj/virology.dmi'
- icon_state = "analyser"
- anchored = 1
- density = 1
-
- var/scanning = 0
- var/pause = 0
-
- var/obj/item/weapon/virusdish/dish = null
-
-/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/I as obj, var/mob/user as mob)
- if(istype(I,/obj/item/weapon/virusdish))
- var/mob/living/carbon/c = user
- if(!dish)
-
- dish = I
- c.drop_item()
- I.loc = src
- for(var/mob/M in viewers(src))
- if(M == user) continue
- M.show_message("\blue [user.name] inserts the [dish.name] in the [src.name]", 3)
-
-
- else
- user << "There is already a dish inserted"
-
- //else
- return
-
-
-/obj/machinery/disease2/diseaseanalyser/process()
- if(stat & (NOPOWER|BROKEN))
- return
- use_power(500)
- src.updateDialog()
-
-
- if(scanning)
- scanning -= 1
- if(scanning == 0)
- var/r = "GNAv2 based virus lifeform"
- r += " Infection rate : [dish.virus2.infectionchance * 10]"
- r += " Spread form : [dish.virus2.spreadtype]"
- r += " Progress Speed : [dish.virus2.stageprob * 10]"
- for(var/datum/disease2/effectholder/E in dish.virus2.effects)
- r += " Effect:[E.effect.name]. Strength : [E.multiplier * 8]. Verosity : [E.chance * 15]. Type : [5-E.stage]."
- var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
- P.info = r
- dish.info = r
- dish.analysed = 1
- dish.loc = src.loc
- dish = null
- icon_state = "analyser"
-
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3)
- else if(dish && !scanning && !pause)
- if(dish.virus2 && dish.growth > 50)
- dish.growth -= 10
- scanning = 25
- icon_state = "analyser_processing"
- else
- pause = 1
- spawn(25)
- dish.loc = src.loc
- dish = null
- for(var/mob/M in viewers(src))
- M.show_message("\icon[src] \blue The [src.name] buzzes", 2)
- pause = 0
-
-
-
- return
diff --git a/code/unused/disease2/base.dm b/code/unused/disease2/base.dm
deleted file mode 100644
index eab69ba69c..0000000000
--- a/code/unused/disease2/base.dm
+++ /dev/null
@@ -1,331 +0,0 @@
-//To simplify, all diseases have 4 stages, with effects starting at stage 2
-//Stage 1 = Rest,Minor disease
-//Stage 2 = Minimal effect
-//Stage 3 = Medium effect
-//Stage 4 = Death/Really Really really bad effect
-
-
-/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
- if(prob(disease.infectionchance))
- if(M.virus2)
- return
- else
- var/score = 0
- if(!forced)
- if(istype(M, /mob/living/carbon/human))
- if(M:gloves)
- score += 5
- if(istype(M:wear_suit, /obj/item/clothing/suit/space)) score += 10
- if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit)) score += 10
- if(istype(M:head, /obj/item/clothing/head/helmet/space)) score += 5
- if(istype(M:head, /obj/item/clothing/head/bio_hood)) score += 5
- if(M.wear_mask)
- score += 5
- if((istype(M:wear_mask, /obj/item/clothing/mask) || istype(M:wear_mask, /obj/item/clothing/mask/surgical)) && !M.internal)
- score += 5
- if(M.internal)
- score += 5
-
- if(score > 15)
- return
- // else if(score == 20 && prob(95))
- // return
- else if(score == 15 && prob(75))
- return
- else if(score == 10 && prob(55))
- return
- else if(score == 5 && prob(35))
- return
-
- M.virus2 = disease.getcopy()
- M.virus2.minormutate()
-
- for(var/datum/disease2/resistance/res in M.resistances)
- if(res.resistsdisease(M.virus2))
- M.virus2 = null
-
-
-
-/datum/disease2/resistance
- var/list/datum/disease2/effect/resistances = list()
-
- proc/resistsdisease(var/datum/disease2/disease/virus2)
- var/list/res2 = list()
- for(var/datum/disease2/effect/e in resistances)
- res2 += e.type
- for(var/datum/disease2/effectholder/holder in virus2)
- if(!(holder.effect.type in res2))
- return 0
- else
- res2 -= holder.effect.type
- if(res2.len > 0)
- return 0
- else
- return 1
-
- New(var/datum/disease2/disease/virus2)
- for(var/datum/disease2/effectholder/h in virus2.effects)
- resistances += h.effect.type
-
-
-/proc/infect_mob_random(var/mob/living/carbon/M)
- if(!M.virus2)
- M.virus2 = new /datum/disease2/disease
- M.virus2.makerandom()
-
-/datum/disease2/disease
- var/infectionchance = 10
- var/spreadtype = "Blood" // Can also be "Airborne"
- var/stage = 1
- var/stageprob = 2
- var/dead = 0
- var/clicks = 0
-
- var/uniqueID = 0
- var/list/datum/disease2/effectholder/effects = list()
- proc/makerandom()
- var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
- holder.stage = 1
- holder.getrandomeffect()
- effects += holder
- holder = new /datum/disease2/effectholder
- holder.stage = 2
- holder.getrandomeffect()
- effects += holder
- holder = new /datum/disease2/effectholder
- holder.stage = 3
- holder.getrandomeffect()
- effects += holder
- holder = new /datum/disease2/effectholder
- holder.stage = 4
- holder.getrandomeffect()
- effects += holder
- uniqueID = rand(0,10000)
- infectionchance = rand(1,10)
- spreadtype = "Airborne"
- proc/minormutate()
- var/datum/disease2/effectholder/holder = pick(effects)
- holder.minormutate()
- infectionchance = min(10,infectionchance + rand(0,1))
- proc/issame(var/datum/disease2/disease/disease)
- var/list/types = list()
- var/list/types2 = list()
- for(var/datum/disease2/effectholder/d in effects)
- types += d.effect.type
- var/equal = 1
-
- for(var/datum/disease2/effectholder/d in disease.effects)
- types2 += d.effect.type
-
- for(var/type in types)
- if(!(type in types2))
- equal = 0
- return equal
-
- proc/activate(var/mob/living/carbon/mob)
- if(dead)
- mob.virus2 = null
- return
- if(mob.stat == 2)
- return
- if(mob.radiation > 50)
- if(prob(1))
- majormutate()
- if(mob.reagents.has_reagent("spaceacillin"))
- return
- if(prob(stageprob) && prob(25 + (clicks/100)) && stage != 4)
- stage++
- clicks = 0
- for(var/datum/disease2/effectholder/e in effects)
- e.runeffect(mob,stage)
-
- proc/cure_added(var/datum/disease2/resistance/res)
- if(res.resistsdisease(src))
- dead = 1
-
- proc/majormutate()
- var/datum/disease2/effectholder/holder = pick(effects)
- holder.majormutate()
-
-
- proc/getcopy()
-// world << "getting copy"
- var/datum/disease2/disease/disease = new /datum/disease2/disease
- disease.infectionchance = infectionchance
- disease.spreadtype = spreadtype
- disease.stageprob = stageprob
- for(var/datum/disease2/effectholder/holder in effects)
- // world << "adding effects"
- var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
- newholder.effect = new holder.effect.type
- newholder.chance = holder.chance
- newholder.cure = holder.cure
- newholder.multiplier = holder.multiplier
- newholder.happensonce = holder.happensonce
- newholder.stage = holder.stage
- disease.effects += newholder
- // world << "[newholder.effect.name]"
- // world << "[disease]"
- return disease
-
-/datum/disease2/effect
- var/name = "Blanking effect"
- var/stage = 4
- var/maxm = 1
- proc/activate(var/mob/living/carbon/mob,var/multiplier)
-
-/datum/disease2/effect/gibbingtons
- name = "Gibbingtons Syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.gib()
-
-/datum/disease2/effect/radian
- name = "Radian's syndrome"
- stage = 4
- maxm = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.radiation += (2*multiplier)
-
-/datum/disease2/effect/toxins
- name = "Hyperacid Syndrome"
- stage = 3
- maxm = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.adjustToxLoss(2*multiplier)
-
-/datum/disease2/effect/scream
- name = "Random screaming syndrome"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*scream")
-
-/datum/disease2/effect/drowsness
- name = "Automated sleeping syndrome"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.drowsyness += 10
-
-/datum/disease2/effect/shakey
- name = "World Shaking syndrome"
- stage = 3
- maxm = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- shake_camera(mob,5*multiplier)
-
-/datum/disease2/effect/deaf
- name = "Hard of hearing syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.ear_deaf += 20
-
-/datum/disease2/effect/invisible
- name = "Waiting Syndrome"
- stage = 1
- activate(var/mob/living/carbon/mob,var/multiplier)
- return
-/*
-/datum/disease2/effect/telepathic
- name = "Telepathy Syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.mutations |= 512
-*/
-/datum/disease2/effect/noface
- name = "Identity Loss syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.real_name = "Unknown"
-
-/datum/disease2/effect/monkey
- name = "Monkism syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- if(istype(mob,/mob/living/carbon/human))
- var/mob/living/carbon/human/h = mob
- h.monkeyize()
-
-/datum/disease2/effect/sneeze
- name = "Coldingtons Effect"
- stage = 1
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*sneeze")
-
-/datum/disease2/effect/gunck
- name = "Flemmingtons"
- stage = 1
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob << "\red Mucous runs down the back of your throat."
-
-/datum/disease2/effect/killertoxins
- name = "Toxification syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.adjustToxLoss(15)
-/*
-/datum/disease2/effect/hallucinations
- name = "Hallucinational Syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.hallucination += 25
-*/
-/datum/disease2/effect/sleepy
- name = "Resting syndrome"
- stage = 2
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.say("*collapse")
-
-/datum/disease2/effect/mind
- name = "Lazy mind syndrome"
- stage = 3
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.setBrainLoss(50)
-
-/datum/disease2/effect/suicide
- name = "Suicidal syndrome"
- stage = 4
- activate(var/mob/living/carbon/mob,var/multiplier)
- mob.suiciding = 1
- //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
- viewers(mob) << "\red [mob.name] is attempting to bite off \his tongue. It looks like \he's trying to commit suicide. "
- mob.oxyloss = max(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss(), mob.getOxyLoss())
- mob.updatehealth()
- spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
- mob.suiciding = 0
-
-/datum/disease2/effectholder
- var/name = "Holder"
- var/datum/disease2/effect/effect
- var/chance = 0 //Chance in percentage each tick
- var/cure = "" //Type of cure it requires
- var/happensonce = 0
- var/multiplier = 1 //The chance the effects are WORSE
- var/stage = 0
-
- proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
- if(happensonce > -1 && effect.stage <= stage && prob(chance))
- effect.activate(mob)
- if(happensonce == 1)
- happensonce = -1
-
- proc/getrandomeffect()
- var/list/datum/disease2/effect/list = list()
- for(var/e in (typesof(/datum/disease2/effect) - /datum/disease2/effect))
- // world << "Making [e]"
- var/datum/disease2/effect/f = new e
- if(f.stage == src.stage)
- list += f
- effect = pick(list)
- chance = rand(1,6)
-
- proc/minormutate()
- switch(pick(1,2,3,4,5))
- if(1)
- chance = rand(0,100)
- if(2)
- multiplier = rand(1,effect.maxm)
- proc/majormutate()
- getrandomeffect()
-
-/proc/dprob(var/p)
- return(prob(sqrt(p)) && prob(sqrt(p)))
diff --git a/code/unused/disease2/biohazard destroyer.dm b/code/unused/disease2/biohazard destroyer.dm
deleted file mode 100644
index 1f39043326..0000000000
--- a/code/unused/disease2/biohazard destroyer.dm
+++ /dev/null
@@ -1,20 +0,0 @@
-/obj/machinery/disease2/biodestroyer
- name = "Biohazard destroyer"
- icon = 'icons/obj/pipes/disposal.dmi'
- icon_state = "disposal"
- var/list/accepts = list(/obj/item/clothing,/obj/item/weapon/virusdish/,/obj/item/weapon/cureimplanter,/obj/item/weapon/diseasedisk)
- density = 1
- anchored = 1
-
-/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob)
- for(var/path in accepts)
- if(I.type in typesof(path))
- user.drop_item()
- del(I)
- overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle")
- return
- user.drop_item()
- I.loc = src.loc
-
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] \blue The [src.name] beeps", 2)
diff --git a/code/unused/disease2/diseasesplicer.dm b/code/unused/disease2/diseasesplicer.dm
deleted file mode 100644
index 958a14b1f1..0000000000
--- a/code/unused/disease2/diseasesplicer.dm
+++ /dev/null
@@ -1,202 +0,0 @@
-/obj/machinery/computer/diseasesplicer
- name = "Disease Splicer"
- icon = 'icons/obj/computer.dmi'
- icon_state = "crew"
- //brightnessred = 0
-// brightnessgreen = 2
-// brightnessblue = 2
-// broken_icon
-
- var/datum/disease2/effectholder/memorybank = null
- var/analysed = 0
- var/obj/item/weapon/virusdish/dish = null
- var/burning = 0
-
- var/splicing = 0
- var/scanning = 0
-
-/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob)
-/*
- if(istype(I, /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/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( 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/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.state = 4
- A.icon_state = "4"
- A.anchored = 1
- del(src)*/
- if(istype(I,/obj/item/weapon/virusdish))
- var/mob/living/carbon/c = user
- if(!dish)
-
- dish = I
- c.drop_item()
- I.loc = src
- if(istype(I,/obj/item/weapon/diseasedisk))
- user << "You upload the contents of the disk into the buffer"
- memorybank = I:effect
-
-
- //else
- src.attack_hand(user)
- return
-
-/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
- return src.attack_hand(user)
-
-/obj/machinery/computer/diseasesplicer/attack_paw(var/mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
- if(..())
- return
- user.machine = src
- var/dat
- if(splicing)
- dat = "Splicing in progress"
- else if(scanning)
- dat = "Splicing in progress"
- else if(burning)
- dat = "Data disk burning in progress"
- else
- if(dish)
- dat = "Virus dish inserted"
-
- dat += " Current DNA strand : "
- if(memorybank)
- dat += ""
- if(analysed)
- dat += "[memorybank.effect.name] ([5-memorybank.effect.stage])"
- else
- dat += "Unknown DNA strand ([5-memorybank.effect.stage])"
- dat += " "
-
- dat += "Burn DNA Sequence to data storage disk "
- else
- dat += "Empty"
-
- dat += " "
-
- if(dish)
- if(dish.virus2)
- if(dish.growth >= 50)
- for(var/datum/disease2/effectholder/e in dish.virus2.effects)
- dat += " DNA strand"
- if(dish.analysed)
- dat += ": [e.effect.name]"
- dat += " (5-[e.effect.stage]) "
- else
- dat += " Insufficent cells to attempt gene splicing"
- else
- dat += " No virus found in dish"
-
- dat += "Eject disk "
- else
- dat += " Please insert dish"
-
- user << browse(dat, "window=computer;size=400x500")
- onclose(user, "computer")
- return
-
-/obj/machinery/computer/diseasesplicer/process()
- if(stat & (NOPOWER|BROKEN))
- return
- use_power(500)
- src.updateDialog()
-
- if(scanning)
- scanning -= 1
- if(!scanning)
- state("The [src.name] beeps")
- icon_state = "crew"
- if(splicing)
- splicing -= 1
- if(!splicing)
- state("The [src.name] pings")
- icon_state = "crew"
- if(burning)
- burning -= 1
- if(!burning)
- var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc)
- if(analysed)
- d.name = "[memorybank.effect.name] GNA disk (Stage: [5-memorybank.effect.stage])"
- else
- d.name = "Unknown GNA disk (Stage: [5-memorybank.effect.stage])"
- d.effect = memorybank
- state("The [src.name] zings")
- icon_state = "crew"
-
-
- return
-
-/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
- if(..())
- return
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.machine = src
-
- if (href_list["grab"])
- memorybank = locate(href_list["grab"])
- analysed = dish.analysed
- del(dish)
- dish = null
- scanning = 30
- icon_state = "crew"
-
- else if(href_list["eject"])
- dish.loc = src.loc
- dish = null
-
- else if(href_list["splice"])
- for(var/datum/disease2/effectholder/e in dish.virus2.effects)
- if(e.stage == memorybank.stage)
- e.effect = memorybank.effect
- splicing = 50
- dish.virus2.spreadtype = "Blood"
- icon_state = "crew"
-
- else if(href_list["disk"])
- burning = 20
- icon_state = "crew"
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
-
-/obj/machinery/computer/diseasesplicer/proc/state(var/msg)
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] \blue [msg]", 2)
-
-
-/obj/item/weapon/diseasedisk
- name = "Blank GNA disk"
- icon = 'icons/obj/cloning.dmi'
- icon_state = "datadisk2"
- var/datum/disease2/effectholder/effect = null
- var/stage = 1
-
-/obj/item/weapon/diseasedisk/premade/New()
- name = "Blank GNA disk (stage: [5-stage])"
- effect = new /datum/disease2/effectholder
- effect.effect = new /datum/disease2/effect/invisible
- effect.stage = stage
diff --git a/code/unused/disease2/dishincubator.dm b/code/unused/disease2/dishincubator.dm
deleted file mode 100644
index 921ed21574..0000000000
--- a/code/unused/disease2/dishincubator.dm
+++ /dev/null
@@ -1,176 +0,0 @@
-/obj/machinery/disease2/incubator/
- name = "Pathogenic incubator"
- density = 1
- anchored = 1
- icon = 'icons/obj/virology.dmi'
- icon_state = "incubator"
- var/obj/item/weapon/virusdish/dish
- var/obj/item/weapon/reagent_containers/glass/beaker = null
- var/radiation = 0
-
- var/on = 0
- var/power = 0
-
- var/foodsupply = 0
- var/toxins = 0
-
- ex_act(severity)
- switch(severity)
- if(1.0)
- del(src)
- return
- if(2.0)
- if (prob(50))
- del(src)
- return
-
- blob_act()
- if (prob(25))
- del(src)
-
- meteorhit()
- del(src)
- return
-
- attackby(var/obj/B as obj, var/mob/user as mob)
- if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
-
- if(src.beaker)
- if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
- user << "A syringe is already loaded into the machine."
- else
- user << "A beaker is already loaded into the machine."
- return
-
- src.beaker = B
- user.drop_item()
- B.loc = src
- if(istype(B,/obj/item/weapon/reagent_containers/syringe))
- user << "You add the syringe to the machine!"
- src.updateUsrDialog()
- else
- user << "You add the beaker to the machine!"
- src.updateUsrDialog()
- else
- if(istype(B,/obj/item/weapon/virusdish))
- if(src.dish)
- user << "A dish is already loaded into the machine."
- return
-
- src.dish = B
- user.drop_item()
- B.loc = src
- if(istype(B,/obj/item/weapon/virusdish))
- user << "You add the dish to the machine!"
- src.updateUsrDialog()
-
- Topic(href, href_list)
- if(stat & BROKEN) return
- if(usr.stat || usr.restrained()) return
- if(!in_range(src, usr)) return
-
- usr.machine = src
- if(!dish) return
-
- if (href_list["power"])
- on = !on
- if(on)
- icon_state = "incubator_on"
- else
- icon_state = "incubator"
- if (href_list["ejectchem"])
- if(beaker)
- beaker.loc = src.loc
- beaker = null
- if (href_list["ejectdish"])
- if(dish)
- dish.loc = src.loc
- dish = null
- if (href_list["rad"])
- radiation += 10
- if (href_list["flush"])
- radiation = 0
- toxins = 0
- foodsupply = 0
-
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
-
- attack_hand(mob/user as mob)
- if(stat & BROKEN)
- return
- user.machine = src
- var/dat = ""
- if(!dish)
- dat = "Please insert dish into the incubator. "
- dat += "Close "
- var/string = "Off"
- if(on)
- string = "On"
- dat += "Power status : [string] "
- dat += " "
- dat += "Food supply : [foodsupply]"
- dat += " "
- dat += "Radiation Levels : [radiation] RADS : Radiate "
- dat += " "
- dat += "Toxins : [toxins]"
- dat += " "
- if(beaker)
- dat += "Eject chemicals : Eject "
- dat += " "
- if(dish)
- dat += "Eject Virus dish : Eject "
- dat += " "
- dat += " "
- dat += "Flush system "
-
-
- user << browse("Pathogenic incubator incubator menu: [dat]", "window=incubator;size=575x400")
- onclose(user, "incubator")
- return
-
-
-
-
- process()
-
- if(dish && on && dish.virus2)
- use_power(50,EQUIP)
- if(!powered(EQUIP))
- on = 0
- icon_state = "incubator"
- if(foodsupply)
- foodsupply -= 1
- dish.growth += 1
- if(dish.growth == 100)
- state("The [src.name] pings")
- if(radiation)
- if(radiation > 50 & prob(5))
- dish.virus2.majormutate()
- if(dish.info)
- dish.info = "OUTDATED : [dish.info]"
- dish.analysed = 0
- state("The [src.name] beeps")
-
- else if(prob(5))
- dish.virus2.minormutate()
- radiation -= 1
- if(toxins && prob(5))
- dish.virus2.infectionchance -= 1
- if(toxins > 50)
- dish.virus2 = null
- else if(!dish)
- on = 0
- icon_state = "incubator"
-
-
- if(beaker)
- if(!beaker.reagents.remove_reagent("virusfood",5))
- foodsupply += 20
- if(!beaker.reagents.remove_reagent("toxins",1))
- toxins += 1
-
- proc/state(var/msg)
- for(var/mob/O in hearers(src, null))
- O.show_message("\icon[src] \blue [msg]", 2)
diff --git a/code/unused/disease2/isolator.dm b/code/unused/disease2/isolator.dm
deleted file mode 100644
index a8b4f0e832..0000000000
--- a/code/unused/disease2/isolator.dm
+++ /dev/null
@@ -1,139 +0,0 @@
-/obj/machinery/disease2/isolator/
- name = "Pathogenic Isolator"
- density = 1
- anchored = 1
- icon = 'icons/obj/virology.dmi'
- icon_state = "isolator"
- var/datum/disease2/disease/virus2 = null
- var/isolating = 0
- var/beaker = null
-
- ex_act(severity)
- switch(severity)
- if(1.0)
- del(src)
- return
- if(2.0)
- if (prob(50))
- del(src)
- return
-
- blob_act()
- if (prob(25))
- del(src)
-
- meteorhit()
- del(src)
- return
-
- attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob)
- if(!istype(B,/obj/item/weapon/reagent_containers/syringe))
- return
-
- if(src.beaker)
- user << "A syringe is already loaded into the machine."
- return
-
- src.beaker = B
- user.drop_item()
- B.loc = src
- if(istype(B,/obj/item/weapon/reagent_containers/syringe))
- user << "You add the syringe to the machine!"
- src.updateUsrDialog()
- icon_state = "isolator_in"
-
- Topic(href, href_list)
- if(stat & BROKEN) return
- if(usr.stat || usr.restrained()) return
- if(!in_range(src, usr)) return
-
- usr.machine = src
- if(!beaker) return
- var/datum/reagents/R = beaker:reagents
-
- if (href_list["isolate"])
- var/datum/reagent/blood/Blood
- for(var/datum/reagent/blood/B in R.reagent_list)
- if(B)
- Blood = B
- break
-
- if(Blood.data["virus2"])
- virus2 = Blood.data["virus2"]
- isolating = 40
- icon_state = "isolator_processing"
- src.updateUsrDialog()
- return
-
- else if (href_list["main"])
- attack_hand(usr)
- return
- else if (href_list["eject"])
- beaker:loc = src.loc
- beaker = null
- icon_state = "isolator"
- src.updateUsrDialog()
- return
-
- attack_hand(mob/user as mob)
- if(stat & BROKEN)
- return
- user.machine = src
- var/dat = ""
- if(!beaker)
- dat = "Please insert sample into the isolator. "
- dat += "Close "
- else if(isolating)
- dat = "Isolating"
- else
- var/datum/reagents/R = beaker:reagents
- dat += "Eject "
- if(!R.total_volume)
- dat += "[beaker] is empty."
- else
- dat += "Contained reagents: "
- for(var/datum/reagent/blood/G in R.reagent_list)
- dat += " [G.name]: Isolate "
- user << browse("Pathogenic Isolator Isolator menu: [dat]", "window=isolator;size=575x400")
- onclose(user, "isolator")
- return
-
-
-
-
- process()
- if(isolating > 0)
- isolating -= 1
- if(isolating == 0)
- var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
- d.virus2 = virus2.getcopy()
- virus2 = null
- icon_state = "isolator_in"
-
-
-
-
-/obj/item/weapon/virusdish
- name = "Virus containment/growth dish"
- icon = 'icons/obj/items.dmi'
- icon_state = "implantcase-b"
- var/datum/disease2/disease/virus2 = null
- var/growth = 0
- var/info = 0
- var/analysed = 0
-
-/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob)
- if(istype(W,/obj/item/weapon/hand_labeler))
- return
- ..()
- if(prob(50))
- user << "The dish shatters"
- if(virus2.infectionchance > 0)
- infect_virus2(user,virus2)
- del src
-
-/obj/item/weapon/virusdish/examine()
- usr << "This is a virus containment dish"
- if(src.info)
- usr << "It has the following information about its contents"
- usr << src.info
diff --git a/code/world.dm b/code/world.dm
index 8c7a9d8793..4793e47c16 100644
--- a/code/world.dm
+++ b/code/world.dm
@@ -14,8 +14,8 @@
href_logfile = file("data/logs/[date_string] hrefs.htm")
diary = file("data/logs/[date_string].log")
diaryofmeanpeople = file("data/logs/[date_string] Attack.log")
- diary << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")]\n---------------------"
- diaryofmeanpeople << "\n\nStarting up. [time2text(world.timeofday, "hh:mm.ss")]\n---------------------"
+ diary << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]"
+ diaryofmeanpeople << "[log_end]\n[log_end]\nStarting up. [time2text(world.timeofday, "hh:mm.ss")][log_end]\n---------------------[log_end]"
changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently
if(byond_version < RECOMMENDED_VERSION)
@@ -67,7 +67,7 @@
// ..()
/world/Topic(T, addr, master, key)
- diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key]"
+ diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]"
if (T == "ping")
var/x = 1
@@ -147,7 +147,7 @@
if(Lines.len)
if(Lines[1])
master_mode = Lines[1]
- diary << "Saved mode is '[master_mode]'"
+ log_misc("Saved mode is '[master_mode]'")
/world/proc/save_mode(var/the_mode)
var/F = file("data/mode.txt")
@@ -181,7 +181,7 @@
if(config.admin_legacy_system)
var/text = file2text("config/moderators.txt")
if (!text)
- diary << "Failed to load config/mods.txt\n"
+ error("Failed to load config/mods.txt")
else
var/list/lines = text2list(text, "\n")
for(var/line in lines)
@@ -343,4 +343,4 @@ proc/establish_old_db_connection()
else
return 1
-#undef FAILED_DB_CONNECTION_CUTOFF
\ No newline at end of file
+#undef FAILED_DB_CONNECTION_CUTOFF
diff --git a/data/.gitignore b/data/.gitignore
deleted file mode 100644
index 92411c6385..0000000000
--- a/data/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.sav
-*.bdb
-*.ban
\ No newline at end of file
diff --git a/data/mode.txt b/data/mode.txt
deleted file mode 100644
index ae791fed36..0000000000
--- a/data/mode.txt
+++ /dev/null
@@ -1 +0,0 @@
-extended
diff --git a/html/changelog.html b/html/changelog.html
index 060fa8df16..1d5921782c 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -35,7 +35,7 @@ Header Section
- Code: Abi79, Aryn, Cael_Aislinn, Ccomp5950 ,Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, JoeyJo0, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
+ Code: Abi79, Aryn, Cael_Aislinn, Ccomp5950, Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, JoeyJo0, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, JoeyJo0, Miniature, Searif, Xenone, faux
Sounds: Aryn
Thanks To: /tg/ station, Goonstation, Animus Station, Daedalus, and original Spacestation 13 devs. Skibiliano for the IRC bot.
@@ -56,21 +56,49 @@ should be listed in the changelog upon commit though. Thanks. -->
+
+
30 March 2014
+
RavingManiac updated:
+
+ Inflatable walls and doors added. Useful for sealing off hull breaches, but easily punctured by sharp objects and Tajarans.
+
+
+
+
+
10 March 2014
+
Chinsky updated:
+
+ Viruses now affect certain range of species, different for each virus
+ Spaceacilline now prevents infection, and has a small chance to cure viruses at Stage 1. It does not give them antibodies though, so they can get sick again!
+ Biosuits and spacesuits now offer more protection against viruses. Full biosuit competely prevents airborne infection, when coupled with gloves they both protect quite well from contact ones
+ Sneezing now spreads viruses in front of mob. Sometimes he gets a warning beforehand though
+
+
+
5 March 2014
RavingManiac updated:
Smartfridges added to the bar, chemistry and virology. No more clutter!
A certain musical instrument has returned to the bar.
- There is now a ten second delay between ingesting a pill/donut/milkshake and feeling the effects of the vile chemicals within.
+ There is now a ten second delay between ingesting a pill/donut/milkshake and regretting it.
-
-
24 February 2014
-
Aryn updated:
+
+
1 March 2014
+
Various updated:
- New lighting system! Credit goes to Forum_account for the code that generated the icons it uses.
+ Paint Mixing, red and blue makes purple!
+ New posters to tell you to respect those darned cat people
+ NanoUI for APC's, Canisters, Tank Transfer Valves and the heaters / coolers
+ PDA bombs are now less annoying, and won't always blow up / cause internal bleeding
+ Blob made less deadly
+ Objectiveless Antags now a configuration option, choose your own adventure!
+ Engineering redesign, now with better monitoring of the explodium supermatter!
+ Security EOD
+ New playable race, IPC's, go beep boop boop all over the station!
+ Gamemode autovoting, now players don't have to call for gamemode votes, it's automatic!
@@ -82,6 +110,33 @@ should be listed in the changelog upon commit though. Thanks. -->
+
+
1 February 2014
+
Various updated:
+
+ NanoUI for PDA
+ Write in blood while a ghost in cult rounds with enough cultists
+ Cookies, absurd sandwiches, and even cookable dioanae nymphs!
+ A bunch of new guns and other weapons
+ Species specific blood
+
+
+
+
+
1 January 2014
+
Various updated:
+
+ AntagHUD and MedicalHUD for ghosts, see who the baddies are, check for new configuration options.
+ Ghosts will now have bold text if they are in the same room as the person making conversations easier to follow.
+ New hairstyles! Now you can use something other then hotpink floor length braid.
+ DNA rework, tell us how you were cloned and became albino!
+ Dirty floors, so now you know exactly how lazy the janitors are!
+ A new UI system, feel free to color it yourself, don't set it to completely clear or you will have a bad time.
+ Cryogenic storage, for all your SSD needs.
+ New hardsuits for those syndicate tajaran
+
+
+
18 December 2013
RavingManiac updated:
@@ -91,6 +146,20 @@ should be listed in the changelog upon commit though. Thanks. -->
+
+
1 December 2013
+
Various Developers banged their keyboards together:
+
+ New Engine, the supermatter, figure out what a cooling loop is, or don't and blow up engineering!
+ Each department will have it's own fax, make a copy of your butt and fax it to the admins!
+ Booze and soda dispensers, they are like chemmasters, only with booze and soda!
+ Bluespace and Cryostasis beakers, how do they work? Fuggin bluespace how do they work?
+ You can now shove things into vending machines, impress your friends on how things magically disappear out of your hands into the machine!
+ Robots and Androids (And gynoids too!) can now use custom job titles
+ Various bugfixes
+
+
+
24 November 2013
Yinadele updated:
@@ -124,6 +193,19 @@ should be listed in the changelog upon commit though. Thanks. -->
+
+
1 November 2013
+
Various updated:
+
+ Autovoting, Get off the station when your 15 hour workweek is done, thanks unions!
+ Some beach props that Chinsky finds useless.
+ Updated NanoUI
+ Dialysis while in sleepers - removes reagents from mobs, like the chemist, toss him in there!
+ Pipe Dispensers can now be ordered by Cargo
+ Fancy G-G-G-G-Ghosts!
+
+
+
29 October 2013
Cael_Aislinn updated:
@@ -136,7 +218,7 @@ should be listed in the changelog upon commit though. Thanks. -->
-
06 Derptomber 2013
+
06 October 2013
Chinsky updated:
Added contact-spread viruses. Spread if infected guy touches someone with bare hands, or if someone touches bare infected guy. Biosuits/gloves help.
@@ -1073,4 +1155,4 @@ Credits Section
Some icons by Yusuke Kamiyamane . All rights reserved. Licensed under a Creative Commons Attribution 3.0 License .