Merge pull request #10 from ZomgPonies/master

Update
This commit is contained in:
SamCroswell
2014-05-03 16:35:15 -04:00
1153 changed files with 30783 additions and 15845 deletions
+4
View File
@@ -4,7 +4,11 @@
*.rsc
*.dmb
*.lk
<<<<<<< HEAD
#ignore any files in config/, except those in subdirectories.
/config/*
!/config/*/*
=======
data/
>>>>>>> 16f787a... Virology - NanoUI, gameplay tweaks, bugfixes
+76 -14
View File
@@ -5,6 +5,65 @@
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR "code"
#define FILE_DIR "code/TriDimension"
#define FILE_DIR "code/WorkInProgress"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Jungle"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Rust"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/ShieldGen"
#define FILE_DIR "code/WorkInProgress/Cael_Aislinn/Supermatter"
#define FILE_DIR "code/WorkInProgress/Susan"
#define FILE_DIR "html"
#define FILE_DIR "icons"
#define FILE_DIR "icons/48x48"
#define FILE_DIR "icons/ass"
#define FILE_DIR "icons/effects"
#define FILE_DIR "icons/mecha"
#define FILE_DIR "icons/misc"
#define FILE_DIR "icons/mob"
#define FILE_DIR "icons/mob/human_races"
#define FILE_DIR "icons/mob/otherHuman"
#define FILE_DIR "icons/NTOS"
#define FILE_DIR "icons/obj"
#define FILE_DIR "icons/obj/assemblies"
#define FILE_DIR "icons/obj/atmospherics"
#define FILE_DIR "icons/obj/clothing"
#define FILE_DIR "icons/obj/doors"
#define FILE_DIR "icons/obj/flora"
#define FILE_DIR "icons/obj/machines"
#define FILE_DIR "icons/obj/pipes"
#define FILE_DIR "icons/obj/power_cond"
#define FILE_DIR "icons/pda_icons"
#define FILE_DIR "icons/pods"
#define FILE_DIR "icons/spideros_icons"
#define FILE_DIR "icons/stamp_icons"
#define FILE_DIR "icons/Testing"
#define FILE_DIR "icons/turf"
#define FILE_DIR "icons/vending_icons"
#define FILE_DIR "nano"
#define FILE_DIR "nano/images"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
#define FILE_DIR "sound/ambience"
#define FILE_DIR "sound/effects"
#define FILE_DIR "sound/effects/turret"
#define FILE_DIR "sound/effects/wind"
#define FILE_DIR "sound/hallucinations"
#define FILE_DIR "sound/items"
#define FILE_DIR "sound/machines"
#define FILE_DIR "sound/mecha"
#define FILE_DIR "sound/misc"
#define FILE_DIR "sound/music"
#define FILE_DIR "sound/piano"
#define FILE_DIR "sound/turntable"
#define FILE_DIR "sound/violin"
#define FILE_DIR "sound/voice"
#define FILE_DIR "sound/voice/complionator"
#define FILE_DIR "sound/voice/Serithi"
#define FILE_DIR "sound/vox"
#define FILE_DIR "sound/vox_fem"
#define FILE_DIR "sound/weapons"
// END_FILE_DIR
// BEGIN_PREFERENCES
#define DEBUG
@@ -16,12 +75,12 @@
#include "code\setup.dm"
#include "code\stylesheet.dm"
#include "code\world.dm"
#include "code\__HELPERS\experimental.dm"
#include "code\__HELPERS\files.dm"
#include "code\__HELPERS\game.dm"
#include "code\__HELPERS\global_lists.dm"
#include "code\__HELPERS\icons.dm"
#include "code\__HELPERS\lists.dm"
#include "code\__HELPERS\loc.dm"
#include "code\__HELPERS\logging.dm"
#include "code\__HELPERS\maths.dm"
#include "code\__HELPERS\mobs.dm"
@@ -81,9 +140,11 @@
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
#include "code\controllers\_DynamicAreaLighting_TG.dm"
#include "code\controllers\configuration.dm"
#include "code\controllers\failsafe.dm"
#include "code\controllers\garbage.dm"
#include "code\controllers\lighting_controller.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\verbs.dm"
@@ -204,6 +265,7 @@
#include "code\game\supplyshuttle.dm"
#include "code\game\area\ai_monitored.dm"
#include "code\game\area\areas.dm"
#include "code\game\area\Dynamic areas.dm"
#include "code\game\area\Space Station 13 areas.dm"
#include "code\game\dna\dna2.dm"
#include "code\game\dna\dna2_domutcheck.dm"
@@ -333,6 +395,7 @@
#include "code\game\machinery\machinery.dm"
#include "code\game\machinery\magnet.dm"
#include "code\game\machinery\mass_driver.dm"
#include "code\game\machinery\metaldetector.dm"
#include "code\game\machinery\navbeacon.dm"
#include "code\game\machinery\newscaster.dm"
#include "code\game\machinery\OpTable.dm"
@@ -568,6 +631,7 @@
#include "code\game\objects\items\weapons\AI_modules.dm"
#include "code\game\objects\items\weapons\alien_specific.dm"
#include "code\game\objects\items\weapons\cards_ids.dm"
#include "code\game\objects\items\weapons\cash.dm"
#include "code\game\objects\items\weapons\cigs_lighters.dm"
#include "code\game\objects\items\weapons\clown_items.dm"
#include "code\game\objects\items\weapons\cosmetics.dm"
@@ -649,8 +713,10 @@
#include "code\game\objects\structures\extinguisher.dm"
#include "code\game\objects\structures\false_walls.dm"
#include "code\game\objects\structures\flora.dm"
#include "code\game\objects\structures\fullwindow.dm"
#include "code\game\objects\structures\girders.dm"
#include "code\game\objects\structures\grille.dm"
#include "code\game\objects\structures\inflatable.dm"
#include "code\game\objects\structures\janicart.dm"
#include "code\game\objects\structures\kitchen_spike.dm"
#include "code\game\objects\structures\ladders.dm"
@@ -668,7 +734,6 @@
#include "code\game\objects\structures\tables_racks.dm"
#include "code\game\objects\structures\tank_dispenser.dm"
#include "code\game\objects\structures\target_stake.dm"
#include "code\game\objects\structures\transit_tubes.dm"
#include "code\game\objects\structures\watercloset.dm"
#include "code\game\objects\structures\windoor_assembly.dm"
#include "code\game\objects\structures\window.dm"
@@ -703,6 +768,9 @@
#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm"
#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm"
#include "code\game\objects\structures\transit_tubes\station.dm"
#include "code\game\objects\structures\transit_tubes\transit_tube.dm"
#include "code\game\objects\structures\transit_tubes\transit_tube_pod.dm"
#include "code\game\structure\structure.dm"
#include "code\game\turfs\simulated.dm"
#include "code\game\turfs\turf.dm"
@@ -850,14 +918,13 @@
#include "code\modules\customitems\item_spawning.dm"
#include "code\modules\customitems\definitions\base.dm"
#include "code\modules\destilery\main.dm"
#include "code\modules\detectivework\detective_work.dm"
#include "code\modules\detectivework\evidence.dm"
#include "code\modules\detectivework\footprints_and_rag.dm"
#include "code\modules\detectivework\scanner.dm"
#include "code\modules\DetectiveWork\detective_work.dm"
#include "code\modules\DetectiveWork\evidence.dm"
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
#include "code\modules\DetectiveWork\scanner.dm"
#include "code\modules\economy\Accounts.dm"
#include "code\modules\economy\Accounts_DB.dm"
#include "code\modules\economy\ATM.dm"
#include "code\modules\economy\cash.dm"
#include "code\modules\economy\economy_misc.dm"
#include "code\modules\economy\EFTPOS.dm"
#include "code\modules\economy\Events.dm"
@@ -1160,6 +1227,7 @@
#include "code\modules\organs\pain.dm"
#include "code\modules\organs\skeleton.dm"
#include "code\modules\organs\wound.dm"
#include "code\modules\paperwork\carbonpaper.dm"
#include "code\modules\paperwork\clipboard.dm"
#include "code\modules\paperwork\filingcabinet.dm"
#include "code\modules\paperwork\folders.dm"
@@ -1398,12 +1466,6 @@
#include "code\WorkInProgress\fireworks.dm"
#include "code\WorkInProgress\periodic_news.dm"
#include "code\WorkInProgress\Apples\artifacts.dm"
#include "code\WorkInProgress\Aryn\Lighting\_Defs.dm"
#include "code\WorkInProgress\Aryn\Lighting\Compatibility.dm"
#include "code\WorkInProgress\Aryn\Lighting\Controller.dm"
#include "code\WorkInProgress\Aryn\Lighting\Engine.dm"
#include "code\WorkInProgress\Aryn\Lighting\Light.dm"
#include "code\WorkInProgress\Aryn\Lighting\Lightpoint.dm"
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\falsewall.dm"
#include "code\WorkInProgress\Cael_Aislinn\Jungle\jungle.dm"
@@ -1505,6 +1567,6 @@
#include "code\ZAS\Zone.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\tgstation-redux-WIP.dmm"
#include "maps\NSS Cyberiad- WIP.dmm"
#include "maps\RandomZLevels\clown3.dmm"
// END_INCLUDE
@@ -116,10 +116,10 @@
if(scrubbing)
// Are we scrubbing gasses that are present?
if(\
(scrub_Toxins && environment.toxins > 0) ||\
(scrub_CO2 && environment.carbon_dioxide > 0) ||\
(scrub_Toxins && environment.toxins > 0.001) ||\
(scrub_CO2 && environment.carbon_dioxide > 0.001) ||\
(scrub_N2O && environment.trace_gases.len > 0) ||\
(scrub_O2 && environment.oxygen > 0))
(scrub_O2 && environment.oxygen > 0.001))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
//Take a gas sample
-2
View File
@@ -54,8 +54,6 @@ datum/pipe_network
for(var/datum/pipeline/line_member in giver.line_members)
line_member.network = src
del(giver)
update_network_gases()
return 1
@@ -36,8 +36,9 @@ obj/machinery/atmospherics/mains_pipe
icon = 'icons/obj/atmospherics/mainspipe.dmi'
layer = 2.4 //under wires with their 2.5
force = 20
var/volume = 0
var/force = 20
var/alert_pressure = 80*ONE_ATMOSPHERE
@@ -535,6 +536,8 @@ obj/machinery/atmospherics/mains_pipe/cap
level = 2
icon_state = "cap"
//TODO: Get Mains valves working!
/*
obj/machinery/atmospherics/mains_pipe/valve
icon_state = "mvalve0"
@@ -700,4 +703,5 @@ obj/machinery/atmospherics/mains_pipe/valve
if(open)
close()
else
open()
open()
*/
@@ -1,49 +0,0 @@
area/var/lighting_use_dynamic
turf/space/is_outside = 1
turf/simulated/shuttle/is_outside = 1
/datum/controller/lighting/var/processing = 1
/datum/controller/lighting/var/iteration = 0
//Because so many objects jump the gun.
proc/lighting_ready()
return lighting_controller && lighting_controller.started
turf_light_data
var/light_overlay
var/lightNW
var/lightSW
var/lightNE
var/lightSE
var/lit_by
turf_light_data/proc/copy_from(turf/T)
light_overlay = T.light_overlay
lightNW = T.lightNW
lightSW = T.lightSW
lightNE = T.lightNE
lightSE = T.lightSE
lit_by = T.lit_by
turf_light_data/proc/copy_to(turf/T)
T.light_overlay = light_overlay
T.lightNW = lightNW
T.lightSW = lightSW
T.lightNE = lightNE
T.lightSE = lightSE
T.lit_by = lit_by
//T.ResetValue()
atom/proc/SetLuminosity(n)
ASSERT(n >= 0)
n = min(n,10) //Caelcode.
if(n > 0)
//world << "[name].SetLuminosity([n]) \[[max(1,n>>1)],[n]\]"
SetLight(max(1,n),n)
else
//world << "[name].SetLuminosity(0)"
SetLight(0,0)
luminosity = n
//else lighting_controller.initial_lights.Add(src)
@@ -1,99 +0,0 @@
/*
Overview:
Unlike the previous lighting controller, this is mostly here to hold global lighting procs and vars.
It does not process every tick, because not even DAL did something so stupid.
Global Vars:
initial_lights - This holds all lights formed before the lighting controller started up. It becomes null on initialization.
Class Vars:
starlight - The light value of space.
icon_updates - The list of turfs which need an update to their overlays.
light_border - Space turfs which are adjacent to non-space turfs.
Class Procs:
Initialize()
Starts the lighting system, creating all light points and turf overlays.
StarLight(n)
Sets the light produced by space. If a solar eclipse suddenly happens, it'll probably lag.
MarkIconUpdate(turf/T)
Called when a turf needs an update to its light icon. Ensures that it only gets calculated once per turf.
FlushIconUpdates()
Called when a light is done marking icon updates. Updates every marked turf.
AddBorder(turf/T) & RemoveBorder(turf/T)
Called by turf/CheckForOpaqueObjects() to modify the light_border list.
*/
var/datum/controller/lighting/lighting_controller
var/all_lightpoints_made = 0
var/list/lit_z_levels = list(1,5)
/datum/controller/lighting
var/starlight = LIGHT_STATES
var/list/icon_updates = list()
var/started = 0
//var/icon/border = icon('Icons/Test.dmi', "border")
/datum/controller/lighting/New()
lighting_controller = src
/datum/controller/lighting/proc/Initialize()
set background = 1
var/start_time = world.timeofday
world << "<b><font color=red>Processing lights...</font></b>"
sleep(1)
var/turfs_updated = 0
var/total_turfs = world.maxx*world.maxy*lit_z_levels.len
for(var/z in lit_z_levels)
for(var/y = 0, y <= world.maxy, y++)
for(var/x = 0, x <= world.maxx, x++)
if(x > 0 && y > 0)
turfs_updated++
if((turfs_updated % (total_turfs>>2)) == 0)
sleep(1)
world << "<font color=red>Progress: [round((turfs_updated/total_turfs)*100, 0.01)]% ([turfs_updated]/[total_turfs])"
var/turf/T = locate(x,y,z)
if(!T.is_outside)
T.light_overlay = new(T)
//T.ResetValue()
if(!all_lightpoints_made) new/lightpoint(x+0.5,y+0.5,z)
//world << "[x],[y],[z]"
all_lightpoints_made = 1
started = 1
for(var/turf/T)
if(T.light_overlay)
T.ResetValue()
T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
world << "<b><font color=red>Lighting initialization took [(world.timeofday-start_time)/world.fps] seconds.</font></b>"
world << "<font color=red>Updated [turfs_updated] turfs.</font>"
/datum/controller/lighting/proc/GetLightIcon(a,b,c,d)
if(a <= 2) return LIGHT_ICON_1
else return LIGHT_ICON_2
-231
View File
@@ -1,231 +0,0 @@
/*
Overview:
Procs given to atom and turf by the lighting engine, as well as the lighting overlay object.
Atom Vars:
light - Contains the light object this atom is currently shining with.
Turf Vars:
light_overlay - Contains an object showing the lighting icon over this turf.
lit_value - Stores how brightly lit the turf is.
has_opaque - A cached value updated by CheckForOpaqueObjects()
is_outside - Any turf with this set to true will be considered as bright as space.
needs_light_update - Turf is marked for icon updates when true.
lightNE, lightSE, lightNW, lightSW - Hold the lightpoints on the four corners of this turf. See Lightpoint.dm
lit_by - A list of lights that are lighting this turf.
Atom Procs:
SetLight(intensity, radius)
A more versatile SetLuminosity() that allows independent control of intensity and radius.
Called behind the scenes of SetLuminosity().
SetOpacity(opacity)
Does the same thing as DAL.
Turf Procs:
UpdateLight()
Called by the lighting controller. It is advisable not to call this manually due to the cost of lightpoint/max_value()
AddLight(light/light)
Called by light/Reset() to light this turf with a particular light.
RemoveLight(light/light)
Called by light/Off() to unlight turfs that were lit by it.
ResetValue()
Called when lights are reset or starlight is changed.
ResetCachedValues()
Resets cached values of all four light points. Called by ResetValue().
CheckForOpaqueObjects()
Called by lighting_controller.Initialize(), SetOpacity() or when a turf might change opacity.
Resets the opacity cache and looks for opaque objects. Also responsible for adding and removing borders to space.
*/
atom/movable/lighting_overlay
name = ""
anchored = 1
layer = 9
mouse_opacity = 0
invisibility = INVISIBILITY_LIGHTING
atom/movable/lighting_overlay/proc/set_state(a,b,c,d)
icon_state = "[a][b][c][d]"
icon = lighting_controller.GetLightIcon(a,b,c,d)
atom/var/light/light
turf/var/atom/movable/lighting_overlay/light_overlay
turf/var/lit_value = 0
turf/var/max_brightness = 0
turf/var/has_opaque = -1
turf/var/is_outside = 0
turf/var/is_border = 0
turf/var/lightpoint/lightNE
turf/var/lightpoint/lightNW
turf/var/lightpoint/lightSE
turf/var/lightpoint/lightSW
turf/var/list/lit_by
atom/movable/New()
. = ..()
if(luminosity)
if(!light)
SetLight(luminosity,luminosity)
else
light.atom = src
light.Reset()
else if(light)
light.atom = src
light.Reset()
if(opacity)
if(lighting_ready())
opacity = 0
SetOpacity(1)
atom/movable/Del()
if(light) light.Off()
if(opacity) SetOpacity(0)
. = ..()
atom/movable/Move(turf/newloc)
var/o = opacity
if(o) SetOpacity(0)
. = ..()
if(.)
if(o) SetOpacity(1)
turf/Entered(atom/movable/M)
. = ..()
if(M.light) M.light.Reset()
atom/proc/SetLight(intensity, radius)
//if(lights_verbose) world << "SetLight([intensity],[radius])"
if(!intensity)
if(!light || !light.intensity)
//if(lights_verbose) world << "Still off."
return
//if(lights_verbose) world << "Shut off light with [light.lit_turfs.len] turfs lit."
light.Off()
light.intensity = 0
//if(lighting_ready()) lighting_controller.FlushIconUpdates()
return
if(!light)
//if(lights_verbose) world << "New light."
light = new(src)
if(light.intensity == intensity)
//if(lights_verbose) world << "Same intensity."
return
light.radius = min(radius,15)
light.intensity = intensity
light.Reset()
//if(lighting_ready()) lighting_controller.FlushIconUpdates()
atom/proc/SetOpacity(o)
if(o == opacity) return
opacity = o
var/turf/T = loc
if(isturf(T))
T.CheckForOpaqueObjects()
for(var/light/A in T.lit_by)
A.Reset()
//lighting_controller.FlushIconUpdates()
atom/proc/UpdateLights()
if(light) light.Reset()
for(var/atom/movable/A in src)
if(A.light) A.light.Reset()
//turf/proc/UpdateLight()
// if(light_overlay)
// light_overlay.icon_state = "[lightSE.max_value()][lightSW.max_value()][lightNW.max_value()][lightNE.max_value()]"
turf/proc/AddLight(light/light, brightness)
if(is_outside) return
if(brightness <= 0) return
if(!lit_by) lit_by = list()
lit_by.Add(light)
lit_by[light] = brightness
if(lighting_ready())
if(brightness > max_brightness)
lit_value = LIGHTCLAMP(brightness)
max_brightness = brightness
if(lightNE) lightNE.cached_value = -1
if(lightNW) lightNW.cached_value = -1
if(lightSE) lightSE.cached_value = -1
if(lightSW) lightSW.cached_value = -1
for(var/turf/T in range(1,src))
if(T.light_overlay)
T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
turf/proc/RemoveLight(light/light)
if(lit_by)
var/brightness = lit_by[light]
lit_by.Remove(light)
if(brightness == max_brightness)
ResetValue()
if(!lit_by.len) lit_by = null
//Only called by ChangeTurf, because it really needs it.
turf/proc/ResetAllLights()
for(var/light/light in lit_by)
light.Reset()
/turf/space/ResetAllLights()
var/atom/movable/lighting_overlay/overlay = locate() in src
if(overlay) overlay.loc = null
light_overlay = null
is_outside = 1
. = ..()
turf/proc/ResetValue()
if(is_outside)
max_brightness = lighting_controller.starlight
lit_value = LIGHTCLAMP(lighting_controller.starlight)
return
if(has_opaque < 0) CheckForOpaqueObjects()
if(has_opaque)
lit_value = 0
else
max_brightness = 0
for(var/light/light in lit_by)
var/brightness = lit_by[light]//light.CalculateBrightness(src)
if(brightness > max_brightness)
max_brightness = brightness
lit_value = LIGHTCLAMP(max_brightness)
if(lighting_ready())
if(lightNE) lightNE.cached_value = -1
if(lightNW) lightNW.cached_value = -1
if(lightSE) lightSE.cached_value = -1
if(lightSW) lightSW.cached_value = -1
for(var/turf/T in range(1,src))
if(T.light_overlay)
T.light_overlay.set_state(MAX_VALUE(T.lightSE), MAX_VALUE(T.lightSW), MAX_VALUE(T.lightNW), MAX_VALUE(T.lightNE))
turf/proc/CheckForOpaqueObjects()
has_opaque = opacity
if(!opacity)
for(var/atom/movable/M in contents)
if(M.opacity)
has_opaque = 1
break
@@ -1,89 +0,0 @@
/*
Overview:
This object functions similarly to /tg/'s /light. It is responsible for calculating what turfs are lit by it.
Class Vars:
radius - Set by atom/SetLight(). This stores how far out turfs will be lit up.
intensity - Set by atom/SetLight(). Stores the amount of light generated at the center.
lit_turfs - A list of turfs being lit by this light.
atom - The atom this light is attached to.
Class Procs:
Reset()
This is called whenever the light changes, or the underlying atom changes position.
Off()
A quick way to turn off a light. Removes the light from all turfs in lit_turfs.
CalculateBrightness(turf/T)
Returns the brightness that should be displayed by this light on a specific turf.
*/
light/var/radius = 0
light/var/intensity = 0
light/var/ambient_extension = 3
light/var/list/lit_turfs = list()
light/var/atom/atom
light/New(atom/atom, radius, ambience=3)
ASSERT(atom)
if(istype(atom))
src.atom = atom
else
src.intensity = atom
src.radius = radius
src.ambient_extension = ambience
light/proc/Reset()
//if(atom.lights_verbose) world << "light.Reset()"
Off()
if(intensity > 0)
//if(atom.lights_verbose) world << "Restoring light."
var/turf/loc = atom
for(var/turf/T in view(loc,radius+ambient_extension))
if(!T.is_outside)
var/brightness = CalculateBrightness(T, loc)
T.AddLight(src, brightness)
lit_turfs.Add(T)
//if(atom.lights_verbose) world << "[lit_turfs.len] turfs added."
light/proc/Off()
//if(atom.lights_verbose) world << "light.Off()"
for(var/turf/T in lit_turfs)
T.RemoveLight(src)
lit_turfs.Cut()
light/proc/Flash(t)
Reset()
spawn(t)
Off()
light/proc/CalculateBrightness(turf/T, turf/loc)
ASSERT(T)
var/square = DISTSQ3(loc.x-T.x,loc.y-T.y,loc.z-T.z)
if(square > (radius+ambient_extension)*(radius+ambient_extension)) return 0
//+2 offset gives an ambient light effect.
var/value = ((radius)/(2*FSQRT(square) + 1)) * intensity - 0.48
/*
lightRadius
---------------- * lightValue - 0.48
2 * distance + 1
The light decreases by twice the distance, starting from the radius.
The + 1 causes the graph to shift to the left one unit so that division by zero is prevented on the source tile.
This is then multiplied by the light value to give the final result.
The -0.48 offset causes the value to be near zero at the radius.
This gives a result which is likely close to the inverse-square law in two dimensions instead of three.
*/
return max(min( value , intensity), 0) //Ensure the value never goes above the maximum light value or below zero.
//return cos(90 * sqrt(square) / max(1,lightRadius)) * lightValue
@@ -1,59 +0,0 @@
/*
Overview:
Perhaps the most cryptic datum in the lighting engine, there are four of these at the corners of every turf.
Any two turfs that share a corner will also have the same lightpoint. Because of the nature of the icons used,
light is shown at the corner of the turf rather than in the middle, necessitating some way to keep track of what
icon state to use.
Class Vars:
x, y, z - The position of the lightpoint. x and y will usually be expressed in terms of 0.5 due to its location on the corner.
NE, NW, SE, SW - The turfs that are in these directions relative to the lightpoint.
cached_value - A cached value of max_value().
Class Procs:
max_value()
The maximum of the light amounts on the four turfs of this light point.
*/
lightpoint
var/x
var/y
var/z
var/turf/NE
var/turf/NW
var/turf/SW
var/turf/SE
var/cached_value = -1
New(x,y,z)
var/turf/T = locate(x+0.5,y+0.5,z)
if(T)
NE = T
T.lightSW = src
T = locate(x-0.5,y+0.5,z)
if(T)
NW = T
T.lightSE = src
T = locate(x-0.5,y-0.5,z)
if(T)
SW = T
T.lightNE = src
T = locate(x+0.5,y-0.5,z)
if(T)
SE = T
T.lightNW = src
proc/max_value()
var
valueA = VALUE_OF(NW)
valueB = VALUE_OF(NE)
valueC = VALUE_OF(SW)
valueD = VALUE_OF(SE)
cached_value = max(valueA,valueB,valueC,valueD)
return cached_value
@@ -1,34 +0,0 @@
var/icon/lighting_dbg = icon('icons/Testing/Zone.dmi', "created")
atom/var/lights_verbose = 0
obj/machinery/light/verb/ShowInfluence()
set src in world
lights_verbose = 1
usr << "<b>[src]</b>"
if(light)
usr << "Intensity: [light.intensity]"
usr << "Radius: [light.radius]"
for(var/turf/T in light.lit_turfs)
T.overlays += lighting_dbg
spawn(50)
for(var/turf/T in light.lit_turfs)
T.overlays -= lighting_dbg
turf/verb/ShowData()
set src in world
usr << "<b>[src]</b>"
usr << "[MAX_VALUE(lightSE)][MAX_VALUE(lightSW)][MAX_VALUE(lightNW)][MAX_VALUE(lightNE)]"
usr << "Lit Value: [lit_value]"
usr << "Max Brightness: [max_brightness]"
usr << "Lit By: "
for(var/light/light in lit_by)
usr << " - [light.atom] \[[lit_by[light]]\][(lit_by[light] == max_brightness ? "(MAX)" : "")]"
light.atom.overlays += lighting_dbg
spawn(50)
for(var/light/light in lit_by)
light.atom.overlays -= lighting_dbg
@@ -1,19 +0,0 @@
#define LIGHT_ICON_1 'icons/effects/lights/lighting5-1.dmi'
#define LIGHT_ICON_2 'icons/effects/lights/lighting5-2.dmi'
#define LIGHT_STATES 4
#define SQ(X) ((X)*(X))
#define DISTSQ3(A,B,C) (SQ(A)+SQ(B)+SQ(C))
#define FSQRT(X) (X >= fastroot.len ? new_fsqrt(X) : fastroot[(X)+1])
#define MAX_VALUE(X) (X.cached_value < 0 ? X.max_value() : X.cached_value)
#define VALUE_OF(X) ( !X ? 0 : ( X.is_outside ? LIGHTCLAMP(lighting_controller.starlight) : X.lit_value ) )
#define LIGHTCLAMP(x) ( max(0,min(LIGHT_STATES,round(x,1))) )
var/list/fastroot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7)
proc/new_fsqrt(n)
//world << "Adding [n-fastroot.len] entries to root table."
for(var/i = fastroot.len, i <= n, i++)
fastroot += round(sqrt(i))
@@ -114,12 +114,10 @@
A.fired()
*/
proc/Emit()
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
var/obj/item/projectile/beam/emitter/A = getFromPool(/obj/item/projectile/beam/emitter, loc)
A.frequency = frequency
A.damage = mega_energy * 500
//
A.icon_state = "emitter"
playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1)
use_power(100 * mega_energy + 500)
/*if(prob(35))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
@@ -92,8 +92,8 @@
src.fire_delay = rand(20,100)
src.shot_number = 0
use_power(1000)
var/obj/item/projectile/beam/emitter/A = new /obj/item/projectile/beam/emitter( src.loc )
playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
var/obj/item/projectile/beam/emitter/A = getFromPool(/obj/item/projectile/beam/emitter, loc)
playsound(get_turf(src), 'sound/weapons/emitter.ogg', 25, 1)
if(prob(35))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -185,7 +185,7 @@
var/num_turfs = get_dist(src,target_mob)
while(get_turf(src) != target_turf && num_turfs > 0)
for(var/obj/structure/window/W in next_turf)
W.ex_act(2)
W.destroy()
for(var/obj/structure/table/O in next_turf)
O.ex_act(1)
for(var/obj/structure/grille/G in next_turf)
@@ -225,7 +225,7 @@
var/num_turfs = get_dist(src,target_turf)
while(get_turf(src) != target_turf && num_turfs > 0)
for(var/obj/structure/window/W in next_turf)
W.ex_act(2)
W.destroy()
for(var/obj/structure/table/O in next_turf)
O.ex_act(1)
for(var/obj/structure/grille/G in next_turf)
+2 -2
View File
@@ -144,8 +144,8 @@ You've gained <b>[totalkarma]</b> total karma in your time here.<br>"}
/client/proc/karmashopmenu()
var/dat = {"<B>Karma Shop</B><br>
<a href='?src=\ref[src];KarmaBuy=1'>Unlock Barber -- 5KP</a><br>
<a href='?src=\ref[src];KarmaBuy=2'>Unlock Nanotrasen Representative -- 15KP</a><br>
<a href='?src=\ref[src];KarmaBuy=3'>Unlock Customs Officer -- 30KP</a><br>
<a href='?src=\ref[src];KarmaBuy=2'>Unlock Nanotrasen Representative -- 30KP</a><br>
<a href='?src=\ref[src];KarmaBuy=3'>Unlock Customs Officer -- 15KP</a><br>
<a href='?src=\ref[src];KarmaBuy=4'>Unlock BlueShield -- 30KP</a><br>
<br>
<a href='?src=\ref[src];KarmaBuy=5'>Unlock Machine People -- 15KP</a><br>
+19 -15
View File
@@ -54,8 +54,8 @@
if(SOUTH)
dir = WEST
if(WEST)
dir = NORTHWEST
if(NORTHWEST)
dir = SOUTHWEST
if(SOUTHWEST)
dir = NORTH
return 1
@@ -120,7 +120,7 @@
screen_loc = "NORTH,WEST+2"
var/varholder = "name"
var/valueholder = "derp"
var/objholder = "/obj/structure/closet"
var/objholder = /obj/structure/closet
Click(location, control, params)
var/list/pa = params2list(params)
@@ -145,13 +145,13 @@
if(1)
return 1
if(2)
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")
var/list/removed_paths = list("/obj/effect/bhole")
if(objholder in removed_paths)
objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet"))
if(!ispath(objholder))
objholder = /obj/structure/closet
alert("That path is not allowed.")
objholder = "/obj/structure/closet"
else if (dd_hasprefix(objholder, "/mob") && !check_rights(R_DEBUG,0))
objholder = "/obj/structure/closet"
else
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = /obj/structure/closet
if(3)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
@@ -171,7 +171,8 @@
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world
if("turf-reference")
master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world
return 1
return 1
/proc/build_click(var/mob/user, buildmode, params, var/obj/object)
var/obj/effect/bmode/buildholder/holder = null
@@ -229,13 +230,16 @@
if(WEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = WEST
if(NORTHWEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
WIN.dir = NORTHWEST
if(SOUTHWEST)
new/obj/structure/window/full/reinforced(get_turf(object))
if(2)
if(pa.Find("left"))
var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir
if(ispath(holder.buildmode.objholder,/turf))
var/turf/T = get_turf(object)
T.ChangeTurf(holder.buildmode.objholder)
else
var/obj/A = new holder.buildmode.objholder (get_turf(object))
A.dir = holder.builddir.dir
else if(pa.Find("right"))
if(isobj(object)) del(object)
@@ -191,7 +191,7 @@
usr << "Message transmitted."
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
centcomm_message_cooldown = 1
spawn(6000)//10 minute cooldown
spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
@@ -208,7 +208,7 @@
usr << "Message transmitted."
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
centcomm_message_cooldown = 1
spawn(6000)//10 minute cooldown
spawn(600)//10 minute cooldown
centcomm_message_cooldown = 0
if("RestoreBackup" in href_list)
+1 -1
View File
@@ -86,7 +86,7 @@ obj/item/check_airflow_movable(n)
return
if(src:shoes)
if(istype(src:shoes, /obj/item/clothing/shoes/magboots))
if(src:shoes:magpulse)
if(src:shoes.flags & NOSLIP)
return
src << "\red You are sucked away by airflow!"
var/airflow_falloff = 9 - ul_FalloffAmount(airflow_dest) //It's a fast falloff calc. Very useful.
-1
View File
@@ -173,7 +173,6 @@
if(connections) connections.update_all()
/turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
del(giver)
return 0
/turf/return_air()
+134
View File
@@ -0,0 +1,134 @@
/*
* Experimental procs by ESwordTheCat.
*/
/*
* Get index of last char occurence to string.
*
* @args
* A, string to be search
* B, char used for search
*
* @return
* >0, index of char at string
* 0, char not found
* -1, parameter B is not a char
* -2, parameter A is not a string
*/
/proc/EgijkAeN(const/A, const/B)
if (istext(A) == 0 || length(A) < 1)
return -2
if (istext(B) == 0 || length(B) > 1)
return -1
var/i = findtext(A, B)
if (0 == i)
return 0
while (i)
. = i
i = findtext(A, B, i + 1)
/obj/machinery/proc/getArea()
var/area/A = loc.loc
if (A != myArea)
myArea = A
. = myArea
/**
* Object pooling.
*
* If this file is named experimental,
* well treat this implementation as experimental experimental (redundancy intended).
*
* WARNING, only supports /mob and /obj.
*/
#define DEBUG_OBJECT_POOL 0
#define MAINTAINING_OBJECT_POOL_COUNT 20
var/list/masterPool = list()
/*
* @args
* A, object type
* B, location to spawn
*
* Example call: getFromPool(/obj/item/weapon/shard, loc)
*/
/proc/getFromPool(const/A, const/B)
if (isnull(masterPool[A]))
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: new proc has been called ([A])."
#endif
return new A(B)
var/atom/movable/Object = masterPool[A][1]
masterPool[A] -= Object
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: getFromPool([A]) [length(masterPool[A])]"
#endif
if (!length(masterPool[A]))
masterPool[A] = null
Object.loc = B
return Object
/*
* @args
* A, object instance
*
* @return
* -1, if A is not a movable atom
*
* Example call: returnToPool(src)
*/
/proc/returnToPool(const/A)
if (!istype(A, /atom/movable))
return -1
var/atom/movable/Object = A
Object.resetVariables()
Object.loc = null
if (isnull(masterPool[Object.type]))
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: [Object.type] pool is empty, recreating pool."
#endif
masterPool[Object.type] = list()
else if (length(masterPool[Object.type]) > MAINTAINING_OBJECT_POOL_COUNT)
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: returnToPool([Object.type]) exceeds [num2text(MAINTAINING_OBJECT_POOL_COUNT)] discarding..."
#endif
return
#if DEBUG_OBJECT_POOL
world << "DEBUG_OBJECT_POOL: returnToPool([Object.type]) [length(masterPool[Object.type])]"
#endif
masterPool[Object.type] += Object
#undef MAINTAINING_OBJECT_POOL_COUNT
#undef DEBUG_OBJECT_POOL
/*
* Override this if the object variables needed to reset.
*
* Example: see, code\game\objects\structures\grille.dm
*/
/atom/movable
proc/resetVariables()
name = initial(name)
density = initial(density)
icon = initial(icon)
icon_state = initial(icon_state)
dir = initial(dir)
+2
View File
@@ -42,6 +42,8 @@ var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
//undershirt
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "None")
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
-7
View File
@@ -1,7 +0,0 @@
atom/movable/proc/setloc(newloc)
if(light)
var/oldloc = loc
loc = newloc
if(isturf(newloc) != isturf(oldloc)) light.Reset()
else
loc = newloc
+20 -19
View File
@@ -76,25 +76,6 @@ proc/age2agedescription(age)
if(70 to INFINITY) return "elderly"
else return "unknown"
/*
Proc for attack log creation, because really why not
1 argument is the actor
2 argument is the target of action
3 is the description of action(like punched, throwed, or any other verb)
4 is the tool with which the action was made(usually item)
5 is additional information, anything that needs to be added
*/
proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
if(ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
if(ismob(target))
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
log_attack("<font color='red'>[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
if(target.client)
if(what_done != ("shaked" || "CPRed" || "grabbed"))
message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)")
proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
@@ -117,3 +98,23 @@ proc/RoundHealth(health)
return "health-100"
return "0"
/*
Proc for attack log creation, because really why not
1 argument is the actor
2 argument is the target of action
3 is the description of action(like punched, throwed, or any other verb)
4 is the tool with which the action was made(usually item)
5 is additional information, anything that needs to be added
*/
proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=null)
if(ismob(user))
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
if(ismob(target))
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [what_done] by [user.name][ismob(user) ? "([user.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
log_attack("<font color='red'>[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition]</font>")
if(target.client)
if(what_done != ("shaked" || "CPRed" || "grabbed"))
message_admins("[user.name][ismob(user) ? "([user.ckey])" : ""] [what_done] [target.name][ismob(target) ? "([target.ckey])" : ""][object ? " with [object]" : " "][addition](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>)")
+5
View File
@@ -1,3 +1,8 @@
// So you can be all 10 SECONDS
#define SECONDS **10
#define MINUTES **600
#define HOURS **36000
//Returns the world time in english
proc/worldtime2text(time = world.time)
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
+1 -1
View File
@@ -172,7 +172,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/DirBlocked(turf/loc,var/dir)
for(var/obj/structure/window/D in loc)
if(!D.density) continue
if(D.dir == SOUTHWEST) return 1
if(D.is_fulltile()) return 1
if(D.dir == dir) return 1
for(var/obj/machinery/door/D in loc)
+1 -1
View File
@@ -46,7 +46,7 @@
continue // could not leave T0 in that direction
var/turf/T1 = get_step(T0,d)
if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) & get_dir(T1,src), border_only = 0))
if(!T1 || T1.density || !T1.ClickCross(get_dir(T1,T0) | get_dir(T1,src), border_only = 0))
continue // couldn't enter or couldn't leave T1
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target))
+67 -1
View File
@@ -168,6 +168,8 @@
*/
/mob/proc/RangedAttack(var/atom/A, var/params)
if(!mutations.len) return
if(ishuman(src) && (istype(src:gloves, /obj/item/clothing/gloves/yellow/power)) && a_intent == "harm")
PowerGlove(A)
if((M_LASER in mutations) && a_intent == "harm")
LaserEyes(A) // moved into a proc below
return
@@ -268,7 +270,7 @@
var/turf/T = get_turf(src)
var/turf/U = get_turf(A)
var/obj/item/projectile/beam/LE = new /obj/item/projectile/beam( loc )
var/obj/item/projectile/beam/LE = getFromPool(/obj/item/projectile/beam, loc)
LE.icon = 'icons/effects/genetics.dmi'
LE.icon_state = "eyelasers"
playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
@@ -290,6 +292,70 @@
else
src << "\red You're out of energy! You need food!"
/mob/proc/PowerGlove(atom/A)
return
/mob/living/carbon/human/PowerGlove(atom/A)
var/obj/item/clothing/gloves/yellow/power/G = src:gloves
var/time = 100
var/turf/T = get_turf(src)
var/turf/U = get_turf(A)
var/obj/structure/cable/cable = locate() in T
if(!cable || !istype(cable))
return
if(world.time < G.next_shock)
src << "<span class='warning'>[G] aren't ready to shock again!</span>"
return
src.visible_message("<span class='warning'>[name] fires an arc of electricity!</span>", \
"<span class='warning'>You fire an arc of electricity!</span>", \
"You hear the loud crackle of electricity!")
var/datum/powernet/PN = cable.get_powernet()
var/available = 0
var/obj/item/projectile/beam/lightning/L = getFromPool(/obj/item/projectile/beam/lightning, loc)
if(PN)
available = PN.avail
L.damage = PN.get_electrocute_damage()
if(available >= 5000000)
L.damage = 205
if(L.damage >= 200)
apply_damage(15, BURN, (hand ? "l_hand" : "r_hand"))
//usr:Stun(15)
//usr:Weaken(15)
//if(usr:status_flags & CANSTUN) // stun is usually associated with stutter
// usr:stuttering += 20
time = 200
src << "<span class='warning'>[G] overload from the massive current shocking you in the process!"
else if(L.damage >= 100)
apply_damage(5, BURN, (hand ? "l_hand" : "r_hand"))
//usr:Stun(10)
//usr:Weaken(10)
//if(usr:status_flags & CANSTUN) // stun is usually associated with stutter
// usr:stuttering += 10
time = 150
src << "<span class='warning'>[G] overload from the massive current shocking you in the process!"
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if(L.damage <= 0)
//del(L)
returnToPool(L)
if(L)
playsound(get_turf(src), 'sound/effects/eleczap.ogg', 75, 1)
L.tang = L.adjustAngle(get_angle(U,T))
L.icon = midicon
L.icon_state = "[L.tang]"
L.firer = usr
L.def_zone = get_organ_target()
L.original = src
L.current = U
L.starting = U
L.yo = U.y - T.y
L.xo = U.x - T.x
spawn( 1 )
L.process()
next_move = world.time + 12
G.next_shock = world.time + time
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
if( stat || buckled || !A || !x || !y || !A.x || !A.y ) return
+2 -3
View File
@@ -45,8 +45,7 @@ var/datum/controller/failsafe/Failsafe
MC_defcon = 0
MC_iteration = controller_iteration
//Lighting controller now neither processes nor iterates.
/*if(lighting_controller.processing)
if(lighting_controller.processing)
if(lighting_iteration == lighting_controller.iteration) //master_controller hasn't finished processing in the defined interval
switch(lighting_defcon)
if(0 to 3)
@@ -61,7 +60,7 @@ var/datum/controller/failsafe/Failsafe
lighting_defcon = 0
else
lighting_defcon = 0
lighting_iteration = lighting_controller.iteration*/
lighting_iteration = lighting_controller.iteration
else
MC_defcon = 0
lighting_defcon = 0
+62 -89
View File
@@ -83,7 +83,6 @@ datum/controller/game_controller/proc/setup()
if(ticker)
ticker.pregame()
new/datum/controller/lighting()
lighting_controller.Initialize()
@@ -162,28 +161,28 @@ datum/controller/game_controller/proc/process()
//MOBS
timer = world.timeofday
process_mobs()
processMobs()
mobs_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//DISEASES
timer = world.timeofday
process_diseases()
processDiseases()
diseases_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//MACHINES
timer = world.timeofday
process_machines()
processMachines()
machines_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//OBJECTS
timer = world.timeofday
process_objects()
processObjects()
objects_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
@@ -191,28 +190,28 @@ datum/controller/game_controller/proc/process()
//PIPENETS
if(!pipe_processing_killed)
timer = world.timeofday
process_pipenets()
processPipenets()
networks_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//POWERNETS
timer = world.timeofday
process_powernets()
processPowernets()
powernets_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//NANO UIS
timer = world.timeofday
process_nano()
processNano()
nano_cost = (world.timeofday - timer) / 10
sleep(breather_ticks)
//EVENTS
timer = world.timeofday
process_events()
processEvents()
events_cost = (world.timeofday - timer) / 10
//TICKER
@@ -237,112 +236,86 @@ datum/controller/game_controller/proc/process()
else
sleep(10)
datum/controller/game_controller/proc/process_mobs()
var/i = 1
while(i<=mob_list.len)
var/mob/M = mob_list[i]
if(M)
last_thing_processed = M.type
M.Life()
i++
/datum/controller/game_controller/proc/processMobs()
for (var/mob/Mob in mob_list)
if (Mob)
last_thing_processed = Mob.type
Mob.Life()
continue
mob_list.Cut(i,i+1)
datum/controller/game_controller/proc/process_diseases()
var/i = 1
while(i<=active_diseases.len)
var/datum/disease/Disease = active_diseases[i]
mob_list = mob_list - Mob
/datum/controller/game_controller/proc/processDiseases()
for (var/datum/disease/Disease in active_diseases)
if(Disease)
last_thing_processed = Disease.type
Disease.process()
i++
continue
active_diseases.Cut(i,i+1)
datum/controller/game_controller/proc/process_machines()
var/i = 1
while(i<=machines.len)
var/obj/machinery/Machine = machines[i]
if(Machine && Machine.loc)
last_thing_processed = Machine.type
if(Machine.process() != PROCESS_KILL)
if(Machine)
active_diseases -= Disease
// if(Machine.use_power)
// Machine.auto_use_power()
i++
/datum/controller/game_controller/proc/processMachines()
for (var/obj/machinery/Machinery in machines)
if (Machinery && Machinery.loc)
last_thing_processed = Machinery.type
if(Machinery.process() != PROCESS_KILL)
if (Machinery) // Why another check?
if (Machinery.use_power)
Machinery.auto_use_power()
continue
machines.Cut(i,i+1)
i=1
while(i<=active_areas.len)
var/area/A = active_areas[i]
if(A.powerupdate)
A.powerupdate -= 1
for(var/obj/machinery/M in A)
if(M)
if(M.use_power)
M.auto_use_power()
if(A.apc.len)
i++
continue
active_areas.Cut(i,i+1)
datum/controller/game_controller/proc/process_objects()
var/i = 1
while(i<=processing_objects.len)
var/obj/Object = processing_objects[i]
if(Object && Object.loc)
Machinery.removeAtProcessing()
/datum/controller/game_controller/proc/processObjects()
for (var/obj/Object in processing_objects)
if (Object && Object.loc)
last_thing_processed = Object.type
Object.process()
i++
continue
processing_objects.Cut(i,i+1)
datum/controller/game_controller/proc/process_pipenets()
processing_objects -= Object
/datum/controller/game_controller/proc/processPipenets()
last_thing_processed = /datum/pipe_network
var/i = 1
while(i<=pipe_networks.len)
var/datum/pipe_network/Network = pipe_networks[i]
if(Network)
Network.process()
i++
continue
pipe_networks.Cut(i,i+1)
datum/controller/game_controller/proc/process_powernets()
for (var/datum/pipe_network/Pipe_Network in pipe_networks)
if(Pipe_Network)
Pipe_Network.process()
continue
pipe_networks -= Pipe_Network
/datum/controller/game_controller/proc/processPowernets()
last_thing_processed = /datum/powernet
var/i = 1
while(i<=powernets.len)
var/datum/powernet/Powernet = powernets[i]
if(Powernet)
for (var/datum/powernet/Powernet in powernets)
if (Powernet)
Powernet.reset()
i++
continue
powernets.Cut(i,i+1)
datum/controller/game_controller/proc/process_nano()
var/i = 1
while(i<=nanomanager.processing_uis.len)
var/datum/nanoui/ui = nanomanager.processing_uis[i]
if(ui)
ui.process()
i++
powernets -= Powernet
/datum/controller/game_controller/proc/processNano()
for (var/datum/nanoui/Nanoui in nanomanager.processing_uis)
if (Nanoui)
Nanoui.process()
continue
nanomanager.processing_uis.Cut(i,i+1)
datum/controller/game_controller/proc/process_events()
nanomanager.processing_uis -= Nanoui
/datum/controller/game_controller/proc/processEvents()
last_thing_processed = /datum/event
var/i = 1
while(i<=events.len)
var/datum/event/Event = events[i]
if(Event)
for (var/datum/event/Event in events)
if (Event)
Event.process()
i++
continue
events.Cut(i,i+1)
events -= Event
checkEvent()
datum/controller/game_controller/proc/Recover() //Mostly a placeholder for now.
+1 -1
View File
@@ -19,7 +19,7 @@
feedback_add_details("admin_verb","RFailsafe")
if("Lighting")
new /datum/controller/lighting()
//lighting_controller.process()
lighting_controller.process()
feedback_add_details("admin_verb","RLighting")
if("Supply Shuttle")
supply_shuttle.process()
+6 -1
View File
@@ -151,12 +151,17 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(H.species.flags & HAS_SKIN_TONE)
if(H.species.bodyflags & HAS_SKIN_TONE)
if (H.s_tone >= 0)
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
// Skin color
if(H.species.flags & HAS_SKIN_TONE)
if(!H.species || H.species.flags & HAS_SKIN_COLOR)
preview_icon.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD)
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
+37 -41
View File
@@ -1,61 +1,43 @@
#define SOLAR_UPDATE_TIME 600 //duration between two updates of the whole sun/solars positions
/datum/sun
var/angle
var/dx
var/dy
// var/counter = 50 // to make the vars update during 1st call
var/rate
var/list/solars // for debugging purposes, references solars_list at the constructor
var/nexttime = 3600 // Replacement for var/counter to force the sun to move every X IC minutes
var/lastAngleUpdate
var/solar_next_update // last time the sun position was checked and adjusted
/datum/sun/New()
solars = solars_list
rate = rand(750,1250)/1000 // 75.0% - 125.0% of standard rotation
if(prob(50))
rate = rand(50,200)/100 // 50% - 200% of standard rotation
if(prob(50)) // same chance to rotate clockwise than counter-clockwise
rate = -rate
solar_next_update = world.time // init the timer
angle = rand (0,360) // the station position to the sun is randomised at round start
// calculate the sun's position given the time of day
// at the standard rate (100%) the angle is increase/decreased by 6 degrees every minute.
// a full rotation thus take a game hour in that case
/datum/sun/proc/calc_position()
/* counter++
if(counter<50) // count 50 pticks (50 seconds, roughly - about a 5deg change)
return
counter = 0 */
if(world.time < solar_next_update) //if less than 60 game secondes have passed, do nothing
return;
angle = ((rate*world.time/100)%360 + 360)%360
angle = (360 + angle + rate * 6) % 360 // increase/decrease the angle to the sun, adjusted by the rate
/*
Yields a 45 - 75 IC minute rotational period
Rotation rate can vary from 4.8 deg/min to 8 deg/min (288 to 480 deg/hr)
*/
if(lastAngleUpdate != angle)
for(var/obj/machinery/power/tracker/T in solars_list)
if(!T.powernet)
solars_list.Remove(T)
continue
T.set_angle(angle)
lastAngleUpdate=angle
if(nexttime > world.time)
return
nexttime = nexttime + 600 // 600 world.time ticks = 1 minute
solar_next_update += SOLAR_UPDATE_TIME // since we updated the angle, set the proper time for the next loop
// now calculate and cache the (dx,dy) increments for line drawing
var/s = sin(angle)
var/c = cos(angle)
if(c == 0)
// Either "abs(s) < abs(c)" or "abs(s) >= abs(c)"
// In both cases, the greater is greater than 0, so, no "if 0" check is needed for the divisions
dx = 0
dy = s
else if( abs(s) < abs(c))
if( abs(s) < abs(c))
dx = s / abs(c)
dy = c / abs(c)
@@ -65,28 +47,42 @@
dy = c / abs(s)
for(var/obj/machinery/power/solar/S in solars_list)
for(var/obj/machinery/power/M in solars_list)
if(!S.powernet)
solars_list.Remove(S)
if(!M.powernet)
solars_list.Remove(M)
continue
if(S.control)
occlusion(S)
// Solar Tracker
if(istype(M, /obj/machinery/power/tracker))
var/obj/machinery/power/tracker/T = M
T.set_angle(angle)
// Solar Control
else if(istype(M, /obj/machinery/power/solar_control))
var/obj/machinery/power/solar_control/C = M
if(C.track == 1) //if manual tracking...
C.tracker_update() //...update the position (not passing an angle, it is handled internally for manual tracking)
// Solar Panel
else if(istype(M, /obj/machinery/power/solar))
var/obj/machinery/power/solar/S = M
if(S.control)
occlusion(S)
// for a solar panel, trace towards sun to see if we're in shadow
/datum/sun/proc/occlusion(var/obj/machinery/power/solar/S)
var/ax = S.x // start at the solar panel
var/ay = S.y
var/turf/T = null
for(var/i = 1 to 20) // 20 steps is enough
ax += dx // do step
ay += dy
var/turf/T = locate( round(ax,0.5),round(ay,0.5),S.z)
T = locate( round(ax,0.5),round(ay,0.5),S.z)
if(T.x == 1 || T.x==world.maxx || T.y==1 || T.y==world.maxy) // not obscured if we reach the edge
break
+10
View File
@@ -174,6 +174,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Emergency Crate"
group = "Engineering"
/datum/supply_packs/evacuation
name = "Inflatable barriers"
contains = list(/obj/item/weapon/storage/briefcase/inflatable,
/obj/item/weapon/storage/briefcase/inflatable,
/obj/item/weapon/storage/briefcase/inflatable)
cost = 20
containertype = /obj/structure/closet/crate
containername = "Inflatable Barrier Crate"
group = "Engineering"
/datum/supply_packs/janitor
name = "Janitorial supplies"
contains = list(/obj/item/weapon/reagent_containers/glass/bucket,
+1
View File
@@ -759,6 +759,7 @@ var/list/vox_sounds = list(
"vox_420" = 'sound/vox_fem/vox_420.ogg',
"voxtest" = 'sound/vox_fem/voxtest.ogg',
"voxtest2" = 'sound/vox_fem/voxtest2.ogg',
"voxtest3" = 'sound/vox_fem/voxtest3.ogg',
"w" = 'sound/vox_fem/w.ogg',
"walk" = 'sound/vox_fem/walk.ogg',
"wall" = 'sound/vox_fem/wall.ogg',
+38
View File
@@ -0,0 +1,38 @@
/area/dynamic // Do not use.
name = "dynamic area"
icon_state = "purple"
var/match_tag = "none"
var/match_width = -1
var/match_height = -1
var/enable_lights = 0
/area/dynamic/destination // Do not use.
name = "dynamic area destination"
/area/dynamic/destination/lobby
name = "Arrivals Lobby"
match_tag = "arrivals"
match_width = 5
match_height = 4
enable_lights = 1
/area/dynamic/source // Do not use.
name = "dynamic area source"
/area/dynamic/source/lobby_bar
name = "\improper Bar"
match_tag = "arrivals"
match_width = 5
match_height = 4
/area/dynamic/source/lobby_russian
name = "\improper Russian Lounge"
match_tag = "arrivals"
match_width = 5
match_height = 4
/area/dynamic/source/lobby_disco
name = "\improper Disco Lounge"
match_tag = "arrivals"
match_width = 5
match_height = 4
+2 -5
View File
@@ -1039,10 +1039,6 @@ proc/process_ghost_teleport_locs()
name = "\improper Clothing Shop"
icon_state = "Theatre"
/area/holodeck
name = "\improper Holodeck"
icon_state = "Holodeck"
@@ -1707,7 +1703,6 @@ proc/process_ghost_teleport_locs()
//GAYBAR
/area/secret/gaybar
name = "\improper Dance Bar"
requires_power = 0
icon_state = "dancebar"
@@ -2043,6 +2038,7 @@ var/list/the_station_areas = list (
/area/hallway/primary/central,
/area/bridge,
/area/crew_quarters,
/area/civilian,
/area/holodeck,
/area/library,
/area/chapel,
@@ -2053,6 +2049,7 @@ var/list/the_station_areas = list (
/area/teleporter,
/area/medical,
/area/security,
/area/prison,
/area/quartermaster,
/area/janitor,
/area/hydroponics,
+5 -1
View File
@@ -26,16 +26,20 @@
// lighting_state = 4
//has_gravity = 0 // Space has gravity. Because.. because.
if(!requires_power)
if(requires_power)
luminosity = 0
else
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
luminosity = 1
lighting_use_dynamic = 0
..()
// spawn(15)
power_change() // all machines set to current power level, also updates lighting icon
InitializeLighting()
/area/proc/poweralert(var/state, var/obj/source as obj)
+1 -2
View File
@@ -58,7 +58,6 @@
return
/atom/proc/assume_air(datum/gas_mixture/giver)
del(giver)
return null
/atom/proc/remove_air(amount)
@@ -168,7 +167,7 @@ its easier to just keep the beam vertical.
//Maxdistance is the longest range the beam will persist before it gives up.
var/EndTime=world.time+time
var/broken = 0
var/obj/item/projectile/beam/lightning/light = new
var/obj/item/projectile/beam/lightning/light = getFromPool(/obj/item/projectile/beam/lightning)
while(BeamTarget&&world.time<EndTime&&get_dist(src,BeamTarget)<maxdistance&&z==BeamTarget.z)
//If the BeamTarget gets deleted, the time expires, or the BeamTarget gets out
//of range or to another z-level, then the beam will stop. Otherwise it will
+1 -1
View File
@@ -43,7 +43,7 @@
if(destination)
if(loc)
loc.Exited(src)
setloc(destination)
loc = destination
loc.Entered(src)
for(var/atom/movable/AM in loc)
AM.Crossed(src)
+15 -8
View File
@@ -24,13 +24,16 @@
#define DNA_UI_BEARD_G 5
#define DNA_UI_BEARD_B 6
#define DNA_UI_SKIN_TONE 7
#define DNA_UI_EYES_R 8
#define DNA_UI_EYES_G 9
#define DNA_UI_EYES_B 10
#define DNA_UI_GENDER 11
#define DNA_UI_BEARD_STYLE 12
#define DNA_UI_HAIR_STYLE 13
#define DNA_UI_LENGTH 13 // Update this when you add something, or you WILL break shit.
#define DNA_UI_SKIN_R 8
#define DNA_UI_SKIN_G 9
#define DNA_UI_SKIN_B 10
#define DNA_UI_EYES_R 11
#define DNA_UI_EYES_G 12
#define DNA_UI_EYES_B 13
#define DNA_UI_GENDER 14
#define DNA_UI_BEARD_STYLE 15
#define DNA_UI_HAIR_STYLE 16
#define DNA_UI_LENGTH 16 // Update this when you add something, or you WILL break shit.
#define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow.
@@ -138,6 +141,10 @@ var/global/list/bad_blocks[0]
SetUIValueRange(DNA_UI_EYES_G, character.g_eyes, 255, 1)
SetUIValueRange(DNA_UI_EYES_B, character.b_eyes, 255, 1)
SetUIValueRange(DNA_UI_SKIN_R, character.r_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1)
SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative.
SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1)
@@ -360,4 +367,4 @@ var/global/list/bad_blocks[0]
ResetSE()
unique_enzymes = md5(character.real_name)
reg_dna[unique_enzymes] = character.real_name
reg_dna[unique_enzymes] = character.real_name
+4
View File
@@ -139,6 +139,10 @@
H.g_facial = dna.GetUIValueRange(DNA_UI_BEARD_G, 255)
H.b_facial = dna.GetUIValueRange(DNA_UI_BEARD_B, 255)
H.r_skin = dna.GetUIValueRange(DNA_UI_SKIN_R, 255)
H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255)
H.b_skin = dna.GetUIValueRange(DNA_UI_SKIN_B, 255)
H.r_eyes = dna.GetUIValueRange(DNA_UI_EYES_R, 255)
H.g_eyes = dna.GetUIValueRange(DNA_UI_EYES_G, 255)
H.b_eyes = dna.GetUIValueRange(DNA_UI_EYES_B, 255)
+15 -12
View File
@@ -86,11 +86,14 @@
/obj/machinery/dna_scannernew/proc/eject_occupant()
src.go_out()
for(var/obj/O in src)
if((!istype(O,/obj/item/weapon/reagent_containers)) && (!istype(O,/obj/item/weapon/circuitboard/clonescanner)) && (!istype(O,/obj/item/weapon/stock_parts)) && (!istype(O,/obj/item/stack/cable_coil)))
O.setloc(get_turf(src))//Ejects items that manage to get in there (exluding the components)
if(!istype(O,/obj/item/weapon/circuitboard/clonescanner) && \
!istype(O,/obj/item/weapon/stock_parts) && \
!istype(O,/obj/item/stack/cable_coil) && \
O != beaker)
O.loc = get_turf(src)//Ejects items that manage to get in there (exluding the components and beaker)
if(!occupant)
for(var/mob/M in src)//Failsafe so you can get mobs out
M.setloc(get_turf(src))
M.loc = get_turf(src)
/obj/machinery/dna_scannernew/verb/move_inside()
set src in oview(1)
@@ -113,7 +116,7 @@
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
src.icon_state = "scanner_1"
src.add_fingerprint(usr)
@@ -191,7 +194,7 @@
beaker = item
user.drop_item()
item.setloc(src)
item.loc = src
user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!")
return
else if (!istype(item, /obj/item/weapon/grab))
@@ -214,7 +217,7 @@
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.occupant = M
src.icon_state = "scanner_1"
@@ -237,7 +240,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "scanner_0"
return
@@ -246,7 +249,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
@@ -255,7 +258,7 @@
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
@@ -264,7 +267,7 @@
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
@@ -277,7 +280,7 @@
/obj/machinery/dna_scannernew/blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
/obj/machinery/computer/scan_consolenew
@@ -313,7 +316,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/scan_consolenew/M = new /obj/item/weapon/circuitboard/scan_consolenew( A )
for (var/obj/C in src)
C.loc = src.loc
+3
View File
@@ -23,6 +23,9 @@
// Any of a number of GENE_ flags.
var/flags=0
// Chance of the gene to cause adverse effects when active
var/instability=0
/**
* Is the gene active in this mob's DNA?
*/
+7 -1
View File
@@ -29,6 +29,7 @@
desc = "The subject suffers from constant radiation sickness and causes the same on nearby organics."
activation_message = "You feel a strange sickness permeate your whole body."
deactivation_message = "You no longer feel awful and sick all over."
instability=5
New()
..()
@@ -216,6 +217,7 @@
desc = "Causes the subject's digestion to create a significant amount of noxious gas."
activation_message = "Your stomach grumbles unpleasantly."
deactivation_message = "Your stomach stops acting up. Phew!"
instability=2
mutation = M_TOXIC_FARTS
@@ -291,6 +293,7 @@
desc = "The subject becomes able to convert excess cellular energy into thermal energy."
activation_messages = list("You suddenly feel rather hot.")
deactivation_messages = list("You no longer feel uncomfortably hot.")
instability=5
spelltype=/obj/effect/proc_holder/spell/targeted/immolate
@@ -319,7 +322,9 @@
L.adjust_fire_stacks(0.5) // Same as walking into fire. Was 100 (goon fire)
L.visible_message("\red <b>[L.name]</b> suddenly bursts into flames!")
//playsound(L.loc, 'mag_fireballlaunch.ogg', 50, 0)
L.on_fire = 1
L.update_icon = 1
playsound(L.loc, 'sound/effects/bamf.ogg', 50, 0)
////////////////////////////////////////////////////////////////////////
@@ -329,6 +334,7 @@
desc = "The subject becomes able to transform the matter of their cells into a liquid state."
activation_messages = list("You feel strange and jiggly.")
deactivation_messages = list("You feel more solid.")
instability=2
verbtype=/proc/bioproc_melt
+17 -3
View File
@@ -17,6 +17,7 @@
desc = "Boosts efficiency in sectors of the brain commonly associated with meta-mental energies."
activation_messages = list("Your mind feels closed.")
deactivation_messages = list("You feel oddly exposed.")
instability=2
mutation=M_PSY_RESIST
@@ -28,6 +29,7 @@
/////////////////////////
/datum/dna/gene/basic/stealth
instability=7
can_activate(var/mob/M, var/flags)
// Can only activate one of these at a time.
if(is_type_in_list(/datum/dna/gene/basic/stealth,M.active_genes))
@@ -53,7 +55,7 @@
var/turf/simulated/T = get_turf(M)
if(!istype(T))
return
if(T.lit_value <= 2)
if(T.lighting_lumcount <= 2)
M.alpha = 0
else
M.alpha = round(255 * 0.80)
@@ -109,6 +111,7 @@
desc = "Allows the subject to lower the body temperature of others."
activation_messages = list("You notice a strange cold tingle in your fingertips.")
deactivation_messages = list("Your fingers feel warmer.")
instability=10
spelltype = /obj/effect/proc_holder/spell/targeted/cryokinesis
@@ -144,7 +147,12 @@
usr << "\red This will only work on normal organic beings."
return
C.bodytemperature = -300
if (M_RESIST_COLD in C.mutations)
C.visible_message("\red A cloud of fine ice crystals engulfs [C.name], but disappears almost instantly!")
return
C.bodytemperature = 0
C.adjustFireLoss(20)
C.ExtinguishMob()
C.visible_message("\red A cloud of fine ice crystals engulfs [C]!")
@@ -178,6 +186,7 @@
desc = "Allows the subject to eat just about anything without harm."
activation_messages = list("You feel hungry.")
deactivation_messages = list("You don't feel quite so hungry anymore.")
instability=3
spelltype=/obj/effect/proc_holder/spell/targeted/eat
@@ -199,6 +208,7 @@
range = 1
selection_type = "view"
var/list/types_allowed=list(/obj/item,/mob/living/simple_animal, /mob/living/carbon/monkey, /mob/living/carbon/human)
/obj/effect/proc_holder/spell/targeted/eat/choose_targets(mob/user = usr)
@@ -297,6 +307,7 @@
//cooldown = 30
activation_messages = list("Your leg muscles feel taut and strong.")
deactivation_messages = list("Your leg muscles shrink back to normal.")
instability=2
spelltype =/obj/effect/proc_holder/spell/targeted/leap
@@ -327,7 +338,7 @@
usr.visible_message("\red <b>[usr.name]</b> takes a huge leap!")
playsound(usr.loc, 'sound/weapons/thudswoosh.ogg', 50, 1)
var/prevLayer = usr.layer
usr.layer = 15
usr.layer = 9
for(var/i=0, i<10, i++)
step(usr, usr.dir)
@@ -374,6 +385,7 @@
//cooldown = 1800
activation_messages = list("You don't feel entirely like yourself somehow.")
deactivation_messages = list("You feel secure in your identity.")
instability=5
New()
..()
@@ -420,6 +432,7 @@
verbtype = /proc/bioproc_empath
activation_messages = list("You suddenly notice more about others than you did before.")
deactivation_messages = list("You no longer feel able to sense intentions.")
instability=1
New()
..()
@@ -515,6 +528,7 @@
desc = "Vastly increases the gas capacity of the subject's digestive tract."
activation_messages = list("You feel bloated and gassy.")
deactivation_messages = list("You no longer feel gassy. What a relief!")
instability=1
mutation = M_SUPER_FART
+4 -2
View File
@@ -110,9 +110,11 @@
sleep(48)
del(animation)
var/mob/living/carbon/human/O = new( src )
var/mob/living/carbon/human/O
if(Mo.greaterform)
O.set_species(Mo.greaterform)
O = new(src, Mo.greaterform)
else
O = new(src)
if (M.dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
+13
View File
@@ -6,6 +6,7 @@
name="No Breathing"
activation_messages=list("You feel no need to breathe.")
mutation=M_NO_BREATH
instability=2
New()
block=NOBREATHBLOCK
@@ -14,6 +15,7 @@
name="Remote Viewing"
activation_messages=list("Your mind expands.")
mutation=M_REMOTE_VIEW
instability=3
New()
block=REMOTEVIEWBLOCK
@@ -26,6 +28,7 @@
name="Regenerate"
activation_messages=list("You feel better.")
mutation=M_REGEN
instability=2
New()
block=REGENERATEBLOCK
@@ -34,6 +37,7 @@
name="Super Speed"
activation_messages=list("Your leg muscles pulsate.")
mutation=M_RUN
instability=1
New()
block=INCREASERUNBLOCK
@@ -42,6 +46,7 @@
name="Telepathy"
activation_messages=list("You expand your mind outwards.")
mutation=M_REMOTE_TALK
instability=1
New()
block=REMOTETALKBLOCK
@@ -54,6 +59,7 @@
name="Morph"
activation_messages=list("Your skin feels strange.")
mutation=M_MORPH
instability=2
New()
block=MORPHBLOCK
@@ -66,6 +72,7 @@
name="Heat Resistance"
activation_messages=list("Your skin is icy to the touch.")
mutation=M_RESIST_HEAT
instability=2
New()
block=COLDBLOCK
@@ -87,6 +94,7 @@
name="Cold Resistance"
activation_messages=list("Your body is filled with warmth.")
mutation=M_RESIST_COLD
instability=2
New()
block=FIREBLOCK
@@ -108,6 +116,7 @@
name="No Prints"
activation_messages=list("Your fingers feel numb.")
mutation=M_FINGERPRINTS
instability=1
New()
block=NOPRINTSBLOCK
@@ -116,6 +125,7 @@
name="Shock Immunity"
activation_messages=list("Your skin feels strange.")
mutation=M_NO_SHOCK
instability=2
New()
block=SHOCKIMMUNITYBLOCK
@@ -124,6 +134,7 @@
name="Midget"
activation_messages=list("Your skin feels rubbery.")
mutation=M_DWARF
instability=1
New()
block=SMALLSIZEBLOCK
@@ -175,6 +186,7 @@
name="X-Ray Vision"
activation_messages=list("The walls suddenly disappear.")
mutation=M_XRAY
instability=2
New()
block=XRAYBLOCK
@@ -184,6 +196,7 @@
activation_messages=list("You feel smarter.")
mutation=M_TK
activation_prob=15
instability=5
New()
block=TELEBLOCK
+1
View File
@@ -16,6 +16,7 @@ Obviously, requires DNA2.
desc = "Allows the subject to become the motherfucking Hulk."
activation_messages = list("Your muscles hurt.")
deactivation_messages = list("Your muscles quit tensing.")
instability=7
spelltype = /obj/effect/proc_holder/spell/targeted/hulk
+46 -1
View File
@@ -152,6 +152,51 @@ var/global/datum/controller/gameticker/ticker
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
spawn(0) // Forking dynamic room selection
var/list/area/dynamic/source/available_source_candidates = typesof(/area/dynamic/source) - /area/dynamic/source
var/list/area/dynamic/destination/available_destination_candidates = typesof(/area/dynamic/destination) - /area/dynamic/destination
for (var/area/dynamic/destination/current_destination_candidate in available_destination_candidates)
var/area/dynamic/destination/current_destination = locate(current_destination_candidate)
if (!current_destination)
continue
if (current_destination.match_width == 0 || current_destination.match_height == 0)
message_admins("Dynamic area destination '[current_destination.name]' does not have its size requirements set.")
continue
var/list/area/dynamic/source/candidate_source_areas = new /list(0)
for (var/area/dynamic/source/candidate_source_area in available_source_candidates)
var/area/dynamic/source/candidate_source = locate(candidate_source_area)
if (!candidate_source)
continue
if (candidate_source.match_tag != current_destination.match_tag)
continue
if (candidate_source.match_width != current_destination.match_width || \
candidate_source.match_height != current_destination.match_height)
continue
candidate_source_areas += candidate_source
if (candidate_source_areas.len == 0)
message_admins("Failed to find a matching source for dynamic area: [current_destination.name]")
continue
var/area/dynamic/source/selected_source = pick(candidate_source_areas)
available_source_candidates -= selected_source
selected_source.copy_contents_to(current_destination, 0)
if (current_destination.enable_lights || selected_source.enable_lights)
current_destination.power_light = 1
else
current_destination.power_light = 0
current_destination.power_change()
//start_events() //handles random events and space dust.
//new random event system is handled from the MC.
@@ -164,7 +209,7 @@ var/global/datum/controller/gameticker/ticker
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
master_controller.process() //Start master_controller.process()
//lighting_controller.process() //Start processing DynamicAreaLighting updates
lighting_controller.process() //Start processing DynamicAreaLighting updates
if(config.sql_enabled)
+29 -20
View File
@@ -35,13 +35,22 @@ datum/objective
if(possible_targets.len > 0)
target = pick(possible_targets)
proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) )
target = possible_target
break
if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && (possible_target.current.stat != 2) )
possible_targets += possible_target
if(possible_targets.len > 0)
target = pick(possible_targets)
//Selects someone with a specific special role if role is != null. Or just anyone with a special role
proc/find_target_with_special_role(role)
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && ishuman(possible_target.current) && (role && possible_target.special_role == role || !role && possible_target.special_role) && (possible_target.current.stat != 2) )
possible_targets += possible_target
if(possible_targets.len > 0)
target = pick(possible_targets)
datum/objective/assassinate
@@ -229,7 +238,7 @@ datum/objective/debrain//I want braaaainssss
find_target()
..()
if(target && target.current)
explanation_text = "Steal the brain of [target.current.real_name]."
explanation_text = "Steal the brain of [target.current.real_name] the [target.assigned_role]."
else
explanation_text = "Free Objective"
return target
@@ -275,6 +284,14 @@ datum/objective/protect//The opposite of killing a dude.
explanation_text = "Free Objective"
return target
find_target_with_special_role(role,role_type=0)
..(role)
if(target && target.current)
explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
else
explanation_text = "Free Objective"
return target
check_completion()
if(!target) //If it's a free objective.
return 1
@@ -306,22 +323,14 @@ datum/objective/hijack
return 1
datum/objective/speciesist
var/datum/species/speciesist_target = null
var/is_human = 0
find_target()
var/list/possible_targets = list()
var/mob/living/carbon/human/O = owner.current
for(var/datum/mind/possible_target in ticker.minds)
if(ishuman(possible_target.current))
var/mob/living/carbon/human/M = possible_target.current
if (M.species != O.species)
possible_targets += M.species
if(possible_targets.len > 0)
speciesist_target = pick(possible_targets)
explanation_text = "Do not allow any [speciesist_target.name]s to escape on the shuttle."
if(istype(owner.current,/mob/living/carbon/human/human))
explanation_text = "Do not allow any non-humans to escape on the shuttle."
is_human = 1
else
explanation_text = "Free Objective"
return speciesist_target
explanation_text = "Do not allow any humans to escape on the shuttle."
return 1
check_completion()
if(emergency_shuttle.location<2)
@@ -329,7 +338,7 @@ datum/objective/speciesist
var/area/shuttle = locate(/area/shuttle/escape/centcom)
for(var/mob/living/carbon/human/player in player_list)
if (player.mind)
if (player.species == speciesist_target)
if (is_human ? !istype(player,/mob/living/carbon/human/human) : istype(player,/mob/living/carbon/human/human))
if(player.stat != DEAD) //they're not dead!
if(get_turf(player) in shuttle)
return 0
+1 -1
View File
@@ -87,7 +87,7 @@
EATBLOCK = getAssignedBlock("EAT", numsToAssign, DNA_HARD_BOUNDS, good=1)
JUMPBLOCK = getAssignedBlock("JUMP", numsToAssign, DNA_HARD_BOUNDS, good=1)
MELTBLOCK = getAssignedBlock("MELT", numsToAssign, good=1)
IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign, good=1)
IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign)
EMPATHBLOCK = getAssignedBlock("EMPATH", numsToAssign, DNA_HARD_BOUNDS, good=1)
SUPERFARTBLOCK = getAssignedBlock("SUPERFART", numsToAssign, DNA_HARDER_BOUNDS, good=1)
POLYMORPHBLOCK = getAssignedBlock("POLYMORPH", numsToAssign, DNA_HARDER_BOUNDS, good=1)
+3 -3
View File
@@ -96,12 +96,12 @@
else
switch(rand(1,100))
if(1 to 25)
if(1 to 30)
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.find_target()
traitor.objectives += kill_objective
if(26 to 40)
if(31 to 40)
var/datum/objective/debrain/debrain_objective = new
debrain_objective.owner = traitor
debrain_objective.find_target()
@@ -109,7 +109,7 @@
if(41 to 50)
var/datum/objective/protect/protect_objective = new
protect_objective.owner = traitor
protect_objective.find_target_by_role("Traitor",0) //Protect your fellow traitor
protect_objective.find_target_with_special_role(null,0)
if (!protect_objective.target)
protect_objective.find_target() //We could not find any traitors, protect somebody
traitor.objectives += protect_objective
@@ -222,9 +222,7 @@
C.Stun(8)
C.Jitter(150)
for(var/obj/structure/window/W in oview(3))
new W.shardtype(W.loc)
if(W.reinf) new /obj/item/stack/rods(W.loc)
del(W)
W.destroy()
playsound(M.current.loc, 'sound/effects/creepyshriek.ogg', 100, 1)
M.current.remove_vampire_blood(30)
M.current.verbs -= /client/vampire/proc/vampire_screech
@@ -278,7 +276,7 @@
if(!mind.vampire.iscloaking)
alpha = 255
return 0
if(T.lit_value <= 2)
if(T.lighting_lumcount <= 2)
alpha = round((255 * 0.15))
return 1
else
@@ -432,7 +430,7 @@
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
// LIGHTING CHECK
if(T.lit_value > max_lum) continue
if(T.lighting_lumcount > max_lum) continue
turfs += T
if(!turfs.len)
+1
View File
@@ -186,6 +186,7 @@
H.equip_or_collect(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/shaftminer(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_or_collect(new /obj/item/weapon/pickaxe/drill(H), slot_r_hand)
// H.equip_or_collect(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
+2 -2
View File
@@ -51,7 +51,7 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
@@ -86,7 +86,7 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
equip(var/mob/living/carbon/human/H)
+1 -1
View File
@@ -12,7 +12,7 @@
access = list(access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist)
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
minimal_access = list(access_eva, access_medical, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist, access_maint_tunnels)
minimal_player_age = 7
+1 -1
View File
@@ -13,7 +13,7 @@
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
minimal_access = list(access_eva, access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_maint_tunnels)
+4 -4
View File
@@ -13,7 +13,7 @@
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
minimal_access = list(access_eva, access_security, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_customs)
@@ -180,12 +180,12 @@
flag = CUSTOMS
department_flag = KARMA
faction = "Station"
total_positions = 1
spawn_positions = 1
total_positions = 2
spawn_positions = 2
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_customs, access_maint_tunnels)
minimal_access = list(access_brig, access_sec_doors, access_security, access_customs, access_maint_tunnels)
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
+5
View File
@@ -52,6 +52,7 @@ var/global/datum/controller/occupations/job_master
if(!job) return 0
if(jobban_isbanned(player, rank)) return 0
if(!job.player_old_enough(player.client)) return 0
if(!is_job_whitelisted(player, rank)) return 0
var/position_limit = job.total_positions
if(!latejoin)
position_limit = job.spawn_positions
@@ -308,6 +309,10 @@ var/global/datum/controller/occupations/job_master
Debug("DO player not old enough, Player: [player], Job:[job.title]")
continue
if(!is_job_whitelisted(player, job.title))
Debug("DO player not whitelisted, Player: [player], Job:[job.title]")
continue
// If the player wants that job on this level, then try give it to him.
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
+11 -32
View File
@@ -187,7 +187,7 @@
blob_act()
if(prob(75))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
A.blob_act()
del(src)
return
@@ -198,7 +198,7 @@
if(!beaker)
beaker = G
user.drop_item()
G.setloc(src)
G.loc = src
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
src.updateUsrDialog()
return
@@ -228,7 +228,7 @@
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.occupant = M
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
@@ -248,21 +248,21 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(2.0)
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
if(3.0)
if(prob(25))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
qdel(src)
return
@@ -309,7 +309,7 @@
if(src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
if(orient == "RIGHT")
icon_state = "sleeper_0-r"
@@ -411,29 +411,8 @@
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
usr << "You're too busy getting your life sucked out of you."
return
visible_message("[usr] starts climbing into the sleeper.", 3)
if(do_after(usr, 20))
if(src.occupant)
usr << "\blue <B>The sleeper is already occupied!</B>"
return
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
src.occupant = usr
src.icon_state = "sleeper_1"
if(orient == "RIGHT")
icon_state = "sleeper_1-r"
usr << "\blue <b>You feel cool air surround you. You go numb as your senses turn inward.</b>"
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
return
for(var/obj/O in src)
del(O)
src.add_fingerprint(usr)
return
return
return
+9 -9
View File
@@ -46,7 +46,7 @@
usr.pulling = null
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
@@ -60,12 +60,12 @@
if ((!( src.occupant ) || src.locked))
return
for(var/obj/O in src)
O.setloc(src.loc)
O.loc = src.loc
//Foreach goto(30)
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
src.icon_state = "body_scanner_0"
return
@@ -83,11 +83,11 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.occupant = M
src.icon_state = "body_scanner_1"
for(var/obj/O in src)
O.setloc(src.loc)
O.loc = src.loc
//Foreach goto(154)
src.add_fingerprint(user)
//G = null
@@ -98,7 +98,7 @@
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(35)
//SN src = null
@@ -107,7 +107,7 @@
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(108)
//SN src = null
@@ -116,7 +116,7 @@
if(3.0)
if (prob(25))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
ex_act(severity)
//Foreach goto(181)
//SN src = null
@@ -128,7 +128,7 @@
/obj/machinery/bodyscanner/blob_act()
if(prob(50))
for(var/atom/movable/A as mob|obj in src)
A.setloc(src.loc)
A.loc = src.loc
del(src)
/obj/machinery/body_scanconsole/ex_act(severity)
+2 -2
View File
@@ -108,7 +108,7 @@ obj/machinery/air_sensor
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/air_management/M = new /obj/item/weapon/circuitboard/air_management( A )
for (var/obj/C in src)
C.loc = src.loc
@@ -389,7 +389,7 @@ legend {
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/injector_control/M = new /obj/item/weapon/circuitboard/injector_control( A )
for (var/obj/C in src)
C.loc = src.loc
+34 -1
View File
@@ -275,9 +275,42 @@ var/global/list/autolathe_recipes_hidden = list( \
if (!busy)
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
var/obj/template = locate(href_list["make"])
// critical exploit fix start -walter0o
var/obj/item/template = null
var/attempting_to_build = locate(href_list["make"])
if(!attempting_to_build)
return
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
template = attempting_to_build
else // somebody is trying to exploit, alert admins -walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate <a href='?_src_=vars;Vars=\ref[attempting_to_build]'>[attempting_to_build]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
return
// now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/max_multiplier = 1
if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
var/obj/item/stack/S = template
max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to <u>[multiplier]</u> on <u>[template]</u> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])" , 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
return
var/power = max(2000, (template.m_amt+template.g_amt+template.f_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier && src.f_amount >= template.f_amt*multiplier)
busy = 1
+2 -2
View File
@@ -34,7 +34,7 @@
/obj/machinery/biogenerator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/weapon/reagent_containers/glass))
if(beaker)
user << "\red The biogenerator already occuped."
user << "\red The biogenerator is already loaded."
else
user.before_take_item(O)
O.loc = src
@@ -220,4 +220,4 @@
create_product(href_list["item"],text2num(href_list["cost"]))
if("menu")
menustat = "menu"
updateUsrDialog()
updateUsrDialog()
+1 -1
View File
@@ -210,7 +210,7 @@
/proc/DirBlockedWithAccess(turf/loc,var/dir,var/obj/item/weapon/card/id/ID)
for(var/obj/structure/window/D in loc)
if(!D.density) continue
if(D.dir == SOUTHWEST) return 1
if(D.is_fulltile()) return 1
if(D.dir == dir) return 1
for(var/obj/machinery/door/D in loc)
+5 -3
View File
@@ -824,7 +824,7 @@ Auto Patrol: []"},
if (src.emagged == 2)
projectile = /obj/item/projectile/beam
else
projectile = /obj/item/projectile/energy/electrode
projectile = /obj/item/projectile/beam/stun
else if(lasercolor == "b")
if (src.emagged == 2)
projectile = /obj/item/projectile/beam/lastertag/omni
@@ -1020,7 +1020,8 @@ Auto Patrol: []"},
if((src.lasercolor == "b") && (src.disabled == 0))
if(istype(Proj, /obj/item/projectile/beam/lastertag/red))
src.disabled = 1
del (Proj)
//del (Proj)
returnToPool(Proj)
sleep(100)
src.disabled = 0
else
@@ -1028,7 +1029,8 @@ Auto Patrol: []"},
else if((src.lasercolor == "r") && (src.disabled == 0))
if(istype(Proj, /obj/item/projectile/beam/lastertag/blue))
src.disabled = 1
del (Proj)
//del (Proj)
returnToPool(Proj)
sleep(100)
src.disabled = 0
else
+2 -2
View File
@@ -92,7 +92,7 @@
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
return
use_power(200) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
charging.give(175) //inefficiency.
use_power(2000) //this used to use CELLRATE, but CELLRATE is fucking awful. feel free to fix this properly!
charging.give(1750) //inefficiency.
updateicon()
+1 -2
View File
@@ -161,7 +161,7 @@
spawn(30)
src.eject_wait = 0
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src, R.dna.species)
occupant = H
if(!R.dna.real_name) //to prevent null names
@@ -211,7 +211,6 @@
if(R.dna.species == "Human") //no more xenos losing ears/tentacles
H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
H.set_species(R.dna.species)
//for(var/datum/language/L in languages)
// H.add_language(L.name)
H.suiciding = 0
+20 -3
View File
@@ -266,9 +266,26 @@
src.updateUsrDialog()
else
..()
return
else if(istype(I, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/arcade/M = new /obj/item/weapon/circuitboard/arcade( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
getFromPool(/obj/item/weapon/shard, loc)
A.state = 3
A.icon_state = "3"
else
user << "\blue You disconnect the monitor."
A.state = 4
A.icon_state = "4"
+1 -1
View File
@@ -112,7 +112,7 @@
C.loc = src.loc
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
A.state = 3
A.icon_state = "3"
else
+1 -1
View File
@@ -56,7 +56,7 @@
if(stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
getFromPool(/obj/item/weapon/shard, loc)
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null
+1 -1
View File
@@ -45,7 +45,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/powermonitor/M = new /obj/item/weapon/circuitboard/powermonitor( A )
for (var/obj/C in src)
C.loc = src.loc
@@ -47,7 +47,7 @@ var/prison_shuttle_timeleft = 0
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
A.state = 3
A.icon_state = "3"
else
+2 -2
View File
@@ -251,7 +251,7 @@
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.setloc(get_step(loc, SOUTH)) //this doesn't account for walls or anything, but i don't forsee that being a problem.
occupant.loc = get_step(loc, SOUTH) //this doesn't account for walls or anything, but i don't forsee that being a problem.
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70) //Patch by Aranclanos to stop people from taking burn damage after being ejected
occupant.bodytemperature = 261
// occupant.metabslow = 0
@@ -275,7 +275,7 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.setloc(src)
M.loc = src
if(M.health > -100 && (M.health < 0 || M.sleeping))
M << "\blue <b>You feel a cold liquid surround you. Your skin starts to freeze up.</b>"
occupant = M
+8 -8
View File
@@ -80,7 +80,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
visible_message("\blue The console beeps happily as it disgorges \the [I].", 3)
I.setloc(get_turf(src))
I.loc = get_turf(src)
frozen_items -= I
else if(href_list["allitems"])
@@ -92,7 +92,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
visible_message("\blue The console beeps happily as it disgorges the desired objects.", 3)
for(var/obj/item/I in frozen_items)
I.setloc(get_turf(src))
I.loc = get_turf(src)
frozen_items -= I
else if(href_list["crew"])
@@ -186,11 +186,11 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
//Drop all items into the pod.
for(var/obj/item/W in occupant)
occupant.drop_from_inventory(W)
W.setloc(src)
W.loc = src
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
for(var/obj/item/O in W.contents)
O.setloc(src)
O.loc = src
//Delete all items not on the preservation list.
var/list/items = src.contents
@@ -240,7 +240,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
current_mode.possible_traitors.Remove(occupant)
// Delete them from datacore.
if(PDA_Manifest.len)
PDA_Manifest.Cut()
for(var/datum/data/record/R in data_core.medical)
@@ -305,7 +305,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
if(do_after(user, 20))
if(!M || !G || !G:affecting) return
M.setloc(src)
M.loc = src
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
@@ -375,7 +375,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
if(orient_right)
@@ -401,7 +401,7 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
occupant.client.eye = src.occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.setloc(get_turf(src))
occupant.loc = get_turf(src)
occupant = null
if(orient_right)
+7 -5
View File
@@ -1079,11 +1079,13 @@ About the new airlock wires panel:
if(istype(src, /obj/machinery/door/airlock/clown))
playsound(src.loc, 'sound/items/bikehorn.ogg', 30, 1)
else
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
for(var/turf/turf in locs)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis)
killthis.ex_act(2)//Smashin windows
playsound(get_turf(src), 'sound/machines/airlock.ogg', 30, 1)
for(var/turf/T in loc)
var/obj/structure/window/W = locate(/obj/structure/window) in T
if (W)
W.destroy()
..()
return
+13 -5
View File
@@ -125,7 +125,7 @@
/obj/machinery/door/window/proc/take_damage(var/damage)
src.health = max(0, src.health - damage)
if (src.health <= 0)
new /obj/item/weapon/shard(src.loc)
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
CC.amount = 2
var/obj/item/weapon/airlock_electronics/ae
@@ -181,7 +181,12 @@
return
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("\red <B>[user] smashes against the [src.name].</B>", 1)
take_damage(25)
if (src.health <= 0)
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
CC.amount = 2
src.density = 0
del(src)
else
return src.attack_hand(user)
@@ -259,11 +264,14 @@
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
var/aforce = I.force
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("\red <B>[src] was hit by [I].</B>")
if(I.damtype == BRUTE || I.damtype == BURN)
take_damage(aforce)
if (src.health <= 0)
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
CC.amount = 2
src.density = 0
del(src)
return
+7 -7
View File
@@ -468,7 +468,7 @@ obj/machinery/hydroponics/proc/mutatepest() // Until someone makes a spaceworm,
obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
//Called when mob user "attacks" it with object O
if (istype(O, /obj/item/weapon/reagent_containers/glass/bucket))
if (istype(O, /obj/item/weapon/reagent_containers/glass))
var/b_amount = O.reagents.get_reagent_amount("water")
if(b_amount > 0 && waterlevel < 100)
if(b_amount + waterlevel > 100)
@@ -476,17 +476,17 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
O.reagents.remove_reagent("water", b_amount)
waterlevel += b_amount
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
user << "You fill the [src] with [b_amount] units of water."
user << "You fill \the [src] with [b_amount] units of water."
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
// Toxicity dilutation code. The more water you put in, the lesser the toxin concentration.
toxic -= round(b_amount/4)
if (toxic < 0 ) // Make sure it won't go overoboard
if (toxic < 0 ) // Make sure it won't go overboard
toxic = 0
else if(waterlevel >= 100)
user << "\red The [src] is already full."
user << "\red \The [src] is already full."
else
user << "\red The bucket is not filled with water."
user << "\red \The [O] is not filled with water."
updateicon()
else if ( istype(O, /obj/item/nutrient) )
@@ -504,7 +504,7 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (planted)
if (S.mode == 1)
if(!S.reagents.total_volume)
user << "\red The syringe is empty."
user << "\red \The [O] is empty."
return
user << "\red You inject the [myseed.plantname] with a chemical solution."
+58 -50
View File
@@ -59,7 +59,6 @@
if(!isbroken)
icon_state = icon_off
/*******************
* Item Adding
********************/
@@ -83,6 +82,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
@@ -100,81 +101,88 @@
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/attack_paw(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/smartfridge/attack_ai(mob/user as mob)
return 0
/obj/machinery/smartfridge/attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
ui_interact(user)
/*******************
* SmartFridge Menu
********************/
/obj/machinery/smartfridge/interact(mob/user as mob)
if(!src.ispowered)
return
/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user.set_machine(src)
var/dat = "<TT><b>Select an item:</b><br>"
var/data[0]
data["contents"] = null
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>"
var/list/items[0]
for (var/i=1 to length(item_quants))
var/K = item_quants[i]
var/count = item_quants[K]
if (count > 0)
items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count)))
dat += "</TT>"
user << browse("<HEAD><TITLE>[src] Supplies</TITLE></HEAD><TT>[dat]</TT>", "window=smartfridge")
onclose(user, "smartfridge")
return
if (items.len > 0)
data["contents"] = items
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
ui.set_initial_data(data)
ui.open()
/obj/machinery/smartfridge/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
if (..()) return 0
var/N = href_list["vend"]
var/amount = text2num(href_list["amount"])
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
return
src.add_fingerprint(user)
item_quants[N] = max(item_quants[N] - amount, 0)
if (href_list["close"])
user.unset_machine()
ui.close()
return 0
var/i = amount
for(var/obj/O in contents)
if(O.name == N)
O.loc = src.loc
i--
if(i <= 0)
break
if (href_list["vend"])
var/index = text2num(href_list["vend"])
var/amount = text2num(href_list["amount"])
var/K = item_quants[index]
var/count = item_quants[K]
src.updateUsrDialog()
return
// Sanity check, there are probably ways to press the button when it shouldn't be possible.
if(count > 0)
item_quants[K] = max(count - amount, 0)
var/i = amount
for(var/obj/O in contents)
if (O.name == K)
O.loc = loc
i--
if (i <= 0)
return 1
return 1
return 0
+30 -3
View File
@@ -112,16 +112,31 @@ Class Procs:
var/global/gl_uid = 1
var/custom_aghost_alerts=0
var/panel_open = 0
var/myArea
/obj/machinery/New()
..()
addAtProcessing()
return ..()
/obj/machinery/proc/addAtProcessing()
if (use_power)
myArea = loc.loc
machines += src
/obj/machinery/Destroy()
/obj/machinery/proc/removeAtProcessing()
if (myArea)
myArea = null
machines -= src
/obj/machinery/Destroy()
if (src in machines)
removeAtProcessing()
..()
/obj/machinery/process()//If you dont use process or power why are you here
/obj/machinery/process() // If you dont use process or power why are you here
return PROCESS_KILL
/obj/machinery/emp_act(severity)
@@ -277,3 +292,15 @@ Class Procs:
panel_open = 0
icon_state = icon_state_closed
user << "<span class='notice'>You close the maintenance hatch of [src].</span>"
/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)
+162
View File
@@ -0,0 +1,162 @@
/obj/machinery/metaldetector
name = "metal detector"
desc = "a metal detector. staff can toggle this between ignore security and detect all with their id."
anchored = 1.0
density = 0
icon = 'icons/obj/machines/metal_detector.dmi'
icon_state = "metaldetector0"
use_power = 1
idle_power_usage = 20
active_power_usage = 250
var/guncount = 0
var/knifecount = 0
var/bombcount = 0
var/meleecount = 0
var/detectall = 0
/obj/machinery/metaldetector/check_access(obj/item/weapon/card/id/I, list/access_list)
if(!istype(access_list))
return 1
if(!access_list.len) //no requirements
return 1
if(istype(I, /obj/item/device/pda))
var/obj/item/device/pda/pda = I
I = pda.id
if(!istype(I) || !I.access) //not ID or no access
return 0
return 1
/obj/machinery/metaldetector/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/card/emag))
if(!src.emagged)
src.emagged = 1
user << "\blue You short out the circuitry."
return
if(istype(W, /obj/item/weapon/card))
for(var/ID in list(user.equipped(), user:wear_id, user:belt))
if(src.check_access(ID,list("20")))
if(!src.detectall)
src.detectall = 1
user << "\blue You set the [src] to detect all personnel."
return
else
src.detectall = 0
user << "\blue You set the [src] to ignore all staff and security."
return
else
user << "\red You lack access to the control panel!"
return
/obj/machinery/metaldetector/Crossed(AM as mob|obj)
if(emagged)
return
if (istype(AM, /mob/living))
var/mob/M = AM
if(!src.detectall)
if(M:wear_id || M:belt)
for(var/ID in list(M:equipped(), M:wear_id, M:belt))
if(src.check_access(ID,list("1", "2", "3", "20", "57", "58")))
return
if (istype(M, /mob/living))
for(var/obj/item/weapon/gun/G in M)
guncount++
for(var/obj/item/device/transfer_valve/B in M)
bombcount++
for(var/obj/item/weapon/kitchen/utensil/knife/K in M)
knifecount++
for(var/obj/item/weapon/kitchenknife/KK in M)
knifecount++
for(var/obj/item/weapon/plastique/KK in M)
bombcount++
for(var/obj/item/weapon/melee/ML in M)
meleecount++
if(guncount)
flick("metaldetector2",src)
playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
for (var/mob/O in viewers(O, null))
O << "\red <b>[src.name]</b> beeps, \"Alert! Firearm found on [M.name]!\""
if(seen_by_camera(M))
// determine the name of the perp (goes by ID if wearing one)
var/perpname = M.name
if(M:wear_id && M:wear_id.registered_name)
perpname = M:wear_id.registered_name
// find the matching security record
for(var/datum/data/record/R in data_core.general)
if(R.fields["name"] == perpname)
for (var/datum/data/record/S in data_core.security)
if (S.fields["id"] == R.fields["id"])
// now add to rap sheet
S.fields["criminal"] = "*Arrest*"
S.fields["mi_crim"] = "Carrying a firearm."
break
guncount = 0
else if(knifecount)
flick("metaldetector2",src)
playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
for (var/mob/O in viewers(O, null))
O << "\red <b>[src.name]</b> beeps, \"Alert! Knife found on [M.name]!\""
if(seen_by_camera(M))
// determine the name of the perp (goes by ID if wearing one)
var/perpname = M.name
if(M:wear_id && M:wear_id.registered_name)
perpname = M:wear_id.registered_name
// find the matching security record
for(var/datum/data/record/R in data_core.general)
if(R.fields["name"] == perpname)
for (var/datum/data/record/S in data_core.security)
if (S.fields["id"] == R.fields["id"])
// now add to rap sheet
S.fields["criminal"] = "*Arrest*"
S.fields["mi_crim"] = "Carrying a knife."
break
knifecount = 0
else if(bombcount)
flick("metaldetector2",src)
playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
for (var/mob/O in viewers(O, null))
O << "\red <b>[src.name]</b> beeps, \"Alert! Bomb found on [M.name]!\""
if(seen_by_camera(M))
// determine the name of the perp (goes by ID if wearing one)
var/perpname = M.name
if(M:wear_id && M:wear_id.registered_name)
perpname = M:wear_id.registered_name
// find the matching security record
for(var/datum/data/record/R in data_core.general)
if(R.fields["name"] == perpname)
for (var/datum/data/record/S in data_core.security)
if (S.fields["id"] == R.fields["id"])
// now add to rap sheet
S.fields["criminal"] = "*Arrest*"
S.fields["mi_crim"] = "Carrying a bomb."
break
bombcount = 0
else if(meleecount)
flick("metaldetector2",src)
playsound(src.loc, 'sound/effects/alert.ogg', 60, 0)
for (var/mob/O in viewers(O, null))
O << "\red <b>[src.name]</b> beeps, \"Alert! Melee weapon found on [M.name]!\""
if(seen_by_camera(M))
// determine the name of the perp (goes by ID if wearing one)
var/perpname = M.name
if(M:wear_id && M:wear_id.registered_name)
perpname = M:wear_id.registered_name
// find the matching security record
for(var/datum/data/record/R in data_core.general)
if(R.fields["name"] == perpname)
for (var/datum/data/record/S in data_core.security)
if (S.fields["id"] == R.fields["id"])
// now add to rap sheet
S.fields["criminal"] = "*Arrest*"
S.fields["mi_crim"] = "Carrying a weapon."
break
meleecount = 0
else
flick("metaldetector1",src)
+3 -3
View File
@@ -66,7 +66,7 @@
spark_system.attach(src)
sleep(10)
if(!installation)// if for some reason the turret has no gun (ie, admin spawned) it resorts to basic taser shots
projectile = /obj/item/projectile/energy/electrode//holder for the projectile, here it is being set
projectile = /obj/item/projectile/beam/stun//holder for the projectile, here it is being set
eprojectile = /obj/item/projectile/beam//holder for the projectile when emagged, if it is different
reqpower = 200
sound = 1
@@ -128,7 +128,7 @@
reqpower = 700
if(/obj/item/weapon/gun/energy/taser)
projectile = /obj/item/projectile/energy/electrode
projectile = /obj/item/projectile/beam/stun
eprojectile = projectile
iconholder = 1
reqpower = 200
@@ -170,7 +170,7 @@
reqpower = 500
else // Energy gun shots
projectile = /obj/item/projectile/energy/electrode// if it hasn't been emagged, it uses normal taser shots
projectile = /obj/item/projectile/beam/stun// if it hasn't been emagged, it uses normal taser shots
eprojectile = /obj/item/projectile/beam//If it has, going to kill mode
iconholder = 1
egun = 1
+20 -20
View File
@@ -1,6 +1,6 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
obj/machinery/recharger
/obj/machinery/recharger
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
@@ -10,7 +10,7 @@ obj/machinery/recharger
active_power_usage = 250
var/obj/item/charging = null
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(istype(user,/mob/living/silicon))
return
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton) || istype(G,/obj/item/device/laptop))
@@ -47,7 +47,7 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
user << "You [anchored ? "attached" : "detached"] the recharger."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
obj/machinery/recharger/attack_hand(mob/user as mob)
/obj/machinery/recharger/attack_hand(mob/user as mob)
add_fingerprint(user)
if(charging)
@@ -57,10 +57,10 @@ obj/machinery/recharger/attack_hand(mob/user as mob)
use_power = 1
update_icon()
obj/machinery/recharger/attack_paw(mob/user as mob)
/obj/machinery/recharger/attack_paw(mob/user as mob)
return attack_hand(user)
obj/machinery/recharger/process()
/obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
@@ -68,33 +68,33 @@ obj/machinery/recharger/process()
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
E.power_supply.give(100)
E.power_supply.give(1000)
icon_state = "recharger1"
use_power(250)
use_power(2500)
else
icon_state = "recharger2"
return
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
B.bcell.charge += 175
B.bcell.charge += 1750
icon_state = "recharger1"
use_power(200)
use_power(2000)
else
icon_state = "recharger2"
return
if(istype(charging, /obj/item/device/laptop))
var/obj/item/device/laptop/L = charging
if(L.stored_computer.battery.charge < L.stored_computer.battery.maxcharge)
L.stored_computer.battery.give(100)
L.stored_computer.battery.give(1000)
icon_state = "recharger1"
use_power(250)
use_power(2500)
else
icon_state = "recharger2"
return
obj/machinery/recharger/emp_act(severity)
/obj/machinery/recharger/emp_act(severity)
if(stat & (NOPOWER|BROKEN) || !anchored)
..(severity)
return
@@ -112,18 +112,18 @@ obj/machinery/recharger/emp_act(severity)
charging.emp_act(severity)
..(severity)
obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
/obj/machinery/recharger/update_icon() //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
if(charging)
icon_state = "recharger1"
else
icon_state = "recharger0"
obj/machinery/recharger/wallcharger
/obj/machinery/recharger/wallcharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
obj/machinery/recharger/wallcharger/process()
/obj/machinery/recharger/wallcharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
@@ -131,22 +131,22 @@ obj/machinery/recharger/wallcharger/process()
if(istype(charging, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = charging
if(E.power_supply.charge < E.power_supply.maxcharge)
E.power_supply.give(100)
E.power_supply.give(1000)
icon_state = "wrecharger1"
use_power(250)
use_power(2500)
else
icon_state = "wrecharger2"
return
if(istype(charging, /obj/item/weapon/melee/baton))
var/obj/item/weapon/melee/baton/B = charging
if(B.bcell && B.bcell.charge < B.bcell.maxcharge)
B.bcell.charge += 175
B.bcell.charge += 1750
icon_state = "recharger1"
use_power(200)
use_power(2000)
else
icon_state = "recharger2"
obj/machinery/recharger/wallcharger/update_icon()
/obj/machinery/recharger/wallcharger/update_icon()
if(charging)
icon_state = "wrecharger1"
else
+2 -2
View File
@@ -75,7 +75,7 @@
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.setloc(src.loc)
src.occupant.loc = src.loc
src.occupant = null
build_icon()
src.use_power = 1
@@ -179,7 +179,7 @@
if(usr && usr.client)
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
src.occupant = usr
/*for(var/obj/O in src)
O.loc = src.loc*/
+6 -6
View File
@@ -410,7 +410,7 @@
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
src.OCCUPANT.setloc(src.loc)
src.OCCUPANT.loc = src.loc
src.OCCUPANT = null
if(!src.isopen)
src.isopen = 1
@@ -453,7 +453,7 @@
usr.stop_pulling()
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = src
usr.setloc(src)
usr.loc = src
// usr.metabslow = 1
src.OCCUPANT = usr
src.isopen = 0 //Close the thing after the guy gets inside
@@ -499,7 +499,7 @@
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.setloc(src)
M.loc = src
src.OCCUPANT = M
src.isopen = 0 //close ittt
@@ -520,7 +520,7 @@
return
user << "You load the [S.name] into the storage compartment."
user.drop_item()
S.setloc(src)
S.loc = src
src.SUIT = S
src.update_icon()
src.updateUsrDialog()
@@ -534,7 +534,7 @@
return
user << "You load the [H.name] into the storage compartment."
user.drop_item()
H.setloc(src)
H.loc = src
src.HELMET = H
src.update_icon()
src.updateUsrDialog()
@@ -548,7 +548,7 @@
return
user << "You load the [M.name] into the storage compartment."
user.drop_item()
M.setloc(src)
M.loc = src
src.MASK = M
src.update_icon()
src.updateUsrDialog()
@@ -347,6 +347,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
freq_text = "Special Ops"
if(1443)
freq_text = "Response Team"
if(1447)
freq_text = "AI Private"
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
@@ -375,6 +377,10 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
else if (display_freq == COMM_FREQ)
part_a = "<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'>"
+1 -1
View File
@@ -217,7 +217,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
for (var/obj/C in src)
C.loc = src.loc
+1 -1
View File
@@ -130,7 +130,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
for (var/obj/C in src)
C.loc = src.loc
@@ -192,7 +192,7 @@
var/newnet = input(usr, "Which network do you want to view?", "Comm Monitor", network) as null|text
if(newnet && ((usr in range(1, src) || issilicon(usr))))
if(newnet && canAccess(usr))
if(length(newnet) > 15)
temp = "<font color = #D70B00>- FAILED: NETWORK TAG STRING TOO LENGHTLY -</font color>"
@@ -206,36 +206,42 @@
updateUsrDialog()
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/traffic/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else if(istype(D, /obj/item/weapon/card/emag) && !emagged)
playsound(get_turf(src), 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "\blue You you disable the security protocols"
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user)
if(issilicon(user) || in_range(user, src))
return 1
return 0
+103 -1
View File
@@ -153,4 +153,106 @@
update_icon()
spawn(cooldown_duration)
cooldown = 0
update_icon()
update_icon()
/obj/machinery/transformer/xray
name = "Automatic X-Ray 5000"
desc = "A large metalic machine with an entrance and an exit. A sign on the side reads, 'backpack go in, backpack come out', 'human go in, irradiated human come out'."
/obj/machinery/transformer/xray/New()
// On us
new /obj/machinery/conveyor/auto(loc, EAST)
addAtProcessing()
/obj/machinery/transformer/xray/conveyor/New()
..()
var/turf/T = loc
if(T)
// Spawn Conveyour Belts
//East
var/turf/east = locate(T.x + 1, T.y, T.z)
if(istype(east, /turf/simulated/floor))
new /obj/machinery/conveyor/auto(east, EAST)
//East2
var/turf/east2 = locate(T.x + 2, T.y, T.z)
if(istype(east2, /turf/simulated/floor))
new /obj/machinery/conveyor/auto(east2, EAST)
// West
var/turf/west = locate(T.x - 1, T.y, T.z)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor/auto(west, EAST)
// West2
var/turf/west2 = locate(T.x - 2, T.y, T.z)
if(istype(west2, /turf/simulated/floor))
new /obj/machinery/conveyor/auto(west2, EAST)
/obj/machinery/transformer/xray/power_change()
..()
update_icon()
/obj/machinery/transformer/xray/update_icon()
..()
if(stat & (BROKEN|NOPOWER))
icon_state = "separator-AO0"
else
icon_state = initial(icon_state)
/obj/machinery/transformer/xray/Bumped(var/atom/movable/AM)
if(cooldown == 1)
return
// Crossed didn't like people lying down.
if(ishuman(AM))
// Only humans can enter from the west side, while lying down.
var/move_dir = get_dir(loc, AM.loc)
var/mob/living/carbon/human/H = AM
if(H.lying && move_dir == WEST)// || move_dir == WEST)
AM.loc = src.loc
irradiate(AM)
else if(isobject(AM))
AM.loc = src.loc
scan(AM)
/obj/machinery/transformer/xray/proc/irradiate(var/mob/living/carbon/human/H)
if(stat & (BROKEN|NOPOWER))
return
flick("separator-AO0",src)
playsound(src.loc, 'sound/effects/alert.ogg', 50, 0)
sleep(5)
H.apply_effect((rand(150,200)),IRRADIATE,0)
if (prob(5))
if(prob(75))
randmutb(H) // Applies bad mutation
domutcheck(H,null,1)
else
randmutg(H) // Applies good mutation
domutcheck(H,null,1)
/obj/machinery/transformer/xray/proc/scan(var/obj/item/I)
var/badcount = 0
for(var/obj/item/weapon/gun/G in src.loc)
badcount++
for(var/obj/item/device/transfer_valve/B in src.loc)
badcount++
for(var/obj/item/weapon/kitchen/utensil/knife/K in src.loc)
badcount++
for(var/obj/item/weapon/kitchenknife/KK in src.loc)
badcount++
for(var/obj/item/weapon/plastique/KK in src.loc)
badcount++
for(var/obj/item/weapon/melee/ML in src.loc)
badcount++
if(badcount)
playsound(src.loc, 'sound/effects/alert.ogg', 50, 0)
flick("separator-AO0",src)
else
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
sleep(30)
+5 -5
View File
@@ -213,17 +213,17 @@
if (src.lasers)
switch(lasertype)
if(1)
A = new /obj/item/projectile/beam( loc )
A = getFromPool(/obj/item/projectile/beam, loc)
if(2)
A = new /obj/item/projectile/beam/heavylaser( loc )
A = getFromPool(/obj/item/projectile/beam/heavylaser, loc)
if(3)
A = new /obj/item/projectile/beam/pulse( loc )
A = getFromPool(/obj/item/projectile/beam/pulse, loc)
if(4)
A = new /obj/item/projectile/change( loc )
if(5)
A = new /obj/item/projectile/beam/lastertag/blue( loc )
A = getFromPool(/obj/item/projectile/beam/lastertag/blue, loc)
if(6)
A = new /obj/item/projectile/beam/lastertag/red( loc )
A = getFromPool(/obj/item/projectile/beam/lastertag/red, loc)
A.original = target
use_power(500)
else
+3
View File
@@ -283,6 +283,7 @@
construction_cost = list("metal"=30000,"plasma"=25000,"silver"=20000,"gold"=20000)
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
var/disabled = 0 //malf
var/canRwall = 0
action(atom/target)
if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve
@@ -297,6 +298,8 @@
switch(mode)
if(0)
if (istype(target, /turf/simulated/wall))
if(istype(target, /turf/simulated/wall/r_wall) && !canRwall)
return 0
occupant_message("Deconstructing [target]...")
set_ready_state(0)
if(do_after_cooldown(target))
+2 -2
View File
@@ -105,7 +105,7 @@
icon_state = "mecha_taser"
energy_drain = 20
equip_cooldown = 8
projectile = /obj/item/projectile/energy/electrode
projectile = /obj/item/projectile/beam/stun
fire_sound = 'sound/weapons/Taser.ogg'
@@ -426,4 +426,4 @@
projectiles--
log_message("Launched a mouse-trap from [src.name], targeting [target]. HONK!")
do_after_cooldown()
return
return
+1 -1
View File
@@ -535,7 +535,7 @@
var/obj/mecha/working/ripley/R = src
if(R.cargo)
for(var/obj/O in R.cargo) //Dump contents of stored cargo
O.setloc(T)
O.loc = T
R.cargo -= O
T.Entered(O)
+27 -29
View File
@@ -151,20 +151,24 @@ steam.start() -- spawns the effect
/obj/effect/effect/sparks
name = "sparks"
desc = "it's a spark what do you need to know?"
icon_state = "sparks"
var/amount = 6.0
anchored = 1.0
mouse_opacity = 0
var/amount = 6.0
resetVariables()
amount = initial(amount)
return ..()
/obj/effect/effect/sparks/New()
..()
playsound(src.loc, "sparks", 100, 1)
var/turf/T = src.loc
var/turf/T = loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
spawn (100)
delete()
return
T.hotspot_expose(1000, 100)
/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
@@ -181,42 +185,36 @@ steam.start() -- spawns the effect
return
/datum/effect/effect/system/spark_spread
var/total_sparks = 0 // To stop it being spammed and lagging!
set_up(n = 3, c = 0, loca)
if(n > 10)
n = 10
number = n
number = n > 10 ? 10 : n
cardinals = c
if(istype(loca, /turf/))
if (istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_sparks > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
src.total_sparks++
for (var/i = 1 to number)
spawn()
if (holder)
location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = getFromPool(/obj/effect/effect/sparks, location)
playsound(location, "sparks", 100, 1)
var/direction
if(src.cardinals)
if (cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
for (var/j = 0, j < pick(1, 2, 3), j++)
sleep(5)
step(sparks,direction)
spawn(20)
if(sparks)
if(sparks) sparks.delete()
src.total_sparks--
step(sparks, direction)
sleep(20)
returnToPool(sparks)
/////////////////////////////////////////////
//// SMOKE SYSTEMS
+12
View File
@@ -271,6 +271,18 @@
/obj/item/proc/equipped(var/mob/user, var/slot)
return
//returns 1 if the item is equipped by a mob, 0 otherwise.
//This might need some error trapping, not sure if get_equipped_items() is safe for non-human mobs.
/obj/item/proc/is_equipped()
if(!ismob(loc))
return 0
var/mob/M = loc
if(src in M.get_equipped_items())
return 1
else
return 0
//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't.
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
//Set disable_warning to 1 if you wish it to not give you outputs.
+5 -2
View File
@@ -132,6 +132,9 @@ move an amendment</a> to the drawing.</p>
move_turfs_to_area(turfs, A)
A.always_unpowered = 0
for(var/turf/T in A.contents)
T.lighting_changed = 1
lighting_controller.changed_turfs += T
spawn(5)
//ma = A.master ? "[A.master]" : "(null)"
@@ -196,7 +199,7 @@ move an amendment</a> to the drawing.</p>
for (var/obj/structure/window/W in T2)
if(turn(dir,180) == W.dir)
return BORDER_BETWEEN
if (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST))
if (W.is_fulltile())
return BORDER_2NDTILE
for(var/obj/machinery/door/window/D in T2)
if(turn(dir,180) == D.dir)
@@ -221,7 +224,7 @@ move an amendment</a> to the drawing.</p>
for (var/dir in cardinal)
var/skip = 0
for (var/obj/structure/window/W in T)
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
if(dir == W.dir || (W.is_fulltile()))
skip = 1; break
if (skip) continue
for(var/obj/machinery/door/window/D in T)
+72 -7
View File
@@ -338,7 +338,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
lastmode = mode
var/title = "Personal Data Assistant"
var/data[0] // This is the data that will be sent to the PDA
@@ -367,7 +367,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(mode in cartmodes)
data["records"] = cartridge.create_NanoUI_values()
if(mode == 0)
if(mode == 0)
cartdata["name"] = cartridge.name
cartdata["access"] = list(\
"access_security" = cartridge.access_security,\
@@ -557,7 +557,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
mode = 1
if("2")//Messenger
mode = 2
if("21")//Read messeges
if("21")//Read messages
mode = 21
if("3")//Atmos scan
mode = 3
@@ -771,6 +771,71 @@ var/global/list/obj/item/device/pda/PDAs = list()
return 1 // return 1 tells it to refresh the UI in NanoUI
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
//TODO: sometimes these attacks show up on the message server
var/i = rand(1,100)
var/j = rand(0,1) //Possibility of losing the PDA after the detonation
var/message = ""
var/mob/living/M = null
if(ismob(P.loc))
M = P.loc
//switch(i) //Yes, the overlapping cases are intended.
if(i<=10) //The traditional explosion
P.explode()
j=1
message += "Your [P] suddenly explodes!"
if(i>=10 && i<= 20) //The PDA burns a hole in the holder.
j=1
if(M && isliving(M))
M.apply_damage( rand(30,60) , BURN)
message += "You feel a searing heat! Your [P] is burning!"
if(i>=20 && i<=25) //EMP
empulse(P.loc, 3, 6, 1)
message += "Your [P] emits a wave of electromagnetic energy!"
if(i>=25 && i<=40) //Smoke
var/datum/effect/effect/system/chem_smoke_spread/S = new /datum/effect/effect/system/chem_smoke_spread
S.attach(P.loc)
S.set_up(P, 10, 0, P.loc)
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
S.start()
message += "Large clouds of smoke billow forth from your [P]!"
if(i>=40 && i<=45) //Bad smoke
var/datum/effect/effect/system/bad_smoke_spread/B = new /datum/effect/effect/system/bad_smoke_spread
B.attach(P.loc)
B.set_up(P, 10, 0, P.loc)
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
B.start()
message += "Large clouds of noxious smoke billow forth from your [P]!"
if(i>=65 && i<=75) //Weaken
if(M && isliving(M))
M.apply_effects(0,1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=75 && i<=85) //Stun and stutter
if(M && isliving(M))
M.apply_effects(1,0,0,0,1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=85) //Sparks
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, P.loc)
s.start()
message += "Your [P] begins to spark violently!"
if(i>45 && i<65 && prob(50)) //Nothing happens
message += "Your [P] bleeps loudly."
j = prob(10)
if(j) //This kills the PDA
P.Del()
if(message)
message += "It melts in a puddle of plastic."
else
message += "Your [P] shatters in a thousand pieces!"
if(M && isliving(M))
message = "\red" + message
M.show_message(message, 1)
/obj/item/device/pda/proc/remove_id()
if (id)
if (ismob(loc))
@@ -805,7 +870,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/machinery/message_server/useMS = null
if(message_servers)
for (var/obj/machinery/message_server/MS in message_servers)
//PDAs are now dependant on the Message Server.
//PDAs are now dependent on the Message Server.
if(MS.active)
useMS = MS
break
@@ -824,8 +889,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
t = Gibberish(t, signal.data["compression"] + 50)
if(useMS && useTC) // only send the message if it's stable
if(useTC != 2) // Does our recepient have a broadcaster on their level?
U << "ERROR: Cannot reach recepient."
if(useTC != 2) // Does our recipient have a broadcaster on their level?
U << "ERROR: Cannot reach recipient."
return
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote.Add(list(list("sent" = 1, "owner" = "[P.owner]", "job" = "[P.ownjob]", "message" = "[t]", "target" = "\ref[P]")))
@@ -867,7 +932,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(L)
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
nanomanager.update_user_uis(L, P) // Update the recieving user's PDA UI so that they can see the new message
nanomanager.update_user_uis(L, P) // Update the receiving user's PDA UI so that they can see the new message
nanomanager.update_user_uis(U, P) // Update the sending user's PDA UI so that they can see the new message
@@ -89,13 +89,13 @@
/obj/item/device/flashlight/pickup(mob/user)
if(on && luminosity)
if(on)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
if(on && !luminosity)
if(on)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(brightness_on)

Some files were not shown because too many files have changed in this diff Show More