Merge pull request #178 from alex-gh/ServerCode

Server code
This commit is contained in:
ZomgPonies
2014-04-14 08:39:36 -04:00
75 changed files with 12891 additions and 849 deletions
+2 -7
View File
@@ -21,7 +21,6 @@
#include "code\__HELPERS\global_lists.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\lists.dm"
#include "code\__HELPERS\loc.dm"
#include "code\__HELPERS\logging.dm"
#include "code\__HELPERS\maths.dm"
#include "code\__HELPERS\mobs.dm"
@@ -81,9 +80,11 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\garbage.dm"
#include "code\controllers\lighting_controller.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\verbs.dm"
@@ -1398,12 +1399,6 @@
#include "code\WorkInProgress\fireworks.dm"
#include "code\WorkInProgress\periodic_news.dm"
#include "code\WorkInProgress\Apples\artifacts.dm"
#include "code\WorkInProgress\Aryn\Lighting\_Defs.dm"
#include "code\WorkInProgress\Aryn\Lighting\Compatibility.dm"
#include "code\WorkInProgress\Aryn\Lighting\Controller.dm"
#include "code\WorkInProgress\Aryn\Lighting\Engine.dm"
#include "code\WorkInProgress\Aryn\Lighting\Light.dm"
#include "code\WorkInProgress\Aryn\Lighting\Lightpoint.dm"
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
@@ -1,49 +0,0 @@
area/var/lighting_use_dynamic
turf/space/is_outside = 1
turf/simulated/shuttle/is_outside = 1
/datum/controller/lighting/var/processing = 1
/datum/controller/lighting/var/iteration = 0
//Because so many objects jump the gun.
proc/lighting_ready()
return lighting_controller && lighting_controller.started
turf_light_data
var/light_overlay
var/lightNW
var/lightSW
var/lightNE
var/lightSE
var/lit_by
turf_light_data/proc/copy_from(turf/T)
light_overlay = T.light_overlay
lightNW = T.lightNW
lightSW = T.lightSW
lightNE = T.lightNE
lightSE = T.lightSE
lit_by = T.lit_by
turf_light_data/proc/copy_to(turf/T)
T.light_overlay = light_overlay
T.lightNW = lightNW
T.lightSW = lightSW
T.lightNE = lightNE
T.lightSE = lightSE
T.lit_by = lit_by
//T.ResetValue()
atom/proc/SetLuminosity(n)
ASSERT(n >= 0)
n = min(n,10) //Caelcode.
if(n > 0)
//world << "[name].SetLuminosity([n]) \[[max(1,n>>1)],[n]\]"
SetLight(max(1,n),n)
else
//world << "[name].SetLuminosity(0)"
SetLight(0,0)
luminosity = n
//else lighting_controller.initial_lights.Add(src)
@@ -1,99 +0,0 @@
/*
Overview:
Unlike the previous lighting controller, this is mostly here to hold global lighting procs and vars.
It does not process every tick, because not even DAL did something so stupid.
Global Vars:
initial_lights - This holds all lights formed before the lighting controller started up. It becomes null on initialization.
Class Vars:
starlight - The light value of space.
icon_updates - The list of turfs which need an update to their overlays.
light_border - Space turfs which are adjacent to non-space turfs.
Class Procs:
Initialize()
Starts the lighting system, creating all light points and turf overlays.
StarLight(n)
Sets the light produced by space. If a solar eclipse suddenly happens, it'll probably lag.
MarkIconUpdate(turf/T)
Called when a turf needs an update to its light icon. Ensures that it only gets calculated once per turf.
FlushIconUpdates()
Called when a light is done marking icon updates. Updates every marked turf.
AddBorder(turf/T) & RemoveBorder(turf/T)
Called by turf/CheckForOpaqueObjects() to modify the light_border list.
*/
var/datum/controller/lighting/lighting_controller
var/all_lightpoints_made = 0
var/list/lit_z_levels = list(1,5)
/datum/controller/lighting
var/starlight = LIGHT_STATES
var/list/icon_updates = list()
var/started = 0
//var/icon/border = icon('Icons/Test.dmi', "border")
/datum/controller/lighting/New()
lighting_controller = src
/datum/controller/lighting/proc/Initialize()
set background = 1
var/start_time = world.timeofday
world << "<b><font color=red>Processing lights...</font></b>"
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 << "<font color=red>Progress: [round((turfs_updated/total_turfs)*100, 0.01)]% ([turfs_updated]/[total_turfs])"
var/turf/T = locate(x,y,z)
if(!T.is_outside)
T.light_overlay = new(T)
//T.ResetValue()
if(!all_lightpoints_made) new/lightpoint(x+0.5,y+0.5,z)
//world << "[x],[y],[z]"
all_lightpoints_made = 1
started = 1
for(var/turf/T)
if(T.light_overlay)
T.ResetValue()
T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
world << "<b><font color=red>Lighting initialization took [(world.timeofday-start_time)/world.fps] seconds.</font></b>"
world << "<font color=red>Updated [turfs_updated] turfs.</font>"
/datum/controller/lighting/proc/GetLightIcon(a,b,c,d)
if(a <= 2) return LIGHT_ICON_1
else return LIGHT_ICON_2
-231
View File
@@ -1,231 +0,0 @@
/*
Overview:
Procs given to atom and turf by the lighting engine, as well as the lighting overlay object.
Atom Vars:
light - Contains the light object this atom is currently shining with.
Turf Vars:
light_overlay - Contains an object showing the lighting icon over this turf.
lit_value - Stores how brightly lit the turf is.
has_opaque - A cached value updated by CheckForOpaqueObjects()
is_outside - Any turf with this set to true will be considered as bright as space.
needs_light_update - Turf is marked for icon updates when true.
lightNE, lightSE, lightNW, lightSW - Hold the lightpoints on the four corners of this turf. See Lightpoint.dm
lit_by - A list of lights that are lighting this turf.
Atom Procs:
SetLight(intensity, radius)
A more versatile SetLuminosity() that allows independent control of intensity and radius.
Called behind the scenes of SetLuminosity().
SetOpacity(opacity)
Does the same thing as DAL.
Turf Procs:
UpdateLight()
Called by the lighting controller. It is advisable not to call this manually due to the cost of lightpoint/max_value()
AddLight(light/light)
Called by light/Reset() to light this turf with a particular light.
RemoveLight(light/light)
Called by light/Off() to unlight turfs that were lit by it.
ResetValue()
Called when lights are reset or starlight is changed.
ResetCachedValues()
Resets cached values of all four light points. Called by ResetValue().
CheckForOpaqueObjects()
Called by lighting_controller.Initialize(), SetOpacity() or when a turf might change opacity.
Resets the opacity cache and looks for opaque objects. Also responsible for adding and removing borders to space.
*/
atom/movable/lighting_overlay
name = ""
anchored = 1
layer = 9
mouse_opacity = 0
invisibility = INVISIBILITY_LIGHTING
atom/movable/lighting_overlay/proc/set_state(a,b,c,d)
icon_state = "[a][b][c][d]"
icon = lighting_controller.GetLightIcon(a,b,c,d)
atom/var/light/light
turf/var/atom/movable/lighting_overlay/light_overlay
turf/var/lit_value = 0
turf/var/max_brightness = 0
turf/var/has_opaque = -1
turf/var/is_outside = 0
turf/var/is_border = 0
turf/var/lightpoint/lightNE
turf/var/lightpoint/lightNW
turf/var/lightpoint/lightSE
turf/var/lightpoint/lightSW
turf/var/list/lit_by
atom/movable/New()
. = ..()
if(luminosity)
if(!light)
SetLight(luminosity,luminosity)
else
light.atom = src
light.Reset()
else if(light)
light.atom = src
light.Reset()
if(opacity)
if(lighting_ready())
opacity = 0
SetOpacity(1)
atom/movable/Del()
if(light) light.Off()
if(opacity) SetOpacity(0)
. = ..()
atom/movable/Move(turf/newloc)
var/o = opacity
if(o) SetOpacity(0)
. = ..()
if(.)
if(o) SetOpacity(1)
turf/Entered(atom/movable/M)
. = ..()
if(M.light) M.light.Reset()
atom/proc/SetLight(intensity, radius)
//if(lights_verbose) world << "SetLight([intensity],[radius])"
if(!intensity)
if(!light || !light.intensity)
//if(lights_verbose) world << "Still off."
return
//if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit."
light.Off()
light.intensity = 0
//if(lighting_ready()) lighting_controller.FlushIconUpdates()
return
if(!light)
//if(lights_verbose) world << "New light."
light = new(src)
if(light.intensity == intensity)
//if(lights_verbose) world << "Same intensity."
return
light.radius = min(radius,15)
light.intensity = intensity
light.Reset()
//if(lighting_ready()) lighting_controller.FlushIconUpdates()
atom/proc/SetOpacity(o)
if(o == opacity) return
opacity = o
var/turf/T = loc
if(isturf(T))
T.CheckForOpaqueObjects()
for(var/light/A in T.lit_by)
A.Reset()
//lighting_controller.FlushIconUpdates()
atom/proc/UpdateLights()
if(light) light.Reset()
for(var/atom/movable/A in src)
if(A.light) A.light.Reset()
//turf/proc/UpdateLight()
// if(light_overlay)
// light_overlay.icon_state = "[lightSE.max_value()][lightSW.max_value()][lightNW.max_value()][lightNE.max_value()]"
turf/proc/AddLight(light/light, brightness)
if(is_outside) return
if(brightness <= 0) return
if(!lit_by) lit_by = list()
lit_by.Add(light)
lit_by[light] = brightness
if(lighting_ready())
if(brightness > max_brightness)
lit_value = LIGHTCLAMP(brightness)
max_brightness = brightness
if(lightNE) lightNE.cached_value = -1
if(lightNW) lightNW.cached_value = -1
if(lightSE) lightSE.cached_value = -1
if(lightSW) lightSW.cached_value = -1
for(var/turf/T in range(1,src))
if(T.light_overlay)
T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
turf/proc/RemoveLight(light/light)
if(lit_by)
var/brightness = lit_by[light]
lit_by.Remove(light)
if(brightness == max_brightness)
ResetValue()
if(!lit_by.len) lit_by = null
//Only called by ChangeTurf, because it really needs it.
turf/proc/ResetAllLights()
for(var/light/light in lit_by)
light.Reset()
/turf/space/ResetAllLights()
var/atom/movable/lighting_overlay/overlay = locate() in src
if(overlay) overlay.loc = null
light_overlay = null
is_outside = 1
. = ..()
turf/proc/ResetValue()
if(is_outside)
max_brightness = lighting_controller.starlight
lit_value = LIGHTCLAMP(lighting_controller.starlight)
return
if(has_opaque < 0) CheckForOpaqueObjects()
if(has_opaque)
lit_value = 0
else
max_brightness = 0
for(var/light/light in lit_by)
var/brightness = lit_by[light]//light.CalculateBrightness(src)
if(brightness > max_brightness)
max_brightness = brightness
lit_value = LIGHTCLAMP(max_brightness)
if(lighting_ready())
if(lightNE) lightNE.cached_value = -1
if(lightNW) lightNW.cached_value = -1
if(lightSE) lightSE.cached_value = -1
if(lightSW) lightSW.cached_value = -1
for(var/turf/T in range(1,src))
if(T.light_overlay)
T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
turf/proc/CheckForOpaqueObjects()
has_opaque = opacity
if(!opacity)
for(var/atom/movable/M in contents)
if(M.opacity)
has_opaque = 1
break
@@ -1,89 +0,0 @@
/*
Overview:
This object functions similarly to /tg/'s /light. It is responsible for calculating what turfs are lit by it.
Class Vars:
radius - Set by atom/SetLight(). This stores how far out turfs will be lit up.
intensity - Set by atom/SetLight(). Stores the amount of light generated at the center.
lit_turfs - A list of turfs being lit by this light.
atom - The atom this light is attached to.
Class Procs:
Reset()
This is called whenever the light changes, or the underlying atom changes position.
Off()
A quick way to turn off a light. Removes the light from all turfs in lit_turfs.
CalculateBrightness(turf/T)
Returns the brightness that should be displayed by this light on a specific turf.
*/
light/var/radius = 0
light/var/intensity = 0
light/var/ambient_extension = 3
light/var/list/lit_turfs = list()
light/var/atom/atom
light/New(atom/atom, radius, ambience=3)
ASSERT(atom)
if(istype(atom))
src.atom = atom
else
src.intensity = atom
src.radius = radius
src.ambient_extension = ambience
light/proc/Reset()
//if(atom.lights_verbose) world << "light.Reset()"
Off()
if(intensity > 0)
//if(atom.lights_verbose) world << "Restoring light."
var/turf/loc = atom
for(var/turf/T in view(loc,radius+ambient_extension))
if(!T.is_outside)
var/brightness = CalculateBrightness(T, loc)
T.AddLight(src, brightness)
lit_turfs.Add(T)
//if(atom.lights_verbose) world << "[lit_turfs.len] turfs added."
light/proc/Off()
//if(atom.lights_verbose) world << "light.Off()"
for(var/turf/T in lit_turfs)
T.RemoveLight(src)
lit_turfs.Cut()
light/proc/Flash(t)
Reset()
spawn(t)
Off()
light/proc/CalculateBrightness(turf/T, turf/loc)
ASSERT(T)
var/square = DISTSQ3(loc.x-T.x,loc.y-T.y,loc.z-T.z)
if(square > (radius+ambient_extension)*(radius+ambient_extension)) return 0
//+2 offset gives an ambient light effect.
var/value = ((radius)/(2*FSQRT(square) + 1)) * intensity - 0.48
/*
lightRadius
---------------- * lightValue - 0.48
2 * distance + 1
The light decreases by twice the distance, starting from the radius.
The + 1 causes the graph to shift to the left one unit so that division by zero is prevented on the source tile.
This is then multiplied by the light value to give the final result.
The -0.48 offset causes the value to be near zero at the radius.
This gives a result which is likely close to the inverse-square law in two dimensions instead of three.
*/
return max(min( value , intensity), 0) //Ensure the value never goes above the maximum light value or below zero.
//return cos(90 * sqrt(square) / max(1,lightRadius)) * lightValue
@@ -1,59 +0,0 @@
/*
Overview:
Perhaps the most cryptic datum in the lighting engine, there are four of these at the corners of every turf.
Any two turfs that share a corner will also have the same lightpoint. Because of the nature of the icons used,
light is shown at the corner of the turf rather than in the middle, necessitating some way to keep track of what
icon state to use.
Class Vars:
x, y, z - The position of the lightpoint. x and y will usually be expressed in terms of 0.5 due to its location on the corner.
NE, NW, SE, SW - The turfs that are in these directions relative to the lightpoint.
cached_value - A cached value of max_value().
Class Procs:
max_value()
The maximum of the light amounts on the four turfs of this light point.
*/
lightpoint
var/x
var/y
var/z
var/turf/NE
var/turf/NW
var/turf/SW
var/turf/SE
var/cached_value = -1
New(x,y,z)
var/turf/T = locate(x+0.5,y+0.5,z)
if(T)
NE = T
T.lightSW = src
T = locate(x-0.5,y+0.5,z)
if(T)
NW = T
T.lightSE = src
T = locate(x-0.5,y-0.5,z)
if(T)
SW = T
T.lightNE = src
T = locate(x+0.5,y-0.5,z)
if(T)
SE = T
T.lightNW = src
proc/max_value()
var
valueA = VALUE_OF(NW)
valueB = VALUE_OF(NE)
valueC = VALUE_OF(SW)
valueD = VALUE_OF(SE)
cached_value = max(valueA,valueB,valueC,valueD)
return cached_value
@@ -1,34 +0,0 @@
var/icon/lighting_dbg = icon('icons/Testing/Zone.dmi', "created")
atom/var/lights_verbose = 0
obj/machinery/light/verb/ShowInfluence()
set src in world
lights_verbose = 1
usr << "<b>[src]</b>"
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 << "<b>[src]</b>"
usr << "[MAX_VALUE(lightSE)][MAX_VALUE(lightSW)][MAX_VALUE(lightNW)][MAX_VALUE(lightNE)]"
usr << "Lit Value: [lit_value]"
usr << "Max Brightness: [max_brightness]"
usr << "Lit By: "
for(var/light/light in lit_by)
usr << " - [light.atom] \[[lit_by[light]]\][(lit_by[light] == max_brightness ? "(MAX)" : "")]"
light.atom.overlays += lighting_dbg
spawn(50)
for(var/light/light in lit_by)
light.atom.overlays -= lighting_dbg
@@ -1,19 +0,0 @@
#define LIGHT_ICON_1 'icons/effects/lights/lighting5-1.dmi'
#define LIGHT_ICON_2 'icons/effects/lights/lighting5-2.dmi'
#define LIGHT_STATES 4
#define SQ(X) ((X)*(X))
#define DISTSQ3(A,B,C) (SQ(A)+SQ(B)+SQ(C))
#define FSQRT(X) (X >= fastroot.len ? new_fsqrt(X) : fastroot[(X)+1])
#define MAX_VALUE(X) (X.cached_value < 0 ? X.max_value() : X.cached_value)
#define VALUE_OF(X) ( !X ? 0 : ( X.is_outside ? LIGHTCLAMP(lighting_controller.starlight) : X.lit_value ) )
#define LIGHTCLAMP(x) ( max(0,min(LIGHT_STATES,round(x,1))) )
var/list/fastroot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7)
proc/new_fsqrt(n)
//world << "Adding [n-fastroot.len] entries to root table."
for(var/i = fastroot.len, i <= n, i++)
fastroot += round(sqrt(i))
-7
View File
@@ -1,7 +0,0 @@
atom/movable/proc/setloc(newloc)
if(light)
var/oldloc = loc
loc = newloc
if(isturf(newloc) != isturf(oldloc)) light.Reset()
else
loc = newloc
+2 -3
View File
@@ -45,8 +45,7 @@ var/datum/controller/failsafe/Failsafe
MC_defcon = 0
MC_iteration = controller_iteration
//Lighting controller now neither processes nor iterates.
/*if(lighting_controller.processing)
if(lighting_controller.processing)
if(lighting_iteration == lighting_controller.iteration) //master_controller hasn't finished processing in the defined interval
switch(lighting_defcon)
if(0 to 3)
@@ -61,7 +60,7 @@ var/datum/controller/failsafe/Failsafe
lighting_defcon = 0
else
lighting_defcon = 0
lighting_iteration = lighting_controller.iteration*/
lighting_iteration = lighting_controller.iteration
else
MC_defcon = 0
lighting_defcon = 0
-1
View File
@@ -83,7 +83,6 @@ datum/controller/game_controller/proc/setup()
if(ticker)
ticker.pregame()
new/datum/controller/lighting()
lighting_controller.Initialize()
+1 -1
View File
@@ -19,7 +19,7 @@
feedback_add_details("admin_verb","RFailsafe")
if("Lighting")
new /datum/controller/lighting()
//lighting_controller.process()
lighting_controller.process()
feedback_add_details("admin_verb","RLighting")
if("Supply Shuttle")
supply_shuttle.process()
+5 -1
View File
@@ -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)
+1 -1
View File
@@ -43,7 +43,7 @@
if(destination)
if(loc)
loc.Exited(src)
setloc(destination)
loc = destination
loc.Entered(src)
for(var/atom/movable/AM in loc)
AM.Crossed(src)
+14 -11
View File
@@ -86,11 +86,14 @@
/obj/machinery/dna_scannernew/proc/eject_occupant()
src.go_out()
for(var/obj/O in src)
if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/stack/cable_coil)))
O.setloc(get_turf(src))//Ejects items that manage to get in there (exluding the components)
if(!istype(O,/obj/item/weapon/circuitboard/clonescanner) && \
!istype(O,/obj/item/weapon/stock_parts) && \
!istype(O,/obj/item/stack/cable_coil) && \
O != beaker)
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components and beaker)
if(!occupant)
for(var/mob/M in src)//Failsafe so you can get mobs out
M.setloc(get_turf(src))
M.loc = get_turf(src)
/obj/machinery/dna_scannernew/verb/move_inside()
set src in oview(1)
@@ -113,7 +116,7 @@
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
src.icon_state = "scanner_1"
src.add_fingerprint(usr)
@@ -191,7 +194,7 @@
beaker = item
user.drop_item()
item.setloc(src)
item.loc = src
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
return
else if (!istype(item, /obj/item/weapon/grab))
@@ -214,7 +217,7 @@
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.occupant = M
src.icon_state = "scanner_1"
@@ -237,7 +240,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "scanner_0"
return
@@ -246,7 +249,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
@@ -255,7 +258,7 @@
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
@@ -264,7 +267,7 @@
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
@@ -277,7 +280,7 @@
/obj/machinery/dna_scannernew/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
/obj/machinery/computer/scan_consolenew
+3
View File
@@ -23,6 +23,9 @@
// Any of a number of GENE_ flags.
var/flags=0
// Chance of the gene to cause adverse effects when active
var/instability=0
/**
* Is the gene active in this mob's DNA?
*/
+4
View File
@@ -29,6 +29,7 @@
desc = "The subject suffers from constant radiation sickness and causes the same on nearby organics."
activation_message = "You feel a strange sickness permeate your whole body."
deactivation_message = "You no longer feel awful and sick all over."
instability=5
New()
..()
@@ -216,6 +217,7 @@
desc = "Causes the subject's digestion to create a significant amount of noxious gas."
activation_message = "Your stomach grumbles unpleasantly."
deactivation_message = "Your stomach stops acting up. Phew!"
instability=2
mutation = M_TOXIC_FARTS
@@ -291,6 +293,7 @@
desc = "The subject becomes able to convert excess cellular energy into thermal energy."
activation_messages = list("You suddenly feel rather hot.")
deactivation_messages = list("You no longer feel uncomfortably hot.")
instability=5
spelltype=/obj/effect/proc_holder/spell/targeted/immolate
@@ -329,6 +332,7 @@
desc = "The subject becomes able to transform the matter of their cells into a liquid state."
activation_messages = list("You feel strange and jiggly.")
deactivation_messages = list("You feel more solid.")
instability=2
verbtype=/proc/bioproc_melt
+10 -1
View File
@@ -17,6 +17,7 @@
desc = "Boosts efficiency in sectors of the brain commonly associated with meta-mental energies."
activation_messages = list("Your mind feels closed.")
deactivation_messages = list("You feel oddly exposed.")
instability=2
mutation=M_PSY_RESIST
@@ -28,6 +29,7 @@
/////////////////////////
/datum/dna/gene/basic/stealth
instability=7
can_activate(var/mob/M, var/flags)
// Can only activate one of these at a time.
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes))
@@ -53,7 +55,7 @@
var/turf/simulated/T = get_turf(M)
if(!istype(T))
return
if(T.lit_value <= 2)
if(T.lighting_lumcount <= 2)
M.alpha = 0
else
M.alpha = round(255 * 0.80)
@@ -109,6 +111,7 @@
desc = "Allows the subject to lower the body temperature of others."
activation_messages = list("You notice a strange cold tingle in your fingertips.")
deactivation_messages = list("Your fingers feel warmer.")
instability=10
spelltype = /obj/effect/proc_holder/spell/targeted/cryokinesis
@@ -178,6 +181,7 @@
desc = "Allows the subject to eat just about anything without harm."
activation_messages = list("You feel hungry.")
deactivation_messages = list("You don't feel quite so hungry anymore.")
instability=3
spelltype=/obj/effect/proc_holder/spell/targeted/eat
@@ -199,6 +203,7 @@
range = 1
selection_type = "view"
var/list/types_allowed=list(/obj/item,/mob/living/simple_animal, /mob/living/carbon/monkey, /mob/living/carbon/human)
/obj/effect/proc_holder/spell/targeted/eat/choose_targets(mob/user = usr)
@@ -297,6 +302,7 @@
//cooldown = 30
activation_messages = list("Your leg muscles feel taut and strong.")
deactivation_messages = list("Your leg muscles shrink back to normal.")
instability=2
spelltype =/obj/effect/proc_holder/spell/targeted/leap
@@ -374,6 +380,7 @@
//cooldown = 1800
activation_messages = list("You don't feel entirely like yourself somehow.")
deactivation_messages = list("You feel secure in your identity.")
instability=5
New()
..()
@@ -420,6 +427,7 @@
verbtype = /proc/bioproc_empath
activation_messages = list("You suddenly notice more about others than you did before.")
deactivation_messages = list("You no longer feel able to sense intentions.")
instability=1
New()
..()
@@ -515,6 +523,7 @@
desc = "Vastly increases the gas capacity of the subject's digestive tract."
activation_messages = list("You feel bloated and gassy.")
deactivation_messages = list("You no longer feel gassy. What a relief!")
instability=1
mutation = M_SUPER_FART
+13
View File
@@ -6,6 +6,7 @@
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
mutation=M_NO_BREATH
instability=2
New()
block=NOBREATHBLOCK
@@ -14,6 +15,7 @@
name="Remote Viewing"
activation_messages=list("Your mind expands.")
mutation=M_REMOTE_VIEW
instability=3
New()
block=REMOTEVIEWBLOCK
@@ -26,6 +28,7 @@
name="Regenerate"
activation_messages=list("You feel better.")
mutation=M_REGEN
instability=2
New()
block=REGENERATEBLOCK
@@ -34,6 +37,7 @@
name="Super Speed"
activation_messages=list("Your leg muscles pulsate.")
mutation=M_RUN
instability=1
New()
block=INCREASERUNBLOCK
@@ -42,6 +46,7 @@
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=M_REMOTE_TALK
instability=1
New()
block=REMOTETALKBLOCK
@@ -54,6 +59,7 @@
name="Morph"
activation_messages=list("Your skin feels strange.")
mutation=M_MORPH
instability=2
New()
block=MORPHBLOCK
@@ -66,6 +72,7 @@
name="Heat Resistance"
activation_messages=list("Your skin is icy to the touch.")
mutation=M_RESIST_HEAT
instability=2
New()
block=COLDBLOCK
@@ -87,6 +94,7 @@
name="Cold Resistance"
activation_messages=list("Your body is filled with warmth.")
mutation=M_RESIST_COLD
instability=2
New()
block=FIREBLOCK
@@ -108,6 +116,7 @@
name="No Prints"
activation_messages=list("Your fingers feel numb.")
mutation=M_FINGERPRINTS
instability=1
New()
block=NOPRINTSBLOCK
@@ -116,6 +125,7 @@
name="Shock Immunity"
activation_messages=list("Your skin feels strange.")
mutation=M_NO_SHOCK
instability=2
New()
block=SHOCKIMMUNITYBLOCK
@@ -124,6 +134,7 @@
name="Midget"
activation_messages=list("Your skin feels rubbery.")
mutation=M_DWARF
instability=1
New()
block=SMALLSIZEBLOCK
@@ -175,6 +186,7 @@
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
mutation=M_XRAY
instability=2
New()
block=XRAYBLOCK
@@ -184,6 +196,7 @@
activation_messages=list("You feel smarter.")
mutation=M_TK
activation_prob=15
instability=5
New()
block=TELEBLOCK
+1
View File
@@ -16,6 +16,7 @@ Obviously, requires DNA2.
desc = "Allows the subject to become the motherfucking Hulk."
activation_messages = list("Your muscles hurt.")
deactivation_messages = list("Your muscles quit tensing.")
instability=7
spelltype = /obj/effect/proc_holder/spell/targeted/hulk
+1 -1
View File
@@ -164,7 +164,7 @@ var/global/datum/controller/gameticker/ticker
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
master_controller.process() //Start master_controller.process()
//lighting_controller.process() //Start processing DynamicAreaLighting updates
lighting_controller.process() //Start processing DynamicAreaLighting updates
if(config.sql_enabled)
@@ -278,7 +278,7 @@
if(!mind.vampire.iscloaking)
alpha = 255
return 0
if(T.lit_value <= 2)
if(T.lighting_lumcount <= 2)
alpha = round((255 * 0.15))
return 1
else
@@ -432,7 +432,7 @@
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
// LIGHTING CHECK
if(T.lit_value > max_lum) continue
if(T.lighting_lumcount > max_lum) continue
turfs += T
if(!turfs.len)
+11 -32
View File
@@ -187,7 +187,7 @@
blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
A.blob_act()
del(src)
return
@@ -198,7 +198,7 @@
if(!beaker)
beaker = G
user.drop_item()
G.setloc(src)
G.loc = src
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
src.updateUsrDialog()
return
@@ -228,7 +228,7 @@
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.occupant = M
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
@@ -248,21 +248,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
@@ -309,7 +309,7 @@
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
@@ -411,29 +411,8 @@
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
visible_message("[usr] starts climbing into the sleeper.", 3)
if(do_after(usr, 20))
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
src.occupant = usr
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
usr << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
return
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
return
return
return
+9 -9
View File
@@ -46,7 +46,7 @@
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
@@ -60,12 +60,12 @@
if ((!( src.occupant ) || src.locked))
return
for(var/obj/O in src)
O.setloc(src.loc)
O.loc = src.loc
//Foreach goto(30)
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "body_scanner_0"
return
@@ -83,11 +83,11 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.occupant = M
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
O.setloc(src.loc)
O.loc = src.loc
//Foreach goto(154)
src.add_fingerprint(user)
//G = null
@@ -98,7 +98,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
@@ -107,7 +107,7 @@
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
@@ -116,7 +116,7 @@
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
@@ -128,7 +128,7 @@
/obj/machinery/bodyscanner/blob_act()
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
/obj/machinery/body_scanconsole/ex_act(severity)
+2 -2
View File
@@ -34,7 +34,7 @@
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "\red The biogenerator already occuped."
user << "\red The biogenerator is already loaded."
else
user.before_take_item(O)
O.loc = src
@@ -220,4 +220,4 @@
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
menustat = "menu"
updateUsrDialog()
updateUsrDialog()
+2 -2
View File
@@ -251,7 +251,7 @@
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.setloc(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
occupant.bodytemperature = 261
// occupant.metabslow = 0
@@ -275,7 +275,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.setloc(src)
M.loc = src
if(M.health > -100 && (M.health < 0 || M.sleeping))
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
occupant = M
+8 -8
View File
@@ -80,7 +80,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
visible_message("\blue The console beeps happily as it disgorges \the [I].", 3)
I.setloc(get_turf(src))
I.loc = get_turf(src)
frozen_items -= I
else if(href_list["allitems"])
@@ -92,7 +92,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
visible_message("\blue The console beeps happily as it disgorges the desired objects.", 3)
for(var/obj/item/I in frozen_items)
I.setloc(get_turf(src))
I.loc = get_turf(src)
frozen_items -= I
else if(href_list["crew"])
@@ -186,11 +186,11 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
//Drop all items into the pod.
for(var/obj/item/W in occupant)
occupant.drop_from_inventory(W)
W.setloc(src)
W.loc = src
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
for(var/obj/item/O in W.contents)
O.setloc(src)
O.loc = src
//Delete all items not on the preservation list.
var/list/items = src.contents
@@ -240,7 +240,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
current_mode.possible_traitors.Remove(occupant)
// Delete them from datacore.
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
@@ -305,7 +305,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
if(do_after(user, 20))
if(!M || !G || !G:affecting) return
M.setloc(src)
M.loc = src
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
@@ -375,7 +375,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
if(orient_right)
@@ -401,7 +401,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
occupant.client.eye = src.occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.setloc(get_turf(src))
occupant.loc = get_turf(src)
occupant = null
if(orient_right)
+7 -7
View File
@@ -468,7 +468,7 @@ obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm,
obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
//Called when mob user "attacks" it with object O
if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
if (istype(O, /obj/item/weapon/reagent_containers/glass))
var/b_amount = O.reagents.get_reagent_amount("water")
if(b_amount > 0 && waterlevel < 100)
if(b_amount + waterlevel > 100)
@@ -476,17 +476,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
O.reagents.remove_reagent("water", b_amount)
waterlevel += b_amount
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
user << "You fill the [src] with [b_amount] units of water."
user << "You fill \the [src] with [b_amount] units of water."
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
toxic -= round(b_amount/4)
if (toxic < 0 ) // Make sure it won't go overoboard
if (toxic < 0 ) // Make sure it won't go overboard
toxic = 0
else if(waterlevel >= 100)
user << "\red The [src] is already full."
user << "\red \The [src] is already full."
else
user << "\red The bucket is not filled with water."
user << "\red \The [O] is not filled with water."
updateicon()
else if ( istype(O, /obj/item/nutrient) )
@@ -504,7 +504,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (planted)
if (S.mode == 1)
if(!S.reagents.total_volume)
user << "\red The syringe is empty."
user << "\red \The [O] is empty."
return
user << "\red You inject the [myseed.plantname] with a chemical solution."
+2 -2
View File
@@ -75,7 +75,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
build_icon()
src.use_power = 1
@@ -179,7 +179,7 @@
if(usr && usr.client)
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
/*for(var/obj/O in src)
O.loc = src.loc*/
+6 -6
View File
@@ -410,7 +410,7 @@
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
src.OCCUPANT.setloc(src.loc)
src.OCCUPANT.loc = src.loc
src.OCCUPANT = null
if(!src.isopen)
src.isopen = 1
@@ -453,7 +453,7 @@
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
// usr.metabslow = 1
src.OCCUPANT = usr
src.isopen = 0 //Close the thing after the guy gets inside
@@ -499,7 +499,7 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.OCCUPANT = M
src.isopen = 0 //close ittt
@@ -520,7 +520,7 @@
return
user << "You load the [S.name] into the storage compartment."
user.drop_item()
S.setloc(src)
S.loc = src
src.SUIT = S
src.update_icon()
src.updateUsrDialog()
@@ -534,7 +534,7 @@
return
user << "You load the [H.name] into the storage compartment."
user.drop_item()
H.setloc(src)
H.loc = src
src.HELMET = H
src.update_icon()
src.updateUsrDialog()
@@ -548,7 +548,7 @@
return
user << "You load the [M.name] into the storage compartment."
user.drop_item()
M.setloc(src)
M.loc = src
src.MASK = M
src.update_icon()
src.updateUsrDialog()
+3
View File
@@ -283,6 +283,7 @@
construction_cost = list("metal"=30000,"plasma"=25000,"silver"=20000,"gold"=20000)
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
var/disabled = 0 //malf
var/canRwall = 0
action(atom/target)
if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve
@@ -297,6 +298,8 @@
switch(mode)
if(0)
if (istype(target, /turf/simulated/wall))
if(istype(target, /turf/simulated/wall/r_wall) && !canRwall)
return 0
occupant_message("Deconstructing [target]...")
set_ready_state(0)
if(do_after_cooldown(target))
+1 -1
View File
@@ -535,7 +535,7 @@
var/obj/mecha/working/ripley/R = src
if(R.cargo)
for(var/obj/O in R.cargo) //Dump contents of stored cargo
O.setloc(T)
O.loc = T
R.cargo -= O
T.Entered(O)
+3
View File
@@ -132,6 +132,9 @@ move an amendment</a> to the drawing.</p>
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)"
@@ -89,13 +89,13 @@
/obj/item/device/flashlight/pickup(mob/user)
if(on && luminosity)
if(on)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
if(on && !luminosity)
if(on)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(brightness_on)
+1 -1
View File
@@ -184,7 +184,7 @@ RCD
/obj/item/weapon/rcd/borg/New()
..()
desc = "A device used to rapidly build walls/floor."
canRwall = 1
canRwall = 0
/obj/item/weapon/rcd_ammo
name = "compressed matter cartridge"
@@ -97,7 +97,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
if(injecting)
implant(src.occupant)
injecting = 0
@@ -117,7 +117,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.setloc(src)
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
@@ -122,6 +122,12 @@
desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
/obj/item/weapon/storage/backpack/satcheldeluxe
name = "leather satchel"
desc = "An NT Deluxe satchel, with the finest quality leather and the company logo in a thin gold stitch"
icon_state = "nt_deluxe"
/obj/item/weapon/storage/backpack/satchel/withwallet
New()
..()
@@ -129,8 +135,8 @@
/obj/item/weapon/storage/backpack/satchel_norm
name = "satchel"
desc = "A trendy looking satchel."
icon_state = "satchel-norm"
desc = "A deluxe NT Satchel, made of the highest quality leather."
icon_state = "NT_Deluxe_satchel_icon"
/obj/item/weapon/storage/backpack/satchel_eng
name = "industrial satchel"
@@ -250,7 +250,7 @@
if(usr)
usr.u_equip(W)
usr.update_icons() //update our overlays
W.setloc(src)
W.loc = src
W.on_enter_storage(src)
if(usr)
if (usr.client && usr.s_active != src)
@@ -293,9 +293,9 @@
W.layer = 20
else
W.layer = initial(W.layer)
W.setloc(new_location)
W.loc = new_location
else
W.setloc(get_turf(src))
W.loc = get_turf(src)
if(usr)
src.orient2hud(usr)
@@ -325,7 +325,7 @@
user << "\red The tray won't fit in [src]."
return 1
else
W.setloc(user.loc)
W.loc = user.loc
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
@@ -21,7 +21,7 @@
if(!opened) // if closed, any item at the crate's loc is put in the contents
for(var/obj/item/I in src.loc)
if(I.density || I.anchored || I == src) continue
I.setloc(src)
I.loc = src
// Fix for #383 - C4 deleting fridges with corpses
/obj/structure/closet/Destroy()
@@ -49,13 +49,13 @@
/obj/structure/closet/proc/dump_contents()
//Cham Projector Exception
for(var/obj/effect/dummy/chameleon/AD in src)
AD.setloc(src.loc)
AD.loc = src.loc
for(var/obj/I in src)
I.setloc(src.loc)
I.loc = src.loc
for(var/mob/M in src)
M.setloc(src.loc)
M.loc = src.loc
if(M.client)
M.client.eye = M.client.mob
M.client.perspective = MOB_PERSPECTIVE
@@ -92,14 +92,14 @@
for(var/obj/effect/dummy/chameleon/AD in src.loc)
if(itemcount >= storage_capacity)
break
AD.setloc(src)
AD.loc = src
itemcount++
for(var/obj/item/I in src.loc)
if(itemcount >= storage_capacity)
break
if(!I.anchored)
I.setloc(src)
I.loc = src
itemcount++
for(var/mob/M in src.loc)
@@ -114,7 +114,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
itemcount++
src.icon_state = src.icon_closed
@@ -139,19 +139,19 @@
switch(severity)
if(1)
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
A.setloc(src.loc)
A.loc = src.loc
A.ex_act(severity++)
qdel(src)
if(2)
if(prob(50))
for (var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
A.ex_act(severity++)
qdel(src)
if(3)
if(prob(5))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
A.ex_act(severity++)
qdel(src)
@@ -160,7 +160,7 @@
..()
if(health <= 0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
return
@@ -169,14 +169,14 @@
if(user.environment_smash)
visible_message("\red [user] destroys the [src]. ")
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
// this should probably use dump_contents()
/obj/structure/closet/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
/obj/structure/closet/meteorhit(obj/O as obj)
@@ -268,7 +268,7 @@
return
usr.drop_item()
if(W)
W.setloc(src.loc)
W.loc = src.loc
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/weapon/weldingtool))
@@ -33,7 +33,7 @@
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
O.setloc(get_turf(src))
O.loc = get_turf(src)
icon_state = icon_opened
src.opened = 1
return 1
@@ -55,7 +55,7 @@
var/obj/structure/stool/bed/B = O
if(B.buckled_mob)
continue
O.setloc(src)
O.loc = src
itemcount++
icon_state = icon_closed
@@ -68,7 +68,7 @@
return
user.drop_item()
if(W)
W.setloc(src.loc)
W.loc = src.loc
else if(istype(W, /obj/item/weapon/packageWrap))
return
else if(istype(W, /obj/item/stack/cable_coil))
@@ -84,7 +84,7 @@
if(rigged)
user << "<span class='notice'>You attach [W] to [src].</span>"
user.drop_item()
W.setloc(src)
W.loc = src
return
else if(istype(W, /obj/item/weapon/wirecutters))
if(rigged)
@@ -385,12 +385,12 @@
continue
if(!S.anchored)
found = 1
S.setloc(src)
S.loc = src
break
if(!found)
for(var/obj/machinery/M in src.loc)
if(!M.anchored)
M.setloc(src)
M.loc = src
break
return
@@ -413,12 +413,12 @@
continue
if(!S.anchored)
found = 1
S.setloc(src)
S.loc = src
break
if(!found)
for(var/obj/machinery/M in src.loc)
if(!M.anchored)
M.setloc(src)
M.loc = src
break
return
@@ -15,7 +15,7 @@
new /obj/item/stack/sheet/wood(src)
var/turf/T = get_turf(src)
for(var/obj/O in contents)
O.setloc(T)
O.loc = T
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
@@ -84,4 +84,4 @@
/obj/structure/largecrate/cat/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
new /mob/living/simple_animal/cat(loc)
..()
..()
+16 -16
View File
@@ -46,21 +46,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
@@ -76,7 +76,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.setloc(src)
A.loc = src
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
del(src.connected)
@@ -90,7 +90,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.connected.loc)
A.loc = src.connected.loc
src.connected.icon_state = "morguet"
src.connected.dir = src.dir
else
@@ -126,7 +126,7 @@
src.connected.connected = src
src.icon_state = "morgue0"
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.connected.loc)
A.loc = src.connected.loc
//Foreach goto(106)
src.connected.icon_state = "morguet"
else
@@ -156,7 +156,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.setloc(src.connected)
A.loc = src.connected
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -173,7 +173,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.setloc(src.loc)
O.loc = src.loc
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
@@ -211,21 +211,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
@@ -250,7 +250,7 @@
if ((src.connected) && (src.locked == 0))
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.setloc(src)
A.loc = src
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
del(src.connected)
@@ -264,7 +264,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.connected.loc)
A.loc = src.connected.loc
src.connected.icon_state = "cremat"
else
//src.connected = null
@@ -298,7 +298,7 @@
src.connected.connected = src
src.icon_state = "crema0"
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.connected.loc)
A.loc = src.connected.loc
//Foreach goto(106)
src.connected.icon_state = "cremat"
else
@@ -374,7 +374,7 @@
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.setloc(src.connected)
A.loc = src.connected
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
@@ -391,7 +391,7 @@
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.setloc(src.loc)
O.loc = src.loc
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
+2 -2
View File
@@ -36,7 +36,7 @@ FLOOR SAFES
return
if(I.w_class + space <= maxspace)
space += I.w_class
I.setloc(src)
I.loc = src
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
@@ -147,7 +147,7 @@ FLOOR SAFES
if(I.w_class + space <= maxspace)
space += I.w_class
user.drop_item()
I.setloc(src)
I.loc = src
user << "<span class='notice'>You put [I] in [src].</span>"
updateUsrDialog()
return
@@ -49,7 +49,7 @@
/obj/structure/transit_tube_pod/Destroy()
for(var/atom/movable/AM in contents)
AM.setloc(loc)
AM.loc = loc
..()
@@ -60,7 +60,8 @@ obj/structure/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/AM in contents)
AM.setloc(loc)
AM.loc = loc
// TODO: What the fuck are you doing
AM.ex_act(severity++)
qdel(src)
@@ -68,7 +69,7 @@ obj/structure/ex_act(severity)
if(2.0)
if(prob(50))
for(var/atom/movable/AM in contents)
AM.setloc(loc)
AM.loc = loc
AM.ex_act(severity++)
qdel(src)
@@ -103,7 +104,7 @@ obj/structure/ex_act(severity)
AM << "<span class='warning'>The tube's support pylons block your way.</span>"
return ..()
else
AM.setloc(src.loc)
AM.loc = src.loc
AM << "<span class='info'>You slip under the tube.</span>"
/obj/structure/transit_tube/station/New(loc)
@@ -115,7 +116,7 @@ obj/structure/ex_act(severity)
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving && pod.dir in directions())
AM.setloc(pod)
AM.loc = pod
return
@@ -435,7 +436,7 @@ obj/structure/ex_act(severity)
if(istype(mob, /mob) && mob.client)
// If the pod is not in a tube at all, you can get out at any time.
if(!(locate(/obj/structure/transit_tube) in loc))
mob.setloc(loc)
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
//if(moving && istype(loc, /turf/space))
@@ -448,7 +449,7 @@ obj/structure/ex_act(severity)
if(!station.pod_moving)
if(direction == station.dir)
if(station.icon_state == "open")
mob.setloc(loc)
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
else
+2 -2
View File
@@ -31,7 +31,7 @@
if(ishuman(user))
user.put_in_hands(I)
else
I.setloc(get_turf(src))
I.loc = get_turf(src)
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
w_items -= I.w_class
return
@@ -84,7 +84,7 @@
user << "<span class='notice'>The cistern is full.</span>"
return
user.drop_item()
I.setloc(src)
I.loc = src
w_items += I.w_class
user << "You carefully place \the [I] into the cistern."
return
+2 -2
View File
@@ -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/global/datum/controller/supply_shuttle/supply_shuttle
//var/datum/controller/supply_shuttle/supply_shuttle = new()
+1 -1
View File
@@ -246,7 +246,7 @@
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 700000
lit_value = 4 //starlight
lighting_lumcount = 4 //starlight
// accepts_lighting=0 // Don't apply overlays
New()
+10 -15
View File
@@ -209,19 +209,15 @@
if(L)
del L
var/turf_light_data/old_lights = new
//Creates a new turf
/turf/proc/ChangeTurf(var/turf/N)
if (!N)
return
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)
+6 -6
View File
@@ -142,7 +142,7 @@ obj/machinery/computer/forensic_scanning
temp = null
if("eject")
if(scanning)
scanning.setloc(loc)
scanning.loc = loc
scanning = null
else
temp = "Eject Failed: No Object"
@@ -152,13 +152,13 @@ obj/machinery/computer/forensic_scanning
if(I && istype(I))
if(istype(I, /obj/item/weapon/evidencebag))
scanning = I.contents[1]
scanning.setloc(src)
scanning.loc = src
I.overlays -= scanning
I.icon_state = "evidenceobj"
else
scanning = I
M.drop_item()
I.setloc(src)
I.loc = src
else
usr << "Invalid Object Rejected."
if("card") //Processing a fingerprint card.
@@ -173,11 +173,11 @@ obj/machinery/computer/forensic_scanning
if(card.amount > 1 || !card.fingerprints.len)
usr << "\red ERROR: No prints/too many cards."
if(card.loc == src)
card.setloc(src.loc)
card.loc = src.loc
card = null
return
M.drop_item()
I.setloc(src)
I.loc = src
process_card()
else
usr << "\red Invalid Object Rejected."
@@ -607,7 +607,7 @@ obj/machinery/computer/forensic_scanning
else
usr << "\red ERROR: No prints/too many cards."
if(card.loc == src)
card.setloc(src.loc)
card.loc = src.loc
card = null
return
return
@@ -768,11 +768,8 @@ It can still be worn/put on as normal.
if(item && target.has_organ_for_slot(slot_to_process)) //Placing an item on the mob
if(item.mob_can_equip(target, slot_to_process, 0))
source.u_equip(item)
item.dropped(source)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
item.pickup(target)
item.dropped(source)
source.update_icons()
target.update_icons()
+5 -3
View File
@@ -264,6 +264,8 @@
if(!gene.block)
continue
if(gene.is_active(src))
if (prob(10) && prob(gene.instability))
adjustCloneLoss(1)
gene.OnMobLife(src)
if (radiation)
@@ -951,7 +953,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
@@ -970,7 +972,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)
@@ -1548,7 +1550,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)
// Separate proc so we can jump out of it when we've succeeded in spreading disease.
@@ -450,7 +450,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
@@ -12,7 +12,6 @@
if(!O)
return 0
if(istype(O,/obj/item/borg/sight))
var/obj/item/borg/sight/S = O
sight_mode &= ~S.sight_mode
@@ -78,7 +77,6 @@
uneq_module(module_state_2)
uneq_module(module_state_3)
/mob/living/silicon/robot/proc/activated(obj/item/O)
if(module_state_1 == O)
return 1
+6 -12
View File
@@ -142,7 +142,7 @@
var/datum/robot_component/cell_component = components["power cell"]
cell_component.wrapped = cell
cell_component.installed = 1
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
@@ -151,9 +151,9 @@
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
@@ -1153,26 +1153,20 @@
if (href_list["deact"])
var/obj/item/O = locate(href_list["deact"])
if(activated(O))
if(module_state_1 == O)
module_state_1 = null
contents -= O
else if(module_state_2 == O)
module_state_2 = null
contents -= O
else if(module_state_3 == O)
module_state_3 = null
contents -= O
else
src << "Module isn't activated."
return
else
src << "Module isn't activated"
return
O.dropped(src)
contents -= O
src << "[O.name] deactivated."
installed_modules()
return
@@ -111,7 +111,7 @@
// Don't check it twice if our destination is the tile we are on or we can't even get to our destination
if(T == destination)
destination = null
else if(!T.lit_value && !destination.lit_value) // No one can see us in the darkness, right?
else if(!T.lighting_lumcount && !destination.lighting_lumcount) // No one can see us in the darkness, right?
return null
// We aren't in darkness, loop for viewers.
+2 -2
View File
@@ -1125,14 +1125,14 @@
area.poweralert(1, src)
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)
+2 -3
View File
@@ -431,9 +431,8 @@
/area/proc/get_apc()
for(var/area/RA in src.related)
var/obj/machinery/power/apc/FINDME = locate() in RA
if (FINDME)
return FINDME
if (RA.apc.len >= 1)
return RA.apc[1]
//Determines how strong could be shock, deals damage to mob, uses power.
@@ -4,7 +4,6 @@
var/global/list/uneatable = list(
/turf/space,
/obj/effect/overlay,
/atom/movable/lighting_overlay,
/mob/dead,
/mob/camera,
/mob/new_player
+49 -1
View File
@@ -121,7 +121,55 @@ datum
src.handle_reactions()
return amount
copy_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)
trans_to_ingest(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1)//For items ingested. A delay is added between ingestion and addition of the reagents
if (!target )
return
if (!target.reagents || src.total_volume<=0)
return
/*var/datum/reagents/R = target.reagents
var/obj/item/weapon/reagent_containers/glass/beaker/noreact/B = new /obj/item/weapon/reagent_containers/glass/beaker/noreact //temporary holder
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
var/part = amount / src.total_volume
var/trans_data = null
for (var/datum/reagent/current_reagent in src.reagent_list)
if (!current_reagent)
continue
//if (current_reagent.id == "blood" && ishuman(target))
// var/mob/living/carbon/human/H = target
// H.inject_blood(my_atom, amount)
// continue
var/current_reagent_transfer = current_reagent.volume * part
if(preserve_data)
trans_data = current_reagent.data
B.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
src.update_total()
B.update_total()
B.handle_reactions()
src.handle_reactions()*/
var/obj/item/weapon/reagent_containers/glass/beaker/noreact/B = new /obj/item/weapon/reagent_containers/glass/beaker/noreact //temporary holder
B.volume = 1000
var/datum/reagents/BR = B.reagents
var/datum/reagents/R = target.reagents
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
src.trans_to(B, amount)
spawn(100)
BR.trans_to(target, BR.total_volume)
del(B)
return amount
copy_to(var/obj/target, var/amount=1, var/multiplier=1, var/preserve_data=1, var/safety = 0)
if(!target)
return
if(!target.reagents || src.total_volume<=0)
+9 -9
View File
@@ -208,7 +208,7 @@
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/food))
src.beaker = B
user.drop_item()
B.setloc(src)
B.loc = src
user << "You set [B] on the machine."
nanomanager.update_uis(src) // update all UIs attached to src
icon_state = "[icon_state]2"
@@ -325,7 +325,7 @@
return
src.beaker = B
user.drop_item()
B.setloc(src)
B.loc = src
user << "You add the beaker to the machine!"
src.updateUsrDialog()
icon_state = "mixer1"
@@ -338,7 +338,7 @@
src.loaded_pill_bottle = B
user.drop_item()
B.setloc(src)
B.loc = src
user << "You add the pill bottle into the dispenser slot!"
src.updateUsrDialog()
return
@@ -354,7 +354,7 @@
if (href_list["ejectp"])
if(loaded_pill_bottle)
loaded_pill_bottle.setloc(src.loc)
loaded_pill_bottle.loc = src.loc
loaded_pill_bottle = null
else if(href_list["close"])
usr << browse(null, "window=chemmaster")
@@ -966,7 +966,7 @@
else
src.beaker = O
user.drop_item()
O.setloc(src)
O.loc = src
update_icon()
src.updateUsrDialog()
return 0
@@ -980,7 +980,7 @@
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
O.contents -= G
G.setloc(src)
G.loc = src
holdingitems += G
if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill
user << "You fill the All-In-One grinder to the brim."
@@ -1003,7 +1003,7 @@
return 1
user.before_take_item(O)
O.setloc(src)
O.loc = src
holdingitems += O
src.updateUsrDialog()
return 0
@@ -1086,7 +1086,7 @@
return
if (!beaker)
return
beaker.setloc(src.loc)
beaker.loc = src.loc
beaker = null
update_icon()
@@ -1098,7 +1098,7 @@
return
for(var/obj/item/O in holdingitems)
O.setloc(src.loc)
O.loc = src.loc
holdingitems -= O
holdingitems = list()
@@ -33,7 +33,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, gulp_size)
reagents.trans_to_ingest(M, gulp_size)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
@@ -55,7 +55,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, gulp_size)
reagents.trans_to_ingest(M, gulp_size)
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
var/mob/living/silicon/robot/bro = user
@@ -191,7 +191,7 @@
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko
name = "Thirteen Loko"
desc = "The CMO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsably."
desc = "The CMO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly."
icon_state = "thirteen_loko"
New()
..()
@@ -36,7 +36,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, 10)
reagents.trans_to_ingest(M, 10)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
@@ -31,7 +31,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, gulp_size)
reagents.trans_to_ingest(M, gulp_size)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
@@ -54,7 +54,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, gulp_size)
reagents.trans_to_ingest(M, gulp_size)
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
var/mob/living/silicon/robot/bro = user
@@ -91,9 +91,9 @@
var/temp_bitesize = max(reagents.total_volume /2, bitesize)
reagents.trans_to(M, temp_bitesize)
*/
reagents.trans_to(M, bitesize)
reagents.trans_to_ingest(M, bitesize)
else
reagents.trans_to(M, reagents.total_volume)
reagents.trans_to_ingest(M, reagents.total_volume)
bitecount++
On_Consume(M)
return 1
@@ -37,7 +37,11 @@
/mob/living/simple_animal/cow,
/mob/living/simple_animal/hostile/retaliate/goat,
/obj/machinery/computer/centrifuge,
/obj/machinery/sleeper )
/obj/machinery/sleeper,
/obj/machinery/smartfridge/,
/obj/machinery/biogenerator,
/obj/machinery/hydroponics,
/obj/machinery/constructable_frame)
New()
..()
@@ -24,7 +24,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, reagents.total_volume)
reagents.trans_to_ingest(M, reagents.total_volume)
del(src)
else
del(src)
@@ -52,7 +52,7 @@
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)
reagents.trans_to(M, reagents.total_volume)
reagents.trans_to_ingest(M, reagents.total_volume)
del(src)
else
del(src)
+25 -22
View File
@@ -112,7 +112,7 @@
if (GM.client)
GM.client.perspective = EYE_PERSPECTIVE
GM.client.eye = src
GM.setloc(src)
GM.loc = src
for (var/mob/C in viewers(src))
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
del(G)
@@ -125,7 +125,7 @@
user.drop_item()
if(I)
I.setloc(src)
I.loc = src
user << "You place \the [I] into the [src]."
for(var/mob/M in viewers(src))
@@ -170,7 +170,7 @@
if (target.client)
target.client.perspective = EYE_PERSPECTIVE
target.client.eye = src
target.setloc(src)
target.loc = src
for (var/mob/C in viewers(src))
if(C == user)
@@ -197,7 +197,7 @@
if (user.client)
user.client.eye = user.client.mob
user.client.perspective = MOB_PERSPECTIVE
user.setloc(src.loc)
user.loc = src.loc
update()
return
@@ -308,7 +308,7 @@
// eject the contents of the disposal unit
proc/eject()
for(var/atom/movable/AM in src)
AM.setloc(src.loc)
AM.loc = src.loc
AM.pipe_eject(0)
update()
@@ -367,7 +367,7 @@
return
use_power = 1
if(mode != 1) // if off or ready, no need to charge
return
@@ -447,7 +447,7 @@
for(var/atom/movable/AM in H)
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
AM.setloc(src.loc)
AM.loc = src.loc
AM.pipe_eject(0)
spawn(1)
if(AM)
@@ -462,7 +462,7 @@
if(istype(I, /obj/item/projectile))
return
if(prob(75))
I.setloc(src)
I.loc = src
for(var/mob/M in viewers(src))
M.show_message("\the [I] lands in \the [src].", 3)
else
@@ -510,7 +510,7 @@
// now everything inside the disposal gets put into the holder
// note AM since can contain mobs or objs
for(var/atom/movable/AM in D)
AM.setloc(src)
AM.loc = src
if(istype(AM, /mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
if(M_FAT in H.mutations) // is a human and fat?
@@ -587,7 +587,7 @@
// used when a a holder meets a stuck holder
proc/merge(var/obj/structure/disposalholder/other)
for(var/atom/movable/AM in other)
AM.setloc(src) // move everything in other holder to this one
AM.loc = src // move everything in other holder to this one
if(ismob(AM))
var/mob/M = AM
if(M.client) // if a client mob, update eye to follow this holder
@@ -649,7 +649,7 @@
// this is unlikely, but just dump out everything into the turf in case
for(var/atom/movable/AM in H)
AM.setloc(T)
AM.loc = T
AM.pipe_eject(0)
del(H)
..()
@@ -680,9 +680,9 @@
if(H2 && !H2.active)
H.merge(H2)
H.setloc(P)
H.loc = P
else // if wasn't a pipe, then set loc to turf
H.setloc(T)
H.loc = T
return null
return P
@@ -721,7 +721,7 @@
if(T.density) // dense ouput turf, so stop holder
H.active = 0
H.setloc(src)
H.loc = src
return
if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
var/turf/simulated/floor/F = T
@@ -741,7 +741,7 @@
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
if(H)
for(var/atom/movable/AM in H)
AM.setloc(T)
AM.loc = T
AM.pipe_eject(direction)
spawn(1)
if(AM)
@@ -756,7 +756,7 @@
for(var/atom/movable/AM in H)
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
AM.setloc(T)
AM.loc = T
AM.pipe_eject(0)
spawn(1)
if(AM)
@@ -789,7 +789,7 @@
// this is unlikely, but just dump out everything into the turf in case
for(var/atom/movable/AM in H)
AM.setloc(T)
AM.loc = T
AM.pipe_eject(0)
del(H)
return
@@ -903,6 +903,9 @@
update()
return
//a three-way junction with dir being the dominant direction
/obj/structure/disposalpipe/junction
icon_state = "pipe-j1"
@@ -1025,9 +1028,9 @@
if(H2 && !H2.active)
H.merge(H2)
H.setloc(P)
H.loc = P
else // if wasn't a pipe, then set loc to turf
H.setloc(T)
H.loc = T
return null
return P
@@ -1087,9 +1090,9 @@
if(H2 && !H2.active)
H.merge(H2)
H.setloc(P)
H.loc = P
else // if wasn't a pipe, then set loc to turf
H.setloc(T)
H.loc = T
return null
return P
@@ -1256,7 +1259,7 @@
if(H)
for(var/atom/movable/AM in H)
AM.setloc(src.loc)
AM.loc = src.loc
AM.pipe_eject(dir)
spawn(5)
AM.throw_at(target, 3, 1)
@@ -92,7 +92,7 @@
update_coolant()
return
user.drop_item()
I.setloc(src)
I.loc = src
scanned_item = I
/obj/machinery/radiocarbon_spectrometer/proc/update_coolant()
@@ -144,15 +144,15 @@
data["radiation"] = round(radiation)
data["t_left_radspike"] = round(t_left_radspike)
data["rad_shield_on"] = rad_shield
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
@@ -319,7 +319,7 @@
last_scan_data = P.info
P.loc = src.loc
scanned_item.setloc(src.loc)
scanned_item.loc = src.loc
scanned_item = null
/obj/machinery/radiocarbon_spectrometer/Topic(href, href_list)
@@ -355,7 +355,7 @@
if(href_list["ejectItem"])
if(scanned_item)
scanned_item.setloc(src.loc)
scanned_item.loc = src.loc
scanned_item = null
add_fingerprint(usr)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 58 KiB

+12568
View File
File diff suppressed because it is too large Load Diff