mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-18 18:42:59 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into papers
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
*.rsc
|
||||
*.dmb
|
||||
*.lk
|
||||
data/
|
||||
|
||||
@@ -17,6 +17,13 @@ The more complicated and easier to update method is using git. You'll need to d
|
||||
|
||||
This will take a while to download, but it provides an easier method for updating.
|
||||
|
||||
Once the repository is in place, run this command:
|
||||
```bash
|
||||
cd Baystation12
|
||||
git update-index --assume-unchanged baystation12.int
|
||||
```
|
||||
Now git will ignore changes to the file baystation12.int.
|
||||
|
||||
### INSTALLATION
|
||||
|
||||
First-time installation should be fairly straightforward. First, you'll need BYOND installed. You can get it from [here](http://www.byond.com/).
|
||||
|
||||
+4
-6
@@ -74,11 +74,13 @@
|
||||
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
|
||||
#include "code\controllers\_DynamicAreaLighting_TG.dm"
|
||||
#include "code\controllers\autotransfer.dm"
|
||||
#include "code\controllers\configuration.dm"
|
||||
#include "code\controllers\failsafe.dm"
|
||||
#include "code\controllers\hooks-defs.dm"
|
||||
#include "code\controllers\hooks.dm"
|
||||
#include "code\controllers\lighting_controller.dm"
|
||||
#include "code\controllers\master_controller.dm"
|
||||
#include "code\controllers\shuttle_controller.dm"
|
||||
#include "code\controllers\verbs.dm"
|
||||
@@ -579,6 +581,7 @@
|
||||
#include "code\game\objects\structures\flora.dm"
|
||||
#include "code\game\objects\structures\girders.dm"
|
||||
#include "code\game\objects\structures\grille.dm"
|
||||
#include "code\game\objects\structures\inflatable.dm"
|
||||
#include "code\game\objects\structures\janicart.dm"
|
||||
#include "code\game\objects\structures\kitchen_spike.dm"
|
||||
#include "code\game\objects\structures\ladders.dm"
|
||||
@@ -1284,12 +1287,6 @@
|
||||
#include "code\WorkInProgress\explosion_particles.dm"
|
||||
#include "code\WorkInProgress\periodic_news.dm"
|
||||
#include "code\WorkInProgress\Apples\artifacts.dm"
|
||||
#include "code\WorkInProgress\Aryn\Lighting\Compatibility.dm"
|
||||
#include "code\WorkInProgress\Aryn\Lighting\Controller.dm"
|
||||
#include "code\WorkInProgress\Aryn\Lighting\Engine.dm"
|
||||
#include "code\WorkInProgress\Aryn\Lighting\Light.dm"
|
||||
#include "code\WorkInProgress\Aryn\Lighting\Lightpoint.dm"
|
||||
#include "code\WorkInProgress\Aryn\Lighting\Math.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle_animals.dm"
|
||||
@@ -1331,6 +1328,7 @@
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
#include "code\WorkInProgress\Wrongnumber\weldbackpack.dm"
|
||||
#include "code\ZAS\_docs.dm"
|
||||
#include "code\ZAS\_gas_mixture.dm"
|
||||
#include "code\ZAS\Airflow.dm"
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
MAP_ICON_TYPE: 0
|
||||
AUTO_FILE_DIR: OFF
|
||||
*/
|
||||
// END_INTERNALS
|
||||
// END_INTERNALS
|
||||
@@ -1,45 +0,0 @@
|
||||
area/var/lighting_use_dynamic
|
||||
|
||||
turf/space/is_outside = 1
|
||||
turf/simulated/shuttle/is_outside = 1
|
||||
|
||||
/datum/controller/lighting/var/processing = 1
|
||||
/datum/controller/lighting/var/iteration = 0
|
||||
|
||||
//Because so many objects jump the gun.
|
||||
proc/lighting_ready()
|
||||
return lighting_controller && lighting_controller.started
|
||||
|
||||
turf_light_data
|
||||
var/light_overlay
|
||||
var/lightNW
|
||||
var/lightSW
|
||||
var/lightNE
|
||||
var/lightSE
|
||||
var/lit_by
|
||||
|
||||
turf_light_data/proc/copy_from(turf/T)
|
||||
light_overlay = T.light_overlay
|
||||
lightNW = T.lightNW
|
||||
lightSW = T.lightSW
|
||||
lightNE = T.lightNE
|
||||
lightSE = T.lightSE
|
||||
lit_by = T.lit_by
|
||||
|
||||
turf_light_data/proc/copy_to(turf/T)
|
||||
T.light_overlay = light_overlay
|
||||
T.lightNW = lightNW
|
||||
T.lightSW = lightSW
|
||||
T.lightNE = lightNE
|
||||
T.lightSE = lightSE
|
||||
T.lit_by = lit_by
|
||||
//T.ResetValue()
|
||||
|
||||
atom/proc/SetLuminosity(n)
|
||||
n = min(n,10) //Caelcode.
|
||||
if(n > 0)
|
||||
SetLight(max(1,n>>1),n)
|
||||
else
|
||||
SetLight(0,0)
|
||||
luminosity = n
|
||||
//else lighting_controller.initial_lights.Add(src)
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
|
||||
Overview:
|
||||
Unlike the previous lighting controller, this is mostly here to hold global lighting procs and vars.
|
||||
It does not process every tick, because not even DAL did something so stupid.
|
||||
|
||||
Global Vars:
|
||||
initial_lights - This holds all lights formed before the lighting controller started up. It becomes null on initialization.
|
||||
|
||||
Class Vars:
|
||||
starlight - The light value of space.
|
||||
|
||||
icon_updates - The list of turfs which need an update to their overlays.
|
||||
|
||||
light_border - Space turfs which are adjacent to non-space turfs.
|
||||
|
||||
Class Procs:
|
||||
Initialize()
|
||||
Starts the lighting system, creating all light points and turf overlays.
|
||||
|
||||
StarLight(n)
|
||||
Sets the light produced by space. If a solar eclipse suddenly happens, it'll probably lag.
|
||||
|
||||
MarkIconUpdate(turf/T)
|
||||
Called when a turf needs an update to its light icon. Ensures that it only gets calculated once per turf.
|
||||
|
||||
FlushIconUpdates()
|
||||
Called when a light is done marking icon updates. Updates every marked turf.
|
||||
|
||||
AddBorder(turf/T) & RemoveBorder(turf/T)
|
||||
Called by turf/CheckForOpaqueObjects() to modify the light_border list.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
var/datum/controller/lighting/lighting_controller
|
||||
|
||||
var/all_lightpoints_made = 0
|
||||
|
||||
var/list/lit_z_levels = list(1,5)
|
||||
|
||||
/datum/controller/lighting
|
||||
|
||||
var/starlight = 4
|
||||
var/list/icon_updates = list()
|
||||
|
||||
var/list/light_border = list()
|
||||
|
||||
var/started = 0
|
||||
|
||||
//var/icon/border = icon('Icons/Test.dmi', "border")
|
||||
|
||||
/datum/controller/lighting/New()
|
||||
lighting_controller = src
|
||||
|
||||
/datum/controller/lighting/proc/Initialize()
|
||||
|
||||
set background = 1
|
||||
|
||||
var/start_time = world.timeofday
|
||||
world << "<b><font color=red>Processing lights...</font></b>"
|
||||
|
||||
sleep(1)
|
||||
|
||||
var/turfs_updated = 0
|
||||
var/total_turfs = world.maxx*world.maxy*lit_z_levels.len
|
||||
|
||||
for(var/z in lit_z_levels)
|
||||
for(var/y = 0, y <= world.maxy, y++)
|
||||
for(var/x = 0, x <= world.maxx, x++)
|
||||
if(x > 0 && y > 0)
|
||||
|
||||
turfs_updated++
|
||||
if((turfs_updated % (total_turfs>>2)) == 0)
|
||||
sleep(1)
|
||||
world << "<font color=red>Progress: [round((turfs_updated/total_turfs)*100, 0.01)]% ([turfs_updated]/[total_turfs])"
|
||||
|
||||
var/turf/T = locate(x,y,z)
|
||||
if(!T.is_outside)
|
||||
T.light_overlay = new(T)
|
||||
//T.ResetValue()
|
||||
if(!all_lightpoints_made) new/lightpoint(x+0.5,y+0.5,z)
|
||||
|
||||
|
||||
|
||||
//world << "[x],[y],[z]"
|
||||
|
||||
all_lightpoints_made = 1
|
||||
started = 1
|
||||
|
||||
for(var/turf/T)
|
||||
if(!T.is_outside && T.light_overlay)
|
||||
|
||||
T.ResetValue()
|
||||
T.UpdateLight()
|
||||
|
||||
world << "<b><font color=red>Lighting initialization took [(world.timeofday-start_time)/world.fps] seconds.</font></b>"
|
||||
world << "<font color=red>Updated [turfs_updated] turfs.</font>"
|
||||
|
||||
/datum/controller/lighting/proc/MarkIconUpdate(turf/T)
|
||||
if(!T.needs_light_update)
|
||||
icon_updates.Add(T)
|
||||
T.needs_light_update = 1
|
||||
|
||||
/datum/controller/lighting/proc/FlushIconUpdates()
|
||||
for(var/turf/T in icon_updates)
|
||||
T.UpdateLight()
|
||||
T.needs_light_update = 0
|
||||
icon_updates = list()
|
||||
|
||||
/datum/controller/lighting/proc/AddBorder(turf/T)
|
||||
if(!T.is_border)
|
||||
light_border.Add(T)
|
||||
T.is_border = 1
|
||||
//T.overlays.Add(border)
|
||||
|
||||
/datum/controller/lighting/proc/RemoveBorder(turf/T)
|
||||
if(T.is_border)
|
||||
light_border.Remove(T)
|
||||
T.is_border = 0
|
||||
@@ -1,227 +0,0 @@
|
||||
/*
|
||||
|
||||
Overview:
|
||||
Procs given to atom and turf by the lighting engine, as well as the lighting overlay object.
|
||||
|
||||
Atom Vars:
|
||||
light - Contains the light object this atom is currently shining with.
|
||||
|
||||
Turf Vars:
|
||||
light_overlay - Contains an object showing the lighting icon over this turf.
|
||||
|
||||
lit_value - Stores how brightly lit the turf is.
|
||||
|
||||
has_opaque - A cached value updated by CheckForOpaqueObjects()
|
||||
|
||||
is_outside - Any turf with this set to true will be considered as bright as space.
|
||||
|
||||
needs_light_update - Turf is marked for icon updates when true.
|
||||
|
||||
lightNE, lightSE, lightNW, lightSW - Hold the lightpoints on the four corners of this turf. See Lightpoint.dm
|
||||
|
||||
lit_by - A list of lights that are lighting this turf.
|
||||
|
||||
Atom Procs:
|
||||
SetLight(intensity, radius)
|
||||
A more versatile SetLuminosity() that allows independent control of intensity and radius.
|
||||
Called behind the scenes of SetLuminosity().
|
||||
|
||||
SetOpacity(opacity)
|
||||
Does the same thing as DAL.
|
||||
|
||||
Turf Procs:
|
||||
UpdateLight()
|
||||
Called by the lighting controller. It is advisable not to call this manually due to the cost of lightpoint/max_value()
|
||||
|
||||
AddLight(light/light)
|
||||
Called by light/Reset() to light this turf with a particular light.
|
||||
|
||||
RemoveLight(light/light)
|
||||
Called by light/Off() to unlight turfs that were lit by it.
|
||||
|
||||
ResetValue()
|
||||
Called when lights are reset or starlight is changed.
|
||||
|
||||
ResetCachedValues()
|
||||
Resets cached values of all four light points. Called by ResetValue().
|
||||
|
||||
CheckForOpaqueObjects()
|
||||
Called by lighting_controller.Initialize(), SetOpacity() or when a turf might change opacity.
|
||||
Resets the opacity cache and looks for opaque objects. Also responsible for adding and removing borders to space.
|
||||
*/
|
||||
|
||||
|
||||
#define LIGHTCLAMP(x) ( max(0,min(3,round(x,1))) )
|
||||
|
||||
atom/movable/lighting_overlay
|
||||
name = ""
|
||||
anchored = 1
|
||||
layer = 9
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/effects/ArynLights.dmi'
|
||||
icon_state = "0000"
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
atom/var/light/light
|
||||
|
||||
turf/var/atom/movable/lighting_overlay/light_overlay
|
||||
|
||||
turf/var/lit_value = 0
|
||||
turf/var/max_brightness = 0
|
||||
turf/var/has_opaque = 0
|
||||
turf/var/is_outside = 0
|
||||
turf/var/is_border = 0
|
||||
turf/var/needs_light_update = 0
|
||||
|
||||
turf/var/lightpoint/lightNE
|
||||
turf/var/lightpoint/lightNW
|
||||
turf/var/lightpoint/lightSE
|
||||
turf/var/lightpoint/lightSW
|
||||
turf/var/list/lit_by
|
||||
|
||||
atom/movable/New()
|
||||
. = ..()
|
||||
if(luminosity)
|
||||
if(!light)
|
||||
SetLight(luminosity,luminosity)
|
||||
else
|
||||
light.Reset()
|
||||
if(opacity)
|
||||
if(lighting_ready())
|
||||
opacity = 0
|
||||
SetOpacity(1)
|
||||
|
||||
atom/movable/Move()
|
||||
var/o = opacity
|
||||
if(o) SetOpacity(0)
|
||||
. = ..()
|
||||
if(.)
|
||||
if(o) SetOpacity(1)
|
||||
if(light)
|
||||
light.Reset()
|
||||
if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
||||
|
||||
atom/proc/SetLight(intensity, radius)
|
||||
//if(lights_verbose) world << "SetLight([intensity],[radius])"
|
||||
if(!intensity)
|
||||
if(!light || !light.intensity)
|
||||
//if(lights_verbose) world << "Still off."
|
||||
return
|
||||
//if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit."
|
||||
light.Off()
|
||||
light.intensity = 0
|
||||
if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
||||
return
|
||||
if(!light)
|
||||
//if(lights_verbose) world << "New light."
|
||||
light = new(src)
|
||||
if(light.intensity == intensity)
|
||||
//if(lights_verbose) world << "Same intensity."
|
||||
return
|
||||
light.radius = min(radius,15)
|
||||
light.intensity = intensity
|
||||
light.Reset()
|
||||
if(lighting_ready()) lighting_controller.FlushIconUpdates()
|
||||
|
||||
atom/proc/SetOpacity(o)
|
||||
if(o == opacity) return
|
||||
opacity = o
|
||||
var/turf/T = loc
|
||||
if(isturf(T))
|
||||
for(var/light/A in T.lit_by)
|
||||
A.Reset()
|
||||
lighting_controller.FlushIconUpdates()
|
||||
|
||||
turf/proc/UpdateLight()
|
||||
if(light_overlay)
|
||||
light_overlay.icon_state = "[lightSE.max_value()][lightSW.max_value()][lightNW.max_value()][lightNE.max_value()]"
|
||||
|
||||
turf/proc/AddLight(light/light)
|
||||
if(is_outside) return
|
||||
|
||||
var/brightness = light.CalculateBrightness(src)
|
||||
if(brightness <= 0) return
|
||||
|
||||
if(!lit_by) lit_by = list()
|
||||
lit_by.Add(light)
|
||||
|
||||
|
||||
lit_by[light] = brightness
|
||||
|
||||
if(!has_opaque && lighting_ready())
|
||||
if(brightness > max_brightness)
|
||||
lit_value = LIGHTCLAMP(brightness)
|
||||
max_brightness = brightness
|
||||
ResetCachedValues()
|
||||
for(var/turf/T in range(1,src))
|
||||
lighting_controller.MarkIconUpdate(T)
|
||||
|
||||
turf/proc/RemoveLight(light/light)
|
||||
if(lit_by)
|
||||
var/brightness = lit_by[light]
|
||||
lit_by.Remove(light)
|
||||
if(brightness == max_brightness)
|
||||
ResetValue()
|
||||
if(!lit_by.len) lit_by = null
|
||||
|
||||
//Only called by ChangeTurf, because it really needs it.
|
||||
turf/proc/ResetAllLights()
|
||||
for(var/light/light in lit_by)
|
||||
light.Reset()
|
||||
|
||||
/turf/space/ResetAllLights()
|
||||
var/atom/movable/lighting_overlay/overlay = locate() in src
|
||||
if (overlay)
|
||||
overlay.loc = null
|
||||
light_overlay = null
|
||||
is_outside = 1
|
||||
. = ..()
|
||||
|
||||
turf/proc/ResetValue()
|
||||
if(is_outside)
|
||||
max_brightness = lighting_controller.starlight
|
||||
lit_value = LIGHTCLAMP(lighting_controller.starlight)
|
||||
return
|
||||
|
||||
CheckForOpaqueObjects()
|
||||
if(has_opaque)
|
||||
lit_value = 0
|
||||
else
|
||||
the_part_where_I_calculate_brightness()
|
||||
|
||||
if(lighting_ready())
|
||||
the_part_where_I_use_range()
|
||||
|
||||
turf/proc
|
||||
the_part_where_I_calculate_brightness()
|
||||
max_brightness = 0
|
||||
for(var/light/light in lit_by)
|
||||
var/brightness = lit_by[light]//light.CalculateBrightness(src)
|
||||
if(brightness > max_brightness)
|
||||
max_brightness = brightness
|
||||
lit_value = LIGHTCLAMP(max_brightness)
|
||||
|
||||
the_part_where_I_use_range()
|
||||
ResetCachedValues()
|
||||
for(var/turf/T in range(1,src))
|
||||
lighting_controller.MarkIconUpdate(T)
|
||||
|
||||
turf/proc/ResetCachedValues()
|
||||
if(lightNE)
|
||||
lightNE.cached_value = -1
|
||||
if(lightNW)
|
||||
lightNW.cached_value = -1
|
||||
if(lightSE)
|
||||
lightSE.cached_value = -1
|
||||
if(lightSW)
|
||||
lightSW.cached_value = -1
|
||||
|
||||
turf/proc/CheckForOpaqueObjects()
|
||||
has_opaque = opacity
|
||||
if(!opacity)
|
||||
for(var/atom/movable/M in contents)
|
||||
if(M.opacity)
|
||||
has_opaque = 1
|
||||
break
|
||||
|
||||
#undef LIGHTCLAMP
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
|
||||
Overview:
|
||||
This object functions similarly to /tg/'s /light. It is responsible for calculating what turfs are lit by it.
|
||||
|
||||
Class Vars:
|
||||
radius - Set by atom/SetLight(). This stores how far out turfs will be lit up.
|
||||
intensity - Set by atom/SetLight(). Stores the amount of light generated at the center.
|
||||
lit_turfs - A list of turfs being lit by this light.
|
||||
atom - The atom this light is attached to.
|
||||
|
||||
Class Procs:
|
||||
Reset()
|
||||
This is called whenever the light changes, or the underlying atom changes position.
|
||||
|
||||
Off()
|
||||
A quick way to turn off a light. Removes the light from all turfs in lit_turfs.
|
||||
|
||||
CalculateBrightness(turf/T)
|
||||
Returns the brightness that should be displayed by this light on a specific turf.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
light/var/radius = 0
|
||||
light/var/intensity = 0
|
||||
light/var/list/lit_turfs
|
||||
light/var/atom/atom
|
||||
|
||||
light/New(atom/atom)
|
||||
src.atom = atom
|
||||
|
||||
light/proc/Reset()
|
||||
//if(atom.lights_verbose) world << "light.Reset()"
|
||||
Off()
|
||||
if(intensity > 0)
|
||||
//if(atom.lights_verbose) world << "Restoring light."
|
||||
for(var/turf/T in view(get_turf(atom),radius+1))
|
||||
if(!T.is_outside)
|
||||
T.AddLight(src)
|
||||
lit_turfs.Add(T)
|
||||
//if(atom.lights_verbose) world << "[lit_turfs.len] turfs added."
|
||||
|
||||
light/proc/Off()
|
||||
//if(atom.lights_verbose) world << "light.Off()"
|
||||
for(var/turf/T in lit_turfs)
|
||||
T.RemoveLight(src)
|
||||
lit_turfs = list()
|
||||
|
||||
light/proc/CalculateBrightness(turf/T)
|
||||
if (!atom)
|
||||
return 0
|
||||
var/square = get_square_dist(atom.x,atom.y,atom.z,T.x,T.y,T.z)
|
||||
if(square > (radius+2)*(radius+2)) return 0
|
||||
//+2 offset gives an ambient light effect.
|
||||
|
||||
var/value = ((radius)/(2*fsqrt(square) + 1)) * intensity - 0.48
|
||||
/*
|
||||
lightRadius
|
||||
---------------- * lightValue - 0.48
|
||||
2 * distance + 1
|
||||
|
||||
The light decreases by twice the distance, starting from the radius.
|
||||
The + 1 causes the graph to shift to the left one unit so that division by zero is prevented on the source tile.
|
||||
|
||||
This is then multiplied by the light value to give the final result.
|
||||
The -0.48 offset causes the value to be near zero at the radius.
|
||||
|
||||
This gives a result which is likely close to the inverse-square law in two dimensions instead of three.
|
||||
*/
|
||||
|
||||
|
||||
return max(min( value , intensity), 0) //Ensure the value never goes above the maximum light value or below zero.
|
||||
|
||||
//return cos(90 * sqrt(square) / max(1,lightRadius)) * lightValue
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
|
||||
Overview:
|
||||
Perhaps the most cryptic datum in the lighting engine, there are four of these at the corners of every turf.
|
||||
Any two turfs that share a corner will also have the same lightpoint. Because of the nature of the icons used,
|
||||
light is shown at the corner of the turf rather than in the middle, necessitating some way to keep track of what
|
||||
icon state to use.
|
||||
|
||||
Class Vars:
|
||||
x, y, z - The position of the lightpoint. x and y will usually be expressed in terms of 0.5 due to its location on the corner.
|
||||
|
||||
NE, NW, SE, SW - The turfs that are in these directions relative to the lightpoint.
|
||||
|
||||
cached_value - A cached value of max_value().
|
||||
|
||||
Class Procs:
|
||||
max_value()
|
||||
The maximum of the light amounts on the four turfs of this light point.
|
||||
|
||||
*/
|
||||
|
||||
lightpoint
|
||||
var/x
|
||||
var/y
|
||||
var/z
|
||||
|
||||
var/turf/NE
|
||||
var/turf/NW
|
||||
var/turf/SW
|
||||
var/turf/SE
|
||||
|
||||
var/cached_value = -1
|
||||
|
||||
New(x,y,z)
|
||||
var/turf/T = locate(x+0.5,y+0.5,z)
|
||||
if(T)
|
||||
NE = T
|
||||
T.lightSW = src
|
||||
T = locate(x-0.5,y+0.5,z)
|
||||
if(T)
|
||||
NW = T
|
||||
T.lightSE = src
|
||||
T = locate(x-0.5,y-0.5,z)
|
||||
if(T)
|
||||
SW = T
|
||||
T.lightNE = src
|
||||
T = locate(x+0.5,y-0.5,z)
|
||||
if(T)
|
||||
SE = T
|
||||
T.lightNW = src
|
||||
|
||||
proc/max_value()
|
||||
if(cached_value < 0)
|
||||
var
|
||||
valueA = value_of(NW)
|
||||
valueB = value_of(NE)
|
||||
valueC = value_of(SW)
|
||||
valueD = value_of(SE)
|
||||
cached_value = max(valueA,valueB,valueC,valueD)
|
||||
return cached_value
|
||||
|
||||
proc/value_of(turf/T)
|
||||
if(!T) return 0
|
||||
if(T.is_outside) return min(lighting_controller.starlight,3)
|
||||
return T.lit_value
|
||||
@@ -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]
|
||||
@@ -1,33 +0,0 @@
|
||||
var/icon/lighting_dbg = icon('icons/Testing/Zone.dmi', "created")
|
||||
|
||||
atom/var/lights_verbose = 0
|
||||
|
||||
obj/machinery/light/verb/ShowInfluence()
|
||||
set src in world
|
||||
|
||||
lights_verbose = 1
|
||||
usr << "<b>[src]</b>"
|
||||
if(light)
|
||||
usr << "Intensity: [light.intensity]"
|
||||
usr << "Radius: [light.radius]"
|
||||
|
||||
for(var/turf/T in light.lit_turfs)
|
||||
T.overlays += lighting_dbg
|
||||
spawn(50)
|
||||
for(var/turf/T in light.lit_turfs)
|
||||
T.overlays -= lighting_dbg
|
||||
|
||||
turf/verb/ShowData()
|
||||
set src in world
|
||||
|
||||
usr << "<b>[src]</b>"
|
||||
usr << "Lit Value: [lit_value]"
|
||||
usr << "Max Brightness: [max_brightness]"
|
||||
|
||||
usr << "Lit By: "
|
||||
for(var/light/light in lit_by)
|
||||
usr << " - [light.atom] \[[lit_by[light]]\][(lit_by[light] == max_brightness ? "(MAX)" : "")]"
|
||||
light.atom.overlays += lighting_dbg
|
||||
spawn(50)
|
||||
for(var/light/light in lit_by)
|
||||
light.atom.overlays -= lighting_dbg
|
||||
@@ -210,7 +210,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/candiedapple, \
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar, \
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cookie, \
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot, \
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball, \
|
||||
/obj/item/weapon/reagent_containers/food/snacks/plump_pie, \
|
||||
)
|
||||
for(var/i=0,i<num,i++)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/policetape.dmi'
|
||||
icon_state = "rollstart"
|
||||
flags = FPRINT
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
var/turf/start
|
||||
var/turf/end
|
||||
var/tape_type = /obj/item/tape
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon = 'icons/obj/autopsy_scanner.dmi'
|
||||
icon_state = ""
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
var/list/datum/autopsy_data_scanner/wdata = list()
|
||||
var/list/datum/autopsy_data_scanner/chemtraces = list()
|
||||
|
||||
+28
-16
@@ -1,24 +1,33 @@
|
||||
//print an error message to world.log
|
||||
|
||||
|
||||
// On Linux/Unix systems the line endings are LF, on windows it's CRLF, admins that don't use notepad++
|
||||
// will get logs that are one big line if the system is Linux and they are using notepad. This solves it by adding CR to every line ending
|
||||
// in the logs. ascii character 13 = CR
|
||||
|
||||
/var/global/log_end= world.system_type == UNIX ? ascii2text(13) : ""
|
||||
|
||||
|
||||
/proc/error(msg)
|
||||
world.log << "## ERROR: [msg]"
|
||||
world.log << "## ERROR: [msg][log_end]"
|
||||
|
||||
//print a warning message to world.log
|
||||
/proc/warning(msg)
|
||||
world.log << "## WARNING: [msg]"
|
||||
world.log << "## WARNING: [msg][log_end]"
|
||||
|
||||
//print a testing-mode debug message to world.log
|
||||
/proc/testing(msg)
|
||||
world.log << "## TESTING: [msg]"
|
||||
world.log << "## TESTING: [msg][log_end]"
|
||||
|
||||
/proc/log_admin(text)
|
||||
admin_log.Add(text)
|
||||
if (config.log_admin)
|
||||
diary << "\[[time_stamp()]]ADMIN: [text]"
|
||||
diary << "\[[time_stamp()]]ADMIN: [text][log_end]"
|
||||
|
||||
|
||||
/proc/log_debug(text)
|
||||
if (config.log_debug)
|
||||
diary << "\[[time_stamp()]]DEBUG: [text]"
|
||||
diary << "\[[time_stamp()]]DEBUG: [text][log_end]"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.toggles & CHAT_DEBUGLOGS)
|
||||
@@ -27,44 +36,47 @@
|
||||
|
||||
/proc/log_game(text)
|
||||
if (config.log_game)
|
||||
diary << "\[[time_stamp()]]GAME: [text]"
|
||||
diary << "\[[time_stamp()]]GAME: [text][log_end]"
|
||||
|
||||
/proc/log_vote(text)
|
||||
if (config.log_vote)
|
||||
diary << "\[[time_stamp()]]VOTE: [text]"
|
||||
diary << "\[[time_stamp()]]VOTE: [text][log_end]"
|
||||
|
||||
/proc/log_access(text)
|
||||
if (config.log_access)
|
||||
diary << "\[[time_stamp()]]ACCESS: [text]"
|
||||
diary << "\[[time_stamp()]]ACCESS: [text][log_end]"
|
||||
|
||||
/proc/log_say(text)
|
||||
if (config.log_say)
|
||||
diary << "\[[time_stamp()]]SAY: [text]"
|
||||
diary << "\[[time_stamp()]]SAY: [text][log_end]"
|
||||
|
||||
/proc/log_ooc(text)
|
||||
if (config.log_ooc)
|
||||
diary << "\[[time_stamp()]]OOC: [text]"
|
||||
diary << "\[[time_stamp()]]OOC: [text][log_end]"
|
||||
|
||||
/proc/log_whisper(text)
|
||||
if (config.log_whisper)
|
||||
diary << "\[[time_stamp()]]WHISPER: [text]"
|
||||
diary << "\[[time_stamp()]]WHISPER: [text][log_end]"
|
||||
|
||||
/proc/log_emote(text)
|
||||
if (config.log_emote)
|
||||
diary << "\[[time_stamp()]]EMOTE: [text]"
|
||||
diary << "\[[time_stamp()]]EMOTE: [text][log_end]"
|
||||
|
||||
/proc/log_attack(text)
|
||||
if (config.log_attack)
|
||||
diary << "\[[time_stamp()]]ATTACK: [text]" //Seperate attack logs? Why?
|
||||
diary << "\[[time_stamp()]]ATTACK: [text][log_end]" //Seperate attack logs? Why? FOR THE GLORY OF SATAN!
|
||||
|
||||
/proc/log_adminsay(text)
|
||||
if (config.log_adminchat)
|
||||
diary << "\[[time_stamp()]]ADMINSAY: [text]"
|
||||
diary << "\[[time_stamp()]]ADMINSAY: [text][log_end]"
|
||||
|
||||
/proc/log_adminwarn(text)
|
||||
if (config.log_adminwarn)
|
||||
diary << "\[[time_stamp()]]ADMINWARN: [text]"
|
||||
diary << "\[[time_stamp()]]ADMINWARN: [text][log_end]"
|
||||
|
||||
/proc/log_pda(text)
|
||||
if (config.log_pda)
|
||||
diary << "\[[time_stamp()]]PDA: [text]"
|
||||
diary << "\[[time_stamp()]]PDA: [text][log_end]"
|
||||
|
||||
/proc/log_misc(text)
|
||||
diary << "\[[time_stamp()]]MISC: [text][log_end]"
|
||||
|
||||
@@ -14,6 +14,7 @@ var/datum/global_hud/global_hud = new()
|
||||
var/obj/screen/blurry
|
||||
var/list/vimpaired
|
||||
var/list/darkMask
|
||||
var/obj/screen/nvg
|
||||
|
||||
/datum/global_hud/New()
|
||||
//420erryday psychedellic colours screen overlay for when you are high
|
||||
@@ -30,6 +31,13 @@ var/datum/global_hud/global_hud = new()
|
||||
blurry.layer = 17
|
||||
blurry.mouse_opacity = 0
|
||||
|
||||
nvg = new /obj/screen()
|
||||
nvg.screen_loc = "1,1"
|
||||
nvg.icon = 'icons/obj/nvg_hud_full.dmi'
|
||||
nvg.icon_state = "nvg_hud"
|
||||
nvg.layer = 17
|
||||
nvg.mouse_opacity = 0
|
||||
|
||||
var/obj/screen/O
|
||||
var/i
|
||||
//that nasty looking dither you get when you're short-sighted
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
if (M.config_tag)
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
|
||||
log_misc("Adding game mode [M.name] ([M.config_tag]) to configuration.")
|
||||
src.modes += M.config_tag
|
||||
src.mode_names[M.config_tag] = M.name
|
||||
src.probabilities[M.config_tag] = M.probability
|
||||
@@ -362,9 +362,9 @@
|
||||
if (prob_name in config.modes)
|
||||
config.probabilities[prob_name] = text2num(prob_value)
|
||||
else
|
||||
diary << "Unknown game mode probability configuration definition: [prob_name]."
|
||||
log_misc("Unknown game mode probability configuration definition: [prob_name].")
|
||||
else
|
||||
diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
|
||||
log_misc("Incorrect probability configuration definition: [prob_name] [prob_value].")
|
||||
|
||||
if("allow_random_events")
|
||||
config.allow_random_events = 1
|
||||
@@ -484,11 +484,11 @@
|
||||
config.cult_ghostwriter_req_cultists = value
|
||||
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
else if(type == "game_options")
|
||||
if(!value)
|
||||
diary << "Unknown value for setting [name] in [filename]."
|
||||
log_misc("Unknown value for setting [name] in [filename].")
|
||||
value = text2num(value)
|
||||
|
||||
switch(name)
|
||||
@@ -529,7 +529,7 @@
|
||||
if("limbs_can_break")
|
||||
config.limbs_can_break = value
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
/datum/configuration/proc/loadsql(filename) // -- TLE
|
||||
var/list/Lines = file2list(filename)
|
||||
@@ -575,7 +575,7 @@
|
||||
if ("enable_stat_tracking")
|
||||
sqllogging = 1
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
/datum/configuration/proc/loadforumsql(filename) // -- TLE
|
||||
var/list/Lines = file2list(filename)
|
||||
@@ -617,7 +617,7 @@
|
||||
if ("authenticatedgroup")
|
||||
forum_authenticated_group = value
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
/datum/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
|
||||
@@ -45,8 +45,7 @@ var/datum/controller/failsafe/Failsafe
|
||||
MC_defcon = 0
|
||||
MC_iteration = controller_iteration
|
||||
|
||||
//Lighting controller now neither processes nor iterates.
|
||||
/*if(lighting_controller.processing)
|
||||
if(lighting_controller.processing)
|
||||
if(lighting_iteration == lighting_controller.iteration) //master_controller hasn't finished processing in the defined interval
|
||||
switch(lighting_defcon)
|
||||
if(0 to 3)
|
||||
@@ -61,7 +60,7 @@ var/datum/controller/failsafe/Failsafe
|
||||
lighting_defcon = 0
|
||||
else
|
||||
lighting_defcon = 0
|
||||
lighting_iteration = lighting_controller.iteration*/
|
||||
lighting_iteration = lighting_controller.iteration
|
||||
else
|
||||
MC_defcon = 0
|
||||
lighting_defcon = 0
|
||||
|
||||
@@ -31,10 +31,12 @@ datum/controller/game_controller
|
||||
|
||||
var/last_thing_processed
|
||||
var/mob/list/expensive_mobs = list()
|
||||
var/rebuild_active_areas = 0
|
||||
|
||||
datum/controller/game_controller/New()
|
||||
//There can be only one master_controller. Out with the old and in with the new.
|
||||
if(master_controller != src)
|
||||
log_debug("Rebuilding Master Controller")
|
||||
if(istype(master_controller))
|
||||
Recover()
|
||||
del(master_controller)
|
||||
@@ -78,7 +80,6 @@ datum/controller/game_controller/proc/setup()
|
||||
if(ticker)
|
||||
ticker.pregame()
|
||||
|
||||
new/datum/controller/lighting()
|
||||
lighting_controller.Initialize()
|
||||
|
||||
|
||||
@@ -260,27 +261,37 @@ datum/controller/game_controller/proc/process_machines()
|
||||
last_thing_processed = Machine.type
|
||||
if(Machine.process() != PROCESS_KILL)
|
||||
if(Machine)
|
||||
|
||||
// if(Machine.use_power)
|
||||
// Machine.auto_use_power()
|
||||
|
||||
i++
|
||||
continue
|
||||
machines.Cut(i,i+1)
|
||||
|
||||
i=1
|
||||
while(i<=active_areas.len)
|
||||
var/area/A = active_areas[i]
|
||||
if(A.powerupdate)
|
||||
if(A.powerupdate && A.master == A)
|
||||
A.powerupdate -= 1
|
||||
for(var/obj/machinery/M in A)
|
||||
if(M)
|
||||
if(M.use_power)
|
||||
M.auto_use_power()
|
||||
for(var/area/SubArea in A.related)
|
||||
for(var/obj/machinery/M in SubArea)
|
||||
if(M)
|
||||
if(M.use_power)
|
||||
M.auto_use_power()
|
||||
|
||||
if(A.apc.len)
|
||||
if(A.apc.len && A.master == A)
|
||||
i++
|
||||
continue
|
||||
|
||||
A.powerupdate = 0
|
||||
active_areas.Cut(i,i+1)
|
||||
|
||||
|
||||
if(controller_iteration % 150 == 0 || rebuild_active_areas) //Every 300 seconds we retest every area/machine
|
||||
for(var/area/A in all_areas)
|
||||
if(A == A.master)
|
||||
A.powerupdate += 1
|
||||
active_areas |= A
|
||||
rebuild_active_areas = 0
|
||||
|
||||
|
||||
|
||||
|
||||
datum/controller/game_controller/proc/process_objects()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
feedback_add_details("admin_verb","RFailsafe")
|
||||
if("Lighting")
|
||||
new /datum/controller/lighting()
|
||||
//lighting_controller.process()
|
||||
lighting_controller.process()
|
||||
feedback_add_details("admin_verb","RLighting")
|
||||
if("Supply Shuttle")
|
||||
supply_shuttle.process()
|
||||
|
||||
@@ -259,6 +259,8 @@ client
|
||||
body += "<option value='?_src_=vars;addlanguage=\ref[D]'>Add Language</option>"
|
||||
body += "<option value='?_src_=vars;remlanguage=\ref[D]'>Remove Language</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;fix_nano=\ref[D]'>Fix NanoUI</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;addverb=\ref[D]'>Add Verb</option>"
|
||||
body += "<option value='?_src_=vars;remverb=\ref[D]'>Remove Verb</option>"
|
||||
if(ishuman(D))
|
||||
@@ -859,6 +861,25 @@ client
|
||||
H.verbs -= verb
|
||||
|
||||
|
||||
else if(href_list["fix_nano"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/mob/H = locate(href_list["fix_nano"])
|
||||
|
||||
if(!istype(H) || !H.client)
|
||||
usr << "This can only be done on mobs with clients"
|
||||
return
|
||||
|
||||
|
||||
|
||||
nanomanager.send_resources(H.client)
|
||||
|
||||
usr << "Resource files sent"
|
||||
H << "Your NanoUI Resource files have been refreshed"
|
||||
|
||||
log_admin("[key_name(usr)] resent the NanoUI resource files to [key_name(H)] ")
|
||||
|
||||
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
@@ -63,7 +63,7 @@ var/global/datum/getrev/revdata = new("config/svndir.txt")
|
||||
s_archive = s
|
||||
if(!revision)
|
||||
abort()
|
||||
diary << "Revision info loaded succesfully"
|
||||
log_misc("Revision info loaded succesfully")
|
||||
return
|
||||
return abort()
|
||||
|
||||
|
||||
@@ -52,6 +52,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/food/drinks/milk,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/milk,
|
||||
/obj/item/weapon/storage/fancy/egg_box,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tofu,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tofu,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/banana)
|
||||
cost = 10
|
||||
@@ -125,6 +129,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
name = "Party equipment"
|
||||
contains = list(/obj/item/weapon/storage/box/drinkingglasses,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/shaker,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/flask/barflask,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
|
||||
@@ -174,6 +179,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Emergency Crate"
|
||||
group = "Engineering"
|
||||
|
||||
/datum/supply_packs/evacuation
|
||||
name = "Inflatable barriers"
|
||||
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
|
||||
/obj/item/weapon/storage/briefcase/inflatable,
|
||||
/obj/item/weapon/storage/briefcase/inflatable)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "Inflatable Barrier Crate"
|
||||
group = "Engineering"
|
||||
|
||||
/datum/supply_packs/janitor
|
||||
name = "Janitorial supplies"
|
||||
contains = list(/obj/item/weapon/reagent_containers/glass/bucket,
|
||||
@@ -288,9 +303,14 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/seeds/cornseed,
|
||||
/obj/item/seeds/eggplantseed,
|
||||
/obj/item/seeds/tomatoseed,
|
||||
/obj/item/seeds/appleseed,
|
||||
/obj/item/seeds/soyaseed,
|
||||
/obj/item/seeds/wheatseed,
|
||||
/obj/item/seeds/carrotseed,
|
||||
/obj/item/seeds/harebell,
|
||||
/obj/item/seeds/lemonseed,
|
||||
/obj/item/seeds/orangeseed,
|
||||
/obj/item/seeds/grassseed,
|
||||
/obj/item/seeds/sunflowerseed,
|
||||
/obj/item/seeds/chantermycelium,
|
||||
/obj/item/seeds/potatoseed,
|
||||
@@ -324,6 +344,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/seeds/amanitamycelium,
|
||||
/obj/item/seeds/reishimycelium,
|
||||
/obj/item/seeds/bananaseed,
|
||||
/obj/item/seeds/riceseed,
|
||||
/obj/item/seeds/eggplantseed,
|
||||
/obj/item/seeds/limeseed,
|
||||
/obj/item/seeds/grapeseed,
|
||||
/obj/item/seeds/eggyseed)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate/hydroponics
|
||||
@@ -763,7 +787,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
group = "Security"
|
||||
|
||||
/datum/supply_packs/randomised
|
||||
var/num_contained = 3 //number of items picked to be contained in a randomised crate
|
||||
var/num_contained = 4 //number of items picked to be contained in a randomised crate
|
||||
contains = list(/obj/item/clothing/head/collectable/chef,
|
||||
/obj/item/clothing/head/collectable/paper,
|
||||
/obj/item/clothing/head/collectable/tophat,
|
||||
@@ -895,22 +919,36 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/randomised/costume
|
||||
num_contained = 2
|
||||
contains = list(/obj/item/clothing/suit/pirate,
|
||||
/obj/item/clothing/suit/johnny_coat,
|
||||
/obj/item/clothing/suit/judgerobe,
|
||||
/obj/item/clothing/suit/wcoat,
|
||||
/obj/item/clothing/suit/hastur,
|
||||
/obj/item/clothing/suit/holidaypriest,
|
||||
/obj/item/clothing/suit/nun,
|
||||
/obj/item/clothing/suit/imperium_monk,
|
||||
/obj/item/clothing/suit/ianshirt,
|
||||
/obj/item/clothing/under/gimmick/rank/captain/suit,
|
||||
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit,
|
||||
/obj/item/clothing/under/lawyer/purpsuit,
|
||||
/obj/item/clothing/under/rank/mailman,
|
||||
/obj/item/clothing/under/dress/dress_saloon,
|
||||
/obj/item/clothing/suit/suspenders,
|
||||
/obj/item/clothing/suit/storage/labcoat/mad,
|
||||
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit)
|
||||
name = "Standard Costume crate"
|
||||
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit,
|
||||
/obj/item/clothing/under/schoolgirl,
|
||||
/obj/item/clothing/under/owl,
|
||||
/obj/item/clothing/under/waiter,
|
||||
/obj/item/clothing/under/gladiator,
|
||||
/obj/item/clothing/under/soviet,
|
||||
/obj/item/clothing/under/scratch,
|
||||
/obj/item/clothing/under/wedding/bride_white,
|
||||
/obj/item/clothing/suit/chef,
|
||||
/obj/item/clothing/suit/apron/overalls,
|
||||
/obj/item/clothing/under/redcoat,
|
||||
/obj/item/clothing/under/kilt)
|
||||
name = "Costumes crate"
|
||||
cost = 10
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "Standard Costumes"
|
||||
containername = "Actor Costumes"
|
||||
access = access_theatre
|
||||
group = "Operations"
|
||||
|
||||
@@ -923,8 +961,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/clothing/under/suit_jacket/female,
|
||||
/obj/item/clothing/under/suit_jacket/really_black,
|
||||
/obj/item/clothing/under/suit_jacket/red,
|
||||
/obj/item/clothing/under/lawyer/bluesuit,
|
||||
/obj/item/clothing/under/lawyer/purpsuit,
|
||||
/obj/item/clothing/shoes/black,
|
||||
/obj/item/clothing/shoes/black,
|
||||
/obj/item/clothing/shoes/leather,
|
||||
/obj/item/clothing/suit/wcoat)
|
||||
name = "Formalwear closet"
|
||||
cost = 30
|
||||
@@ -1052,13 +1093,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/bee_keeper
|
||||
name = "Beekeeping Crate"
|
||||
contains = list(/obj/item/beezeez,
|
||||
/obj/item/beezeez,
|
||||
/obj/item/weapon/bee_net,
|
||||
/obj/item/apiary,
|
||||
/obj/item/queen_bee,
|
||||
/obj/item/queen_bee,
|
||||
/obj/item/queen_bee)
|
||||
cost = 20
|
||||
cost = 40
|
||||
contraband = 1
|
||||
containertype = /obj/structure/closet/crate/hydroponics
|
||||
containername = "Beekeeping crate"
|
||||
access = access_hydroponics
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ var/global/list/PDA_Manifest = list()
|
||||
item_state = "beachball"
|
||||
density = 0
|
||||
anchored = 0
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
force = 0.0
|
||||
throwforce = 0.0
|
||||
throw_speed = 1
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
icon = 'icons/obj/seeds.dmi'
|
||||
icon_state = "seed" // unknown plant seed - these shouldn't exist in-game
|
||||
flags = FPRINT | TABLEPASS
|
||||
w_class = 1.0 // Makes them pocketable
|
||||
w_class = 2.0 // Makes them pocketable
|
||||
var/mypath = "/obj/item/seeds"
|
||||
var/plantname = "Plants"
|
||||
var/productname = ""
|
||||
@@ -1205,7 +1205,7 @@
|
||||
force = 0
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
@@ -1229,7 +1229,7 @@
|
||||
force = 15
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
@@ -1251,7 +1251,7 @@
|
||||
force = 30
|
||||
flags = TABLEPASS
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
plant_type = 1
|
||||
@@ -1417,7 +1417,7 @@
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle16"
|
||||
flags = FPRINT | TABLEPASS
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
var/mutmod = 0
|
||||
var/yieldmod = 0
|
||||
New()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "banana_peel"
|
||||
item_state = "banana_peel"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
@@ -42,7 +42,7 @@
|
||||
icon = 'icons/obj/harvest.dmi'
|
||||
icon_state = "corncob"
|
||||
item_state = "corncob"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
@@ -53,7 +53,7 @@
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "soap"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throwforce = 0
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
@@ -90,7 +90,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "c_tube"
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 4
|
||||
throw_range = 5
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
desc = "Better keep this safe."
|
||||
icon_state = "nucleardisk"
|
||||
item_state = "card-id"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
|
||||
/*
|
||||
/obj/item/weapon/game_kit
|
||||
@@ -229,7 +229,7 @@
|
||||
icon_state = "large"
|
||||
sharp = 1
|
||||
desc = "Could probably be used as ... a throwing weapon?"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
force = 5.0
|
||||
throwforce = 8.0
|
||||
item_state = "shard-glass"
|
||||
@@ -400,8 +400,8 @@
|
||||
/obj/item/weapon/module/power_control
|
||||
name = "power control module"
|
||||
icon_state = "power_mod"
|
||||
desc = "Heavy-duty switching circuits for power control."
|
||||
m_amt = 50
|
||||
desc = "Heavy-duty switching circuits for power control."
|
||||
m_amt = 50
|
||||
g_amt = 50
|
||||
|
||||
/obj/item/weapon/module/id_auth
|
||||
@@ -461,7 +461,7 @@
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "meat"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
origin_tech = "biotech=2"
|
||||
|
||||
/obj/item/weapon/hatchet
|
||||
|
||||
@@ -860,7 +860,7 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "chapeloffice"
|
||||
|
||||
/area/lawoffice
|
||||
name = "\improper Law Office"
|
||||
name = "\improper Internal Affairs"
|
||||
icon_state = "law"
|
||||
|
||||
|
||||
@@ -977,6 +977,10 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Engineering Hallway"
|
||||
icon_state = "engine_hallway"
|
||||
|
||||
engine_eva
|
||||
name = "\improper Engine EVA"
|
||||
icon_state = "engine_eva"
|
||||
|
||||
workshop
|
||||
name = "\improper Engineering Workshop"
|
||||
icon_state = "engine_storage"
|
||||
@@ -1238,6 +1242,11 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Firing Range"
|
||||
icon_state = "firingrange"
|
||||
|
||||
/area/security/tactical
|
||||
name = "\improper Tactical Equipment"
|
||||
icon_state = "Tactical"
|
||||
|
||||
|
||||
/*
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -26,16 +26,20 @@
|
||||
// lighting_state = 4
|
||||
//has_gravity = 0 // Space has gravity. Because.. because.
|
||||
|
||||
if(!requires_power)
|
||||
if(requires_power)
|
||||
luminosity = 0
|
||||
else
|
||||
power_light = 0 //rastaf0
|
||||
power_equip = 0 //rastaf0
|
||||
power_environ = 0 //rastaf0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
..()
|
||||
|
||||
// spawn(15)
|
||||
power_change() // all machines set to current power level, also updates lighting icon
|
||||
InitializeLighting()
|
||||
|
||||
|
||||
/area/proc/poweralert(var/state, var/obj/source as obj)
|
||||
@@ -240,7 +244,6 @@
|
||||
return used
|
||||
|
||||
/area/proc/clear_usage()
|
||||
|
||||
master.used_equip = 0
|
||||
master.used_light = 0
|
||||
master.used_environ = 0
|
||||
|
||||
@@ -44,7 +44,7 @@ Stealthy and Inconspicuous Weapons;
|
||||
/obj/item/weapon/cartridge/syndicate:3:Detomatix PDA Cartridge;
|
||||
Whitespace:Seperator;
|
||||
Stealth and Camouflage Items;
|
||||
/obj/item/clothing/under/chameleon:3:Chameleon Jumpsuit;
|
||||
/obj/item/weapon/storage/box/syndie_kit/chameleon:3:Chameleon Kit;
|
||||
/obj/item/clothing/shoes/syndigaloshes:2:No-Slip Syndicate Shoes;
|
||||
/obj/item/weapon/card/id/syndicate:2:Agent ID card;
|
||||
/obj/item/clothing/mask/gas/voice:4:Voice Changer;
|
||||
|
||||
@@ -57,7 +57,12 @@ var/global/datum/controller/gameticker/ticker
|
||||
if(going)
|
||||
pregame_timeleft--
|
||||
if(pregame_timeleft == config.vote_autogamemode_timeleft)
|
||||
vote.autogamemode()
|
||||
if(!vote.time_remaining)
|
||||
vote.autogamemode() //Quit calling this over and over and over and over.
|
||||
while(vote.time_remaining)
|
||||
for(var/i=0, i<10, i++)
|
||||
sleep(1)
|
||||
vote.process()
|
||||
if(pregame_timeleft <= 0)
|
||||
current_state = GAME_STATE_SETTING_UP
|
||||
while (!setup())
|
||||
@@ -148,7 +153,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
|
||||
master_controller.process() //Start master_controller.process()
|
||||
//lighting_controller.process() //Start processing DynamicAreaLighting updates
|
||||
lighting_controller.process() //Start processing DynamicAreaLighting updates
|
||||
|
||||
for(var/obj/multiz/ladder/L in world) L.connect() //Lazy hackfix for ladders. TODO: move this to an actual controller. ~ Z
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
/datum/game_mode/malfunction/pre_setup()
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(player.mind && player.mind.assigned_role == "AI")
|
||||
if(player.mind && player.mind.assigned_role == "AI" && (player.client.prefs.be_special & BE_MALF))
|
||||
malf_ai+=player.mind
|
||||
if(malf_ai.len)
|
||||
return 1
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state ="book"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/uses = 5
|
||||
var/temp = null
|
||||
|
||||
@@ -26,7 +26,7 @@ var/list/whitelist = list()
|
||||
/proc/load_alienwhitelist()
|
||||
var/text = file2text("config/alienwhitelist.txt")
|
||||
if (!text)
|
||||
diary << "Failed to load config/alienwhitelist.txt\n"
|
||||
log_misc("Failed to load config/alienwhitelist.txt")
|
||||
else
|
||||
alien_whitelist = text2list(text, "\n")
|
||||
|
||||
@@ -51,4 +51,4 @@ var/list/whitelist = list()
|
||||
|
||||
return 0
|
||||
|
||||
#undef WHITELISTFILE
|
||||
#undef WHITELISTFILE
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
if(beaker)
|
||||
user << "\red The biogenerator already occuped."
|
||||
user << "\red The biogenerator is already loaded."
|
||||
else
|
||||
user.before_take_item(O)
|
||||
O.loc = src
|
||||
|
||||
@@ -77,10 +77,8 @@
|
||||
//Cameras can't track people wearing an agent card or a ninja hood.
|
||||
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
continue
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
var/obj/item/clothing/head/helmet/space/space_ninja/hood = H.head
|
||||
if(!hood.canremove)
|
||||
continue
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
continue
|
||||
|
||||
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
|
||||
if(!near_camera(M))
|
||||
@@ -137,8 +135,8 @@
|
||||
U << "Follow camera mode terminated."
|
||||
U.cameraFollow = null
|
||||
return
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && !H.head.canremove)
|
||||
U << "Follow camera mode terminated."
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
U << "Follow camera mode terminated."
|
||||
U.cameraFollow = null
|
||||
return
|
||||
if(H.digitalcamo)
|
||||
@@ -199,4 +197,4 @@
|
||||
else
|
||||
if (sorttext(a.c_tag, b.c_tag) < 0)
|
||||
L.Swap(j, j + 1)
|
||||
return L
|
||||
return L
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
|
||||
item_state = "card-id"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
var/datum/dna2/record/buf=null
|
||||
var/read_only = 0 //Well,it's still a floppy disk
|
||||
|
||||
|
||||
@@ -662,4 +662,23 @@
|
||||
del(W)
|
||||
|
||||
for(var/mob/M in currentarea)
|
||||
M << "FIGHT!"
|
||||
M << "FIGHT!"
|
||||
|
||||
//Holorack
|
||||
|
||||
/obj/structure/rack/holorack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
|
||||
/obj/structure/rack/holorack/attack_alien(mob/user as mob) //Removed code for larva since it doesn't work. Previous code is now a larva ability. /N
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/rack/holorack/attack_hand(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/structure/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "It's a holorack! You can't unwrench it!"
|
||||
return
|
||||
@@ -1203,6 +1203,8 @@ About the new airlock wires panel:
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
@@ -1329,4 +1331,4 @@ About the new airlock wires panel:
|
||||
src.locked = 0
|
||||
src.open()
|
||||
src.locked = 1
|
||||
return
|
||||
return
|
||||
@@ -98,7 +98,7 @@
|
||||
"\The [src]", "Yes, [density ? "open" : "close"]", "No")
|
||||
if(answer == "No")
|
||||
return
|
||||
if(user.stat || !user.canmove || user.stunned || user.weakened || user.paralysis || get_dist(src, user) > 1)
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || (!user.canmove && !isAI(user)) || (get_dist(src, user) > 1 && !isAI(user)))
|
||||
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
|
||||
return
|
||||
|
||||
|
||||
@@ -130,6 +130,8 @@
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
@@ -227,6 +229,8 @@
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
if(src.req_access.len)
|
||||
ae.conf_access = src.req_access
|
||||
else if (src.req_one_access.len)
|
||||
@@ -342,5 +346,4 @@
|
||||
/obj/machinery/door/window/brigdoor/southright
|
||||
dir = SOUTH
|
||||
icon_state = "rightsecure"
|
||||
base_state = "rightsecure"
|
||||
|
||||
base_state = "rightsecure"
|
||||
|
||||
@@ -448,7 +448,7 @@ obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm,
|
||||
obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
//Called when mob user "attacks" it with object O
|
||||
if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
|
||||
if (istype(O, /obj/item/weapon/reagent_containers/glass))
|
||||
var/b_amount = O.reagents.get_reagent_amount("water")
|
||||
if(b_amount > 0 && waterlevel < 100)
|
||||
if(b_amount + waterlevel > 100)
|
||||
@@ -456,17 +456,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
O.reagents.remove_reagent("water", b_amount)
|
||||
waterlevel += b_amount
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
user << "You fill the [src] with [b_amount] units of water."
|
||||
user << "You fill \the [src] with [b_amount] units of water."
|
||||
|
||||
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
|
||||
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
|
||||
toxic -= round(b_amount/4)
|
||||
if (toxic < 0 ) // Make sure it won't go overoboard
|
||||
if (toxic < 0 ) // Make sure it won't go overboard
|
||||
toxic = 0
|
||||
|
||||
else if(waterlevel >= 100)
|
||||
user << "\red The [src] is already full."
|
||||
user << "\red \The [src] is already full."
|
||||
else
|
||||
user << "\red The bucket is not filled with water."
|
||||
user << "\red \The [O] is not filled with water."
|
||||
updateicon()
|
||||
|
||||
else if ( istype(O, /obj/item/nutrient) )
|
||||
@@ -484,7 +484,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (planted)
|
||||
if (S.mode == 1)
|
||||
if(!S.reagents.total_volume)
|
||||
user << "\red The syringe is empty."
|
||||
user << "\red \The [O] is empty."
|
||||
return
|
||||
user << "\red You inject the [myseed.plantname] with a chemical solution."
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
break
|
||||
|
||||
if(!input_plate)
|
||||
diary << "a [src] didn't find an input plate."
|
||||
log_misc("a [src] didn't find an input plate.")
|
||||
return
|
||||
|
||||
Bumped(var/atom/A)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/machinery/processor
|
||||
name = "Food Processor"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
@@ -27,23 +26,23 @@
|
||||
/* objs */
|
||||
meat
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
|
||||
meat2
|
||||
input = /obj/item/weapon/syntiflesh
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
/*
|
||||
monkeymeat
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
|
||||
humanmeat
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/meat/human
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
*/
|
||||
potato
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/grown/potato
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/fries
|
||||
output = /obj/item/weapon/reagent_containers/food/snacks/rawsticks
|
||||
|
||||
carrot
|
||||
input = /obj/item/weapon/reagent_containers/food/snacks/grown/carrot
|
||||
@@ -159,4 +158,3 @@
|
||||
src.visible_message("\blue \the [src] finished processing.", \
|
||||
"You hear the food processor stopping/")
|
||||
|
||||
|
||||
|
||||
@@ -130,12 +130,25 @@
|
||||
if(!isbroken)
|
||||
icon_state = icon_off
|
||||
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
panel_open = !panel_open
|
||||
user << "You [panel_open ? "open" : "close"] the maintenance panel."
|
||||
overlays.Cut()
|
||||
if(panel_open)
|
||||
overlays += image(icon, icon_panel)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters))
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
if(!src.ispowered)
|
||||
user << "<span class='notice'>\The [src] is unpowered and useless.</span>"
|
||||
return
|
||||
@@ -154,6 +167,8 @@
|
||||
user.visible_message("<span class='notice'>[user] has added \the [O] to \the [src].", \
|
||||
"<span class='notice'>You add \the [O] to \the [src].")
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else if(istype(O, /obj/item/weapon/storage/bag/plants))
|
||||
var/obj/item/weapon/storage/bag/plants/P = O
|
||||
var/plants_loaded = 0
|
||||
@@ -171,147 +186,155 @@
|
||||
plants_loaded++
|
||||
if(plants_loaded)
|
||||
|
||||
user.visible_message("<span class='notice'>[user] loads \the [src] with \the [P].</span>", \
|
||||
"<span class='notice'>You load \the [src] with \the [P].</span>")
|
||||
user.visible_message( \
|
||||
"<span class='notice'>[user] loads \the [src] with \the [P].</span>", \
|
||||
"<span class='notice'>You load \the [src] with \the [P].</span>")
|
||||
if(P.contents.len > 0)
|
||||
user << "<span class='notice'>Some items are refused.</span>"
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
else
|
||||
user << "<span class='notice'>\The [src] smartly refuses [O].</span>"
|
||||
return 1
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/smartfridge/secure/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (istype(O, /obj/item/weapon/card/emag))
|
||||
src.emagged = 1
|
||||
user << "You short out the product lock on [src]"
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/screwdriver))
|
||||
src.panel_open = !src.panel_open
|
||||
user << "You [src.panel_open ? "open" : "close"] the maintenance panel."
|
||||
src.overlays.Cut()
|
||||
if(src.panel_open)
|
||||
src.overlays += image(src.icon, src.icon_panel)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if(istype(O, /obj/item/device/multitool)||istype(O, /obj/item/weapon/wirecutters))
|
||||
if(src.panel_open)
|
||||
attack_hand(user)
|
||||
emagged = 1
|
||||
locked = -1
|
||||
user << "You short out the product lock on [src]."
|
||||
return
|
||||
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/smartfridge/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
if(src.seconds_electrified != 0)
|
||||
if(src.shock(user, 100))
|
||||
if(!ispowered) return
|
||||
if(seconds_electrified != 0)
|
||||
if(shock(user, 100))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/*******************
|
||||
* SmartFridge Menu
|
||||
********************/
|
||||
|
||||
/obj/machinery/smartfridge/interact(mob/user as mob)
|
||||
if(!src.ispowered)
|
||||
return
|
||||
/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "<TT><b>Select an item:</b><br>"
|
||||
var/is_secure = istype(src,/obj/machinery/smartfridge/secure)
|
||||
|
||||
if (contents.len == 0)
|
||||
dat += "<font color = 'red'>No product loaded!</font>"
|
||||
var/data[0]
|
||||
data["contents"] = null
|
||||
data["wires"] = null
|
||||
data["panel_open"] = panel_open
|
||||
data["electrified"] = seconds_electrified > 0
|
||||
data["shoot_inventory"] = shoot_inventory
|
||||
data["locked"] = locked
|
||||
data["secure"] = is_secure
|
||||
|
||||
var/list/items[0]
|
||||
for (var/i=1 to length(item_quants))
|
||||
var/K = item_quants[i]
|
||||
var/count = item_quants[K]
|
||||
if (count > 0)
|
||||
items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count)))
|
||||
|
||||
if (items.len > 0)
|
||||
data["contents"] = items
|
||||
|
||||
var/list/vendwires = null
|
||||
if (is_secure)
|
||||
vendwires = list(
|
||||
"Violet" = 1,
|
||||
"Orange" = 2,
|
||||
"Green" = 3)
|
||||
else
|
||||
for (var/O in item_quants)
|
||||
if(item_quants[O] > 0)
|
||||
var/N = item_quants[O]
|
||||
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
|
||||
dat += " [N] </font>"
|
||||
dat += "<a href='byond://?src=\ref[src];vend=[O];amount=1'>Vend</A> "
|
||||
if(N > 5)
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=5'>x5</A>)"
|
||||
if(N > 10)
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=10'>x10</A>)"
|
||||
if(N > 25)
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=25'>x25</A>)"
|
||||
if(N > 1)
|
||||
dat += "(<a href='?src=\ref[src];vend=[O];amount=[N]'>All</A>)"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "</TT>"
|
||||
if(panel_open)
|
||||
//One of the wires does absolutely nothing.
|
||||
var/list/vendwires = list(
|
||||
vendwires = list(
|
||||
"Blue" = 1,
|
||||
"Red" = 2,
|
||||
"Black" = 3
|
||||
)
|
||||
dat += "<br><hr><br><B>Access Panel</B><br>"
|
||||
for(var/wiredesc in vendwires)
|
||||
var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
|
||||
dat += "[wiredesc] wire: "
|
||||
if(!is_uncut)
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Mend</a>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Cut</a> "
|
||||
dat += "<a href='?src=\ref[src];pulsewire=[vendwires[wiredesc]]'>Pulse</a> "
|
||||
dat += "<br>"
|
||||
"Black" = 3)
|
||||
|
||||
dat += "<br>"
|
||||
dat += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"].<BR>"
|
||||
dat += "The red light is [src.shoot_inventory ? "off" : "blinking"].<BR>"
|
||||
user << browse("<HEAD><TITLE>[src] Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
|
||||
return
|
||||
var/list/vendor_wires[0]
|
||||
for (var/wire in vendwires)
|
||||
var is_uncut = wires & APCWireColorToFlag[vendwires[wire]]
|
||||
vendor_wires.Add(list(list("wire" = wire, "cut" = !is_uncut, "index" = vendwires[wire])))
|
||||
|
||||
if (vendor_wires.len > 0)
|
||||
data["wires"] = vendor_wires
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/smartfridge/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
if (..()) return 0
|
||||
|
||||
if ((href_list["cutwire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["cutwire"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
usr << "You need wirecutters!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
src.mend(twire)
|
||||
else
|
||||
src.cut(twire)
|
||||
else if ((href_list["pulsewire"]) && (src.panel_open))
|
||||
var/twire = text2num(href_list["pulsewire"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return
|
||||
if (src.isWireColorCut(twire))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return
|
||||
else
|
||||
src.pulse(twire)
|
||||
else if (href_list["vend"])
|
||||
var/N = href_list["vend"]
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (href_list["close"])
|
||||
user.unset_machine()
|
||||
ui.close()
|
||||
return 0
|
||||
|
||||
if (href_list["vend"])
|
||||
var/index = text2num(href_list["vend"])
|
||||
var/amount = text2num(href_list["amount"])
|
||||
var/K = item_quants[index]
|
||||
var/count = item_quants[K]
|
||||
|
||||
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
return
|
||||
// Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
if(count > 0)
|
||||
item_quants[K] = max(count - amount, 0)
|
||||
|
||||
item_quants[N] = max(item_quants[N] - amount, 0)
|
||||
var/i = amount
|
||||
for(var/obj/O in contents)
|
||||
if (O.name == K)
|
||||
O.loc = loc
|
||||
i--
|
||||
if (i <= 0)
|
||||
return 1
|
||||
|
||||
var/i = amount
|
||||
for(var/obj/O in contents)
|
||||
if(O.name == N)
|
||||
O.loc = src.loc
|
||||
i--
|
||||
if(i <= 0)
|
||||
break
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
return 1
|
||||
|
||||
if (panel_open)
|
||||
if (href_list["cutwire"])
|
||||
if (!( istype(usr.get_active_hand(), /obj/item/weapon/wirecutters) ))
|
||||
user << "You need wirecutters!"
|
||||
return 1
|
||||
|
||||
var/wire_index = text2num(href_list["cutwire"])
|
||||
if (isWireColorCut(wire_index))
|
||||
mend(wire_index)
|
||||
else
|
||||
cut(wire_index)
|
||||
return 1
|
||||
|
||||
if (href_list["pulsewire"])
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return 1
|
||||
|
||||
var/wire_index = text2num(href_list["pulsewire"])
|
||||
if (isWireColorCut(wire_index))
|
||||
usr << "You can't pulse a cut wire."
|
||||
return 1
|
||||
|
||||
pulse(wire_index)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/*************
|
||||
* Hacking
|
||||
@@ -332,7 +355,7 @@
|
||||
|
||||
/obj/machinery/smartfridge/proc/mend(var/wireColor)
|
||||
var/wireFlag = APCWireColorToFlag[wireColor]
|
||||
var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function
|
||||
var/wireIndex = APCWireColorToIndex[wireColor]
|
||||
src.wires |= wireFlag
|
||||
switch(wireIndex)
|
||||
if(WIRE_SHOCK)
|
||||
@@ -347,7 +370,7 @@
|
||||
switch(wireIndex)
|
||||
if(WIRE_SHOCK)
|
||||
src.seconds_electrified = 30
|
||||
if (WIRE_SHOOTINV)
|
||||
if(WIRE_SHOOTINV)
|
||||
src.shoot_inventory = !src.shoot_inventory
|
||||
if(WIRE_SCANID)
|
||||
src.locked = -1
|
||||
@@ -385,80 +408,23 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/smartfridge/proc/shock(mob/user, prb)
|
||||
if(!src.ispowered) // unpowered, no shock
|
||||
return 0
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
if(!ispowered) return 0
|
||||
if(!prob(prb)) return 0
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if (electrocute_mob(user, get_area(src), src, 0.7))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
return electrocute_mob(user, get_area(src), src, 0.7)
|
||||
|
||||
/************************
|
||||
* Secure SmartFridges
|
||||
*************************/
|
||||
|
||||
/obj/machinery/smartfridge/secure/Topic(href, href_list)
|
||||
usr.set_machine(src)
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
if ((!src.allowed(usr)) && (!src.emagged) && (src.locked != -1) && href_list["vend"]) //For SECURE VENDING MACHINES YEAH
|
||||
usr << "\red Access denied." //Unless emagged of course
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/smartfridge/secure/interact(mob/user as mob)
|
||||
|
||||
if(!src.ispowered)
|
||||
return
|
||||
|
||||
var/dat = "<TT><b>Select an item:</b><br>"
|
||||
|
||||
if (contents.len == 0)
|
||||
dat += "<font color = 'red'>No product loaded!</font>"
|
||||
else
|
||||
for (var/O in item_quants)
|
||||
if(item_quants[O] > 0)
|
||||
var/N = item_quants[O]
|
||||
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
|
||||
dat += " [N] </font>"
|
||||
dat += "<a href='byond://?src=\ref[src];vend=[O];amount=1'>Vend</A> "
|
||||
if(N > 5)
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=5'>x5</A>)"
|
||||
if(N > 10)
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=10'>x10</A>)"
|
||||
if(N > 25)
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=25'>x25</A>)"
|
||||
if(N > 1)
|
||||
dat += "(<a href='?src=\ref[src];vend=[O];amount=[N]'>All</A>)"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "</TT>"
|
||||
if(panel_open)
|
||||
var/list/vendwires = list(
|
||||
"Violet" = 1,
|
||||
"Orange" = 2,
|
||||
"Green" = 3
|
||||
)
|
||||
dat += "<br><hr><br><B>Access Panel</B><br>"
|
||||
for(var/wiredesc in vendwires)
|
||||
var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
|
||||
dat += "[wiredesc] wire: "
|
||||
if(!is_uncut)
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Mend</a>"
|
||||
else
|
||||
dat += "<a href='?src=\ref[src];cutwire=[vendwires[wiredesc]]'>Cut</a> "
|
||||
dat += "<a href='?src=\ref[src];pulsewire=[vendwires[wiredesc]]'>Pulse</a> "
|
||||
dat += "<br>"
|
||||
|
||||
dat += "<br>"
|
||||
dat += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"].<BR>"
|
||||
//dat += "The red light is [src.shoot_inventory ? "off" : "blinking"].<BR>"
|
||||
dat += "The green light is [src.locked == 1 ? "off" : "[src.locked == -1 ? "blinking" : "on"]"].<BR>"
|
||||
user << browse("<HEAD><TITLE>[src] Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
|
||||
return
|
||||
|
||||
//TODO: Make smartfridges hackable. - JoeyJo0
|
||||
if(!ispowered) return 0
|
||||
if (usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
|
||||
if (!allowed(usr) && !emagged && locked != -1 && href_list["vend"])
|
||||
usr << "\red Access denied."
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -193,7 +193,7 @@ Class Procs:
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
var/area/A = get_area(src)
|
||||
A.powerupdate = 1
|
||||
A.master.powerupdate = 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -236,7 +236,7 @@ Class Procs:
|
||||
src.add_fingerprint(user)
|
||||
|
||||
var/area/A = get_area(src)
|
||||
A.powerupdate = 1
|
||||
A.master.powerupdate = 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -248,3 +248,13 @@ Class Procs:
|
||||
uid = gl_uid
|
||||
gl_uid++
|
||||
|
||||
/obj/machinery/proc/state(var/msg)
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\icon[src] <span class = 'notice'>[msg]</span>", 2)
|
||||
|
||||
/obj/machinery/proc/ping(text=null)
|
||||
if (!text)
|
||||
text = "\The [src] pings."
|
||||
|
||||
state(text, "blue")
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
@@ -350,6 +350,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
freq_text = "Special Ops"
|
||||
if(1345)
|
||||
freq_text = "Response Team"
|
||||
if(1447)
|
||||
freq_text = "AI Private"
|
||||
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
|
||||
|
||||
|
||||
@@ -378,6 +380,10 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
else if (display_freq == COMM_FREQ)
|
||||
part_a = "<span class='comradio'><span class='name'>"
|
||||
|
||||
// AI private channel
|
||||
else if (display_freq == 1447)
|
||||
part_a = "<span class='airadio'><span class='name'>"
|
||||
|
||||
// department radio formatting (poorly optimized, ugh)
|
||||
else if (display_freq == SEC_FREQ)
|
||||
part_a = "<span class='secradio'><span class='name'>"
|
||||
|
||||
@@ -766,7 +766,7 @@
|
||||
product_ads = "We like plants!;Don't you want some?;The greenest thumbs ever.;We like big plants.;Soft soil..."
|
||||
icon_state = "nutri"
|
||||
icon_deny = "nutri-deny"
|
||||
products = list(/obj/item/beezeez = 45,/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
|
||||
products = list(/obj/item/nutrient/ez = 35,/obj/item/nutrient/l4z = 25,/obj/item/nutrient/rh = 15,/obj/item/weapon/pestspray = 20,
|
||||
/obj/item/weapon/reagent_containers/syringe = 5,/obj/item/weapon/storage/bag/plants = 5)
|
||||
premium = list(/obj/item/weapon/reagent_containers/glass/bottle/ammonia = 10,/obj/item/weapon/reagent_containers/glass/bottle/diethylamine = 5)
|
||||
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
|
||||
/datum/poster/bay_19
|
||||
icon_state="bsposter19"
|
||||
name = "Respect a Soghun"
|
||||
desc = "This poster depicts a well dressed looking Soghun receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
|
||||
name = "Respect a Unathi"
|
||||
desc = "This poster depicts a well dressed looking Unathi receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
|
||||
|
||||
/datum/poster/bay_20
|
||||
icon_state="bsposter20"
|
||||
@@ -142,4 +142,4 @@
|
||||
/datum/poster/bay_29
|
||||
icon_state="bsposter29"
|
||||
name = "Winter Is Coming"
|
||||
desc = "On the poster is a frighteningly large wolf, he warns: \"Only YOU can keep the station from freezing during planetary occultation!\""
|
||||
desc = "On the poster is a frighteningly large wolf, he warns: \"Only YOU can keep the station from freezing during planetary occultation!\""
|
||||
|
||||
@@ -26,9 +26,37 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
epicenter = get_turf(epicenter)
|
||||
if(!epicenter) return
|
||||
|
||||
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
//playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
|
||||
//playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
|
||||
|
||||
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
|
||||
playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
|
||||
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
|
||||
|
||||
// Stereo users will also hear the direction of the explosion!
|
||||
|
||||
// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
|
||||
|
||||
// 3/7/14 will calculate to 80 + 35
|
||||
var/far_dist = 0
|
||||
far_dist += heavy_impact_range * 5
|
||||
far_dist += devastation_range * 20
|
||||
var/frequency = get_rand_frequency()
|
||||
for(var/mob/M in player_list)
|
||||
// Double check for client
|
||||
if(M && M.client)
|
||||
var/turf/M_turf = get_turf(M)
|
||||
if(M_turf && M_turf.z == epicenter.z)
|
||||
var/dist = get_dist(M_turf, epicenter)
|
||||
// If inside the blast radius + world.view - 2
|
||||
if(dist <= round(max_range + world.view - 2, 1))
|
||||
M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
|
||||
|
||||
//You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
|
||||
|
||||
else if(dist <= far_dist)
|
||||
var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
|
||||
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
|
||||
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
|
||||
|
||||
var/close = range(world.view+round(devastation_range,1), epicenter)
|
||||
// to all distanced mobs play a different sound
|
||||
@@ -55,7 +83,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
var/y0 = epicenter.y
|
||||
var/z0 = epicenter.z
|
||||
|
||||
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
|
||||
for(var/turf/T in range(epicenter, max_range))
|
||||
var/dist = cheap_pythag(T.x - x0,T.y - y0)
|
||||
|
||||
if(dist < devastation_range) dist = 1
|
||||
|
||||
@@ -133,6 +133,9 @@ move an amendment</a> to the drawing.</p>
|
||||
move_turfs_to_area(turfs, A)
|
||||
|
||||
A.always_unpowered = 0
|
||||
for(var/turf/T in A.contents)
|
||||
T.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += T
|
||||
|
||||
spawn(5)
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
|
||||
@@ -10,7 +10,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
icon = 'icons/obj/pda.dmi'
|
||||
icon_state = "pda"
|
||||
item_state = "electronic"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_ID | SLOT_BELT
|
||||
|
||||
@@ -330,14 +330,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
ui_tick++
|
||||
var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main")
|
||||
var/auto_update = 1
|
||||
if(mode in no_auto_update)
|
||||
auto_update = 0
|
||||
if(mode == lastmode && ui_tick % 5 && mode in update_every_five)
|
||||
if(old_ui && (mode == lastmode && ui_tick % 5 && mode in update_every_five))
|
||||
return
|
||||
|
||||
lastmode = mode
|
||||
|
||||
|
||||
var/title = "Personal Data Assistant"
|
||||
|
||||
var/data[0] // This is the data that will be sent to the PDA
|
||||
@@ -366,7 +367,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if(mode in cartmodes)
|
||||
data["records"] = cartridge.create_NanoUI_values()
|
||||
|
||||
if(mode == 0)
|
||||
if(mode == 0)
|
||||
cartdata["name"] = cartridge.name
|
||||
cartdata["access"] = list(\
|
||||
"access_security" = cartridge.access_security,\
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "flash"
|
||||
item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang)
|
||||
throwforce = 5
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
item_state = ""
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
brightness_on = 2
|
||||
w_class = 1
|
||||
|
||||
|
||||
// the desk lamps are a bit special
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A device used to project your voice. Loudly."
|
||||
icon_state = "megaphone"
|
||||
item_state = "radio"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
|
||||
var/spamcheck = 0
|
||||
|
||||
@@ -742,20 +742,25 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
src.channels = list()
|
||||
src.syndie = 0
|
||||
|
||||
var/mob/living/silicon/robot/D = src.loc
|
||||
if(D.module)
|
||||
for(var/ch_name in D.module.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] += D.module.channels[ch_name]
|
||||
if(keyslot)
|
||||
for(var/ch_name in keyslot.channels)
|
||||
if(ch_name in src.channels)
|
||||
continue
|
||||
src.channels += ch_name
|
||||
src.channels[ch_name] = keyslot.channels[ch_name]
|
||||
|
||||
src.channels[ch_name] += keyslot.channels[ch_name]
|
||||
|
||||
if(keyslot.syndie)
|
||||
src.syndie = 1
|
||||
var/mob/living/silicon/robot/Ro = usr
|
||||
if(Ro.module)
|
||||
src.config(Ro.module.channels)
|
||||
|
||||
|
||||
for (var/ch_name in channels)
|
||||
for (var/ch_name in src.channels)
|
||||
if(!radio_controller)
|
||||
sleep(30) // Waiting for the radio_controller to be created.
|
||||
if(!radio_controller)
|
||||
|
||||
@@ -68,7 +68,7 @@ REAGENT SCANNER
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
m_amt = 200
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "universal recorder"
|
||||
icon_state = "taperecorderidle"
|
||||
item_state = "analyzer"
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
m_amt = 60
|
||||
g_amt = 30
|
||||
var/emagged = 0.0
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "lgloves"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 1
|
||||
throw_range = 15
|
||||
var/state
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
amount = 5
|
||||
max_amount = 5
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
var/heal_brute = 0
|
||||
|
||||
@@ -131,7 +131,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/wood
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//Added by Jack Rost
|
||||
/obj/item/trash
|
||||
icon = 'icons/obj/trash.dmi'
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
desc = "This is rubbish."
|
||||
raisins
|
||||
name = "4no raisins"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
|
||||
for(var/mob/living/carbon/human/M in viewers(T, null))
|
||||
if(M:eyecheck() <= 0)
|
||||
flick("e_flash", M.flash) // flash dose faggots
|
||||
flick("e_flash", M.flash)
|
||||
|
||||
for(var/i=1, i<=deliveryamt, i++)
|
||||
var/atom/movable/x = new spawner_type
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
throwforce = 5.0
|
||||
throw_speed = 1
|
||||
throw_range = 4
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
origin_tech = "materials=4;magnets=3;syndicate=4"
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/active = 0
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
storage_slots = 50; //the number of plant pieces it can carry.
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
|
||||
max_w_class = 3
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown")
|
||||
|
||||
|
||||
@@ -252,5 +252,5 @@
|
||||
storage_slots = 50; //the number of cash pieces it can carry.
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
|
||||
max_w_class = 3
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash")
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "briefcase"
|
||||
desc = "It's made of AUTHENTIC faux-leather and has a price-tag still attached. Its owner must be a real professional."
|
||||
icon_state = "briefcase"
|
||||
item_state = "briefcase"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
force = 8.0
|
||||
throw_speed = 1
|
||||
|
||||
@@ -117,3 +117,20 @@
|
||||
new /obj/item/clothing/suit/space/syndicate(src)
|
||||
new /obj/item/clothing/head/helmet/space/syndicate(src)
|
||||
return
|
||||
/obj/item/weapon/storage/box/syndie_kit/chameleon
|
||||
name = "Chameleon Kit"
|
||||
desc = "Comes with all the clothes you need to impersonate most people. Acting lessons sold seperately."
|
||||
storage_slots = 10
|
||||
|
||||
/obj/item/weapon/storage/box/syndie_kit/chameleon/New()
|
||||
..()
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/head/chameleon(src)
|
||||
new /obj/item/clothing/suit/chameleon(src)
|
||||
new /obj/item/clothing/shoes/chameleon(src)
|
||||
new /obj/item/weapon/storage/backpack/chameleon(src)
|
||||
new /obj/item/clothing/gloves/chameleon(src)
|
||||
new /obj/item/clothing/mask/chameleon(src)
|
||||
new /obj/item/clothing/glasses/chameleon(src)
|
||||
new /obj/item/weapon/gun/projectile/chameleon(src)
|
||||
new /obj/item/ammo_magazine/chameleon(src)
|
||||
@@ -113,7 +113,7 @@
|
||||
//Telescopic baton
|
||||
/obj/item/weapon/melee/telebaton
|
||||
name = "telescopic baton"
|
||||
desc = "A compact yet robust personal defense weapon. Can be concealed when folded."
|
||||
desc = "A compact yet rebalanced personal defense weapon. Can be concealed when folded."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "telebaton_0"
|
||||
item_state = "telebaton_0"
|
||||
@@ -178,7 +178,6 @@
|
||||
return
|
||||
if(..())
|
||||
playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
target.Weaken(4)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
attack_verb = list("banned")
|
||||
@@ -26,7 +26,7 @@
|
||||
throw_speed = 1
|
||||
throw_range = 4
|
||||
throwforce = 10
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
|
||||
@@ -14,7 +14,7 @@ LINEN BINS
|
||||
throwforce = 1
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
item_color = "white"
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +87,9 @@
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
new /obj/item/weapon/weldingtool/largetank(src)
|
||||
new /obj/item/weapon/weldpack(src)
|
||||
new /obj/item/weapon/weldpack(src)
|
||||
new /obj/item/weapon/weldpack(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
new /obj/item/clothing/head/greenbandana(src)
|
||||
new /obj/item/weapon/minihoe(src)
|
||||
new /obj/item/weapon/hatchet(src)
|
||||
new /obj/item/weapon/bee_net(src)
|
||||
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
|
||||
return
|
||||
@@ -28,6 +28,13 @@
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
return
|
||||
if (hasorgans(user))
|
||||
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
||||
if (user.hand)
|
||||
temp = user:organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
|
||||
return
|
||||
if(has_extinguisher)
|
||||
user.put_in_hands(has_extinguisher)
|
||||
user << "<span class='notice'>You take [has_extinguisher] from [src].</span>"
|
||||
@@ -62,4 +69,4 @@
|
||||
else
|
||||
icon_state = "extinguisher_full"
|
||||
else
|
||||
icon_state = "extinguisher_empty"
|
||||
icon_state = "extinguisher_empty"
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
/obj/item/inflatable
|
||||
name = "inflatable wall"
|
||||
desc = "A folded membrane which rapidly expands into a large cubical shape on activation."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_wall"
|
||||
w_class = 3.0
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "\blue You inflate [src]."
|
||||
var/obj/structure/inflatable/R = new /obj/structure/inflatable(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
/obj/structure/inflatable
|
||||
name = "inflatable wall"
|
||||
desc = "An inflated membrane. Do not puncture."
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "wall"
|
||||
|
||||
var/health = 50.0
|
||||
|
||||
|
||||
New(location)
|
||||
..()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
Del()
|
||||
update_nearby_tiles()
|
||||
..()
|
||||
|
||||
proc/update_nearby_tiles(need_rebuild) //Copypasta from airlock code
|
||||
if(!air_master)
|
||||
return 0
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
return 0
|
||||
|
||||
bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
deflate(1)
|
||||
return
|
||||
if(3.0)
|
||||
if(prob(50))
|
||||
deflate(1)
|
||||
return
|
||||
|
||||
|
||||
blob_act()
|
||||
deflate(1)
|
||||
|
||||
|
||||
meteorhit()
|
||||
//world << "glass at [x],[y],[z] Mhit"
|
||||
deflate(1)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return attack_generic(user, 15)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] tears open [src]!</span>")
|
||||
deflate(1)
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] tears at [src]!</span>")
|
||||
|
||||
attack_alien(mob/user as mob)
|
||||
if(islarva(user)) return
|
||||
attack_generic(user, 15)
|
||||
|
||||
attack_animal(mob/user as mob)
|
||||
if(!isanimal(user)) return
|
||||
var/mob/living/simple_animal/M = user
|
||||
if(M.melee_damage_upper <= 0) return
|
||||
attack_generic(M, M.melee_damage_upper)
|
||||
|
||||
|
||||
attack_slime(mob/user as mob)
|
||||
if(!isslimeadult(user)) return
|
||||
attack_generic(user, rand(10, 15))
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!istype(W)) return
|
||||
|
||||
if (is_sharp(W))
|
||||
visible_message("\red <b>[user] pierces [src] with [W]!</b>")
|
||||
deflate(1)
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
hit(W.force)
|
||||
..()
|
||||
return
|
||||
|
||||
proc/hit(var/damage, var/sound_effect = 1)
|
||||
health = max(0, health - damage)
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(health <= 0)
|
||||
deflate(1)
|
||||
|
||||
|
||||
proc/deflate(var/violent=0)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
|
||||
if(violent)
|
||||
visible_message("[src] rapidly deflates!")
|
||||
var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
else
|
||||
//user << "\blue You slowly deflate the inflatable wall."
|
||||
visible_message("[src] slowly deflates.")
|
||||
spawn(50)
|
||||
var/obj/item/inflatable/R = new /obj/item/inflatable(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
|
||||
verb/hand_deflate()
|
||||
set name = "Deflate"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
deflate()
|
||||
|
||||
/obj/item/inflatable/door/
|
||||
name = "inflatable door"
|
||||
desc = "A folded membrane which rapidly expands into a simple door on activation."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_door"
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
user << "\blue You inflate [src]."
|
||||
var/obj/structure/inflatable/door/R = new /obj/structure/inflatable/door(user.loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
/obj/structure/inflatable/door //Based on mineral door code
|
||||
name = "inflatable door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "door_closed"
|
||||
|
||||
var/state = 0 //closed, 1 == open
|
||||
var/isSwitchingStates = 0
|
||||
|
||||
//Bumped(atom/user)
|
||||
// ..()
|
||||
// if(!state)
|
||||
// return TryToSwitchState(user)
|
||||
// return
|
||||
|
||||
attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
|
||||
if(isAI(user)) //so the AI can't open it
|
||||
return
|
||||
else if(isrobot(user)) //but cyborgs can
|
||||
if(get_dist(user,src) <= 1) //not remotely though
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group)
|
||||
return state
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
|
||||
if(M.client)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.handcuffed)
|
||||
SwitchState()
|
||||
else
|
||||
SwitchState()
|
||||
else if(istype(user, /obj/mecha))
|
||||
SwitchState()
|
||||
|
||||
proc/SwitchState()
|
||||
if(state)
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
update_nearby_tiles()
|
||||
|
||||
proc/Open()
|
||||
isSwitchingStates = 1
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("door_opening",src)
|
||||
sleep(10)
|
||||
density = 0
|
||||
opacity = 0
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
proc/Close()
|
||||
isSwitchingStates = 1
|
||||
//playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
|
||||
flick("door_closing",src)
|
||||
sleep(10)
|
||||
density = 1
|
||||
opacity = 0
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
|
||||
update_icon()
|
||||
if(state)
|
||||
icon_state = "door_open"
|
||||
else
|
||||
icon_state = "door_closed"
|
||||
|
||||
deflate(var/violent=0)
|
||||
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
|
||||
if(violent)
|
||||
visible_message("[src] rapidly deflates!")
|
||||
var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
else
|
||||
//user << "\blue You slowly deflate the inflatable wall."
|
||||
visible_message("[src] slowly deflates.")
|
||||
spawn(50)
|
||||
var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc)
|
||||
src.transfer_fingerprints_to(R)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/item/inflatable/torn
|
||||
name = "torn inflatable wall"
|
||||
desc = "A folded membrane which rapidly expands into a large cubical shape on activation. It is too torn to be usable."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_wall_torn"
|
||||
|
||||
attack_self(mob/user)
|
||||
user << "\blue The inflatable wall is too torn to be inflated!"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/inflatable/door/torn
|
||||
name = "torn inflatable door"
|
||||
desc = "A folded membrane which rapidly expands into a simple door on activation. It is too torn to be usable."
|
||||
icon = 'icons/obj/inflatable.dmi'
|
||||
icon_state = "folded_door_torn"
|
||||
|
||||
attack_self(mob/user)
|
||||
user << "\blue The inflatable door is too torn to be inflated!"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weapon/storage/briefcase/inflatable
|
||||
name = "inflatable barrier box"
|
||||
desc = "Contains inflatable walls and doors."
|
||||
icon_state = "inf_box"
|
||||
item_state = "syringe_kit"
|
||||
max_combined_w_class = 21
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/inflatable/door(src)
|
||||
new /obj/item/inflatable/door(src)
|
||||
new /obj/item/inflatable/door(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
new /obj/item/inflatable(src)
|
||||
@@ -204,7 +204,11 @@
|
||||
if("Cn9") soundfile = 'sound/piano/Cn9.ogg'
|
||||
else return
|
||||
|
||||
hearers(15, src) << sound(soundfile)
|
||||
//hearers(15, src) << sound(soundfile)
|
||||
var/turf/source = get_turf(src)
|
||||
for(var/mob/M in hearers(15, source))
|
||||
M.playsound_local(source, file(soundfile), 100, falloff = 5)
|
||||
|
||||
|
||||
/obj/structure/device/piano/proc/playsong()
|
||||
do
|
||||
|
||||
@@ -323,15 +323,23 @@
|
||||
anchored = 1
|
||||
var/busy = 0 //Something's being washed at the moment
|
||||
|
||||
/obj/structure/sink/attack_hand(mob/M as mob)
|
||||
if(isrobot(M) || isAI(M))
|
||||
/obj/structure/sink/attack_hand(mob/user as mob)
|
||||
if (hasorgans(user))
|
||||
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
|
||||
if (user.hand)
|
||||
temp = user:organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.display_name], but cannot!"
|
||||
return
|
||||
|
||||
if(isrobot(user) || isAI(user))
|
||||
return
|
||||
|
||||
if(!Adjacent(M))
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
M << "\red Someone's already washing here."
|
||||
user << "\red Someone's already washing here."
|
||||
return
|
||||
|
||||
usr << "\blue You start washing your hands."
|
||||
@@ -340,13 +348,14 @@
|
||||
sleep(40)
|
||||
busy = 0
|
||||
|
||||
if(!Adjacent(M)) return //Person has moved away from the sink
|
||||
if(!Adjacent(user)) return //Person has moved away from the sink
|
||||
|
||||
M.clean_blood()
|
||||
if(ishuman(M))
|
||||
M:update_inv_gloves()
|
||||
user.clean_blood()
|
||||
if(ishuman(user))
|
||||
user:update_inv_gloves()
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("\blue [M] washes their hands using \the [src].")
|
||||
V.show_message("\blue [user] washes their hands using \the [src].")
|
||||
|
||||
|
||||
/obj/structure/sink/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(busy)
|
||||
@@ -415,4 +424,4 @@
|
||||
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
|
||||
icon_state = "puddle-splash"
|
||||
..()
|
||||
icon_state = "puddle"
|
||||
icon_state = "puddle"
|
||||
|
||||
+67
-73
@@ -1,79 +1,41 @@
|
||||
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num)
|
||||
//Frequency stuff only works with 45kbps oggs.
|
||||
var/list/shatter_sound = list('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
|
||||
var/list/explosion_sound = list('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
|
||||
var/list/spark_sound = list('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
|
||||
var/list/rustle_sound = list('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
|
||||
var/list/punch_sound = list('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
|
||||
var/list/clown_sound = list('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
|
||||
var/list/swing_hit_sound = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
|
||||
var/list/hiss_sound = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
|
||||
var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
|
||||
//var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg')
|
||||
|
||||
switch(soundin)
|
||||
if ("shatter") soundin = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
|
||||
if ("explosion") soundin = pick('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
|
||||
if ("sparks") soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
|
||||
if ("rustle") soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
|
||||
if ("punch") soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
|
||||
if ("clownstep") soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
|
||||
if ("swing_hit") soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
|
||||
if ("hiss") soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
|
||||
if ("pageturn") soundin = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
|
||||
/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff)
|
||||
|
||||
var/sound/S = sound(soundin)
|
||||
S.wait = 0 //No queue
|
||||
S.channel = 0 //Any channel
|
||||
S.volume = vol
|
||||
soundin = get_sfx(soundin) // same sound for everyone
|
||||
|
||||
if (vary)
|
||||
S.frequency = rand(32000, 55000)
|
||||
if(isarea(source))
|
||||
error("[source] is an area and is trying to make the sound: [soundin]")
|
||||
return
|
||||
|
||||
for (var/A in range(world.view+extrarange, source)) // Plays for people in range.
|
||||
var/frequency = get_rand_frequency() // Same frequency for everybody
|
||||
var/turf/turf_source = get_turf(source)
|
||||
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
var/mob/M2 = locate(/mob/, M)
|
||||
if (M2 && M2.client)
|
||||
if(M2.ear_deaf <= 0 || !M.ear_deaf)
|
||||
if(isturf(source))
|
||||
var/dx = source.x - M2.x
|
||||
S.pan = max(-100, min(100, dx/8.0 * 100))
|
||||
// Looping through the player list has the added bonus of working for mobs inside containers
|
||||
for (var/P in player_list)
|
||||
var/mob/M = P
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
if(get_dist(M, turf_source) <= world.view + extrarange)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && T.z == turf_source.z)
|
||||
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff)
|
||||
|
||||
M2 << S
|
||||
var/const/FALLOFF_SOUNDS = 1
|
||||
var/const/SURROUND_CAP = 7
|
||||
|
||||
if (M.client)
|
||||
if(M.ear_deaf <= 0 || !M.ear_deaf)
|
||||
if(isturf(source))
|
||||
var/dx = source.x - M.x
|
||||
S.pan = max(-100, min(100, dx/8.0 * 100))
|
||||
|
||||
M << S
|
||||
|
||||
if(istype(A, /obj/structure/closet))
|
||||
var/obj/O = A
|
||||
for(var/mob/M in O)
|
||||
if (M.client)
|
||||
if(M.ear_deaf <= 0 || !M.ear_deaf)
|
||||
if(isturf(source))
|
||||
var/dx = source.x - M.x
|
||||
S.pan = max(-100, min(100, dx/8.0 * 100))
|
||||
|
||||
M << S
|
||||
|
||||
for(var/obj/mecha/mech in range(world.view+extrarange, source))
|
||||
var/mob/M = mech.occupant
|
||||
if (M && M.client)
|
||||
if(M.ear_deaf <= 0 || !M.ear_deaf)
|
||||
if(isturf(source))
|
||||
var/dx = source.x - M.x
|
||||
S.pan = max(-100, min(100, dx/8.0 * 100))
|
||||
|
||||
M << S
|
||||
// Now plays for people in lockers! -- Polymorph
|
||||
|
||||
/mob/proc/playsound_local(var/atom/source, soundin, vol as num, vary, extrarange as num)
|
||||
/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff)
|
||||
if(!src.client || ear_deaf > 0) return
|
||||
switch(soundin)
|
||||
if ("shatter") soundin = pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg')
|
||||
if ("explosion") soundin = pick('sound/effects/Explosion1.ogg','sound/effects/Explosion2.ogg')
|
||||
if ("sparks") soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
|
||||
if ("rustle") soundin = pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg')
|
||||
if ("punch") soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
|
||||
if ("clownstep") soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
|
||||
if ("swing_hit") soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
|
||||
if ("hiss") soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
|
||||
soundin = get_sfx(soundin)
|
||||
|
||||
var/sound/S = sound(soundin)
|
||||
S.wait = 0 //No queue
|
||||
@@ -81,14 +43,46 @@
|
||||
S.volume = vol
|
||||
|
||||
if (vary)
|
||||
S.frequency = rand(32000, 55000)
|
||||
if(isturf(source))
|
||||
var/dx = source.x - src.x
|
||||
S.pan = max(-100, min(100, dx/8.0 * 100))
|
||||
if(frequency)
|
||||
S.frequency = frequency
|
||||
else
|
||||
S.frequency = get_rand_frequency()
|
||||
|
||||
if(isturf(turf_source))
|
||||
// 3D sounds, the technology is here!
|
||||
var/turf/T = get_turf(src)
|
||||
var/dx = turf_source.x - T.x // Hearing from the right/left
|
||||
|
||||
S.x = round(max(-SURROUND_CAP, min(SURROUND_CAP, dx)), 1)
|
||||
|
||||
var/dz = turf_source.y - T.y // Hearing from infront/behind
|
||||
S.z = round(max(-SURROUND_CAP, min(SURROUND_CAP, dz)), 1)
|
||||
|
||||
// The y value is for above your head, but there is no ceiling in 2d spessmens.
|
||||
S.y = 1
|
||||
S.falloff = (falloff ? falloff : FALLOFF_SOUNDS)
|
||||
|
||||
src << S
|
||||
|
||||
/client/proc/playtitlemusic()
|
||||
if(!ticker || !ticker.login_music) return
|
||||
if(prefs.toggles & SOUND_LOBBY)
|
||||
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
|
||||
src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS
|
||||
|
||||
/proc/get_rand_frequency()
|
||||
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
|
||||
|
||||
/proc/get_sfx(soundin)
|
||||
if(istext(soundin))
|
||||
switch(soundin)
|
||||
if ("shatter") soundin = pick(shatter_sound)
|
||||
if ("explosion") soundin = pick(explosion_sound)
|
||||
if ("sparks") soundin = pick(spark_sound)
|
||||
if ("rustle") soundin = pick(rustle_sound)
|
||||
if ("punch") soundin = pick(punch_sound)
|
||||
if ("clownstep") soundin = pick(clown_sound)
|
||||
if ("swing_hit") soundin = pick(swing_hit_sound)
|
||||
if ("hiss") soundin = pick(hiss_sound)
|
||||
if ("pageturn") soundin = pick(page_sound)
|
||||
//if ("gunshot") soundin = pick(gun_sound)
|
||||
return soundin
|
||||
@@ -1,8 +1,8 @@
|
||||
//Config stuff
|
||||
#define SUPPLY_DOCKZ 2 //Z-level of the Dock.
|
||||
#define SUPPLY_STATIONZ 1 //Z-level of the Station.
|
||||
#define SUPPLY_STATION_AREATYPE /area/supply/station //Type of the supply shuttle area for station
|
||||
#define SUPPLY_DOCK_AREATYPE /area/supply/dock //Type of the supply shuttle area for dock
|
||||
#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station
|
||||
#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock
|
||||
|
||||
var/datum/controller/supply_shuttle/supply_shuttle = new()
|
||||
|
||||
|
||||
+10
-15
@@ -195,8 +195,6 @@
|
||||
if(L)
|
||||
del L
|
||||
|
||||
var/turf_light_data/old_lights = new
|
||||
|
||||
//Creates a new turf
|
||||
/turf/proc/ChangeTurf(var/turf/N)
|
||||
if (!N)
|
||||
@@ -216,12 +214,10 @@ var/turf_light_data/old_lights = new
|
||||
return W
|
||||
///// Z-Level Stuff
|
||||
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
|
||||
//world << "Replacing [src.type] with [N]"
|
||||
|
||||
var/old_opacity = opacity
|
||||
|
||||
old_lights.copy_from(src)
|
||||
|
||||
if(connections) connections.erase_all()
|
||||
|
||||
if(istype(src,/turf/simulated))
|
||||
@@ -242,12 +238,10 @@ var/turf_light_data/old_lights = new
|
||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||
//W.Assimilate_Air()
|
||||
|
||||
old_lights.copy_to(W)
|
||||
W.ResetAllLights()
|
||||
|
||||
if(old_opacity)
|
||||
W.opacity = 1
|
||||
W.SetOpacity(0)
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
if (istype(W,/turf/simulated/floor))
|
||||
W.RemoveLattice()
|
||||
@@ -265,9 +259,10 @@ var/turf_light_data/old_lights = new
|
||||
// zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
|
||||
old_lights.copy_to(W)
|
||||
W.ResetAllLights()
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
if(air_master)
|
||||
air_master.mark_for_update(src)
|
||||
|
||||
+2
-2
@@ -115,8 +115,8 @@ var/list/reg_dna = list( )
|
||||
|
||||
var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
|
||||
|
||||
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
|
||||
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: 0.02 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
|
||||
var/CHARGELEVEL = 0.0005 // Cap for how fast cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
|
||||
|
||||
var/shuttle_z = 2 //default
|
||||
var/airtunnel_start = 68 // default
|
||||
|
||||
@@ -34,8 +34,8 @@ world/IsBanned(key,address,computer_id)
|
||||
var/ckeytext = ckey(key)
|
||||
|
||||
if(!establish_db_connection())
|
||||
world.log << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
error("Ban database connection failure. Key [ckeytext] not checked")
|
||||
log_misc("Ban database connection failure. Key [ckeytext] not checked")
|
||||
return
|
||||
|
||||
var/failedcid = 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/proc/ToRban_update()
|
||||
spawn(0)
|
||||
diary << "Downloading updated ToR data..."
|
||||
log_misc("Downloading updated ToR data...")
|
||||
var/http[] = world.Export("http://exitlist.torproject.org/exit-addresses")
|
||||
|
||||
var/list/rawlist = file2list(http["CONTENT"])
|
||||
@@ -36,10 +36,10 @@
|
||||
if(!cleaned) continue
|
||||
F[cleaned] << 1
|
||||
F["last_update"] << world.realtime
|
||||
diary << "ToR data updated!"
|
||||
log_misc("ToR data updated!")
|
||||
if(usr) usr << "ToRban updated."
|
||||
return 1
|
||||
diary << "ToR data update aborted: no data."
|
||||
log_misc("ToR data update aborted: no data.")
|
||||
return 0
|
||||
|
||||
/client/proc/ToRban(task in list("update","toggle","show","remove","remove all","find"))
|
||||
@@ -85,4 +85,4 @@
|
||||
return
|
||||
|
||||
#undef TORFILE
|
||||
#undef TOR_UPDATE_INTERVAL
|
||||
#undef TOR_UPDATE_INTERVAL
|
||||
|
||||
@@ -103,8 +103,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
world.log << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
error("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
log_misc("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
@@ -123,8 +123,8 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(directory[ckey])
|
||||
if(!admin_datums)
|
||||
world.log << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||
diary << "The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system."
|
||||
error("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
|
||||
log_misc("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
|
||||
@@ -66,8 +66,8 @@ DEBUG
|
||||
log_admin("jobban_keylist was empty")
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
world.log << "Database connection failed. Reverting to the legacy ban system."
|
||||
diary << "Database connection failed. Reverting to the legacy ban system."
|
||||
error("Database connection failed. Reverting to the legacy ban system.")
|
||||
log_misc("Database connection failed. Reverting to the legacy ban system.")
|
||||
config.ban_legacy_system = 1
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
icon_state = "night"
|
||||
item_state = "glasses"
|
||||
origin_tech = "magnets=2"
|
||||
darkness_view = 3
|
||||
darkness_view = 7
|
||||
|
||||
/obj/item/clothing/glasses/eyepatch
|
||||
name = "eyepatch"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
desc = "A sterile mask designed to help prevent the spread of diseases."
|
||||
icon_state = "sterile"
|
||||
item_state = "sterile"
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
flags = FPRINT|TABLEPASS|MASKCOVERSMOUTH
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.01
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
//*****************
|
||||
//**Cham Jumpsuit**
|
||||
//*****************
|
||||
|
||||
/obj/item/clothing/under/chameleon
|
||||
//starts off as black
|
||||
name = "black jumpsuit"
|
||||
@@ -6,60 +10,35 @@
|
||||
item_color = "black"
|
||||
desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist."
|
||||
origin_tech = "syndicate=3"
|
||||
siemens_coefficient = 0.8
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
for(var/U in typesof(/obj/item/clothing/under/color)-(/obj/item/clothing/under/color))
|
||||
var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/cloud,
|
||||
/obj/item/clothing/under/golem, /obj/item/clothing/under/gimmick)//Prevent infinite loops and bad jumpsuits.
|
||||
for(var/U in typesof(/obj/item/clothing/under)-blocked)
|
||||
var/obj/item/clothing/under/V = new U
|
||||
src.clothing_choices += V
|
||||
|
||||
for(var/U in typesof(/obj/item/clothing/under/rank)-(/obj/item/clothing/under/rank))
|
||||
var/obj/item/clothing/under/V = new U
|
||||
src.clothing_choices += V
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
|
||||
attackby(obj/item/clothing/under/U as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(U, /obj/item/clothing/under/chameleon))
|
||||
user << "\red Nothing happens."
|
||||
return
|
||||
if(istype(U, /obj/item/clothing/under))
|
||||
if(src.clothing_choices.Find(U))
|
||||
user << "\red Pattern is already recognised by the suit."
|
||||
return
|
||||
src.clothing_choices += U
|
||||
user << "\red Pattern absorbed by the suit."
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
name = "psychedelic"
|
||||
desc = "Groovy!"
|
||||
icon_state = "psyche"
|
||||
item_color = "psyche"
|
||||
spawn(200)
|
||||
name = "Black Jumpsuit"
|
||||
icon_state = "bl_suit"
|
||||
item_color = "black"
|
||||
desc = null
|
||||
..()
|
||||
|
||||
update_icon()
|
||||
usr.update_inv_w_uniform()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Color"
|
||||
set name = "Change Jumpsuit Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(icon_state == "psyche")
|
||||
usr << "\red Your suit is malfunctioning"
|
||||
return
|
||||
|
||||
var/obj/item/clothing/under/A
|
||||
A = input("Select Colour to change it to", "BOOYEA", A) in clothing_choices
|
||||
if(!A)
|
||||
var/picked = input("Select jumpsuit to change it to", "Chameleon Jumpsuit")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
@@ -69,14 +48,415 @@
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
usr.update_inv_w_uniform() //so our overlays update.
|
||||
if(usr)
|
||||
usr.update_inv_w_uniform() //so our overlays update.
|
||||
|
||||
//*****************
|
||||
//**Chameleon Hat**
|
||||
//*****************
|
||||
|
||||
/obj/item/clothing/head/chameleon
|
||||
name = "grey cap"
|
||||
icon_state = "greysoft"
|
||||
item_state = "greysoft"
|
||||
item_color = "grey"
|
||||
desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
/obj/item/clothing/under/chameleon/all/New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/chameleon/all)
|
||||
//to prevent an infinite loop
|
||||
for(var/U in typesof(/obj/item/clothing/under)-blocked)
|
||||
var/obj/item/clothing/under/V = new U
|
||||
src.clothing_choices += V
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/head/chameleon,
|
||||
/obj/item/clothing/head/space/golem, /obj/item/clothing/head/justice,)//Prevent infinite loops and bad hats.
|
||||
for(var/U in typesof(/obj/item/clothing/head)-blocked)
|
||||
var/obj/item/clothing/head/V = new U
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "grey cap"
|
||||
desc = "It's a baseball hat in a tasteful grey colour."
|
||||
icon_state = "greysoft"
|
||||
item_color = "grey"
|
||||
update_icon()
|
||||
usr.update_inv_head()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Hat/Helmet Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select headwear to change it to", "Chameleon Hat")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
flags_inv = A.flags_inv
|
||||
if(usr)
|
||||
usr.update_inv_head() //so our overlays update.
|
||||
|
||||
//******************
|
||||
//**Chameleon Suit**
|
||||
//******************
|
||||
|
||||
/obj/item/clothing/suit/chameleon
|
||||
name = "armor"
|
||||
icon_state = "armor"
|
||||
item_state = "armor"
|
||||
desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/space/space_ninja,
|
||||
/obj/item/clothing/suit/golem, /obj/item/clothing/suit/suit, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
|
||||
/obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits.
|
||||
for(var/U in typesof(/obj/item/clothing/suit)-blocked)
|
||||
var/obj/item/clothing/suit/V = new U
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "armor"
|
||||
desc = "An armored vest that protects against some damage."
|
||||
icon_state = "armor"
|
||||
item_color = "armor"
|
||||
update_icon()
|
||||
usr.update_inv_wear_suit()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Exosuit Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select exosuit to change it to", "Chameleon Exosuit")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
flags_inv = A.flags_inv
|
||||
if(usr)
|
||||
usr.update_inv_wear_suit() //so our overlays update.
|
||||
|
||||
//*******************
|
||||
//**Chameleon Shoes**
|
||||
//*******************
|
||||
/obj/item/clothing/shoes/chameleon
|
||||
name = "black shoes"
|
||||
icon_state = "black"
|
||||
item_state = "black"
|
||||
item_color = "black"
|
||||
desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/shoes/chameleon,
|
||||
/obj/item/clothing/shoes/golem, /obj/item/clothing/shoes/syndigaloshes, /obj/item/clothing/shoes/cyborg)//prevent infinite loops and bad shoes.
|
||||
for(var/U in typesof(/obj/item/clothing/shoes)-blocked)
|
||||
var/obj/item/clothing/shoes/V = new U
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "black shoes"
|
||||
desc = "A pair of black shoes."
|
||||
icon_state = "black"
|
||||
item_state = "black"
|
||||
item_color = "black"
|
||||
update_icon()
|
||||
usr.update_inv_shoes()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Footwear Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select shoes to change it to", "Chameleon Shoes")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
if(usr)
|
||||
usr.update_inv_shoes() //so our overlays update.
|
||||
|
||||
//**********************
|
||||
//**Chameleon Backpack**
|
||||
//**********************
|
||||
/obj/item/weapon/storage/backpack/chameleon
|
||||
name = "backpack"
|
||||
icon_state = "backpack"
|
||||
item_state = "backpack"
|
||||
desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/weapon/storage/backpack/chameleon, /obj/item/weapon/storage/backpack/satchel/withwallet)
|
||||
for(var/U in typesof(/obj/item/weapon/storage/backpack)-blocked)//Prevent infinite loops and bad backpacks.
|
||||
var/obj/item/weapon/storage/backpack/V = new U
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "backpack"
|
||||
desc = "You wear this on your back and put items into it."
|
||||
icon_state = "backpack"
|
||||
item_state = "backpack"
|
||||
update_icon()
|
||||
usr.update_inv_back()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Backpack Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select backpack to change it to", "Chameleon Backpack")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/weapon/storage/backpack/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
if(usr)
|
||||
usr.update_inv_back() //so our overlays update.
|
||||
|
||||
//********************
|
||||
//**Chameleon Gloves**
|
||||
//********************
|
||||
|
||||
/obj/item/clothing/gloves/chameleon
|
||||
name = "black gloves"
|
||||
icon_state = "black"
|
||||
item_state = "bgloves"
|
||||
item_color = "brown"
|
||||
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/gloves/chameleon)//Prevent infinite loops and bad hats.
|
||||
for(var/U in typesof(/obj/item/clothing/gloves)-blocked)
|
||||
var/obj/item/clothing/gloves/V = new U
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "black gloves"
|
||||
desc = "It looks like a pair of gloves, but it seems to have a small dial inside."
|
||||
icon_state = "black"
|
||||
item_color = "brown"
|
||||
update_icon()
|
||||
usr.update_inv_gloves()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Gloves Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select gloves to change it to", "Chameleon Gloves")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
item_color = A.item_color
|
||||
flags_inv = A.flags_inv
|
||||
if(usr)
|
||||
usr.update_inv_gloves() //so our overlays update.
|
||||
|
||||
//******************
|
||||
//**Chameleon Mask**
|
||||
//******************
|
||||
|
||||
/obj/item/clothing/mask/chameleon
|
||||
name = "gas mask"
|
||||
icon_state = "gas_alt"
|
||||
item_state = "gas_alt"
|
||||
desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/mask/chameleon)//Prevent infinite loops and bad hats.
|
||||
for(var/U in typesof(/obj/item/clothing/mask)-blocked)
|
||||
var/obj/item/clothing/mask/V = new U
|
||||
if(V)
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "gas mask"
|
||||
desc = "It's a gas mask."
|
||||
icon_state = "gas_alt"
|
||||
update_icon()
|
||||
usr.update_inv_wear_mask()
|
||||
verb/change()
|
||||
set name = "Change Mask Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select mask to change it to", "Chameleon Mask")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
flags_inv = A.flags_inv
|
||||
if(usr)
|
||||
usr.update_inv_wear_mask() //so our overlays update.
|
||||
|
||||
//*********************
|
||||
//**Chameleon Glasses**
|
||||
//*********************
|
||||
|
||||
/obj/item/clothing/glasses/chameleon
|
||||
name = "Optical Meson Scanner"
|
||||
icon_state = "meson"
|
||||
item_state = "glasses"
|
||||
desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside."
|
||||
origin_tech = "syndicate=3"
|
||||
var/list/clothing_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/glasses/chameleon)//Prevent infinite loops and bad hats.
|
||||
for(var/U in typesof(/obj/item/clothing/glasses)-blocked)
|
||||
var/obj/item/clothing/glasses/V = new U
|
||||
src.clothing_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown.
|
||||
name = "Optical Meson Scanner"
|
||||
desc = "It's a set of mesons."
|
||||
icon_state = "meson"
|
||||
update_icon()
|
||||
usr.update_inv_glasses()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Glasses Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select glasses to change it to", "Chameleon Glasses")as null|anything in clothing_choices
|
||||
if(!picked || !clothing_choices[picked])
|
||||
return
|
||||
var/newtype = clothing_choices[picked]
|
||||
var/obj/item/clothing/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
flags_inv = A.flags_inv
|
||||
if(usr)
|
||||
usr.update_inv_glasses() //so our overlays update.
|
||||
|
||||
//*****************
|
||||
//**Chameleon Gun**
|
||||
//*****************
|
||||
/obj/item/weapon/gun/projectile/chameleon
|
||||
name = "desert eagle"
|
||||
desc = "A fake Desert Eagle with a dial on the side to change the gun's disguise."
|
||||
icon_state = "deagle"
|
||||
w_class = 3.0
|
||||
max_shells = 7
|
||||
caliber = ".45"
|
||||
origin_tech = "combat=2;materials=2;syndicate=8"
|
||||
ammo_type = "/obj/item/ammo_casing/chameleon"
|
||||
var/list/gun_choices = list()
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/weapon/gun/projectile/chameleon)
|
||||
for(var/U in typesof(/obj/item/weapon/gun/)-blocked)
|
||||
var/obj/item/weapon/gun/V = new U
|
||||
src.gun_choices[V.name] = U
|
||||
return
|
||||
|
||||
emp_act(severity)
|
||||
name = "desert eagle"
|
||||
desc = "It's a desert eagle."
|
||||
icon_state = "deagle"
|
||||
update_icon()
|
||||
usr.update_inv_r_hand()
|
||||
usr.update_inv_l_hand()
|
||||
|
||||
verb/change()
|
||||
set name = "Change Gun Appearance"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
var/picked = input("Select gun to change it to", "Chameleon Gun")as null|anything in gun_choices
|
||||
if(!picked || !gun_choices[picked])
|
||||
return
|
||||
var/newtype = gun_choices[picked]
|
||||
var/obj/item/weapon/gun/A = new newtype
|
||||
|
||||
desc = null
|
||||
permeability_coefficient = 0.90
|
||||
|
||||
desc = A.desc
|
||||
name = A.name
|
||||
icon_state = A.icon_state
|
||||
item_state = A.item_state
|
||||
flags_inv = A.flags_inv
|
||||
if(usr)
|
||||
usr.update_inv_r_hand()
|
||||
usr.update_inv_l_hand() //so our overlays update.
|
||||
@@ -762,7 +762,7 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "mara_kilpatrick_1"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
|
||||
////// Small locket - Altair An-Nasaqan - Serithi
|
||||
|
||||
@@ -775,7 +775,7 @@
|
||||
item_color = "altair_locket"
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
|
||||
////// Silver locket - Konaa Hirano - Konaa_Hirano
|
||||
@@ -789,7 +789,7 @@
|
||||
item_color = "konaahirano"
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
var/obj/item/held //Item inside locket.
|
||||
|
||||
@@ -819,7 +819,7 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "nasir_khayyam_1"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
|
||||
////// Emerald necklace - Ty Foster - Nega
|
||||
@@ -830,7 +830,7 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "ty_foster"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
|
||||
////// Apollon Pendant - Michael Guess - Dragor23
|
||||
/obj/item/clothing/mask/michael_guess_1
|
||||
@@ -839,7 +839,7 @@
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "michael_guess_1"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
//////////// Shoes ////////////
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "evidenceobj"
|
||||
item_state = ""
|
||||
w_class = 1
|
||||
w_class = 2
|
||||
|
||||
/obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
throwforce = 1.0
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
var/access = list()
|
||||
access = access_crate_cash
|
||||
var/worth = 0
|
||||
|
||||
@@ -207,7 +207,7 @@ I said no!
|
||||
/datum/recipe/donkpocket
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/donkpocket //SPECIAL
|
||||
proc/warm_up(var/obj/item/weapon/reagent_containers/food/snacks/donkpocket/being_cooked)
|
||||
@@ -619,7 +619,7 @@ I said no!
|
||||
/datum/recipe/meatballsoup
|
||||
reagents = list("water" = 10)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot ,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball ,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/carrot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
|
||||
)
|
||||
@@ -887,8 +887,8 @@ I said no!
|
||||
reagents = list("water" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spagetti,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/meatballspagetti
|
||||
|
||||
@@ -896,10 +896,10 @@ I said no!
|
||||
reagents = list("water" = 5)
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spagetti,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/spesslaw
|
||||
|
||||
@@ -1084,7 +1084,7 @@ I said no!
|
||||
|
||||
/datum/recipe/sausage
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cutlet,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sausage
|
||||
@@ -1185,7 +1185,7 @@ I said no!
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/potato,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/faggot,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatball,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
|
||||
make_food(var/obj/container as obj)
|
||||
@@ -1215,6 +1215,12 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/tofurkey
|
||||
|
||||
// Fuck Science!
|
||||
/datum/recipe/ruinedvirusdish
|
||||
items = list(
|
||||
/obj/item/weapon/virusdish
|
||||
)
|
||||
result = /obj/item/weapon/ruinedvirusdish
|
||||
|
||||
//////////////////////////////////////////
|
||||
// bs12 food port stuff
|
||||
@@ -1240,11 +1246,11 @@ I said no!
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/flatbread
|
||||
|
||||
/datum/recipe/faggot
|
||||
/datum/recipe/meatball
|
||||
items = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawfaggot
|
||||
/obj/item/weapon/reagent_containers/food/snacks/rawmeatball
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/faggot
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/meatball
|
||||
|
||||
/datum/recipe/cutlet
|
||||
items = list(
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
icon_state ="scanner"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this
|
||||
var/obj/item/weapon/book/book // Currently scanned book
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
#define ORE_PROC_GOLD 1
|
||||
#define ORE_PROC_SILVER 2
|
||||
#define ORE_PROC_DIAMOND 4
|
||||
#define ORE_PROC_GLASS 8
|
||||
#define ORE_PROC_PLASMA 16
|
||||
#define ORE_PROC_URANIUM 32
|
||||
#define ORE_PROC_IRON 64
|
||||
#define ORE_PROC_CLOWN 128
|
||||
|
||||
/**********************Mineral processing unit console**************************/
|
||||
|
||||
/obj/machinery/mineral/processing_unit_console
|
||||
@@ -32,84 +41,83 @@
|
||||
//iron
|
||||
if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown || machine.ore_adamantine)
|
||||
if(machine.ore_iron)
|
||||
if (machine.selected_iron==1)
|
||||
if (machine.selected & ORE_PROC_IRON)
|
||||
dat += text("<A href='?src=\ref[src];sel_iron=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_iron=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Iron: [machine.ore_iron]<br>")
|
||||
else
|
||||
machine.selected_iron = 0
|
||||
machine.selected &= ~ORE_PROC_IRON
|
||||
|
||||
//sand - glass
|
||||
if(machine.ore_glass)
|
||||
if (machine.selected_glass==1)
|
||||
if (machine.selected & ORE_PROC_GLASS)
|
||||
dat += text("<A href='?src=\ref[src];sel_glass=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_glass=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Sand: [machine.ore_glass]<br>")
|
||||
else
|
||||
machine.selected_glass = 0
|
||||
machine.selected &= ~ORE_PROC_GLASS
|
||||
|
||||
//plasma
|
||||
if(machine.ore_plasma)
|
||||
if (machine.selected_plasma==1)
|
||||
if (machine.selected & ORE_PROC_PLASMA)
|
||||
dat += text("<A href='?src=\ref[src];sel_plasma=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_plasma=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Plasma: [machine.ore_plasma]<br>")
|
||||
else
|
||||
machine.selected_plasma = 0
|
||||
machine.selected &= ~ORE_PROC_PLASMA
|
||||
|
||||
//uranium
|
||||
if(machine.ore_uranium)
|
||||
if (machine.selected_uranium==1)
|
||||
if (machine.selected & ORE_PROC_URANIUM)
|
||||
dat += text("<A href='?src=\ref[src];sel_uranium=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_uranium=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Uranium: [machine.ore_uranium]<br>")
|
||||
else
|
||||
machine.selected_uranium = 0
|
||||
machine.selected &= ~ORE_PROC_URANIUM
|
||||
|
||||
//gold
|
||||
if(machine.ore_gold)
|
||||
if (machine.selected_gold==1)
|
||||
if (machine.selected & ORE_PROC_GOLD)
|
||||
dat += text("<A href='?src=\ref[src];sel_gold=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_gold=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Gold: [machine.ore_gold]<br>")
|
||||
else
|
||||
machine.selected_gold = 0
|
||||
machine.selected &= ~ORE_PROC_GOLD
|
||||
|
||||
//silver
|
||||
if(machine.ore_silver)
|
||||
if (machine.selected_silver==1)
|
||||
if (machine.selected & ORE_PROC_SILVER)
|
||||
dat += text("<A href='?src=\ref[src];sel_silver=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_silver=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Silver: [machine.ore_silver]<br>")
|
||||
else
|
||||
machine.selected_silver = 0
|
||||
machine.selected &= ~ORE_PROC_SILVER
|
||||
|
||||
//diamond
|
||||
if(machine.ore_diamond)
|
||||
if (machine.selected_diamond==1)
|
||||
if (machine.selected & ORE_PROC_DIAMOND)
|
||||
dat += text("<A href='?src=\ref[src];sel_diamond=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_diamond=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Diamond: [machine.ore_diamond]<br>")
|
||||
else
|
||||
machine.selected_diamond = 0
|
||||
machine.selected &= ~ORE_PROC_DIAMOND
|
||||
|
||||
//bananium
|
||||
if(machine.ore_clown)
|
||||
if (machine.selected_clown==1)
|
||||
if (machine.selected & ORE_PROC_CLOWN)
|
||||
dat += text("<A href='?src=\ref[src];sel_clown=no'><font color='green'>Smelting</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];sel_clown=yes'><font color='red'>Not smelting</font></A> ")
|
||||
dat += text("Bananium: [machine.ore_clown]<br>")
|
||||
else
|
||||
machine.selected_clown = 0
|
||||
|
||||
machine.selected &= ~ORE_PROC_CLOWN
|
||||
|
||||
//On or off
|
||||
dat += text("Machine is currently ")
|
||||
@@ -132,44 +140,45 @@
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["sel_iron"])
|
||||
if (href_list["sel_iron"] == "yes")
|
||||
machine.selected_iron = 1
|
||||
machine.selected |= ORE_PROC_IRON
|
||||
else
|
||||
machine.selected_iron = 0
|
||||
machine.selected &= ~ORE_PROC_IRON
|
||||
if(href_list["sel_glass"])
|
||||
if (href_list["sel_glass"] == "yes")
|
||||
machine.selected_glass = 1
|
||||
machine.selected |= ORE_PROC_GLASS
|
||||
else
|
||||
machine.selected_glass = 0
|
||||
machine.selected &= ~ORE_PROC_GLASS
|
||||
if(href_list["sel_plasma"])
|
||||
if (href_list["sel_plasma"] == "yes")
|
||||
machine.selected_plasma = 1
|
||||
machine.selected |= ORE_PROC_PLASMA
|
||||
else
|
||||
machine.selected_plasma = 0
|
||||
machine.selected &= ~ORE_PROC_PLASMA
|
||||
if(href_list["sel_uranium"])
|
||||
if (href_list["sel_uranium"] == "yes")
|
||||
machine.selected_uranium = 1
|
||||
machine.selected |= ORE_PROC_URANIUM
|
||||
else
|
||||
machine.selected_uranium = 0
|
||||
machine.selected &= ~ORE_PROC_URANIUM
|
||||
if(href_list["sel_gold"])
|
||||
if (href_list["sel_gold"] == "yes")
|
||||
machine.selected_gold = 1
|
||||
machine.selected |= ORE_PROC_GOLD
|
||||
else
|
||||
machine.selected_gold = 0
|
||||
machine.selected &= ~ORE_PROC_GOLD
|
||||
if(href_list["sel_silver"])
|
||||
if (href_list["sel_silver"] == "yes")
|
||||
machine.selected_silver = 1
|
||||
machine.selected |= ORE_PROC_SILVER
|
||||
else
|
||||
machine.selected_silver = 0
|
||||
machine.selected &= ~ORE_PROC_SILVER
|
||||
if(href_list["sel_diamond"])
|
||||
if (href_list["sel_diamond"] == "yes")
|
||||
machine.selected_diamond = 1
|
||||
machine.selected |= ORE_PROC_DIAMOND
|
||||
else
|
||||
machine.selected_diamond = 0
|
||||
machine.selected &= ~ORE_PROC_DIAMOND
|
||||
if(href_list["sel_clown"])
|
||||
if (href_list["sel_clown"] == "yes")
|
||||
machine.selected_clown = 1
|
||||
machine.selected |= ORE_PROC_CLOWN
|
||||
else
|
||||
machine.selected_clown = 0
|
||||
machine.selected &= ~ORE_PROC_CLOWN
|
||||
|
||||
if(href_list["set_on"])
|
||||
if (href_list["set_on"] == "on")
|
||||
machine.on = 1
|
||||
@@ -187,6 +196,7 @@
|
||||
icon_state = "furnace"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
luminosity = 3 //Big fire with window, yeah it puts out a little light.
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/obj/machinery/mineral/CONSOLE = null
|
||||
@@ -199,6 +209,8 @@
|
||||
var/ore_iron = 0;
|
||||
var/ore_clown = 0;
|
||||
var/ore_adamantine = 0;
|
||||
var/selected = 0
|
||||
/*
|
||||
var/selected_gold = 0
|
||||
var/selected_silver = 0
|
||||
var/selected_diamond = 0
|
||||
@@ -207,8 +219,10 @@
|
||||
var/selected_uranium = 0
|
||||
var/selected_iron = 0
|
||||
var/selected_clown = 0
|
||||
*/
|
||||
var/on = 0 //0 = off, 1 =... oh you know!
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
@@ -227,14 +241,17 @@
|
||||
var/i
|
||||
for (i = 0; i < 10; i++)
|
||||
if (on)
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
|
||||
|
||||
|
||||
if (selected == ORE_PROC_GLASS)
|
||||
if (ore_glass > 0)
|
||||
ore_glass--;
|
||||
new /obj/item/stack/sheet/glass(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_GLASS + ORE_PROC_IRON)
|
||||
if (ore_glass > 0 && ore_iron > 0)
|
||||
ore_glass--;
|
||||
ore_iron--;
|
||||
@@ -242,49 +259,49 @@
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_GOLD)
|
||||
if (ore_gold > 0)
|
||||
ore_gold--;
|
||||
new /obj/item/stack/sheet/mineral/gold(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_SILVER)
|
||||
if (ore_silver > 0)
|
||||
ore_silver--;
|
||||
new /obj/item/stack/sheet/mineral/silver(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_DIAMOND)
|
||||
if (ore_diamond > 0)
|
||||
ore_diamond--;
|
||||
new /obj/item/stack/sheet/mineral/diamond(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_PLASMA)
|
||||
if (ore_plasma > 0)
|
||||
ore_plasma--;
|
||||
new /obj/item/stack/sheet/mineral/plasma(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_URANIUM)
|
||||
if (ore_uranium > 0)
|
||||
ore_uranium--;
|
||||
new /obj/item/stack/sheet/mineral/uranium(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_IRON)
|
||||
if (ore_iron > 0)
|
||||
ore_iron--;
|
||||
new /obj/item/stack/sheet/metal(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_IRON + ORE_PROC_PLASMA)
|
||||
if (ore_iron > 0 && ore_plasma > 0)
|
||||
ore_iron--;
|
||||
ore_plasma--;
|
||||
@@ -292,20 +309,23 @@
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
|
||||
if (selected == ORE_PROC_CLOWN)
|
||||
if (ore_clown > 0)
|
||||
ore_clown--;
|
||||
new /obj/item/stack/sheet/mineral/clown(output.loc)
|
||||
else
|
||||
on = 0
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
continue
|
||||
/*
|
||||
if (selected == ORE_PROC_GLASS + ORE_PROC_PLASMA)
|
||||
if (ore_glass > 0 && ore_plasma > 0)
|
||||
ore_glass--;
|
||||
ore_plasma--;
|
||||
new /obj/item/stack/sheet/glass/plasmaglass(output.loc)
|
||||
else
|
||||
on = 0
|
||||
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
|
||||
continue
|
||||
if (selected == ORE_PROC_GLASS + ORE_PROC_IRON + ORE_PROC_PLASMA)
|
||||
if (ore_glass > 0 && ore_plasma > 0 && ore_iron > 0)
|
||||
ore_glass--;
|
||||
ore_iron--;
|
||||
@@ -314,10 +334,10 @@
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
|
||||
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
|
||||
//Iamgoofball here, this comment I'm typing right now was made in 11/1/2013. If you're reading this in 2020, then please let me know if the world has gone into a nuclear apocalypse. Also Urist has been tried and hung for how lazy he was. That and he was jaywalking.
|
||||
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
|
||||
*/
|
||||
|
||||
|
||||
if (selected == ORE_PROC_URANIUM + ORE_PROC_DIAMOND)
|
||||
if (ore_uranium >= 2 && ore_diamond >= 1)
|
||||
ore_uranium -= 2
|
||||
ore_diamond -= 1
|
||||
@@ -325,62 +345,63 @@
|
||||
else
|
||||
on = 0
|
||||
continue
|
||||
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
|
||||
if (selected == ORE_PROC_SILVER + ORE_PROC_PLASMA)
|
||||
if (ore_silver >= 1 && ore_plasma >= 3)
|
||||
ore_silver -= 1
|
||||
ore_plasma -= 3
|
||||
new /obj/item/stack/sheet/mineral/mythril(output.loc)
|
||||
else
|
||||
on = 0
|
||||
continue*/
|
||||
continue
|
||||
|
||||
|
||||
|
||||
//if a non valid combination is selected
|
||||
|
||||
var/b = 1 //this part checks if all required ores are available
|
||||
|
||||
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
|
||||
if (!selected)
|
||||
b = 0
|
||||
|
||||
if (selected_gold == 1)
|
||||
if (selected & ORE_PROC_GOLD)
|
||||
if (ore_gold <= 0)
|
||||
b = 0
|
||||
if (selected_silver == 1)
|
||||
if (selected & ORE_PROC_SILVER)
|
||||
if (ore_silver <= 0)
|
||||
b = 0
|
||||
if (selected_diamond == 1)
|
||||
if (selected & ORE_PROC_DIAMOND)
|
||||
if (ore_diamond <= 0)
|
||||
b = 0
|
||||
if (selected_uranium == 1)
|
||||
if (selected & ORE_PROC_URANIUM)
|
||||
if (ore_uranium <= 0)
|
||||
b = 0
|
||||
if (selected_plasma == 1)
|
||||
if (selected & ORE_PROC_PLASMA)
|
||||
if (ore_plasma <= 0)
|
||||
b = 0
|
||||
if (selected_iron == 1)
|
||||
if (selected & ORE_PROC_IRON)
|
||||
if (ore_iron <= 0)
|
||||
b = 0
|
||||
if (selected_glass == 1)
|
||||
if (selected & ORE_PROC_GLASS)
|
||||
if (ore_glass <= 0)
|
||||
b = 0
|
||||
if (selected_clown == 1)
|
||||
if (selected & ORE_PROC_CLOWN)
|
||||
if (ore_clown <= 0)
|
||||
b = 0
|
||||
|
||||
if (b) //if they are, deduct one from each, produce slag and shut the machine off
|
||||
if (selected_gold == 1)
|
||||
if (selected & ORE_PROC_GOLD)
|
||||
ore_gold--
|
||||
if (selected_silver == 1)
|
||||
if (selected & ORE_PROC_SILVER)
|
||||
ore_silver--
|
||||
if (selected_diamond == 1)
|
||||
if (selected & ORE_PROC_DIAMOND)
|
||||
ore_diamond--
|
||||
if (selected_uranium == 1)
|
||||
if (selected & ORE_PROC_URANIUM)
|
||||
ore_uranium--
|
||||
if (selected_plasma == 1)
|
||||
if (selected & ORE_PROC_PLASMA)
|
||||
ore_plasma--
|
||||
if (selected_iron == 1)
|
||||
if (selected & ORE_PROC_IRON)
|
||||
ore_iron--
|
||||
if (selected_clown == 1)
|
||||
if (selected & ORE_PROC_CLOWN)
|
||||
ore_clown--
|
||||
new /obj/item/weapon/ore/slag(output.loc)
|
||||
on = 0
|
||||
@@ -397,44 +418,44 @@
|
||||
if (istype(O,/obj/item/weapon/ore/iron))
|
||||
ore_iron++;
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/glass))
|
||||
ore_glass++;
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/diamond))
|
||||
ore_diamond++;
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/plasma))
|
||||
ore_plasma++
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/gold))
|
||||
ore_gold++
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/silver))
|
||||
ore_silver++
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/uranium))
|
||||
ore_uranium++
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/clown))
|
||||
ore_clown++
|
||||
O.loc = null
|
||||
del(O)
|
||||
//del(O)
|
||||
continue
|
||||
O.loc = src.output.loc
|
||||
else
|
||||
break
|
||||
return
|
||||
return
|
||||
|
||||
@@ -242,85 +242,108 @@
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
if (src.output && src.input)
|
||||
var/obj/item/O
|
||||
var/obj/item/stack/O
|
||||
while (locate(/obj/item, input.loc))
|
||||
O = locate(/obj/item, input.loc)
|
||||
O = locate(/obj/item/stack, input.loc)
|
||||
if(isnull(O))
|
||||
var/obj/item/I = locate(/obj/item, input.loc)
|
||||
if (istype(I,/obj/item/weapon/ore/slag))
|
||||
I.loc = null
|
||||
else
|
||||
I.loc = output.loc
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
ore_iron+= O:amount;
|
||||
del(O)
|
||||
ore_iron+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
ore_diamond+= O:amount;
|
||||
del(O)
|
||||
ore_diamond+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
|
||||
ore_plasma+= O:amount
|
||||
del(O)
|
||||
ore_plasma+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
ore_gold+= O:amount
|
||||
del(O)
|
||||
ore_gold+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
ore_silver+= O:amount
|
||||
del(O)
|
||||
ore_silver+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/clown))
|
||||
ore_clown+= O:amount
|
||||
del(O)
|
||||
ore_clown+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
ore_uranium+= O:amount
|
||||
del(O)
|
||||
ore_uranium+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/glass/plasmaglass))
|
||||
ore_plasmaglass+= O:amount
|
||||
del(O)
|
||||
ore_plasmaglass+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/glass/plasmarglass))
|
||||
ore_plasmarglass+= O:amount
|
||||
del(O)
|
||||
ore_plasmarglass+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/glass))
|
||||
ore_glass+= O:amount
|
||||
del(O)
|
||||
ore_glass+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/rglass))
|
||||
ore_rglass+= O:amount
|
||||
del(O)
|
||||
ore_rglass+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/plasteel))
|
||||
ore_plasteel+= O:amount
|
||||
del(O)
|
||||
ore_plasteel+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/adamantine))
|
||||
ore_adamantine+= O:amount
|
||||
del(O)
|
||||
ore_adamantine+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/mythril))
|
||||
ore_mythril+= O:amount
|
||||
del(O)
|
||||
ore_mythril+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/cardboard))
|
||||
ore_cardboard+= O:amount
|
||||
del(O)
|
||||
ore_cardboard+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/wood))
|
||||
ore_wood+= O:amount
|
||||
del(O)
|
||||
ore_wood+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/cloth))
|
||||
ore_cloth+= O:amount
|
||||
del(O)
|
||||
ore_cloth+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/stack/sheet/leather))
|
||||
ore_leather+= O:amount
|
||||
del(O)
|
||||
continue
|
||||
if (istype(O,/obj/item/weapon/ore/slag))
|
||||
del(O)
|
||||
ore_leather+= O.amount
|
||||
O.loc = null
|
||||
//del(O)
|
||||
continue
|
||||
O.loc = src.output.loc
|
||||
|
||||
if (ore_gold >= stack_amt)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold
|
||||
G.amount = stack_amt
|
||||
|
||||
@@ -81,45 +81,46 @@
|
||||
throwforce = 0.0
|
||||
w_class = 1.0
|
||||
var/string_attached
|
||||
var/sides = 2
|
||||
|
||||
/obj/item/weapon/coin/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/obj/item/weapon/coin/gold
|
||||
name = "Gold coin"
|
||||
name = "gold coin"
|
||||
icon_state = "coin_gold"
|
||||
|
||||
/obj/item/weapon/coin/silver
|
||||
name = "Silver coin"
|
||||
name = "silver coin"
|
||||
icon_state = "coin_silver"
|
||||
|
||||
/obj/item/weapon/coin/diamond
|
||||
name = "Diamond coin"
|
||||
name = "diamond coin"
|
||||
icon_state = "coin_diamond"
|
||||
|
||||
/obj/item/weapon/coin/iron
|
||||
name = "Iron coin"
|
||||
name = "iron coin"
|
||||
icon_state = "coin_iron"
|
||||
|
||||
/obj/item/weapon/coin/plasma
|
||||
name = "Solid plasma coin"
|
||||
name = "solid plasma coin"
|
||||
icon_state = "coin_plasma"
|
||||
|
||||
/obj/item/weapon/coin/uranium
|
||||
name = "Uranium coin"
|
||||
name = "uranium coin"
|
||||
icon_state = "coin_uranium"
|
||||
|
||||
/obj/item/weapon/coin/clown
|
||||
name = "Bananaium coin"
|
||||
name = "bananaium coin"
|
||||
icon_state = "coin_clown"
|
||||
|
||||
/obj/item/weapon/coin/adamantine
|
||||
name = "Adamantine coin"
|
||||
name = "adamantine coin"
|
||||
icon_state = "coin_adamantine"
|
||||
|
||||
/obj/item/weapon/coin/mythril
|
||||
name = "Mythril coin"
|
||||
name = "mythril coin"
|
||||
icon_state = "coin_mythril"
|
||||
|
||||
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -150,3 +151,13 @@
|
||||
string_attached = null
|
||||
user << "\blue You detach the string from the coin."
|
||||
else ..()
|
||||
|
||||
/obj/item/weapon/coin/attack_self(mob/user as mob)
|
||||
var/result = rand(1, sides)
|
||||
var/comment = ""
|
||||
if(result == 1)
|
||||
comment = "tails"
|
||||
else if(result == 2)
|
||||
comment = "heads"
|
||||
user.visible_message("<span class='notice'>[user] has thrown the [src]. It lands on [comment]! </span>", \
|
||||
"<span class='notice'>You throw the [src]. It lands on [comment]! </span>")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "brain2"
|
||||
flags = TABLEPASS
|
||||
force = 1.0
|
||||
w_class = 1.0
|
||||
w_class = 2.0
|
||||
throwforce = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
|
||||
@@ -195,17 +195,22 @@
|
||||
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
|
||||
if(lying)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [t_him] up!", \
|
||||
"<span class='notice'>You shake [src] trying to wake [t_him] up!")
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [t_him] feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make [t_him] feel better!</span>")
|
||||
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
M.visible_message( \
|
||||
"\blue [M] shakes [src] trying to wake [t_him] up!", \
|
||||
"\blue You shake [src] trying to wake [t_him] up!", \
|
||||
)
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
|
||||
@@ -58,6 +58,12 @@
|
||||
dizziness = 0
|
||||
jitteriness = 0
|
||||
|
||||
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
hud_updateflag |= 1 << STATUS_HUD
|
||||
|
||||
handle_hud_list()
|
||||
|
||||
//Handle species-specific deaths.
|
||||
if(species) species.handle_death(src)
|
||||
|
||||
|
||||
@@ -258,8 +258,9 @@
|
||||
continue
|
||||
if(temp.status & ORGAN_ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
|
||||
continue
|
||||
if(!species.flags & IS_SYNTHETIC)
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name], it has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
@@ -274,7 +275,8 @@
|
||||
wound_flavor_text["[temp.display_name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
if(wound_flavor_text["[temp.display_name]"])
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len > 0)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
@@ -469,4 +471,4 @@
|
||||
else
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -1096,7 +1096,7 @@
|
||||
var/tdamage = 0
|
||||
var/ticks = 0
|
||||
while (germs < 2501 && ticks < 100000 && round(damage/10)*20)
|
||||
diary << "VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]"
|
||||
log_misc("VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]")
|
||||
ticks++
|
||||
if (prob(round(damage/10)*20))
|
||||
germs++
|
||||
|
||||
@@ -192,8 +192,9 @@
|
||||
This function restores the subjects blood to max.
|
||||
*/
|
||||
/mob/living/carbon/human/proc/restore_blood()
|
||||
var/blood_volume = vessel.get_reagent_amount("blood")
|
||||
vessel.add_reagent("blood",560.0-blood_volume)
|
||||
if(!species.flags & NO_BLOOD)
|
||||
var/blood_volume = vessel.get_reagent_amount("blood")
|
||||
vessel.add_reagent("blood",560.0-blood_volume)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user