mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #4607 from Aryn/master
Lighting Fixes Volume II: Return of the Bugs
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include "code\__HELPERS\global_lists.dm"
|
#include "code\__HELPERS\global_lists.dm"
|
||||||
#include "code\__HELPERS\icons.dm"
|
#include "code\__HELPERS\icons.dm"
|
||||||
#include "code\__HELPERS\lists.dm"
|
#include "code\__HELPERS\lists.dm"
|
||||||
|
#include "code\__HELPERS\loc.dm"
|
||||||
#include "code\__HELPERS\logging.dm"
|
#include "code\__HELPERS\logging.dm"
|
||||||
#include "code\__HELPERS\maths.dm"
|
#include "code\__HELPERS\maths.dm"
|
||||||
#include "code\__HELPERS\mobs.dm"
|
#include "code\__HELPERS\mobs.dm"
|
||||||
@@ -1283,12 +1284,12 @@
|
|||||||
#include "code\WorkInProgress\explosion_particles.dm"
|
#include "code\WorkInProgress\explosion_particles.dm"
|
||||||
#include "code\WorkInProgress\periodic_news.dm"
|
#include "code\WorkInProgress\periodic_news.dm"
|
||||||
#include "code\WorkInProgress\Apples\artifacts.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\Compatibility.dm"
|
||||||
#include "code\WorkInProgress\Aryn\Lighting\Controller.dm"
|
#include "code\WorkInProgress\Aryn\Lighting\Controller.dm"
|
||||||
#include "code\WorkInProgress\Aryn\Lighting\Engine.dm"
|
#include "code\WorkInProgress\Aryn\Lighting\Engine.dm"
|
||||||
#include "code\WorkInProgress\Aryn\Lighting\Light.dm"
|
#include "code\WorkInProgress\Aryn\Lighting\Light.dm"
|
||||||
#include "code\WorkInProgress\Aryn\Lighting\Lightpoint.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\falsewall.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
|
||||||
|
|||||||
@@ -36,10 +36,14 @@ turf_light_data/proc/copy_to(turf/T)
|
|||||||
//T.ResetValue()
|
//T.ResetValue()
|
||||||
|
|
||||||
atom/proc/SetLuminosity(n)
|
atom/proc/SetLuminosity(n)
|
||||||
|
ASSERT(n >= 0)
|
||||||
|
|
||||||
n = min(n,10) //Caelcode.
|
n = min(n,10) //Caelcode.
|
||||||
if(n > 0)
|
if(n > 0)
|
||||||
SetLight(max(1,n>>1),n)
|
//world << "[name].SetLuminosity([n]) \[[max(1,n>>1)],[n]\]"
|
||||||
|
SetLight(max(1,n),n)
|
||||||
else
|
else
|
||||||
|
//world << "[name].SetLuminosity(0)"
|
||||||
SetLight(0,0)
|
SetLight(0,0)
|
||||||
luminosity = n
|
luminosity = n
|
||||||
//else lighting_controller.initial_lights.Add(src)
|
//else lighting_controller.initial_lights.Add(src)
|
||||||
@@ -41,11 +41,8 @@ var/list/lit_z_levels = list(1,5)
|
|||||||
|
|
||||||
/datum/controller/lighting
|
/datum/controller/lighting
|
||||||
|
|
||||||
var/starlight = 4
|
var/starlight = LIGHT_STATES
|
||||||
var/list/icon_updates = list()
|
var/list/icon_updates = list()
|
||||||
|
|
||||||
var/list/light_border = list()
|
|
||||||
|
|
||||||
var/started = 0
|
var/started = 0
|
||||||
|
|
||||||
//var/icon/border = icon('Icons/Test.dmi', "border")
|
//var/icon/border = icon('Icons/Test.dmi', "border")
|
||||||
@@ -89,32 +86,14 @@ var/list/lit_z_levels = list(1,5)
|
|||||||
started = 1
|
started = 1
|
||||||
|
|
||||||
for(var/turf/T)
|
for(var/turf/T)
|
||||||
if(!T.is_outside && T.light_overlay)
|
if(T.light_overlay)
|
||||||
|
|
||||||
T.ResetValue()
|
T.ResetValue()
|
||||||
T.UpdateLight()
|
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 << "<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>"
|
world << "<font color=red>Updated [turfs_updated] turfs.</font>"
|
||||||
|
|
||||||
/datum/controller/lighting/proc/MarkIconUpdate(turf/T)
|
/datum/controller/lighting/proc/GetLightIcon(a,b,c,d)
|
||||||
if(!T.needs_light_update)
|
if(a <= 2) return LIGHT_ICON_1
|
||||||
icon_updates.Add(T)
|
else return LIGHT_ICON_2
|
||||||
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
|
|
||||||
@@ -50,28 +50,26 @@ Turf Procs:
|
|||||||
Resets the opacity cache and looks for opaque objects. Also responsible for adding and removing borders to space.
|
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
|
atom/movable/lighting_overlay
|
||||||
name = ""
|
name = ""
|
||||||
anchored = 1
|
anchored = 1
|
||||||
layer = 9
|
layer = 9
|
||||||
mouse_opacity = 0
|
mouse_opacity = 0
|
||||||
icon = 'icons/effects/ArynLights.dmi'
|
|
||||||
icon_state = "0000"
|
|
||||||
invisibility = INVISIBILITY_LIGHTING
|
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
|
atom/var/light/light
|
||||||
|
|
||||||
turf/var/atom/movable/lighting_overlay/light_overlay
|
turf/var/atom/movable/lighting_overlay/light_overlay
|
||||||
|
|
||||||
turf/var/lit_value = 0
|
turf/var/lit_value = 0
|
||||||
turf/var/max_brightness = 0
|
turf/var/max_brightness = 0
|
||||||
turf/var/has_opaque = 0
|
turf/var/has_opaque = -1
|
||||||
turf/var/is_outside = 0
|
turf/var/is_outside = 0
|
||||||
turf/var/is_border = 0
|
turf/var/is_border = 0
|
||||||
turf/var/needs_light_update = 0
|
|
||||||
|
|
||||||
turf/var/lightpoint/lightNE
|
turf/var/lightpoint/lightNE
|
||||||
turf/var/lightpoint/lightNW
|
turf/var/lightpoint/lightNW
|
||||||
@@ -85,21 +83,31 @@ atom/movable/New()
|
|||||||
if(!light)
|
if(!light)
|
||||||
SetLight(luminosity,luminosity)
|
SetLight(luminosity,luminosity)
|
||||||
else
|
else
|
||||||
|
light.atom = src
|
||||||
light.Reset()
|
light.Reset()
|
||||||
|
else if(light)
|
||||||
|
light.atom = src
|
||||||
|
light.Reset()
|
||||||
if(opacity)
|
if(opacity)
|
||||||
if(lighting_ready())
|
if(lighting_ready())
|
||||||
opacity = 0
|
opacity = 0
|
||||||
SetOpacity(1)
|
SetOpacity(1)
|
||||||
|
|
||||||
atom/movable/Move()
|
atom/movable/Del()
|
||||||
|
if(light) light.Off()
|
||||||
|
if(opacity) SetOpacity(0)
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
atom/movable/Move(turf/newloc)
|
||||||
var/o = opacity
|
var/o = opacity
|
||||||
if(o) SetOpacity(0)
|
if(o) SetOpacity(0)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(.)
|
if(.)
|
||||||
if(o) SetOpacity(1)
|
if(o) SetOpacity(1)
|
||||||
if(light)
|
|
||||||
light.Reset()
|
turf/Entered(atom/movable/M)
|
||||||
if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
. = ..()
|
||||||
|
if(M.light) M.light.Reset()
|
||||||
|
|
||||||
atom/proc/SetLight(intensity, radius)
|
atom/proc/SetLight(intensity, radius)
|
||||||
//if(lights_verbose) world << "SetLight([intensity],[radius])"
|
//if(lights_verbose) world << "SetLight([intensity],[radius])"
|
||||||
@@ -110,7 +118,7 @@ atom/proc/SetLight(intensity, radius)
|
|||||||
//if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit."
|
//if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit."
|
||||||
light.Off()
|
light.Off()
|
||||||
light.intensity = 0
|
light.intensity = 0
|
||||||
if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
//if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
||||||
return
|
return
|
||||||
if(!light)
|
if(!light)
|
||||||
//if(lights_verbose) world << "New light."
|
//if(lights_verbose) world << "New light."
|
||||||
@@ -121,25 +129,31 @@ atom/proc/SetLight(intensity, radius)
|
|||||||
light.radius = min(radius,15)
|
light.radius = min(radius,15)
|
||||||
light.intensity = intensity
|
light.intensity = intensity
|
||||||
light.Reset()
|
light.Reset()
|
||||||
if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
//if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
||||||
|
|
||||||
atom/proc/SetOpacity(o)
|
atom/proc/SetOpacity(o)
|
||||||
if(o == opacity) return
|
if(o == opacity) return
|
||||||
opacity = o
|
opacity = o
|
||||||
var/turf/T = loc
|
var/turf/T = loc
|
||||||
if(isturf(T))
|
if(isturf(T))
|
||||||
|
T.CheckForOpaqueObjects()
|
||||||
for(var/light/A in T.lit_by)
|
for(var/light/A in T.lit_by)
|
||||||
A.Reset()
|
A.Reset()
|
||||||
lighting_controller.FlushIconUpdates()
|
|
||||||
|
|
||||||
turf/proc/UpdateLight()
|
//lighting_controller.FlushIconUpdates()
|
||||||
if(light_overlay)
|
|
||||||
light_overlay.icon_state = "[lightSE.max_value()][lightSW.max_value()][lightNW.max_value()][lightNE.max_value()]"
|
|
||||||
|
|
||||||
turf/proc/AddLight(light/light)
|
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(is_outside) return
|
||||||
|
|
||||||
var/brightness = light.CalculateBrightness(src)
|
|
||||||
if(brightness <= 0) return
|
if(brightness <= 0) return
|
||||||
|
|
||||||
if(!lit_by) lit_by = list()
|
if(!lit_by) lit_by = list()
|
||||||
@@ -148,13 +162,19 @@ turf/proc/AddLight(light/light)
|
|||||||
|
|
||||||
lit_by[light] = brightness
|
lit_by[light] = brightness
|
||||||
|
|
||||||
if(!has_opaque && lighting_ready())
|
if(lighting_ready())
|
||||||
if(brightness > max_brightness)
|
if(brightness > max_brightness)
|
||||||
lit_value = LIGHTCLAMP(brightness)
|
lit_value = LIGHTCLAMP(brightness)
|
||||||
max_brightness = brightness
|
max_brightness = brightness
|
||||||
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
|
||||||
|
|
||||||
for(var/turf/T in range(1,src))
|
for(var/turf/T in range(1,src))
|
||||||
lighting_controller.MarkIconUpdate(T)
|
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)
|
turf/proc/RemoveLight(light/light)
|
||||||
if(lit_by)
|
if(lit_by)
|
||||||
@@ -171,10 +191,9 @@ turf/proc/ResetAllLights()
|
|||||||
|
|
||||||
/turf/space/ResetAllLights()
|
/turf/space/ResetAllLights()
|
||||||
var/atom/movable/lighting_overlay/overlay = locate() in src
|
var/atom/movable/lighting_overlay/overlay = locate() in src
|
||||||
if (overlay)
|
if(overlay) overlay.loc = null
|
||||||
overlay.loc = null
|
light_overlay = null
|
||||||
light_overlay = null
|
is_outside = 1
|
||||||
is_outside = 1
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
turf/proc/ResetValue()
|
turf/proc/ResetValue()
|
||||||
@@ -183,17 +202,10 @@ turf/proc/ResetValue()
|
|||||||
lit_value = LIGHTCLAMP(lighting_controller.starlight)
|
lit_value = LIGHTCLAMP(lighting_controller.starlight)
|
||||||
return
|
return
|
||||||
|
|
||||||
CheckForOpaqueObjects()
|
if(has_opaque < 0) CheckForOpaqueObjects()
|
||||||
if(has_opaque)
|
if(has_opaque)
|
||||||
lit_value = 0
|
lit_value = 0
|
||||||
else
|
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
|
max_brightness = 0
|
||||||
for(var/light/light in lit_by)
|
for(var/light/light in lit_by)
|
||||||
var/brightness = lit_by[light]//light.CalculateBrightness(src)
|
var/brightness = lit_by[light]//light.CalculateBrightness(src)
|
||||||
@@ -201,20 +213,14 @@ turf/proc
|
|||||||
max_brightness = brightness
|
max_brightness = brightness
|
||||||
lit_value = LIGHTCLAMP(max_brightness)
|
lit_value = LIGHTCLAMP(max_brightness)
|
||||||
|
|
||||||
the_part_where_I_use_range()
|
if(lighting_ready())
|
||||||
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
|
||||||
for(var/turf/T in range(1,src))
|
for(var/turf/T in range(1,src))
|
||||||
lighting_controller.MarkIconUpdate(T)
|
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/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()
|
turf/proc/CheckForOpaqueObjects()
|
||||||
has_opaque = opacity
|
has_opaque = opacity
|
||||||
@@ -222,6 +228,4 @@ turf/proc/CheckForOpaqueObjects()
|
|||||||
for(var/atom/movable/M in contents)
|
for(var/atom/movable/M in contents)
|
||||||
if(M.opacity)
|
if(M.opacity)
|
||||||
has_opaque = 1
|
has_opaque = 1
|
||||||
break
|
break
|
||||||
|
|
||||||
#undef LIGHTCLAMP
|
|
||||||
@@ -24,20 +24,30 @@ Class Procs:
|
|||||||
|
|
||||||
light/var/radius = 0
|
light/var/radius = 0
|
||||||
light/var/intensity = 0
|
light/var/intensity = 0
|
||||||
light/var/list/lit_turfs
|
light/var/ambient_extension = 3
|
||||||
|
light/var/list/lit_turfs = list()
|
||||||
light/var/atom/atom
|
light/var/atom/atom
|
||||||
|
|
||||||
light/New(atom/atom)
|
light/New(atom/atom, radius, ambience=3)
|
||||||
src.atom = atom
|
ASSERT(atom)
|
||||||
|
|
||||||
|
if(istype(atom))
|
||||||
|
src.atom = atom
|
||||||
|
else
|
||||||
|
src.intensity = atom
|
||||||
|
src.radius = radius
|
||||||
|
src.ambient_extension = ambience
|
||||||
|
|
||||||
light/proc/Reset()
|
light/proc/Reset()
|
||||||
//if(atom.lights_verbose) world << "light.Reset()"
|
//if(atom.lights_verbose) world << "light.Reset()"
|
||||||
Off()
|
Off()
|
||||||
if(intensity > 0)
|
if(intensity > 0)
|
||||||
//if(atom.lights_verbose) world << "Restoring light."
|
//if(atom.lights_verbose) world << "Restoring light."
|
||||||
for(var/turf/T in view(get_turf(atom),radius+1))
|
var/turf/loc = atom
|
||||||
|
for(var/turf/T in view(loc,radius+ambient_extension))
|
||||||
if(!T.is_outside)
|
if(!T.is_outside)
|
||||||
T.AddLight(src)
|
var/brightness = CalculateBrightness(T, loc)
|
||||||
|
T.AddLight(src, brightness)
|
||||||
lit_turfs.Add(T)
|
lit_turfs.Add(T)
|
||||||
//if(atom.lights_verbose) world << "[lit_turfs.len] turfs added."
|
//if(atom.lights_verbose) world << "[lit_turfs.len] turfs added."
|
||||||
|
|
||||||
@@ -45,16 +55,20 @@ light/proc/Off()
|
|||||||
//if(atom.lights_verbose) world << "light.Off()"
|
//if(atom.lights_verbose) world << "light.Off()"
|
||||||
for(var/turf/T in lit_turfs)
|
for(var/turf/T in lit_turfs)
|
||||||
T.RemoveLight(src)
|
T.RemoveLight(src)
|
||||||
lit_turfs = list()
|
lit_turfs.Cut()
|
||||||
|
|
||||||
light/proc/CalculateBrightness(turf/T)
|
light/proc/Flash(t)
|
||||||
if (!atom)
|
Reset()
|
||||||
return 0
|
spawn(t)
|
||||||
var/square = get_square_dist(atom.x,atom.y,atom.z,T.x,T.y,T.z)
|
Off()
|
||||||
if(square > (radius+2)*(radius+2)) return 0
|
|
||||||
|
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.
|
//+2 offset gives an ambient light effect.
|
||||||
|
|
||||||
var/value = ((radius)/(2*fsqrt(square) + 1)) * intensity - 0.48
|
var/value = ((radius)/(2*FSQRT(square) + 1)) * intensity - 0.48
|
||||||
/*
|
/*
|
||||||
lightRadius
|
lightRadius
|
||||||
---------------- * lightValue - 0.48
|
---------------- * lightValue - 0.48
|
||||||
|
|||||||
@@ -50,16 +50,10 @@ lightpoint
|
|||||||
T.lightNW = src
|
T.lightNW = src
|
||||||
|
|
||||||
proc/max_value()
|
proc/max_value()
|
||||||
if(cached_value < 0)
|
var
|
||||||
var
|
valueA = VALUE_OF(NW)
|
||||||
valueA = value_of(NW)
|
valueB = VALUE_OF(NE)
|
||||||
valueB = value_of(NE)
|
valueC = VALUE_OF(SW)
|
||||||
valueC = value_of(SW)
|
valueD = VALUE_OF(SE)
|
||||||
valueD = value_of(SE)
|
cached_value = max(valueA,valueB,valueC,valueD)
|
||||||
cached_value = max(valueA,valueB,valueC,valueD)
|
return cached_value
|
||||||
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
|
|
||||||
@@ -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]
|
|
||||||
@@ -21,6 +21,7 @@ turf/verb/ShowData()
|
|||||||
set src in world
|
set src in world
|
||||||
|
|
||||||
usr << "<b>[src]</b>"
|
usr << "<b>[src]</b>"
|
||||||
|
usr << "[MAX_VALUE(lightSE)][MAX_VALUE(lightSW)][MAX_VALUE(lightNW)][MAX_VALUE(lightNE)]"
|
||||||
usr << "Lit Value: [lit_value]"
|
usr << "Lit Value: [lit_value]"
|
||||||
usr << "Max Brightness: [max_brightness]"
|
usr << "Max Brightness: [max_brightness]"
|
||||||
|
|
||||||
|
|||||||
19
code/WorkInProgress/Aryn/Lighting/_Defs.dm
Normal file
19
code/WorkInProgress/Aryn/Lighting/_Defs.dm
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#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
code/__HELPERS/loc.dm
Normal file
7
code/__HELPERS/loc.dm
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
atom/movable/proc/setloc(newloc)
|
||||||
|
if(light)
|
||||||
|
var/oldloc = loc
|
||||||
|
loc = newloc
|
||||||
|
if(isturf(newloc) != isturf(oldloc)) light.Reset()
|
||||||
|
else
|
||||||
|
loc = newloc
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
if(destination)
|
if(destination)
|
||||||
if(loc)
|
if(loc)
|
||||||
loc.Exited(src)
|
loc.Exited(src)
|
||||||
loc = destination
|
setloc(destination)
|
||||||
loc.Entered(src)
|
loc.Entered(src)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -87,10 +87,10 @@
|
|||||||
src.go_out()
|
src.go_out()
|
||||||
for(var/obj/O in src)
|
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/weapon/cable_coil)))
|
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/weapon/cable_coil)))
|
||||||
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components)
|
O.setloc(get_turf(src))//Ejects items that manage to get in there (exluding the components)
|
||||||
if(!occupant)
|
if(!occupant)
|
||||||
for(var/mob/M in src)//Failsafe so you can get mobs out
|
for(var/mob/M in src)//Failsafe so you can get mobs out
|
||||||
M.loc = get_turf(src)
|
M.setloc(get_turf(src))
|
||||||
|
|
||||||
/obj/machinery/dna_scannernew/verb/move_inside()
|
/obj/machinery/dna_scannernew/verb/move_inside()
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
usr.stop_pulling()
|
usr.stop_pulling()
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
usr.client.eye = src
|
usr.client.eye = src
|
||||||
usr.loc = src
|
usr.setloc(src)
|
||||||
src.occupant = usr
|
src.occupant = usr
|
||||||
src.icon_state = "scanner_1"
|
src.icon_state = "scanner_1"
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
beaker = item
|
beaker = item
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
item.loc = src
|
item.setloc(src)
|
||||||
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
|
||||||
return
|
return
|
||||||
else if (!istype(item, /obj/item/weapon/grab))
|
else if (!istype(item, /obj/item/weapon/grab))
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
if(M.client)
|
if(M.client)
|
||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
src.occupant = M
|
src.occupant = M
|
||||||
src.icon_state = "scanner_1"
|
src.icon_state = "scanner_1"
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
if (src.occupant.client)
|
if (src.occupant.client)
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
src.occupant.client.eye = src.occupant.client.mob
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
src.occupant.loc = src.loc
|
src.occupant.setloc(src.loc)
|
||||||
src.occupant = null
|
src.occupant = null
|
||||||
src.icon_state = "scanner_0"
|
src.icon_state = "scanner_0"
|
||||||
return
|
return
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
//Foreach goto(35)
|
//Foreach goto(35)
|
||||||
//SN src = null
|
//SN src = null
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
if(2.0)
|
if(2.0)
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
//Foreach goto(108)
|
//Foreach goto(108)
|
||||||
//SN src = null
|
//SN src = null
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
if(3.0)
|
if(3.0)
|
||||||
if (prob(25))
|
if (prob(25))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
//Foreach goto(181)
|
//Foreach goto(181)
|
||||||
//SN src = null
|
//SN src = null
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
/obj/machinery/dna_scannernew/blob_act()
|
/obj/machinery/dna_scannernew/blob_act()
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/machinery/computer/scan_consolenew
|
/obj/machinery/computer/scan_consolenew
|
||||||
@@ -454,15 +454,15 @@
|
|||||||
if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len)
|
if (connected.beaker.reagents && connected.beaker.reagents.reagent_list.len)
|
||||||
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
|
for(var/datum/reagent/R in connected.beaker.reagents.reagent_list)
|
||||||
data["beakerVolume"] += R.volume
|
data["beakerVolume"] += R.volume
|
||||||
|
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// 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)
|
if (!ui)
|
||||||
// the ui does not exist, so we'll create a new() one
|
// 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
|
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||||
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
|
ui = new(user, src, ui_key, "dna_modifier.tmpl", "DNA Modifier Console", 660, 700)
|
||||||
// when the ui is first opened this is the data it will use
|
// 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
|
// open the new ui window
|
||||||
ui.open()
|
ui.open()
|
||||||
// auto update every Master Controller tick
|
// auto update every Master Controller tick
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
blob_act()
|
blob_act()
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
A.blob_act()
|
A.blob_act()
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
if(!beaker)
|
if(!beaker)
|
||||||
beaker = G
|
beaker = G
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
G.loc = src
|
G.setloc(src)
|
||||||
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
if(M.client)
|
if(M.client)
|
||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
src.occupant = M
|
src.occupant = M
|
||||||
src.icon_state = "sleeper_1"
|
src.icon_state = "sleeper_1"
|
||||||
if(orient == "RIGHT")
|
if(orient == "RIGHT")
|
||||||
@@ -252,21 +252,21 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(2.0)
|
if(2.0)
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(3.0)
|
if(3.0)
|
||||||
if(prob(25))
|
if(prob(25))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
if(src.occupant.client)
|
if(src.occupant.client)
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
src.occupant.client.eye = src.occupant.client.mob
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
src.occupant.loc = src.loc
|
src.occupant.setloc(src.loc)
|
||||||
src.occupant = null
|
src.occupant = null
|
||||||
if(orient == "RIGHT")
|
if(orient == "RIGHT")
|
||||||
icon_state = "sleeper_0-r"
|
icon_state = "sleeper_0-r"
|
||||||
@@ -408,7 +408,7 @@
|
|||||||
usr.stop_pulling()
|
usr.stop_pulling()
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
usr.client.eye = src
|
usr.client.eye = src
|
||||||
usr.loc = src
|
usr.setloc(src)
|
||||||
src.occupant = usr
|
src.occupant = usr
|
||||||
src.icon_state = "sleeper_1"
|
src.icon_state = "sleeper_1"
|
||||||
if(orient == "RIGHT")
|
if(orient == "RIGHT")
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
usr.pulling = null
|
usr.pulling = null
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
usr.client.eye = src
|
usr.client.eye = src
|
||||||
usr.loc = src
|
usr.setloc(src)
|
||||||
src.occupant = usr
|
src.occupant = usr
|
||||||
src.icon_state = "body_scanner_1"
|
src.icon_state = "body_scanner_1"
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
@@ -60,12 +60,12 @@
|
|||||||
if ((!( src.occupant ) || src.locked))
|
if ((!( src.occupant ) || src.locked))
|
||||||
return
|
return
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
O.loc = src.loc
|
O.setloc(src.loc)
|
||||||
//Foreach goto(30)
|
//Foreach goto(30)
|
||||||
if (src.occupant.client)
|
if (src.occupant.client)
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
src.occupant.client.eye = src.occupant.client.mob
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
src.occupant.loc = src.loc
|
src.occupant.setloc(src.loc)
|
||||||
src.occupant = null
|
src.occupant = null
|
||||||
src.icon_state = "body_scanner_0"
|
src.icon_state = "body_scanner_0"
|
||||||
return
|
return
|
||||||
@@ -83,11 +83,11 @@
|
|||||||
if (M.client)
|
if (M.client)
|
||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
src.occupant = M
|
src.occupant = M
|
||||||
src.icon_state = "body_scanner_1"
|
src.icon_state = "body_scanner_1"
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
O.loc = src.loc
|
O.setloc(src.loc)
|
||||||
//Foreach goto(154)
|
//Foreach goto(154)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
//G = null
|
//G = null
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
//Foreach goto(35)
|
//Foreach goto(35)
|
||||||
//SN src = null
|
//SN src = null
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
if(2.0)
|
if(2.0)
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
//Foreach goto(108)
|
//Foreach goto(108)
|
||||||
//SN src = null
|
//SN src = null
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
if(3.0)
|
if(3.0)
|
||||||
if (prob(25))
|
if (prob(25))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
//Foreach goto(181)
|
//Foreach goto(181)
|
||||||
//SN src = null
|
//SN src = null
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
/obj/machinery/bodyscanner/blob_act()
|
/obj/machinery/bodyscanner/blob_act()
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/machinery/body_scanconsole/ex_act(severity)
|
/obj/machinery/body_scanconsole/ex_act(severity)
|
||||||
|
|||||||
@@ -121,13 +121,13 @@
|
|||||||
data["beakerVolume"] += R.volume
|
data["beakerVolume"] += R.volume
|
||||||
|
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// 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)
|
if (!ui)
|
||||||
// the ui does not exist, so we'll create a new() one
|
// 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
|
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||||
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
|
ui = new(user, src, ui_key, "cryo.tmpl", "Cryo Cell Control System", 520, 410)
|
||||||
// when the ui is first opened this is the data it will use
|
// 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
|
// open the new ui window
|
||||||
ui.open()
|
ui.open()
|
||||||
// auto update every Master Controller tick
|
// auto update every Master Controller tick
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
if (occupant.client)
|
if (occupant.client)
|
||||||
occupant.client.eye = occupant.client.mob
|
occupant.client.eye = occupant.client.mob
|
||||||
occupant.client.perspective = MOB_PERSPECTIVE
|
occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
|
occupant.setloc(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
|
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
|
||||||
occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug.
|
occupant.bodytemperature = 261 // Changed to 70 from 140 by Zuhayr due to reoccurance of bug.
|
||||||
// occupant.metabslow = 0
|
// occupant.metabslow = 0
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
M.stop_pulling()
|
M.stop_pulling()
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
if(M.health > -100 && (M.health < 0 || M.sleeping))
|
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>"
|
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
|
||||||
occupant = M
|
occupant = M
|
||||||
|
|||||||
@@ -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)
|
visible_message("\blue The console beeps happily as it disgorges \the [I].", 3)
|
||||||
|
|
||||||
I.loc = get_turf(src)
|
I.setloc(get_turf(src))
|
||||||
frozen_items -= I
|
frozen_items -= I
|
||||||
|
|
||||||
else if(href_list["allitems"])
|
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)
|
visible_message("\blue The console beeps happily as it disgorges the desired objects.", 3)
|
||||||
|
|
||||||
for(var/obj/item/I in frozen_items)
|
for(var/obj/item/I in frozen_items)
|
||||||
I.loc = get_turf(src)
|
I.setloc(get_turf(src))
|
||||||
frozen_items -= I
|
frozen_items -= I
|
||||||
|
|
||||||
else if(href_list["crew"])
|
else if(href_list["crew"])
|
||||||
@@ -186,11 +186,11 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
|||||||
//Drop all items into the pod.
|
//Drop all items into the pod.
|
||||||
for(var/obj/item/W in occupant)
|
for(var/obj/item/W in occupant)
|
||||||
occupant.drop_from_inventory(W)
|
occupant.drop_from_inventory(W)
|
||||||
W.loc = src
|
W.setloc(src)
|
||||||
|
|
||||||
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
|
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
|
||||||
for(var/obj/item/O in W.contents)
|
for(var/obj/item/O in W.contents)
|
||||||
O.loc = src
|
O.setloc(src)
|
||||||
|
|
||||||
//Delete all items not on the preservation list.
|
//Delete all items not on the preservation list.
|
||||||
var/list/items = src.contents
|
var/list/items = src.contents
|
||||||
@@ -240,7 +240,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
|||||||
current_mode.possible_traitors.Remove(occupant)
|
current_mode.possible_traitors.Remove(occupant)
|
||||||
|
|
||||||
// Delete them from datacore.
|
// Delete them from datacore.
|
||||||
|
|
||||||
if(PDA_Manifest.len)
|
if(PDA_Manifest.len)
|
||||||
PDA_Manifest.Cut()
|
PDA_Manifest.Cut()
|
||||||
for(var/datum/data/record/R in data_core.medical)
|
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(do_after(user, 20))
|
||||||
if(!M || !G || !G:affecting) return
|
if(!M || !G || !G:affecting) return
|
||||||
|
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
|
|
||||||
if(M.client)
|
if(M.client)
|
||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
@@ -375,7 +375,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
|||||||
usr.stop_pulling()
|
usr.stop_pulling()
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
usr.client.eye = src
|
usr.client.eye = src
|
||||||
usr.loc = src
|
usr.setloc(src)
|
||||||
src.occupant = usr
|
src.occupant = usr
|
||||||
|
|
||||||
if(orient_right)
|
if(orient_right)
|
||||||
@@ -401,7 +401,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
|
|||||||
occupant.client.eye = src.occupant.client.mob
|
occupant.client.eye = src.occupant.client.mob
|
||||||
occupant.client.perspective = MOB_PERSPECTIVE
|
occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
|
|
||||||
occupant.loc = get_turf(src)
|
occupant.setloc(get_turf(src))
|
||||||
occupant = null
|
occupant = null
|
||||||
|
|
||||||
if(orient_right)
|
if(orient_right)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
if (src.occupant.client)
|
if (src.occupant.client)
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
src.occupant.client.eye = src.occupant.client.mob
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
src.occupant.loc = src.loc
|
src.occupant.setloc(src.loc)
|
||||||
src.occupant = null
|
src.occupant = null
|
||||||
build_icon()
|
build_icon()
|
||||||
src.use_power = 1
|
src.use_power = 1
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
if(usr && usr.client)
|
if(usr && usr.client)
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
usr.client.eye = src
|
usr.client.eye = src
|
||||||
usr.loc = src
|
usr.setloc(src)
|
||||||
src.occupant = usr
|
src.occupant = usr
|
||||||
/*for(var/obj/O in src)
|
/*for(var/obj/O in src)
|
||||||
O.loc = src.loc*/
|
O.loc = src.loc*/
|
||||||
|
|||||||
@@ -410,7 +410,7 @@
|
|||||||
|
|
||||||
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
|
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
|
||||||
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
|
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
|
||||||
src.OCCUPANT.loc = src.loc
|
src.OCCUPANT.setloc(src.loc)
|
||||||
src.OCCUPANT = null
|
src.OCCUPANT = null
|
||||||
if(!src.isopen)
|
if(!src.isopen)
|
||||||
src.isopen = 1
|
src.isopen = 1
|
||||||
@@ -453,7 +453,7 @@
|
|||||||
usr.stop_pulling()
|
usr.stop_pulling()
|
||||||
usr.client.perspective = EYE_PERSPECTIVE
|
usr.client.perspective = EYE_PERSPECTIVE
|
||||||
usr.client.eye = src
|
usr.client.eye = src
|
||||||
usr.loc = src
|
usr.setloc(src)
|
||||||
// usr.metabslow = 1
|
// usr.metabslow = 1
|
||||||
src.OCCUPANT = usr
|
src.OCCUPANT = usr
|
||||||
src.isopen = 0 //Close the thing after the guy gets inside
|
src.isopen = 0 //Close the thing after the guy gets inside
|
||||||
@@ -499,7 +499,7 @@
|
|||||||
if (M.client)
|
if (M.client)
|
||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
src.OCCUPANT = M
|
src.OCCUPANT = M
|
||||||
src.isopen = 0 //close ittt
|
src.isopen = 0 //close ittt
|
||||||
|
|
||||||
@@ -520,7 +520,7 @@
|
|||||||
return
|
return
|
||||||
user << "You load the [S.name] into the storage compartment."
|
user << "You load the [S.name] into the storage compartment."
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
S.loc = src
|
S.setloc(src)
|
||||||
src.SUIT = S
|
src.SUIT = S
|
||||||
src.update_icon()
|
src.update_icon()
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
@@ -534,7 +534,7 @@
|
|||||||
return
|
return
|
||||||
user << "You load the [H.name] into the storage compartment."
|
user << "You load the [H.name] into the storage compartment."
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
H.loc = src
|
H.setloc(src)
|
||||||
src.HELMET = H
|
src.HELMET = H
|
||||||
src.update_icon()
|
src.update_icon()
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
@@ -548,7 +548,7 @@
|
|||||||
return
|
return
|
||||||
user << "You load the [M.name] into the storage compartment."
|
user << "You load the [M.name] into the storage compartment."
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
src.MASK = M
|
src.MASK = M
|
||||||
src.update_icon()
|
src.update_icon()
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
|
|||||||
@@ -529,7 +529,7 @@
|
|||||||
var/obj/mecha/working/ripley/R = src
|
var/obj/mecha/working/ripley/R = src
|
||||||
if(R.cargo)
|
if(R.cargo)
|
||||||
for(var/obj/O in R.cargo) //Dump contents of stored cargo
|
for(var/obj/O in R.cargo) //Dump contents of stored cargo
|
||||||
O.loc = T
|
O.setloc(T)
|
||||||
R.cargo -= O
|
R.cargo -= O
|
||||||
T.Entered(O)
|
T.Entered(O)
|
||||||
|
|
||||||
|
|||||||
@@ -89,13 +89,13 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/device/flashlight/pickup(mob/user)
|
/obj/item/device/flashlight/pickup(mob/user)
|
||||||
if(on)
|
if(on && luminosity)
|
||||||
user.SetLuminosity(user.luminosity + brightness_on)
|
user.SetLuminosity(user.luminosity + brightness_on)
|
||||||
SetLuminosity(0)
|
SetLuminosity(0)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/device/flashlight/dropped(mob/user)
|
/obj/item/device/flashlight/dropped(mob/user)
|
||||||
if(on)
|
if(on && !luminosity)
|
||||||
user.SetLuminosity(user.luminosity - brightness_on)
|
user.SetLuminosity(user.luminosity - brightness_on)
|
||||||
SetLuminosity(brightness_on)
|
SetLuminosity(brightness_on)
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
if (src.occupant.client)
|
if (src.occupant.client)
|
||||||
src.occupant.client.eye = src.occupant.client.mob
|
src.occupant.client.eye = src.occupant.client.mob
|
||||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||||
src.occupant.loc = src.loc
|
src.occupant.setloc(src.loc)
|
||||||
if(injecting)
|
if(injecting)
|
||||||
implant(src.occupant)
|
implant(src.occupant)
|
||||||
injecting = 0
|
injecting = 0
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
M.stop_pulling()
|
M.stop_pulling()
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
src.occupant = M
|
src.occupant = M
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
icon_state = "implantchair_on"
|
icon_state = "implantchair_on"
|
||||||
|
|||||||
@@ -250,7 +250,7 @@
|
|||||||
if(usr)
|
if(usr)
|
||||||
usr.u_equip(W)
|
usr.u_equip(W)
|
||||||
usr.update_icons() //update our overlays
|
usr.update_icons() //update our overlays
|
||||||
W.loc = src
|
W.setloc(src)
|
||||||
W.on_enter_storage(src)
|
W.on_enter_storage(src)
|
||||||
if(usr)
|
if(usr)
|
||||||
if (usr.client && usr.s_active != src)
|
if (usr.client && usr.s_active != src)
|
||||||
@@ -293,9 +293,9 @@
|
|||||||
W.layer = 20
|
W.layer = 20
|
||||||
else
|
else
|
||||||
W.layer = initial(W.layer)
|
W.layer = initial(W.layer)
|
||||||
W.loc = new_location
|
W.setloc(new_location)
|
||||||
else
|
else
|
||||||
W.loc = get_turf(src)
|
W.setloc(get_turf(src))
|
||||||
|
|
||||||
if(usr)
|
if(usr)
|
||||||
src.orient2hud(usr)
|
src.orient2hud(usr)
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
user << "\red The tray won't fit in [src]."
|
user << "\red The tray won't fit in [src]."
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
W.loc = user.loc
|
W.setloc(user.loc)
|
||||||
if ((user.client && user.s_active != src))
|
if ((user.client && user.s_active != src))
|
||||||
user.client.screen -= W
|
user.client.screen -= W
|
||||||
W.dropped(user)
|
W.dropped(user)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
if(!opened) // if closed, any item at the crate's loc is put in the contents
|
||||||
for(var/obj/item/I in src.loc)
|
for(var/obj/item/I in src.loc)
|
||||||
if(I.density || I.anchored || I == src) continue
|
if(I.density || I.anchored || I == src) continue
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
|
|
||||||
/obj/structure/closet/alter_health()
|
/obj/structure/closet/alter_health()
|
||||||
return get_turf(src)
|
return get_turf(src)
|
||||||
@@ -44,13 +44,13 @@
|
|||||||
/obj/structure/closet/proc/dump_contents()
|
/obj/structure/closet/proc/dump_contents()
|
||||||
//Cham Projector Exception
|
//Cham Projector Exception
|
||||||
for(var/obj/effect/dummy/chameleon/AD in src)
|
for(var/obj/effect/dummy/chameleon/AD in src)
|
||||||
AD.loc = src.loc
|
AD.setloc(src.loc)
|
||||||
|
|
||||||
for(var/obj/I in src)
|
for(var/obj/I in src)
|
||||||
I.loc = src.loc
|
I.setloc(src.loc)
|
||||||
|
|
||||||
for(var/mob/M in src)
|
for(var/mob/M in src)
|
||||||
M.loc = src.loc
|
M.setloc(src.loc)
|
||||||
if(M.client)
|
if(M.client)
|
||||||
M.client.eye = M.client.mob
|
M.client.eye = M.client.mob
|
||||||
M.client.perspective = MOB_PERSPECTIVE
|
M.client.perspective = MOB_PERSPECTIVE
|
||||||
@@ -85,14 +85,14 @@
|
|||||||
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
for(var/obj/effect/dummy/chameleon/AD in src.loc)
|
||||||
if(itemcount >= storage_capacity)
|
if(itemcount >= storage_capacity)
|
||||||
break
|
break
|
||||||
AD.loc = src
|
AD.setloc(src)
|
||||||
itemcount++
|
itemcount++
|
||||||
|
|
||||||
for(var/obj/item/I in src.loc)
|
for(var/obj/item/I in src.loc)
|
||||||
if(itemcount >= storage_capacity)
|
if(itemcount >= storage_capacity)
|
||||||
break
|
break
|
||||||
if(!I.anchored)
|
if(!I.anchored)
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
itemcount++
|
itemcount++
|
||||||
|
|
||||||
for(var/mob/M in src.loc)
|
for(var/mob/M in src.loc)
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
M.client.perspective = EYE_PERSPECTIVE
|
M.client.perspective = EYE_PERSPECTIVE
|
||||||
M.client.eye = src
|
M.client.eye = src
|
||||||
|
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
itemcount++
|
itemcount++
|
||||||
|
|
||||||
src.icon_state = src.icon_closed
|
src.icon_state = src.icon_closed
|
||||||
@@ -130,19 +130,19 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1)
|
if(1)
|
||||||
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
|
for(var/atom/movable/A as mob|obj in src)//pulls everything out of the locker and hits it with an explosion
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
A.ex_act(severity++)
|
A.ex_act(severity++)
|
||||||
del(src)
|
del(src)
|
||||||
if(2)
|
if(2)
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
for (var/atom/movable/A as mob|obj in src)
|
for (var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
A.ex_act(severity++)
|
A.ex_act(severity++)
|
||||||
del(src)
|
del(src)
|
||||||
if(3)
|
if(3)
|
||||||
if(prob(5))
|
if(prob(5))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
A.ex_act(severity++)
|
A.ex_act(severity++)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
..()
|
..()
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -160,14 +160,14 @@
|
|||||||
if(user.wall_smash)
|
if(user.wall_smash)
|
||||||
visible_message("\red [user] destroys the [src]. ")
|
visible_message("\red [user] destroys the [src]. ")
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
// this should probably use dump_contents()
|
// this should probably use dump_contents()
|
||||||
/obj/structure/closet/blob_act()
|
/obj/structure/closet/blob_act()
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
/obj/structure/closet/meteorhit(obj/O as obj)
|
/obj/structure/closet/meteorhit(obj/O as obj)
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
return
|
return
|
||||||
usr.drop_item()
|
usr.drop_item()
|
||||||
if(W)
|
if(W)
|
||||||
W.loc = src.loc
|
W.setloc(src.loc)
|
||||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||||
return
|
return
|
||||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||||
for(var/obj/O in src)
|
for(var/obj/O in src)
|
||||||
O.loc = get_turf(src)
|
O.setloc(get_turf(src))
|
||||||
icon_state = icon_opened
|
icon_state = icon_opened
|
||||||
src.opened = 1
|
src.opened = 1
|
||||||
return 1
|
return 1
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
var/obj/structure/stool/bed/B = O
|
var/obj/structure/stool/bed/B = O
|
||||||
if(B.buckled_mob)
|
if(B.buckled_mob)
|
||||||
continue
|
continue
|
||||||
O.loc = src
|
O.setloc(src)
|
||||||
itemcount++
|
itemcount++
|
||||||
|
|
||||||
icon_state = icon_closed
|
icon_state = icon_closed
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
return
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
if(W)
|
if(W)
|
||||||
W.loc = src.loc
|
W.setloc(src.loc)
|
||||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||||
return
|
return
|
||||||
else if(istype(W, /obj/item/weapon/cable_coil))
|
else if(istype(W, /obj/item/weapon/cable_coil))
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
if(rigged)
|
if(rigged)
|
||||||
user << "<span class='notice'>You attach [W] to [src].</span>"
|
user << "<span class='notice'>You attach [W] to [src].</span>"
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
W.loc = src
|
W.setloc(src)
|
||||||
return
|
return
|
||||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||||
if(rigged)
|
if(rigged)
|
||||||
@@ -424,12 +424,12 @@
|
|||||||
continue
|
continue
|
||||||
if(!S.anchored)
|
if(!S.anchored)
|
||||||
found = 1
|
found = 1
|
||||||
S.loc = src
|
S.setloc(src)
|
||||||
break
|
break
|
||||||
if(!found)
|
if(!found)
|
||||||
for(var/obj/machinery/M in src.loc)
|
for(var/obj/machinery/M in src.loc)
|
||||||
if(!M.anchored)
|
if(!M.anchored)
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
break
|
break
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -452,12 +452,12 @@
|
|||||||
continue
|
continue
|
||||||
if(!S.anchored)
|
if(!S.anchored)
|
||||||
found = 1
|
found = 1
|
||||||
S.loc = src
|
S.setloc(src)
|
||||||
break
|
break
|
||||||
if(!found)
|
if(!found)
|
||||||
for(var/obj/machinery/M in src.loc)
|
for(var/obj/machinery/M in src.loc)
|
||||||
if(!M.anchored)
|
if(!M.anchored)
|
||||||
M.loc = src
|
M.setloc(src)
|
||||||
break
|
break
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
new /obj/item/stack/sheet/wood(src)
|
new /obj/item/stack/sheet/wood(src)
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
for(var/obj/O in contents)
|
for(var/obj/O in contents)
|
||||||
O.loc = T
|
O.setloc(T)
|
||||||
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
|
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 pry open \the [src].</span>", \
|
||||||
"<span class='notice'>You hear splitting wood.</span>")
|
"<span class='notice'>You hear splitting wood.</span>")
|
||||||
|
|||||||
@@ -34,21 +34,21 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(2.0)
|
if(2.0)
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(3.0)
|
if(3.0)
|
||||||
if (prob(5))
|
if (prob(5))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
if (src.connected)
|
if (src.connected)
|
||||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||||
if (!( A.anchored ))
|
if (!( A.anchored ))
|
||||||
A.loc = src
|
A.setloc(src)
|
||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
//src.connected = null
|
//src.connected = null
|
||||||
del(src.connected)
|
del(src.connected)
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
src.connected.connected = src
|
src.connected.connected = src
|
||||||
src.icon_state = "morgue0"
|
src.icon_state = "morgue0"
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.connected.loc
|
A.setloc(src.connected.loc)
|
||||||
src.connected.icon_state = "morguet"
|
src.connected.icon_state = "morguet"
|
||||||
src.connected.dir = src.dir
|
src.connected.dir = src.dir
|
||||||
else
|
else
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
src.connected.connected = src
|
src.connected.connected = src
|
||||||
src.icon_state = "morgue0"
|
src.icon_state = "morgue0"
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.connected.loc
|
A.setloc(src.connected.loc)
|
||||||
//Foreach goto(106)
|
//Foreach goto(106)
|
||||||
src.connected.icon_state = "morguet"
|
src.connected.icon_state = "morguet"
|
||||||
else
|
else
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
if (src.connected)
|
if (src.connected)
|
||||||
for(var/atom/movable/A as mob|obj in src.loc)
|
for(var/atom/movable/A as mob|obj in src.loc)
|
||||||
if (!( A.anchored ))
|
if (!( A.anchored ))
|
||||||
A.loc = src.connected
|
A.setloc(src.connected)
|
||||||
//Foreach goto(26)
|
//Foreach goto(26)
|
||||||
src.connected.connected = null
|
src.connected.connected = null
|
||||||
src.connected.update()
|
src.connected.update()
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
return
|
return
|
||||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||||
return
|
return
|
||||||
O.loc = src.loc
|
O.setloc(src.loc)
|
||||||
if (user != O)
|
if (user != O)
|
||||||
for(var/mob/B in viewers(user, 3))
|
for(var/mob/B in viewers(user, 3))
|
||||||
if ((B.client && !( B.blinded )))
|
if ((B.client && !( B.blinded )))
|
||||||
@@ -199,21 +199,21 @@
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(2.0)
|
if(2.0)
|
||||||
if (prob(50))
|
if (prob(50))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
if(3.0)
|
if(3.0)
|
||||||
if (prob(5))
|
if (prob(5))
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.loc
|
A.setloc(src.loc)
|
||||||
ex_act(severity)
|
ex_act(severity)
|
||||||
del(src)
|
del(src)
|
||||||
return
|
return
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
if ((src.connected) && (src.locked == 0))
|
if ((src.connected) && (src.locked == 0))
|
||||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||||
if (!( A.anchored ))
|
if (!( A.anchored ))
|
||||||
A.loc = src
|
A.setloc(src)
|
||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
//src.connected = null
|
//src.connected = null
|
||||||
del(src.connected)
|
del(src.connected)
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
src.connected.connected = src
|
src.connected.connected = src
|
||||||
src.icon_state = "crema0"
|
src.icon_state = "crema0"
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.connected.loc
|
A.setloc(src.connected.loc)
|
||||||
src.connected.icon_state = "cremat"
|
src.connected.icon_state = "cremat"
|
||||||
else
|
else
|
||||||
//src.connected = null
|
//src.connected = null
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
src.connected.connected = src
|
src.connected.connected = src
|
||||||
src.icon_state = "crema0"
|
src.icon_state = "crema0"
|
||||||
for(var/atom/movable/A as mob|obj in src)
|
for(var/atom/movable/A as mob|obj in src)
|
||||||
A.loc = src.connected.loc
|
A.setloc(src.connected.loc)
|
||||||
//Foreach goto(106)
|
//Foreach goto(106)
|
||||||
src.connected.icon_state = "cremat"
|
src.connected.icon_state = "cremat"
|
||||||
else
|
else
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
if (src.connected)
|
if (src.connected)
|
||||||
for(var/atom/movable/A as mob|obj in src.loc)
|
for(var/atom/movable/A as mob|obj in src.loc)
|
||||||
if (!( A.anchored ))
|
if (!( A.anchored ))
|
||||||
A.loc = src.connected
|
A.setloc(src.connected)
|
||||||
//Foreach goto(26)
|
//Foreach goto(26)
|
||||||
src.connected.connected = null
|
src.connected.connected = null
|
||||||
src.connected.update()
|
src.connected.update()
|
||||||
@@ -377,7 +377,7 @@
|
|||||||
return
|
return
|
||||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||||
return
|
return
|
||||||
O.loc = src.loc
|
O.setloc(src.loc)
|
||||||
if (user != O)
|
if (user != O)
|
||||||
for(var/mob/B in viewers(user, 3))
|
for(var/mob/B in viewers(user, 3))
|
||||||
if ((B.client && !( B.blinded )))
|
if ((B.client && !( B.blinded )))
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ FLOOR SAFES
|
|||||||
return
|
return
|
||||||
if(I.w_class + space <= maxspace)
|
if(I.w_class + space <= maxspace)
|
||||||
space += I.w_class
|
space += I.w_class
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
|
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
|
||||||
@@ -147,7 +147,7 @@ FLOOR SAFES
|
|||||||
if(I.w_class + space <= maxspace)
|
if(I.w_class + space <= maxspace)
|
||||||
space += I.w_class
|
space += I.w_class
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
/obj/structure/transit_tube_pod/Del()
|
/obj/structure/transit_tube_pod/Del()
|
||||||
for(var/atom/movable/AM in contents)
|
for(var/atom/movable/AM in contents)
|
||||||
AM.loc = loc
|
AM.setloc(loc)
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ obj/structure/ex_act(severity)
|
|||||||
switch(severity)
|
switch(severity)
|
||||||
if(1.0)
|
if(1.0)
|
||||||
for(var/atom/movable/AM in contents)
|
for(var/atom/movable/AM in contents)
|
||||||
AM.loc = loc
|
AM.setloc(loc)
|
||||||
AM.ex_act(severity++)
|
AM.ex_act(severity++)
|
||||||
|
|
||||||
del(src)
|
del(src)
|
||||||
@@ -68,7 +68,7 @@ obj/structure/ex_act(severity)
|
|||||||
if(2.0)
|
if(2.0)
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
for(var/atom/movable/AM in contents)
|
for(var/atom/movable/AM in contents)
|
||||||
AM.loc = loc
|
AM.setloc(loc)
|
||||||
AM.ex_act(severity++)
|
AM.ex_act(severity++)
|
||||||
|
|
||||||
del(src)
|
del(src)
|
||||||
@@ -105,7 +105,7 @@ obj/structure/ex_act(severity)
|
|||||||
AM << "<span class='warning'>The tube's support pylons block your way.</span>"
|
AM << "<span class='warning'>The tube's support pylons block your way.</span>"
|
||||||
return ..()
|
return ..()
|
||||||
else
|
else
|
||||||
AM.loc = src.loc
|
AM.setloc(src.loc)
|
||||||
AM << "<span class='info'>You slip under the tube.</span>"
|
AM << "<span class='info'>You slip under the tube.</span>"
|
||||||
|
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ obj/structure/ex_act(severity)
|
|||||||
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
|
if(!pod_moving && icon_state == "open" && istype(AM, /mob))
|
||||||
for(var/obj/structure/transit_tube_pod/pod in loc)
|
for(var/obj/structure/transit_tube_pod/pod in loc)
|
||||||
if(!pod.moving && pod.dir in directions())
|
if(!pod.moving && pod.dir in directions())
|
||||||
AM.loc = pod
|
AM.setloc(pod)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ obj/structure/ex_act(severity)
|
|||||||
if(istype(mob, /mob) && mob.client)
|
if(istype(mob, /mob) && mob.client)
|
||||||
// If the pod is not in a tube at all, you can get out at any time.
|
// 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))
|
if(!(locate(/obj/structure/transit_tube) in loc))
|
||||||
mob.loc = loc
|
mob.setloc(loc)
|
||||||
mob.client.Move(get_step(loc, direction), direction)
|
mob.client.Move(get_step(loc, direction), direction)
|
||||||
|
|
||||||
//if(moving && istype(loc, /turf/space))
|
//if(moving && istype(loc, /turf/space))
|
||||||
@@ -425,7 +425,7 @@ obj/structure/ex_act(severity)
|
|||||||
if(!station.pod_moving)
|
if(!station.pod_moving)
|
||||||
if(direction == station.dir)
|
if(direction == station.dir)
|
||||||
if(station.icon_state == "open")
|
if(station.icon_state == "open")
|
||||||
mob.loc = loc
|
mob.setloc(loc)
|
||||||
mob.client.Move(get_step(loc, direction), direction)
|
mob.client.Move(get_step(loc, direction), direction)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
user.put_in_hands(I)
|
user.put_in_hands(I)
|
||||||
else
|
else
|
||||||
I.loc = get_turf(src)
|
I.setloc(get_turf(src))
|
||||||
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
|
user << "<span class='notice'>You find \an [I] in the cistern.</span>"
|
||||||
w_items -= I.w_class
|
w_items -= I.w_class
|
||||||
return
|
return
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
user << "<span class='notice'>The cistern is full.</span>"
|
user << "<span class='notice'>The cistern is full.</span>"
|
||||||
return
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
w_items += I.w_class
|
w_items += I.w_class
|
||||||
user << "You carefully place \the [I] into the cistern."
|
user << "You carefully place \the [I] into the cistern."
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ obj/machinery/computer/forensic_scanning
|
|||||||
temp = null
|
temp = null
|
||||||
if("eject")
|
if("eject")
|
||||||
if(scanning)
|
if(scanning)
|
||||||
scanning.loc = loc
|
scanning.setloc(loc)
|
||||||
scanning = null
|
scanning = null
|
||||||
else
|
else
|
||||||
temp = "Eject Failed: No Object"
|
temp = "Eject Failed: No Object"
|
||||||
@@ -152,13 +152,13 @@ obj/machinery/computer/forensic_scanning
|
|||||||
if(I && istype(I))
|
if(I && istype(I))
|
||||||
if(istype(I, /obj/item/weapon/evidencebag))
|
if(istype(I, /obj/item/weapon/evidencebag))
|
||||||
scanning = I.contents[1]
|
scanning = I.contents[1]
|
||||||
scanning.loc = src
|
scanning.setloc(src)
|
||||||
I.overlays -= scanning
|
I.overlays -= scanning
|
||||||
I.icon_state = "evidenceobj"
|
I.icon_state = "evidenceobj"
|
||||||
else
|
else
|
||||||
scanning = I
|
scanning = I
|
||||||
M.drop_item()
|
M.drop_item()
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
else
|
else
|
||||||
usr << "Invalid Object Rejected."
|
usr << "Invalid Object Rejected."
|
||||||
if("card") //Processing a fingerprint card.
|
if("card") //Processing a fingerprint card.
|
||||||
@@ -173,11 +173,11 @@ obj/machinery/computer/forensic_scanning
|
|||||||
if(card.amount > 1 || !card.fingerprints.len)
|
if(card.amount > 1 || !card.fingerprints.len)
|
||||||
usr << "\red ERROR: No prints/too many cards."
|
usr << "\red ERROR: No prints/too many cards."
|
||||||
if(card.loc == src)
|
if(card.loc == src)
|
||||||
card.loc = src.loc
|
card.setloc(src.loc)
|
||||||
card = null
|
card = null
|
||||||
return
|
return
|
||||||
M.drop_item()
|
M.drop_item()
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
process_card()
|
process_card()
|
||||||
else
|
else
|
||||||
usr << "\red Invalid Object Rejected."
|
usr << "\red Invalid Object Rejected."
|
||||||
@@ -607,7 +607,7 @@ obj/machinery/computer/forensic_scanning
|
|||||||
else
|
else
|
||||||
usr << "\red ERROR: No prints/too many cards."
|
usr << "\red ERROR: No prints/too many cards."
|
||||||
if(card.loc == src)
|
if(card.loc == src)
|
||||||
card.loc = src.loc
|
card.setloc(src.loc)
|
||||||
card = null
|
card = null
|
||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -717,8 +717,11 @@ 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 && target.has_organ_for_slot(slot_to_process)) //Placing an item on the mob
|
||||||
if(item.mob_can_equip(target, slot_to_process, 0))
|
if(item.mob_can_equip(target, slot_to_process, 0))
|
||||||
source.u_equip(item)
|
source.u_equip(item)
|
||||||
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
|
||||||
item.dropped(source)
|
item.dropped(source)
|
||||||
|
|
||||||
|
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
|
||||||
|
item.pickup(target)
|
||||||
|
|
||||||
source.update_icons()
|
source.update_icons()
|
||||||
target.update_icons()
|
target.update_icons()
|
||||||
|
|
||||||
|
|||||||
@@ -9,44 +9,48 @@
|
|||||||
/mob/living/silicon/robot/proc/uneq_active()
|
/mob/living/silicon/robot/proc/uneq_active()
|
||||||
if(isnull(module_active))
|
if(isnull(module_active))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//In checking borglights, I simplified this a bit.
|
||||||
|
var/obj/item/module = module_active
|
||||||
|
|
||||||
|
module.dropped(src)
|
||||||
|
|
||||||
|
if(istype(module,/obj/item/borg/sight))
|
||||||
|
var/obj/item/borg/sight/sight_module = module
|
||||||
|
sight_mode &= ~sight_module.sight_mode
|
||||||
|
|
||||||
|
if (client)
|
||||||
|
client.screen -= module
|
||||||
|
|
||||||
|
contents -= module
|
||||||
|
|
||||||
if(module_state_1 == module_active)
|
if(module_state_1 == module_active)
|
||||||
if(istype(module_state_1,/obj/item/borg/sight))
|
|
||||||
sight_mode &= ~module_state_1:sight_mode
|
|
||||||
if (client)
|
|
||||||
client.screen -= module_state_1
|
|
||||||
contents -= module_state_1
|
|
||||||
module_active = null
|
|
||||||
module_state_1 = null
|
module_state_1 = null
|
||||||
inv1.icon_state = "inv1"
|
inv1.icon_state = "inv1"
|
||||||
else if(module_state_2 == module_active)
|
else if(module_state_2 == module_active)
|
||||||
if(istype(module_state_2,/obj/item/borg/sight))
|
|
||||||
sight_mode &= ~module_state_2:sight_mode
|
|
||||||
if (client)
|
|
||||||
client.screen -= module_state_2
|
|
||||||
contents -= module_state_2
|
|
||||||
module_active = null
|
|
||||||
module_state_2 = null
|
module_state_2 = null
|
||||||
inv2.icon_state = "inv2"
|
inv2.icon_state = "inv2"
|
||||||
else if(module_state_3 == module_active)
|
else if(module_state_3 == module_active)
|
||||||
if(istype(module_state_3,/obj/item/borg/sight))
|
|
||||||
sight_mode &= ~module_state_3:sight_mode
|
|
||||||
if (client)
|
|
||||||
client.screen -= module_state_3
|
|
||||||
contents -= module_state_3
|
|
||||||
module_active = null
|
|
||||||
module_state_3 = null
|
module_state_3 = null
|
||||||
inv3.icon_state = "inv3"
|
inv3.icon_state = "inv3"
|
||||||
|
|
||||||
|
module_active = null
|
||||||
|
|
||||||
|
//src << "[module.name] deactivated."
|
||||||
|
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/mob/living/silicon/robot/proc/uneq_all()
|
/mob/living/silicon/robot/proc/uneq_all()
|
||||||
module_active = null
|
module_active = null
|
||||||
|
var/obj/item/module
|
||||||
if(module_state_1)
|
if(module_state_1)
|
||||||
if(istype(module_state_1,/obj/item/borg/sight))
|
if(istype(module_state_1,/obj/item/borg/sight))
|
||||||
sight_mode &= ~module_state_1:sight_mode
|
sight_mode &= ~module_state_1:sight_mode
|
||||||
if (client)
|
if (client)
|
||||||
client.screen -= module_state_1
|
client.screen -= module_state_1
|
||||||
contents -= module_state_1
|
contents -= module_state_1
|
||||||
|
module = module_state_1
|
||||||
|
module.dropped(src)
|
||||||
module_state_1 = null
|
module_state_1 = null
|
||||||
inv1.icon_state = "inv1"
|
inv1.icon_state = "inv1"
|
||||||
if(module_state_2)
|
if(module_state_2)
|
||||||
@@ -55,6 +59,8 @@
|
|||||||
if (client)
|
if (client)
|
||||||
client.screen -= module_state_2
|
client.screen -= module_state_2
|
||||||
contents -= module_state_2
|
contents -= module_state_2
|
||||||
|
module = module_state_2
|
||||||
|
module.dropped(src)
|
||||||
module_state_2 = null
|
module_state_2 = null
|
||||||
inv2.icon_state = "inv2"
|
inv2.icon_state = "inv2"
|
||||||
if(module_state_3)
|
if(module_state_3)
|
||||||
@@ -63,8 +69,11 @@
|
|||||||
if (client)
|
if (client)
|
||||||
client.screen -= module_state_3
|
client.screen -= module_state_3
|
||||||
contents -= module_state_3
|
contents -= module_state_3
|
||||||
|
module = module_state_3
|
||||||
|
module.dropped(src)
|
||||||
module_state_3 = null
|
module_state_3 = null
|
||||||
inv3.icon_state = "inv3"
|
inv3.icon_state = "inv3"
|
||||||
|
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
/mob/living/silicon/robot/proc/activated(obj/item/O)
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
var/datum/robot_component/cell_component = components["power cell"]
|
var/datum/robot_component/cell_component = components["power cell"]
|
||||||
cell_component.wrapped = cell
|
cell_component.wrapped = cell
|
||||||
cell_component.installed = 1
|
cell_component.installed = 1
|
||||||
|
|
||||||
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
||||||
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
@@ -135,9 +135,9 @@
|
|||||||
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
hud_list[IMPTRACK_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")
|
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
|
||||||
|
|
||||||
@@ -1093,44 +1093,48 @@
|
|||||||
if(activated(O))
|
if(activated(O))
|
||||||
src << "Already activated"
|
src << "Already activated"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!module_state_1)
|
if(!module_state_1)
|
||||||
module_state_1 = O
|
module_state_1 = O
|
||||||
O.layer = 20
|
|
||||||
contents += O
|
|
||||||
if(istype(module_state_1,/obj/item/borg/sight))
|
|
||||||
sight_mode |= module_state_1:sight_mode
|
|
||||||
else if(!module_state_2)
|
else if(!module_state_2)
|
||||||
module_state_2 = O
|
module_state_2 = O
|
||||||
O.layer = 20
|
|
||||||
contents += O
|
|
||||||
if(istype(module_state_2,/obj/item/borg/sight))
|
|
||||||
sight_mode |= module_state_2:sight_mode
|
|
||||||
else if(!module_state_3)
|
else if(!module_state_3)
|
||||||
module_state_3 = O
|
module_state_3 = O
|
||||||
O.layer = 20
|
|
||||||
contents += O
|
|
||||||
if(istype(module_state_3,/obj/item/borg/sight))
|
|
||||||
sight_mode |= module_state_3:sight_mode
|
|
||||||
else
|
else
|
||||||
src << "You need to disable a module first!"
|
src << "You need to disable a module first!"
|
||||||
|
return
|
||||||
|
|
||||||
|
O.pickup(src)
|
||||||
|
O.layer = 20
|
||||||
|
contents += O
|
||||||
|
if(istype(O,/obj/item/borg/sight))
|
||||||
|
var/obj/item/borg/sight/sight = O
|
||||||
|
sight_mode |= sight.sight_mode
|
||||||
|
|
||||||
installed_modules()
|
installed_modules()
|
||||||
|
|
||||||
if (href_list["deact"])
|
if (href_list["deact"])
|
||||||
var/obj/item/O = locate(href_list["deact"])
|
var/obj/item/O = locate(href_list["deact"])
|
||||||
|
|
||||||
if(activated(O))
|
if(activated(O))
|
||||||
if(module_state_1 == O)
|
if(module_state_1 == O)
|
||||||
module_state_1 = null
|
module_state_1 = null
|
||||||
contents -= O
|
|
||||||
else if(module_state_2 == O)
|
else if(module_state_2 == O)
|
||||||
module_state_2 = null
|
module_state_2 = null
|
||||||
contents -= O
|
|
||||||
else if(module_state_3 == O)
|
else if(module_state_3 == O)
|
||||||
module_state_3 = null
|
module_state_3 = null
|
||||||
contents -= O
|
|
||||||
else
|
else
|
||||||
src << "Module isn't activated."
|
src << "Module isn't activated."
|
||||||
|
return
|
||||||
else
|
else
|
||||||
src << "Module isn't activated"
|
src << "Module isn't activated"
|
||||||
|
return
|
||||||
|
|
||||||
|
O.dropped(src)
|
||||||
|
contents -= O
|
||||||
|
|
||||||
|
src << "[O.name] deactivated."
|
||||||
|
|
||||||
installed_modules()
|
installed_modules()
|
||||||
|
|
||||||
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
var/global/list/uneatable = list(
|
var/global/list/uneatable = list(
|
||||||
/turf/space,
|
/turf/space,
|
||||||
/obj/effect/overlay
|
/obj/effect/overlay,
|
||||||
|
/atom/movable/lighting_overlay //Because apparently this needs to be outright stated and even /atom/movable gives energy regardless.
|
||||||
)
|
)
|
||||||
|
|
||||||
/obj/machinery/singularity/
|
/obj/machinery/singularity/
|
||||||
|
|||||||
@@ -204,7 +204,7 @@
|
|||||||
user << "<span class='notice'>This machine only accepts beakers</span>"
|
user << "<span class='notice'>This machine only accepts beakers</span>"
|
||||||
src.beaker = B
|
src.beaker = B
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
B.loc = src
|
B.setloc(src)
|
||||||
user << "You set [B] on the machine."
|
user << "You set [B] on the machine."
|
||||||
nanomanager.update_uis(src) // update all UIs attached to src
|
nanomanager.update_uis(src) // update all UIs attached to src
|
||||||
return
|
return
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
return
|
return
|
||||||
src.beaker = B
|
src.beaker = B
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
B.loc = src
|
B.setloc(src)
|
||||||
user << "You add the beaker to the machine!"
|
user << "You add the beaker to the machine!"
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
icon_state = "mixer1"
|
icon_state = "mixer1"
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
|
|
||||||
src.loaded_pill_bottle = B
|
src.loaded_pill_bottle = B
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
B.loc = src
|
B.setloc(src)
|
||||||
user << "You add the pill bottle into the dispenser slot!"
|
user << "You add the pill bottle into the dispenser slot!"
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
|
|
||||||
if (href_list["ejectp"])
|
if (href_list["ejectp"])
|
||||||
if(loaded_pill_bottle)
|
if(loaded_pill_bottle)
|
||||||
loaded_pill_bottle.loc = src.loc
|
loaded_pill_bottle.setloc(src.loc)
|
||||||
loaded_pill_bottle = null
|
loaded_pill_bottle = null
|
||||||
else if(href_list["close"])
|
else if(href_list["close"])
|
||||||
usr << browse(null, "window=chemmaster")
|
usr << browse(null, "window=chemmaster")
|
||||||
@@ -462,7 +462,7 @@
|
|||||||
reagents.trans_to(P,amount_per_pill)
|
reagents.trans_to(P,amount_per_pill)
|
||||||
if(src.loaded_pill_bottle)
|
if(src.loaded_pill_bottle)
|
||||||
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
|
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
|
||||||
P.loc = loaded_pill_bottle
|
P.setloc(loaded_pill_bottle)
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
|
|
||||||
else if (href_list["createbottle"])
|
else if (href_list["createbottle"])
|
||||||
@@ -958,7 +958,7 @@
|
|||||||
else
|
else
|
||||||
src.beaker = O
|
src.beaker = O
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
O.loc = src
|
O.setloc(src)
|
||||||
update_icon()
|
update_icon()
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return 0
|
return 0
|
||||||
@@ -972,7 +972,7 @@
|
|||||||
|
|
||||||
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
for (var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
|
||||||
O.contents -= G
|
O.contents -= G
|
||||||
G.loc = src
|
G.setloc(src)
|
||||||
holdingitems += G
|
holdingitems += G
|
||||||
if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill
|
if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill
|
||||||
user << "You fill the All-In-One grinder to the brim."
|
user << "You fill the All-In-One grinder to the brim."
|
||||||
@@ -989,7 +989,7 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
user.before_take_item(O)
|
user.before_take_item(O)
|
||||||
O.loc = src
|
O.setloc(src)
|
||||||
holdingitems += O
|
holdingitems += O
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return 0
|
return 0
|
||||||
@@ -1072,7 +1072,7 @@
|
|||||||
return
|
return
|
||||||
if (!beaker)
|
if (!beaker)
|
||||||
return
|
return
|
||||||
beaker.loc = src.loc
|
beaker.setloc(src.loc)
|
||||||
beaker = null
|
beaker = null
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
@@ -1084,7 +1084,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
for(var/obj/item/O in holdingitems)
|
for(var/obj/item/O in holdingitems)
|
||||||
O.loc = src.loc
|
O.setloc(src.loc)
|
||||||
holdingitems -= O
|
holdingitems -= O
|
||||||
holdingitems = list()
|
holdingitems = list()
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
if (GM.client)
|
if (GM.client)
|
||||||
GM.client.perspective = EYE_PERSPECTIVE
|
GM.client.perspective = EYE_PERSPECTIVE
|
||||||
GM.client.eye = src
|
GM.client.eye = src
|
||||||
GM.loc = src
|
GM.setloc(src)
|
||||||
for (var/mob/C in viewers(src))
|
for (var/mob/C in viewers(src))
|
||||||
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
||||||
del(G)
|
del(G)
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
if(I)
|
if(I)
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
|
|
||||||
user << "You place \the [I] into the [src]."
|
user << "You place \the [I] into the [src]."
|
||||||
for(var/mob/M in viewers(src))
|
for(var/mob/M in viewers(src))
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
if (target.client)
|
if (target.client)
|
||||||
target.client.perspective = EYE_PERSPECTIVE
|
target.client.perspective = EYE_PERSPECTIVE
|
||||||
target.client.eye = src
|
target.client.eye = src
|
||||||
target.loc = src
|
target.setloc(src)
|
||||||
|
|
||||||
for (var/mob/C in viewers(src))
|
for (var/mob/C in viewers(src))
|
||||||
if(C == user)
|
if(C == user)
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
if (user.client)
|
if (user.client)
|
||||||
user.client.eye = user.client.mob
|
user.client.eye = user.client.mob
|
||||||
user.client.perspective = MOB_PERSPECTIVE
|
user.client.perspective = MOB_PERSPECTIVE
|
||||||
user.loc = src.loc
|
user.setloc(src.loc)
|
||||||
update()
|
update()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
// eject the contents of the disposal unit
|
// eject the contents of the disposal unit
|
||||||
proc/eject()
|
proc/eject()
|
||||||
for(var/atom/movable/AM in src)
|
for(var/atom/movable/AM in src)
|
||||||
AM.loc = src.loc
|
AM.setloc(src.loc)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
update()
|
update()
|
||||||
|
|
||||||
@@ -367,7 +367,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
use_power = 1
|
use_power = 1
|
||||||
|
|
||||||
if(mode != 1) // if off or ready, no need to charge
|
if(mode != 1) // if off or ready, no need to charge
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@
|
|||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
|
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
|
||||||
|
|
||||||
AM.loc = src.loc
|
AM.setloc(src.loc)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(AM)
|
if(AM)
|
||||||
@@ -462,7 +462,7 @@
|
|||||||
if(istype(I, /obj/item/projectile))
|
if(istype(I, /obj/item/projectile))
|
||||||
return
|
return
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
for(var/mob/M in viewers(src))
|
for(var/mob/M in viewers(src))
|
||||||
M.show_message("\the [I] lands in \the [src].", 3)
|
M.show_message("\the [I] lands in \the [src].", 3)
|
||||||
else
|
else
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
// now everything inside the disposal gets put into the holder
|
// now everything inside the disposal gets put into the holder
|
||||||
// note AM since can contain mobs or objs
|
// note AM since can contain mobs or objs
|
||||||
for(var/atom/movable/AM in D)
|
for(var/atom/movable/AM in D)
|
||||||
AM.loc = src
|
AM.setloc(src)
|
||||||
if(istype(AM, /mob/living/carbon/human))
|
if(istype(AM, /mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = AM
|
var/mob/living/carbon/human/H = AM
|
||||||
if(FAT in H.mutations) // is a human and fat?
|
if(FAT in H.mutations) // is a human and fat?
|
||||||
@@ -587,7 +587,7 @@
|
|||||||
// used when a a holder meets a stuck holder
|
// used when a a holder meets a stuck holder
|
||||||
proc/merge(var/obj/structure/disposalholder/other)
|
proc/merge(var/obj/structure/disposalholder/other)
|
||||||
for(var/atom/movable/AM in other)
|
for(var/atom/movable/AM in other)
|
||||||
AM.loc = src // move everything in other holder to this one
|
AM.setloc(src) // move everything in other holder to this one
|
||||||
if(ismob(AM))
|
if(ismob(AM))
|
||||||
var/mob/M = AM
|
var/mob/M = AM
|
||||||
if(M.client) // if a client mob, update eye to follow this holder
|
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
|
// this is unlikely, but just dump out everything into the turf in case
|
||||||
|
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.setloc(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
del(H)
|
del(H)
|
||||||
..()
|
..()
|
||||||
@@ -680,9 +680,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.setloc(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.setloc(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -721,7 +721,7 @@
|
|||||||
|
|
||||||
if(T.density) // dense ouput turf, so stop holder
|
if(T.density) // dense ouput turf, so stop holder
|
||||||
H.active = 0
|
H.active = 0
|
||||||
H.loc = src
|
H.setloc(src)
|
||||||
return
|
return
|
||||||
if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||||
var/turf/simulated/floor/F = T
|
var/turf/simulated/floor/F = T
|
||||||
@@ -741,7 +741,7 @@
|
|||||||
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
|
playsound(src, 'sound/machines/hiss.ogg', 50, 0, 0)
|
||||||
if(H)
|
if(H)
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.setloc(T)
|
||||||
AM.pipe_eject(direction)
|
AM.pipe_eject(direction)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(AM)
|
if(AM)
|
||||||
@@ -756,7 +756,7 @@
|
|||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
|
target = get_offset_target_turf(T, rand(5)-rand(5), rand(5)-rand(5))
|
||||||
|
|
||||||
AM.loc = T
|
AM.setloc(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
if(AM)
|
if(AM)
|
||||||
@@ -789,7 +789,7 @@
|
|||||||
// this is unlikely, but just dump out everything into the turf in case
|
// this is unlikely, but just dump out everything into the turf in case
|
||||||
|
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = T
|
AM.setloc(T)
|
||||||
AM.pipe_eject(0)
|
AM.pipe_eject(0)
|
||||||
del(H)
|
del(H)
|
||||||
return
|
return
|
||||||
@@ -940,7 +940,7 @@
|
|||||||
if(controller.up)
|
if(controller.up)
|
||||||
T = locate(src.x, src.y, controller.up_target)
|
T = locate(src.x, src.y, controller.up_target)
|
||||||
if(!T)
|
if(!T)
|
||||||
H.loc = src.loc
|
H.setloc(src.loc)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
for(var/obj/structure/disposalpipe/down/F in T)
|
for(var/obj/structure/disposalpipe/down/F in T)
|
||||||
@@ -956,9 +956,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.setloc(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.setloc(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -993,7 +993,7 @@
|
|||||||
if(controller.down)
|
if(controller.down)
|
||||||
T = locate(src.x, src.y, controller.down_target)
|
T = locate(src.x, src.y, controller.down_target)
|
||||||
if(!T)
|
if(!T)
|
||||||
H.loc = src.loc
|
H.setloc(src.loc)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
for(var/obj/structure/disposalpipe/up/F in T)
|
for(var/obj/structure/disposalpipe/up/F in T)
|
||||||
@@ -1009,9 +1009,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.setloc(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.setloc(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -1139,9 +1139,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.setloc(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.setloc(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -1201,9 +1201,9 @@
|
|||||||
if(H2 && !H2.active)
|
if(H2 && !H2.active)
|
||||||
H.merge(H2)
|
H.merge(H2)
|
||||||
|
|
||||||
H.loc = P
|
H.setloc(P)
|
||||||
else // if wasn't a pipe, then set loc to turf
|
else // if wasn't a pipe, then set loc to turf
|
||||||
H.loc = T
|
H.setloc(T)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
return P
|
return P
|
||||||
@@ -1370,7 +1370,7 @@
|
|||||||
|
|
||||||
if(H)
|
if(H)
|
||||||
for(var/atom/movable/AM in H)
|
for(var/atom/movable/AM in H)
|
||||||
AM.loc = src.loc
|
AM.setloc(src.loc)
|
||||||
AM.pipe_eject(dir)
|
AM.pipe_eject(dir)
|
||||||
spawn(5)
|
spawn(5)
|
||||||
AM.throw_at(target, 3, 1)
|
AM.throw_at(target, 3, 1)
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
update_coolant()
|
update_coolant()
|
||||||
return
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
I.loc = src
|
I.setloc(src)
|
||||||
scanned_item = I
|
scanned_item = I
|
||||||
|
|
||||||
/obj/machinery/radiocarbon_spectrometer/proc/update_coolant()
|
/obj/machinery/radiocarbon_spectrometer/proc/update_coolant()
|
||||||
@@ -144,15 +144,15 @@
|
|||||||
data["radiation"] = round(radiation)
|
data["radiation"] = round(radiation)
|
||||||
data["t_left_radspike"] = round(t_left_radspike)
|
data["t_left_radspike"] = round(t_left_radspike)
|
||||||
data["rad_shield_on"] = rad_shield
|
data["rad_shield_on"] = rad_shield
|
||||||
|
|
||||||
// update the ui if it exists, returns null if no ui is passed/found
|
// 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)
|
if (!ui)
|
||||||
// the ui does not exist, so we'll create a new() one
|
// 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
|
// 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)
|
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
|
// 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
|
// open the new ui window
|
||||||
ui.open()
|
ui.open()
|
||||||
// auto update every Master Controller tick
|
// auto update every Master Controller tick
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
last_scan_data = P.info
|
last_scan_data = P.info
|
||||||
P.loc = src.loc
|
P.loc = src.loc
|
||||||
|
|
||||||
scanned_item.loc = src.loc
|
scanned_item.setloc(src.loc)
|
||||||
scanned_item = null
|
scanned_item = null
|
||||||
|
|
||||||
/obj/machinery/radiocarbon_spectrometer/Topic(href, href_list)
|
/obj/machinery/radiocarbon_spectrometer/Topic(href, href_list)
|
||||||
@@ -355,7 +355,7 @@
|
|||||||
|
|
||||||
if(href_list["ejectItem"])
|
if(href_list["ejectItem"])
|
||||||
if(scanned_item)
|
if(scanned_item)
|
||||||
scanned_item.loc = src.loc
|
scanned_item.setloc(src.loc)
|
||||||
scanned_item = null
|
scanned_item = null
|
||||||
|
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB |
BIN
icons/effects/lights/lighting1.dmi
Normal file
BIN
icons/effects/lights/lighting1.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
BIN
icons/effects/lights/lighting2.dmi
Normal file
BIN
icons/effects/lights/lighting2.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
BIN
icons/effects/lights/lighting3.dmi
Normal file
BIN
icons/effects/lights/lighting3.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
BIN
icons/effects/lights/lighting5-1.dmi
Normal file
BIN
icons/effects/lights/lighting5-1.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
BIN
icons/effects/lights/lighting5-2.dmi
Normal file
BIN
icons/effects/lights/lighting5-2.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 116 KiB |
Reference in New Issue
Block a user