New lighting, it's essentially just the old DAL system with a queue.

Comments for lighting:
	Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
	by using the var/tag variable and moving turfs into the contents list of the correct sub-area.

	Unlike sd_DAL however it uses a queueing system. Everytime we  call a change to opacity or luminosity
	(through SetOpacity() or SetLuminosity()) we are  simply updating variables and scheduling certain lights/turfs for an
	update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
	means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
	over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
	setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
	turning it back on with lighting_controller.processing = 1.

	Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values
	for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity
	at runtime)

	Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
	have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we
	gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset
	costs.

	Known Issues/TODO:
		admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment
		mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity
		Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
		No directional lighting support. Fairly easy to add this and the code is ready.
		When opening airlocks etc, lighting does not always update to account for the change in opacity.

Explosions now cause lighting to cease processing temporarily.

Moved controller datums to the code/controllers directory. I plan on standardising them.
"Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI" controller datums can be accessed via the debug controller verb (used to be the debug master controller verb)
Supply shuttle now uses a controller datum. Shuttles tend to arrive up to 30 seconds late, this is not a bug.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4537 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-08-25 16:06:57 +00:00
parent 676079cdba
commit 6e274cd395
89 changed files with 1519 additions and 2245 deletions

View File

@@ -54,6 +54,7 @@
icon = 'icons/effects/fire.dmi'
icon_state = "1"
layer = TURF_LAYER
luminosity = 3
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
@@ -136,7 +137,6 @@
New()
..()
dir = pick(cardinal)
sd_SetLuminosity(3)
return
@@ -144,7 +144,6 @@
if (istype(loc, /turf/simulated))
var/turf/simulated/T = loc
loc:active_hotspot = null
src.sd_SetLuminosity(0)
if(T.to_be_destroyed)
var/chance_of_deletion

View File

@@ -0,0 +1,305 @@
/*
Modified DynamicAreaLighting for TGstation - Coded by Carnwennan
This is TG's 'new' lighting system. It's basically a heavily modified mix of combination of Forum_Account's and
ShadowDarke's respective lighting libraries. Credits, where due, to them.
Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
by using the var/tag variable and moving turfs into the contents list of the correct sub-area.
Unlike sd_DAL however it uses a queueing system. Everytime we call a change to opacity or luminosity
(through SetOpacity() or SetLuminosity()) we are simply updating variables and scheduling certain lights/turfs for an
update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
turning it back on with lighting_controller.processing = 1.
Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values
for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity
at runtime)
Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we
gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset
costs.
Known Issues/TODO:
admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment
mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity
Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
No directional lighting support. Fairly easy to add this and the code is ready.
When opening airlocks etc, lighting does not always update to account for the change in opacity.
*/
#define LIGHTING_MAX_LUMINOSITY 12 //Hard maximum luminosity to prevet lag which could be caused by coders making mini-suns
#define LIGHTING_MAX_LUMINOSITY_MOB 7 //Mobs get their own max because 60-odd human suns running around would be pretty silly
#define LIGHTING_LAYER 10 //Drawing layer for lighting overlays
#define LIGHTING_ICON 'icons/effects/ss13_dark_alpha7.dmi' //Icon used for lighting shading effects
datum/controller/lighting/New() //moved here so its in the define. eek :S
lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
datum/light_source
var/atom/owner
var/changed = 1
var/mobile = 1
var/list/effect = list()
var/__x = 0 //x coordinate at last update
var/__y = 0 //y coordinate at last update
New(atom/A)
if(!istype(A))
CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
..()
owner = A
if(istype(owner, /atom/movable)) mobile = 1 //apparantly this is faster than type-checking
else mobile = 0 //Perhaps removing support for luminous turfs would be a good idea.
__x = owner.x
__y = owner.y
// the lighting object maintains a list of all light sources
lighting_controller.lights += src
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
proc/check()
if(!owner)
remove_effect()
return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
if(mobile)
// check to see if we've moved since last update
if(owner.x != __x || owner.y != __y)
__x = owner.x
__y = owner.y
changed = 1
if(changed)
changed = 0
remove_effect()
return add_effect()
return 0
proc/remove_effect()
// before we apply the effect we remove the light's current effect.
if(effect.len)
for(var/turf in effect) // negate the effect of this light source
var/turf/T = turf
T.update_lumcount(-effect[T])
effect.Cut() // clear the effect list
proc/add_effect()
// only do this if the light is turned on and is on the map
if(owner.loc && owner.luminosity > 0)
effect = new_effect() // identify the effects of this light source
for(var/turf in effect)
var/turf/T = turf
T.update_lumcount(effect[T]) // apply the effect
return 0
else
owner.light = null
return 1 //cause the light to be removed from the lights list and garbage collected once it's no
//longer referenced by the queue
proc/new_effect()
. = list()
for(var/turf/T in view(owner.luminosity, owner))
// var/area/A = T.loc
// if(!A) continue
var/change_in_lumcount = lum(T)
if(change_in_lumcount > 0)
.[T] = change_in_lumcount
return .
proc/lum(turf/A)
return owner.luminosity - max(abs(A.x-__x),abs(A.y-__y))
// var/dist = cheap_hypotenuse(A.x,A.y,__x,__y) //fetches the pythagorean distance between A and the light
// if(owner.luminosity < dist) //if the turf is outside the radius the light doesn't illuminate it
// return 0
// return round(owner.luminosity - (dist/2),0.1)
atom
var/datum/light_source/light
//Turfs with opacity when they are constructed will trigger nearby lights to update
//Turfs atoms with luminosity when they are constructed will create a light_source automatically
//TODO: lag reduction
turf/New()
..()
if(opacity)
UpdateAffectingLights()
if(luminosity)
world.log << "[type] has luminosity at New()"
if(light) world.log << "## WARNING: [type] - Don't set lights up manually during New(), We do it automatically."
light = new(src)
//Movable atoms with opacity when they are constructed will trigger nearby lights to update
//Movable atoms with luminosity when they are constructed will create a light_source automatically
//TODO: lag reduction
atom/movable/New()
..()
if(opacity)
UpdateAffectingLights()
if(luminosity)
if(light) world.log << "## WARNING: [type] - Don't set lights up manually during New(), We do it automatically."
light = new(src)
//Turfs with opacity will trigger nearby lights to update at next lighting process.
//TODO: is this really necessary? Removing it could help reduce lag during singulo-mayhem somewhat
turf/Del()
if(opacity)
UpdateAffectingLights()
..()
//Objects with opacity will trigger nearby lights to update at next lighting process.
atom/movable/Del()
if(opacity)
UpdateAffectingLights()
..()
//Sets our luminosity. Enforces a hardcoded maximum luminosity by default. This maximum can be overridden but it is extremely
//unwise to do so.
//If we have no light it will create one.
//If we are setting luminosity to 0 the light will be cleaned up and delted once all its queues are complete
//if we have a light already it is merely updated
atom/proc/SetLuminosity(new_luminosity, max_luminosity = LIGHTING_MAX_LUMINOSITY)
if(new_luminosity < 0)
new_luminosity = 0
// world.log << "## WARNING: [type] - luminosity cannot be negative"
else if(max_luminosity < new_luminosity)
new_luminosity = max_luminosity
// if(luminosity != new_luminosity)
// world.log << "## WARNING: [type] - LIGHT_MAX_LUMINOSITY exceeded"
if(isturf(loc))
if(light)
if(luminosity != new_luminosity) //TODO: remove lights from the light list when they're not luminous? DONE in add_effect
light.changed = 1
else
if(new_luminosity)
light = new(src)
luminosity = new_luminosity
//Snowflake code to prevent mobs becoming suns (lag-prevention)
mob/SetLuminosity(new_luminosity)
..(new_luminosity,LIGHTING_MAX_LUMINOSITY_MOB)
//change our opacity (defaults to toggle), and then update all lights that affect us.
atom/proc/SetOpacity(var/new_opacity)
if(new_opacity == null) new_opacity = !opacity
else if(opacity == new_opacity) return
opacity = new_opacity
UpdateAffectingLights()
//set the changed status of all lights which could have possibly lit this atom.
//We don't need to worry about lights which lit us but moved away, since they will have change status set already
atom/proc/UpdateAffectingLights()
var/turf/T = src
if(!isturf(T))
T = loc
if(!isturf(T)) return
for(var/atom in range(LIGHTING_MAX_LUMINOSITY,T)) //TODO: this will probably not work very well :(
var/atom/A = atom
if(A.light && A.luminosity)
A.light.changed = 1 //force it to update at next process()
// for(var/light in lighting_controller.lights) //TODO: this will probably laaaaaag
// var/datum/light_source/L = light
// if(L.changed) continue
// if(!L.owner) continue
// if(!L.owner.luminosity) continue
// if(src in L.effect)
// L.changed = 1
turf
var/lighting_lumcount = 0
var/lighting_changed = 0
turf/space
lighting_lumcount = 4 //starlight
turf/proc/update_lumcount(amount)
lighting_lumcount += amount
// if(lighting_lumcount < 0 || lighting_lumcount > 100)
// world.log << "## WARNING: [type] ([src]) lighting_lumcount = [lighting_lumcount]"
if(!lighting_changed)
lighting_controller.changed_turfs += src
lighting_changed = 1
turf/proc/shift_to_subarea()
lighting_changed = 0
var/area/Area = loc
if(!istype(Area) || !Area.lighting_use_dynamic) return
// change the turf's area depending on its brightness
// restrict light to valid levels
var/light = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states)
var/new_tag = "[Area.type]sd_L[light]"
if(Area.tag!=new_tag) //skip if already in this area
var/area/A = locate(new_tag) // find an appropriate area
if(!A)
A = new Area.type() // create area if it wasn't found
// replicate vars
for(var/V in Area.vars)
switch(V)
if("contents","lighting_overlay","overlays") continue
else
if(issaved(Area.vars[V])) A.vars[V] = Area.vars[V]
A.tag = new_tag
A.lighting_subarea = 1
A.SetLightLevel(light)
Area.related += A
A.contents += src // move the turf into the area
area
var/lighting_use_dynamic = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
var/image/lighting_overlay //tracks the darkness image of the area for easy removal
var/lighting_subarea = 0 //tracks whether we're a lighting sub-area
proc/SetLightLevel(light)
if(!src) return
if(light < 0)
light = 0
luminosity = 0
else
if(light > lighting_controller.lighting_states)
light = lighting_controller.lighting_states
luminosity = 1
if(lighting_overlay)
overlays -= lighting_overlay
lighting_overlay.icon_state = "[light]"
else
lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
overlays += lighting_overlay
proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
if(!tag) tag = "[type]"
if(!lighting_use_dynamic)
if(!lighting_subarea) // see if this is a lighting subarea already
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
SetLightLevel(4)
#undef LIGHTING_MAX_LUMINOSITY
#undef LIGHTING_MAX_LUMINOSITY_MOB
#undef LIGHTING_LAYER
#undef LIGHTING_ICON

View File

@@ -0,0 +1,81 @@
var/datum/controller/lighting/lighting_controller = new ()
datum/controller/lighting
var/processing = 0
var/processing_interval = 4 //setting this too low will probably kill the server. Don't be silly with it!
var/process_cost = 0
var/iteration = 0
var/lighting_states = 7
var/list/lights = list()
var/lights_workload_max = 0
// var/list/changed_lights() //TODO: possibly implement this to reduce on overheads?
var/list/changed_turfs = list()
var/changed_turfs_workload_max = 0
//Workhorse of lighting. It cycles through each light to see which ones need their effects updating. It updates their
//effects and then processes every turf in the queue, moving the turfs to the corresponing lighting sub-area.
//All queue lists prune themselves, which will cause lights with no luminosity to be garbage collected (cheaper and safer
//than deleting them). Processing interval should be roughly half a second for best results.
//By using queues we are ensuring we don't perform more updates than are necessary
datum/controller/lighting/proc/process()
processing = 1
spawn(0)
set background = 1
while(1)
var/started = world.timeofday
if(processing)
iteration++
lights_workload_max = max(lights_workload_max,lights.len)
for(var/i=1, i<=lights.len, i++)
var/datum/light_source/L = lights[i]
if(L.check())
lights.Cut(i,i+1)
i--
sleep(-1)
changed_turfs_workload_max = max(changed_turfs_workload_max,changed_turfs.len)
for(var/i=1, i<=changed_turfs.len, i++)
var/turf/T = changed_turfs[i]
if(T && T.lighting_changed)
T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list
process_cost = (world.timeofday - started)
sleep(processing_interval)
//same as above except it attempts to shift ALL turfs in the world regardless of lighting_changed status
//Does not loop. Should be run prior to process() being called for the first time.
//Note: if we get additional z-levels at runtime (e.g. if the gateway thin ever gets finished) we can initialize specific
//z-levels with the z_level argument
datum/controller/lighting/proc/Initialize(var/z_level)
processing = 0
spawn(-1)
set background = 1
for(var/i=1, i<=lights.len, i++)
var/datum/light_source/L = lights[i]
if(L.check())
lights.Cut(i,i+1)
i--
var/z_start = 1
var/z_finish = world.maxz
if(z_level)
z_level = round(z_level,1)
if(z_level > 0 && z_level <= world.maxz)
z_start = z_level
z_finish = z_level
for(var/k=z_start,k<=z_finish,k++)
for(var/i=1,i<=world.maxx,i++)
for(var/j=1,j<=world.maxy,j++)
var/turf/T = locate(i,j,k)
if(T) T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list

View File

@@ -0,0 +1,210 @@
var/global/datum/controller/game_controller/master_controller //Set in world.New()
var/global/datum/failsafe/Failsafe
var/global/controller_iteration = 0
var/global/last_tick_timeofday = world.timeofday
var/global/last_tick_duration = 0
datum/controller/game_controller
var/processing = 0
var/global/air_master_ready = 0
var/global/sun_ready = 0
var/global/mobs_ready = 0
var/global/diseases_ready = 0
var/global/machines_ready = 0
var/global/objects_ready = 0
var/global/networks_ready = 0
var/global/powernets_ready = 0
var/global/ticker_ready = 0
//Used for MC 'proc break' debugging
var/global/obj/last_obj_processed
var/global/datum/disease/last_disease_processed
var/global/obj/machinery/last_machine_processed
var/global/mob/last_mob_processed
proc/setup()
if(master_controller && (master_controller != src))
del(src)
return
//There can be only one master.
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
if(!job_master)
job_master = new /datum/controller/occupations()
if(job_master.SetupOccupations())
world << "\red \b Job setup complete"
job_master.LoadJobs("config/jobs.txt")
world.tick_lag = config.Ticklag
createRandomZlevel()
setup_objects()
setupgenetics()
for(var/i = 0, i < max_secret_rooms, i++)
make_mining_asteroid_secret()
syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
syndicate_code_response = generate_code_phrase()
emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
if(!ticker)
ticker = new /datum/controller/gameticker()
setupfactions()
spawn
ticker.pregame()
proc/setup_objects()
world << "\red \b Initializing objects"
sleep(-1)
for(var/obj/object in world)
object.initialize()
world << "\red \b Initializing pipe networks"
sleep(-1)
for(var/obj/machinery/atmospherics/machine in world)
machine.build_network()
world << "\red \b Initializing atmos machinery."
sleep(-1)
for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
T.broadcast_status()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
T.broadcast_status()
world << "\red \b Initializations complete."
proc/process()
processing = 1
spawn(0)
set background = 1
while(1)
var/currenttime = world.timeofday
var/diff = (currenttime - last_tick_timeofday) / 10
last_tick_timeofday = currenttime
last_tick_duration = diff
if(processing)
controller_iteration++
var/start_time = world.timeofday
air_master_ready = 0
sun_ready = 0
mobs_ready = 0
diseases_ready = 0
machines_ready = 0
objects_ready = 0
networks_ready = 0
powernets_ready = 0
ticker_ready = 0
spawn(0)
air_master.process()
air_master_ready = 1
sleep(1)
spawn(0)
sun.calc_position()
sun_ready = 1
sleep(-1)
spawn(0)
for(var/mob/M in world)
last_mob_processed = M
M.Life()
mobs_ready = 1
sleep(-1)
spawn(0)
for(var/datum/disease/D in active_diseases)
last_disease_processed = D
D.process()
diseases_ready = 1
spawn(0)
for(var/obj/machinery/machine in machines)
if(machine)
last_machine_processed = machine
machine.process()
if(machine && machine.use_power)
machine.auto_use_power()
machines_ready = 1
sleep(1)
spawn(-1)
for(var/obj/object in processing_objects)
last_obj_processed = object
object.process()
objects_ready = 1
sleep(-1)
spawn(-1)
for(var/datum/pipe_network/network in pipe_networks)
network.process()
networks_ready = 1
spawn(-1)
for(var/datum/powernet/P in powernets)
P.reset()
powernets_ready = 1
sleep(-1)
spawn(-1)
ticker.process()
ticker_ready = 1
var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.)
while(!air_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready)
IL_check++
if(IL_check > 600)
var/MC_report = "air_master_ready = [air_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];"
message_admins("<b><font color='red'>PROC BREAKAGE WARNING:</font> The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.</b>")
message_admins("<b>The master controller reports: [MC_report]</b>")
if(!diseases_ready)
if(last_disease_processed)
message_admins("<b>DISEASE PROCESSING stuck on </b><A HREF='?src=%holder_ref%;adminplayervars=\ref[last_disease_processed]'>[last_disease_processed]</A>", 0, 1)
else
message_admins("<b>DISEASE PROCESSING stuck on </b>unknown")
if(!machines_ready)
if(last_machine_processed)
message_admins("<b>MACHINE PROCESSING stuck on </b><A HREF='?src=%holder_ref%;adminplayervars=\ref[last_machine_processed]'>[last_machine_processed]</A>", 0, 1)
else
message_admins("<b>MACHINE PROCESSING stuck on </b>unknown")
if(!objects_ready)
if(last_obj_processed)
message_admins("<b>OBJ PROCESSING stuck on </b><A HREF='?src=ADMINHOLDERREF;adminplayervars=\ref[last_obj_processed]'>[last_obj_processed]</A>", 0, 1)
else
message_admins("<b>OBJ PROCESSING stuck on </b>unknown")
log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];")
message_admins("<font color='red'><b>Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.</b></font>")
break;
sleep(1)
sleep(world.timeofday+12-start_time)
else
sleep(10)

67
code/controllers/verbs.dm Normal file
View File

@@ -0,0 +1,67 @@
//TODO: rewrite and standardise all controller datums to the datum/controller type
//TODO: allow all controllers to be deleted for clean restarts (see WIP master controller stuff)
/client/proc/restart_controller(controller in list("Master","Lighting","Supply Shuttle"))
set category = "Debug"
set name = "Restart Controller"
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
if(!holder) return
usr = null
src = null
switch(controller)
if("Master")
master_controller.process()
feedback_add_details("admin_verb","RMC")
if("Lighting")
lighting_controller.process()
feedback_add_details("admin_verb","RLighting")
if("Supply Shuttle")
supply_shuttle.process()
feedback_add_details("admin_verb","RSupply")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.", 1)
return
/client/proc/debug_controller(controller in list("Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
if(!holder) return
switch(controller)
if("Master")
debug_variables(master_controller)
feedback_add_details("admin_verb","DMC")
if("Ticker")
debug_variables(ticker)
feedback_add_details("admin_verb","DTicker")
if("Lighting")
debug_variables(lighting_controller)
feedback_add_details("admin_verb","DLighting")
if("Air")
debug_variables(air_master)
feedback_add_details("admin_verb","DAir")
if("Jobs")
debug_variables(job_master)
feedback_add_details("admin_verb","DJobs")
if("Sun")
debug_variables(sun)
feedback_add_details("admin_verb","DSun")
if("Radio")
debug_variables(radio_controller)
feedback_add_details("admin_verb","DRadio")
if("Supply Shuttle")
debug_variables(supply_shuttle)
feedback_add_details("admin_verb","DSupply")
if("Emergency Shuttle")
debug_variables(emergency_shuttle)
feedback_add_details("admin_verb","DEmergency")
if("Configuration")
debug_variables(config)
feedback_add_details("admin_verb","DConf")
if("pAI")
debug_variables(paiController)
feedback_add_details("admin_verb","DpAI")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.", 1)
return

View File

@@ -108,10 +108,6 @@
playSpecials(curturf,effectin,soundin)
// Remove any luminosity etc.
var/prevlum = teleatom.luminosity
teleatom.luminosity = 0
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -119,9 +115,6 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
// Re-Apply lum
teleatom.sd_SetLuminosity(prevlum)
destarea.Entered(teleatom)
return 1

View File

@@ -48,7 +48,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
var/area/master // master area used for power calcluations
// (original area before splitting due to sd_DAL)
var/list/related // the other areas of the same type as this
var/list/lights // list of all lights on this area
// var/list/lights // list of all lights on this area
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
@@ -122,10 +122,10 @@ proc/process_ghost_teleport_locs()
//place to another. Look at escape shuttle for example.
//All shuttles show now be under shuttle since we have smooth-wall code.
/area/shuttle //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
requires_power = 0
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/shuttle/arrival
name = "\improper Arrival Shuttle"
@@ -227,14 +227,14 @@ proc/process_ghost_teleport_locs()
name = "\improper Alien Shuttle Base"
requires_power = 1
luminosity = 0
sd_lighting = 1
lighting_use_dynamic = 1
/area/shuttle/alien/mine
icon_state = "shuttle"
name = "\improper Alien Shuttle Mine"
requires_power = 1
luminosity = 0
sd_lighting = 1
lighting_use_dynamic = 1
/area/shuttle/prison/
name = "\improper Prison Shuttle"
@@ -306,7 +306,7 @@ proc/process_ghost_teleport_locs()
icon_state = "start"
requires_power = 0
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
has_gravity = 1
// === end remove
@@ -786,7 +786,7 @@ proc/process_ghost_teleport_locs()
name = "\improper Holodeck"
icon_state = "Holodeck"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/holodeck/alphadeck
name = "\improper Holodeck Alpha"
@@ -854,7 +854,7 @@ proc/process_ghost_teleport_locs()
/area/solar
requires_power = 0
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
auxport
name = "\improper Fore Port Solar Array"
@@ -1335,25 +1335,25 @@ proc/process_ghost_teleport_locs()
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/AIsatextFS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/AIsatextAS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/AIsatextAP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
/area/turret_protected/NewAIMain
name = "\improper AI Main New"
@@ -1435,7 +1435,7 @@ proc/process_ghost_teleport_locs()
/area/turret_protected/AssistantRoom
name = "\improper Assistant Room"
icon_state = "storage"
sd_lighting = 0
lighting_use_dynamic = 0
/////////////////////////////////////////////////////////////////////
/*
@@ -1507,7 +1507,7 @@ var/list/the_station_areas = list (
name = "Keelin's private beach"
icon_state = "null"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
requires_power = 0
var/sound/mysound = null

View File

@@ -227,6 +227,7 @@
density = 0
anchored = 1
layer = 2
luminosity = 1
icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"

View File

@@ -50,20 +50,13 @@
//Magic constants obtained by using linear regression on right-angled triangles of sides 0<x<1, 0<y<1
//They should approximate pythagoras theorem well enough for our needs.
//In fact, less accuracy is kinda better for explosions anyway :P Maybe k1=1, k2=0.5?
#define k1 0.934
#define k2 0.427
/proc/approx_dist(center=usr, T) // T is just the second atom to check distance to center with
var/turf/centerturf = get_turf(center)
var/turf/targetturf = get_turf(T)
var/a = abs(targetturf.x - centerturf.x) //sides of right-angled triangle
var/b = abs(targetturf.y - centerturf.y)
if(a>=b)
return (k1*a) + (k2*b) //No sqrt or powers :)
else
return (k1*b) + (k2*a)
/proc/cheap_hypotenuse(Ax,Ay,Bx,By) // T is just the second atom to check distance to center with
var/dx = abs(Ax - Bx) //sides of right-angled triangle
var/dy = abs(Ay - By)
if(dx>=dy) return (k1*dx) + (k2*dy) //No sqrt or powers :)
else return (k1*dx) + (k2*dy)
#undef k1
#undef k2

View File

@@ -914,22 +914,22 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
if(!istype(M,/mob)) continue
M.loc = X
var/area/AR = X.loc
// var/area/AR = X.loc
if(AR.sd_lighting)
X.opacity = !X.opacity
X.sd_SetOpacity(!X.opacity)
// if(AR.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
// X.opacity = !X.opacity
// X.SetOpacity(!X.opacity)
toupdate += X
if(turftoleave)
var/turf/ttl = new turftoleave(T)
var/area/AR2 = ttl.loc
// var/area/AR2 = ttl.loc
if(AR2.sd_lighting)
ttl.opacity = !ttl.opacity
ttl.sd_SetOpacity(!ttl.opacity)
// if(AR2.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
// ttl.opacity = !ttl.opacity
// ttl.sd_SetOpacity(!ttl.opacity)
fromupdate += ttl
@@ -1089,14 +1089,14 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
for(var/V in T.vars)
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity", "sd_light_spill",)))
if(!(V in list("type","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")))
X.vars[V] = T.vars[V]
var/area/AR = X.loc
// var/area/AR = X.loc
if(AR.sd_lighting)
X.opacity = !X.opacity
X.sd_SetOpacity(!X.opacity)
// if(AR.lighting_use_dynamic)
// X.opacity = !X.opacity
// X.sd_SetOpacity(!X.opacity) //TODO: rewrite this code so it's not messed by lighting ~Carn
toupdate += X

View File

@@ -3,80 +3,43 @@
// ===
/area/
/area
var/global/global_uid = 0
var/uid
/area/New()
icon_state = ""
layer = 10
master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references src.loc.loc.master ~Carn
src.icon = 'icons/effects/alert.dmi'
uid = ++global_uid
spawn(1)
//world.log << "New: [src] [tag]"
var/sd_created = findtext(tag,"sd_L")
sd_New(sd_created)
if(sd_created)
related += src
return
related = list(src)
src.icon = 'icons/effects/alert.dmi'
src.layer = 10
// update_lights()
if(name == "Space") // override defaults for space
if(type == /area) // override defaults for space. TODO: make space areas of type /area/space rather than /area
requires_power = 1
always_unpowered = 1
sd_SetLuminosity(1)
lighting_use_dynamic = 1
power_light = 0
power_equip = 0
power_environ = 0
// 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
sd_lighting = 0 // *DAL*
else
luminosity = 0
//sd_SetLuminosity(0) // *DAL*
lighting_use_dynamic = 0
..()
// spawn(15)
power_change() // all machines set to current power level, also updates lighting icon
InitializeLighting()
/*spawn(5)
for(var/turf/T in src) // count the number of turfs (for lighting calc)
if(no_air)
T.oxygen = 0 // remove air if so specified for this area
T.n2 = 0
T.res_vars()
*/
spawn(15)
src.power_change() // all machines set to current power level, also updates lighting icon
/*
/proc/get_area(area/A)
while (A)
if (istype(A, /area))
return A
A = A.loc
return null
*/
/*
/area/proc/update_lights()
var/new_power = 0
for(var/obj/machinery/light/L in src.contents)
if(L.on)
new_power += (L.luminosity * 20)
lighting_power_usage = new_power
return
*/
/area/proc/poweralert(var/state, var/obj/source as obj)
if (state != poweralm)
poweralm = state

View File

@@ -2,7 +2,7 @@ var/global/max_secret_rooms = 3
/*
proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0 or null - random, 1 - nothing, 2 - iron, 3 - silicon
if(!size)
size = pick(100;2,50;3,35;4,25;6,10;12)
@@ -43,7 +43,8 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
max_secret_rooms--
return 1
*/
/*
/proc/populate_w_asteroids(var/z,var/density=null)
if(!density)
density = pick(10,20,40)
@@ -55,7 +56,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
if(start_loc && spawn_asteroid(start_loc))
density--
return
*/
//this is terrible! -Pete
/*
/datum/game_mode/proc/setup_sectors()
@@ -79,7 +80,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
else
break
world << "\blue \b Randomization complete."
/*
//debug
for(x=1,x<=global_map.len,x++)
var/list/y_arr = global_map[x]
@@ -92,7 +93,7 @@ proc/spawn_asteroid(var/turf/start_loc,var/type,var/size,var/richness)//type: 0
else t = "Empty Cold Space"
world << "Global map [x] - [y] contains [t] (Z = [y_arr[y]])"
//debug
*/
return
/datum/game_mode/proc/spawn_exporation_packs()

View File

@@ -113,8 +113,8 @@
src.update_status()
master_controller = new /datum/controller/game_controller()
spawn(-1)
master_controller.setup()
spawn(-1) master_controller.setup()
lighting_controller.Initialize()
return
//Crispy fullban

View File

@@ -344,7 +344,7 @@
set category = "Changeling"
set name = "Regenerative Stasis (20)"
var/datum/changeling/changeling = changeling_power(20,0,100,UNCONSCIOUS)
var/datum/changeling/changeling = changeling_power(20,0,100,DEAD)
if(!changeling) return
changeling.chem_charges -= 20

View File

@@ -27,8 +27,8 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fake our death while we regenerate our form, even through death."
helptext = "Must be used before death."
desc = "We become weakened to a death-like state, where we will rise again from death."
helptext = "Can be used before or after death. Duration varies greatly."
genomecost = 0
allowduringlesserform = 1
verbpath = /mob/proc/changeling_fakedeath
@@ -64,6 +64,7 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/transformation_sting
name = "Transformation Sting"
desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another."
helptext = "Does not provide a warning to others. The victim will transform much like a changeling would."
genomecost = 3
verbpath = /mob/proc/changeling_transformation_sting

View File

@@ -24,7 +24,7 @@
name = "Desk"
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
icon_state = "tomealtar"
luminosity = 5
// luminosity = 5
//sprites for this no longer exist -Pete
//(they were stolen from another game anyway)

View File

@@ -129,10 +129,11 @@ var/global/datum/controller/gameticker/ticker
if(admins_number == 0)
send2irc("Server", "Round just started with no admins online!")
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
supply_shuttle.process() //Start the supply shuttle regenerating points -- TLE
master_controller.process() //Start master_controller.process()
lighting_controller.process() //Start processing DynamicAreaLighting updates
//Start master_controller.process()
spawn master_controller.process()
if(config.sql_enabled)
spawn(3000)
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE

View File

@@ -87,6 +87,7 @@
/obj/var/req_one_access_txt = "0"
/obj/New()
..()
//NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
if(src.req_access_txt)
var/list/req_access_str = dd_text2list(req_access_txt,";")
@@ -106,7 +107,7 @@
if(n)
req_one_access += n
..()
//returns 1 if this mob has sufficient access to use this object
/obj/proc/allowed(mob/M)

View File

@@ -3,6 +3,7 @@
/obj/machinery/bot
icon = 'icons/obj/aibots.dmi'
layer = MOB_LAYER
luminosity = 2
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
var/on = 1
var/health = 0 //do not forget to set health for your bot!

View File

@@ -165,7 +165,7 @@
network = null //Not the best way but it will do. I think.
cameranet.removeCamera(src)
stat |= EMPED
sd_SetLuminosity(0)
SetLuminosity(0)
spawn(900)
network = initial(network)
icon_state = initial(icon_state)

View File

@@ -1207,8 +1207,7 @@ About the new airlock wires panel:
src.density = 0
update_icon()
if(!glass)
src.sd_SetOpacity(0)
src.SetOpacity(0) //ugh...lots of lag for something so trivial
src.operating = 0
return
user << "\red You need to be wielding the Fire axe to do that."
@@ -1224,8 +1223,7 @@ About the new airlock wires panel:
src.density = 0
update_icon()
if(!glass)
src.sd_SetOpacity(0)
src.SetOpacity(0) //ugh...lots of lag for something so trivial
src.operating = 0
return
@@ -1243,8 +1241,7 @@ About the new airlock wires panel:
sleep(15)
update_icon()
if((src.visible) && (!glass))
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
src.operating = 0
else
user << "\red You need to be wielding the Fire axe to do that."
@@ -1258,8 +1255,7 @@ About the new airlock wires panel:
sleep(15)
update_icon()
if((src.visible) && (!glass))
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
src.operating = 0
else

View File

@@ -204,12 +204,12 @@
animate("opening")
icon_state = "door0"
src.sd_SetOpacity(0)
src.SetOpacity(0)
sleep(10)
src.layer = 2.7
src.density = 0
update_icon()
src.sd_SetOpacity(0)
// src.SetOpacity(0)
update_nearby_tiles()
if(operating) operating = 0
@@ -235,8 +235,7 @@
sleep(10)
update_icon()
if(visible && !glass)
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
operating = 0
update_nearby_tiles()
return

View File

@@ -20,9 +20,9 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.SetOpacity(0)
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
src.operating = 0
return
return
@@ -36,9 +36,9 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.SetOpacity(0)
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
update_nearby_tiles()
if(operating == 1) //emag again
@@ -55,15 +55,14 @@
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.density = 1
if (src.visible)
src.sd_SetOpacity(1)
src.SetOpacity(initial(opacity))
update_nearby_tiles()
sleep(10)
src.operating = 0
return
/*
/obj/machinery/door/poddoor/two_tile_hor/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -73,14 +72,14 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.SetOpacity(0)
f1.SetOpacity(0)
f2.SetOpacity(0)
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
f1.density = 0
f1.sd_SetOpacity(0)
f2.density = 0
f2.sd_SetOpacity(0)
update_nearby_tiles()
@@ -97,18 +96,18 @@
src.operating = 1
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.density = 1
f1.density = 1
f1.sd_SetOpacity(1)
f2.density = 1
f2.sd_SetOpacity(1)
if (src.visible)
src.sd_SetOpacity(1)
update_nearby_tiles()
sleep(10)
src.SetOpacity(initial(opacity))
f1.SetOpacity(initial(opacity))
f2.SetOpacity(initial(opacity))
update_nearby_tiles()
src.operating = 0
return
@@ -370,7 +369,7 @@
del f3
del f4
..()
*/
/obj/machinery/door/poddoor/filler_object
name = ""
icon_state = ""

View File

@@ -11,15 +11,15 @@
src.add_fingerprint(user)
if (!( istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1) ))
return
if ((src.density && (stat & NOPOWER) && !( src.operating )))
spawn( 0 )
src.operating = 1
if(src.density && (stat & NOPOWER) && !src.operating)
operating = 1
spawn(-1)
flick("shutterc0", src)
src.icon_state = "shutter0"
icon_state = "shutter0"
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
src.operating = 0
density = 0
SetOpacity(0)
operating = 0
return
return
@@ -28,20 +28,20 @@
return
if (!ticker)
return 0
if(!src.operating) //in case of emag
src.operating = 1
if(!operating) //in case of emag
operating = 1
flick("shutterc0", src)
src.icon_state = "shutter0"
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
SetOpacity(0)
update_nearby_tiles()
if(operating == 1) //emag again
src.operating = 0
operating = 0
if(autoclose)
spawn(150)
autoclose()
autoclose() //TODO: note to self: look into this ~Carn
return 1
/obj/machinery/door/poddoor/shutters/close()
@@ -52,7 +52,7 @@
src.icon_state = "shutter1"
src.density = 1
if(src.visible)
src.sd_SetOpacity(1)
SetOpacity(1)
update_nearby_tiles()
sleep(10)

View File

@@ -106,7 +106,7 @@
sleep(10)
src.density = 0
src.sd_SetOpacity(0)
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
if(operating == 1) //emag again
@@ -122,8 +122,8 @@
src.icon_state = text("[]", src.base_state)
src.density = 1
if (src.visible)
src.sd_SetOpacity(1)
// if(src.visible)
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
update_nearby_tiles()
sleep(10)

View File

@@ -22,19 +22,20 @@
base_state = "pflash"
density = 1
/*
/obj/machinery/flasher/New()
sleep(4)
sleep(4) //<--- What the fuck are you doing? D=
src.sd_SetLuminosity(2)
*/
/obj/machinery/flasher/power_change()
if ( powered() )
stat &= ~NOPOWER
icon_state = "[base_state]1"
src.sd_SetLuminosity(2)
// src.sd_SetLuminosity(2)
else
stat |= ~NOPOWER
icon_state = "[base_state]1-p"
src.sd_SetLuminosity(0)
// src.sd_SetLuminosity(0)
//Don't want to render prison breaks impossible
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)

View File

@@ -11,6 +11,7 @@ Possible to do for anyone motivated enough:
Give an AI variable for different hologram icons.
Itegrate EMP effect to disable the unit.
*/
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return
@@ -70,10 +71,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
hologram.icon = A.holo_icon
hologram.mouse_opacity = 0//So you can't click on it.
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
hologram.sd_SetLuminosity(1)//To make it glowy.
hologram.anchored = 1//So space wind cannot drag it.
hologram.name = "AI hologram"//If someone decides to right click.
sd_SetLuminosity(1)//To make the pad glowy.
hologram.SetLuminosity(2) //hologram lighting
SetLuminosity(2) //pad lighting
icon_state = "holopad1"
A.current = src
master = A//AI is the master.
@@ -81,12 +82,12 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
return 1
/obj/machinery/hologram/holopad/proc/clear_holo()
hologram.sd_SetLuminosity(0)//Clear lighting.
// hologram.SetLuminosity(0)//Clear lighting. //handled by the lighting controller when its ower is deleted
del(hologram)//Get rid of hologram.
if(master.current == src)
master.current = null
master = null//Null the master, since no-one is using it now.
sd_SetLuminosity(0)//Clear lighting for the parent.
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
icon_state = "holopad0"
use_power = 1//Passive power usage.
return 1

View File

@@ -176,14 +176,11 @@ obj/machinery/hydroponics/proc/updateicon()
if(src.harvest)
overlays += image('icons/obj/hydroponics.dmi', icon_state="over_harvest3")
if(myseed)
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom)) //revert luminosity to 0
sd_SetLuminosity(0)
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom)) //update luminosity
sd_SetLuminosity(myseed.potency/10)
if(!luminosity)
if(istype(myseed,/obj/item/seeds/glowshroom))
SetLuminosity(round(myseed.potency/10))
else
if(luminosity)
sd_SetLuminosity(0)
SetLuminosity(0)
return
@@ -978,7 +975,6 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
updateicon()
///////////////////////////////////////////////////////////////////////////////
/obj/machinery/hydroponics/soil //Not actually hydroponics at all! Honk!
name = "soil"
icon = 'icons/obj/hydroponics.dmi'
@@ -1003,12 +999,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else
overlays += image('icons/obj/hydroponics.dmi', icon_state="[src.myseed.species]-grow[src.myseed.growthstages]")
if(myseed)
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom))
sd_SetLuminosity(0)
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom))
sd_SetLuminosity(myseed.potency/10)
if(!luminosity)
if(istype(myseed,/obj/item/seeds/glowshroom))
SetLuminosity(round(myseed.potency/10))
else
if(luminosity)
sd_SetLuminosity(0)
SetLuminosity(0)
return

View File

@@ -53,11 +53,11 @@
if ( powered() && disable == 0 )
stat &= ~NOPOWER
icon_state = "[base_state]"
src.sd_SetLuminosity(2)
// src.sd_SetLuminosity(2)
else
stat |= ~NOPOWER
icon_state = "[base_state]-p"
src.sd_SetLuminosity(0)
// src.sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))

View File

@@ -597,6 +597,7 @@
anchored = 1
density = 1
unacidable = 1
luminosity = 3
var/needs_power = 0
var/active = 1
// var/power = 10
@@ -612,8 +613,6 @@
src.gen_secondary = B
if(A && B)
needs_power = 1
spawn(1)
src.sd_SetLuminosity(3)
/obj/machinery/shieldwall/attack_hand(mob/user as mob)
return

View File

@@ -89,14 +89,14 @@
if(mode==4) // supply shuttle timer
var/disp1
var/disp2
if(supply_shuttle_moving)
if(supply_shuttle.moving)
disp1 = "SPPLY"
disp2 = get_supply_shuttle_timer()
if(lentext(disp1) > 5)
disp1 = "**~**"
else
if(supply_shuttle_at_station)
if(supply_shuttle.at_station)
disp1 = "SPPLY"
disp2 = "STATN"
else
@@ -185,8 +185,8 @@
return ""
proc/get_supply_shuttle_timer()
if(supply_shuttle_moving)
var/timeleft = round((supply_shuttle_time - world.timeofday) / 10,1)
if(supply_shuttle.moving)
var/timeleft = round((supply_shuttle.eta_timeofday - world.timeofday) / 10,1)
return "[add_zero(num2text((timeleft / 60) % 60),2)]~[add_zero(num2text(timeleft % 60), 2)]"
// note ~ translates into a blinking :
return ""

View File

@@ -1,219 +0,0 @@
var/global/datum/controller/game_controller/master_controller //Set in world.New()
var/global/datum/failsafe/Failsafe
var/global/controllernum = "no"
var/global/controller_iteration = 0
var/global/last_tick_timeofday = world.timeofday
var/global/last_tick_duration = 0
datum/controller/game_controller
var/processing = 1
var/global/air_master_ready = 0
var/global/sun_ready = 0
var/global/mobs_ready = 0
var/global/diseases_ready = 0
var/global/machines_ready = 0
var/global/objects_ready = 0
var/global/networks_ready = 0
var/global/powernets_ready = 0
var/global/ticker_ready = 0
//Used for MC 'proc break' debugging
var/global/obj/last_obj_processed
var/global/datum/disease/last_disease_processed
var/global/obj/machinery/last_machine_processed
var/global/mob/last_mob_processed
proc/setup()
if(master_controller && (master_controller != src))
del(src)
return
//There can be only one master.
if(!air_master)
air_master = new /datum/controller/air_system()
air_master.setup()
if(!job_master)
job_master = new /datum/controller/occupations()
if(job_master.SetupOccupations())
world << "\red \b Job setup complete"
job_master.LoadJobs("config/jobs.txt")
world.tick_lag = config.Ticklag
createRandomZlevel()
setup_objects()
setupgenetics()
for(var/i = 0, i < max_secret_rooms, i++)
make_mining_asteroid_secret()
syndicate_code_phrase = generate_code_phrase()//Sets up code phrase for traitors, for the round.
syndicate_code_response = generate_code_phrase()
emergency_shuttle = new /datum/shuttle_controller/emergency_shuttle()
if(!ticker)
ticker = new /datum/controller/gameticker()
setupfactions()
spawn
ticker.pregame()
proc/setup_objects()
world << "\red \b Initializing objects"
sleep(-1)
for(var/obj/object in world)
object.initialize()
world << "\red \b Initializing pipe networks"
sleep(-1)
for(var/obj/machinery/atmospherics/machine in world)
machine.build_network()
world << "\red \b Initializing atmos machinery."
sleep(-1)
for(var/obj/machinery/atmospherics/unary/vent_pump/T in world)
T.broadcast_status()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/T in world)
T.broadcast_status()
world << "\red \b Initializations complete."
proc/process()
var/currenttime = world.timeofday
var/diff = (currenttime - last_tick_timeofday) / 10
last_tick_timeofday = currenttime
last_tick_duration = diff
if(!processing)
return 0
controllernum = "yes"
spawn (100)
controllernum = "no"
controller_iteration++
var/start_time = world.timeofday
air_master_ready = 0
sun_ready = 0
mobs_ready = 0
diseases_ready = 0
machines_ready = 0
objects_ready = 0
networks_ready = 0
powernets_ready = 0
ticker_ready = 0
spawn(0)
air_master.process()
air_master_ready = 1
sleep(1)
spawn(0)
sun.calc_position()
sun_ready = 1
sleep(-1)
spawn(0)
for(var/mob/M in world)
last_mob_processed = M
M.Life()
mobs_ready = 1
sleep(-1)
spawn(0)
for(var/datum/disease/D in active_diseases)
last_disease_processed = D
D.process()
diseases_ready = 1
spawn(0)
for(var/obj/machinery/machine in machines)
if(machine)
last_machine_processed = machine
machine.process()
if(machine && machine.use_power)
machine.auto_use_power()
machines_ready = 1
sleep(-1)
sleep(1)
spawn(0)
for(var/obj/object in processing_objects)
last_obj_processed = object
object.process()
objects_ready = 1
spawn(0)
for(var/datum/pipe_network/network in pipe_networks)
network.process()
networks_ready = 1
spawn(0)
for(var/datum/powernet/P in powernets)
P.reset()
powernets_ready = 1
sleep(-1)
spawn(0)
ticker.process()
ticker_ready = 1
sleep(world.timeofday+12-start_time)
var/IL_check = 0 //Infinite loop check (To report when the master controller breaks.)
while(!air_master_ready || !sun_ready || !mobs_ready || !diseases_ready || !machines_ready || !objects_ready || !networks_ready || !powernets_ready || !ticker_ready)
IL_check++
if(IL_check > 600)
var/MC_report = "air_master_ready = [air_master_ready]; sun_ready = [sun_ready]; mobs_ready = [mobs_ready]; diseases_ready = [diseases_ready]; machines_ready = [machines_ready]; objects_ready = [objects_ready]; networks_ready = [networks_ready]; powernets_ready = [powernets_ready]; ticker_ready = [ticker_ready];"
message_admins("<b><font color='red'>PROC BREAKAGE WARNING:</font> The game's master contorller appears to be stuck in one of it's cycles. It has looped through it's delaying loop [IL_check] times.</b>")
message_admins("<b>The master controller reports: [MC_report]</b>")
if(!diseases_ready)
if(last_disease_processed)
message_admins("<b>DISEASE PROCESSING stuck on </b><A HREF='?src=%holder_ref%;adminplayervars=\ref[last_disease_processed]'>[last_disease_processed]</A>", 0, 1)
else
message_admins("<b>DISEASE PROCESSING stuck on </b>unknown")
if(!machines_ready)
if(last_machine_processed)
message_admins("<b>MACHINE PROCESSING stuck on </b><A HREF='?src=%holder_ref%;adminplayervars=\ref[last_machine_processed]'>[last_machine_processed]</A>", 0, 1)
else
message_admins("<b>MACHINE PROCESSING stuck on </b>unknown")
if(!objects_ready)
if(last_obj_processed)
message_admins("<b>OBJ PROCESSING stuck on </b><A HREF='?src=ADMINHOLDERREF;adminplayervars=\ref[last_obj_processed]'>[last_obj_processed]</A>", 0, 1)
else
message_admins("<b>OBJ PROCESSING stuck on </b>unknown")
log_admin("PROC BREAKAGE WARNING: infinite_loop_check = [IL_check]; [MC_report];")
message_admins("<font color='red'><b>Master controller breaking out of delaying loop. Restarting the round is advised if problem persists. DO NOT manually restart the master controller.</b></font>")
break;
sleep(1)
spawn
process()
return 1

View File

@@ -944,14 +944,11 @@
set category = "Exosuit Interface"
set src = usr.loc
set popup_menu = 0
if(usr!=src.occupant)
return
if(usr!=occupant) return
lights = !lights
if(lights)
src.sd_SetLuminosity(src.luminosity + src.lights_power)
else
src.sd_SetLuminosity(src.luminosity - src.lights_power)
src.log_message("Toggled lights.")
if(lights) SetLuminosity(luminosity + lights_power)
else SetLuminosity(luminosity - lights_power)
log_message("Toggled lights.")
return

View File

@@ -194,18 +194,17 @@ var/global/list/obj/item/device/pda/PDAs = list()
*/
/obj/item/device/pda/pickup(mob/user)
if(fon)
sd_SetLuminosity(0)
user.total_luminosity += f_lum
SetLuminosity(0)
user.SetLuminosity(user.luminosity + f_lum)
/obj/item/device/pda/dropped(mob/user)
if(fon)
user.total_luminosity -= f_lum
sd_SetLuminosity(f_lum)
user.SetLuminosity(user.luminosity - f_lum)
SetLuminosity(f_lum)
/obj/item/device/pda/New()
..()
PDAs += src
spawn(3)
if(default_cartridge)
cartridge = new default_cartridge(src)
@@ -496,14 +495,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
//MAIN FUNCTIONS===================================
if("Light")
fon = (!fon)
if (src in U.contents)
if(fon)
U.total_luminosity += f_lum
fon = 0
if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
else SetLuminosity(0)
else
U.total_luminosity -= f_lum
else
sd_SetLuminosity(fon * f_lum)
fon = 1
if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
else SetLuminosity(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0

View File

@@ -468,17 +468,17 @@ Code:
menu = "<h4><img src=pda_crate.png> Supply Record Interlink</h4>"
menu += "<BR><B>Supply shuttle</B><BR>"
menu += "Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]<BR>"
menu += "Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>"
menu += "Current approved orders: <BR><ol>"
for(var/S in supply_shuttle_shoppinglist)
for(var/S in supply_shuttle.shoppinglist)
var/datum/supply_order/SO = S
menu += "<li>[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "<li>#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]</li>"
menu += "</ol>"
menu += "Current requests: <BR><ol>"
for(var/S in supply_shuttle_requestlist)
for(var/S in supply_shuttle.requestlist)
var/datum/supply_order/SO = S
menu += "<li>[SO.object.name] requested by [SO.orderedby]</li>"
menu += "<li>#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]</li>"
menu += "</ol><font size=\"-3\">Upgrade NOW to Space Parts & Space Vendors PLUS for full remote order control and inventory management."
if (48) //mulebot control

View File

@@ -18,25 +18,24 @@
..()
if (on)
icon_state = icon_on
src.sd_SetLuminosity(brightness_on)
src.SetLuminosity(brightness_on)
else
icon_state = icon_off
src.sd_SetLuminosity(0)
src.SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
if(on)
icon_state = icon_on
if(src.loc == user)
user.total_luminosity += brightness_on
else if (isturf(src.loc))
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity + brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
else
icon_state = icon_off
if(src.loc == user)
user.total_luminosity -= brightness_on
else if (isturf(src.loc))
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity - brightness_on)
else if(isturf(loc))
SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
@@ -85,14 +84,14 @@
/obj/item/device/flashlight/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity + brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity - brightness_on)
SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen

View File

@@ -50,7 +50,7 @@
for(var/mob/M in viewers(user))
if(M == user) continue
M << "[user] detaches the power sink from the cable."
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "powersink0"
return
@@ -85,7 +85,7 @@
if(M == user) continue
M << "[user] deactivates the power sink!"
mode = 1
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "powersink0"
processing_objects.Remove(src)
@@ -93,9 +93,7 @@
if(attached)
var/datum/powernet/PN = attached.get_powernet()
if(PN)
if(!luminosity)
sd_SetLuminosity(12)
SetLuminosity(12)
// found a powernet, so drain up to max power from it

View File

@@ -175,6 +175,7 @@
icon_state = "weednode"
name = "purple sac"
desc = "Weird purple octopus-like thing."
luminosity = NODERANGE
/obj/effect/alien/weeds/New()
..()
@@ -187,11 +188,6 @@
Life()
return
/obj/effect/alien/weeds/node/New()
..()
sd_SetLuminosity(NODERANGE)
return
/obj/effect/alien/weeds/proc/Life()
set background = 1
var/turf/U = get_turf(src)

View File

@@ -60,7 +60,5 @@
New()
..()
sd_SetLuminosity(1)
spawn(1200) // 2 minutes
del(src)

View File

@@ -936,7 +936,7 @@ steam.start() -- spawns the effect
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 0 // changed in New()
opacity = 1 // changed in New()
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
@@ -945,11 +945,11 @@ steam.start() -- spawns the effect
New()
..()
update_nearby_tiles(1)
spawn(1)
sd_NewOpacity(1)
Del()
sd_NewOpacity(0)
density = 0
update_nearby_tiles(1)
..()

View File

@@ -21,7 +21,7 @@
spreadChance = 0
/obj/effect/glowshroom/New()
set background = 1
..()
dir = CalcDir()
@@ -40,10 +40,8 @@
else //if on the floor, glowshroom on-floor sprite
icon_state = "glowshroomf"
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
sd_SetLuminosity(potency/10)
spawn(delay)
if(src)
SetLuminosity(round(potency/10))
Spread()
/obj/effect/glowshroom/proc/Spread()

View File

@@ -20,6 +20,10 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) )
playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) )
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
lighting_controller.processing = 0
var/powernet_rebuild_was_deferred_already = defer_powernet_rebuild
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -49,12 +53,16 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
for(var/atom/object in T.contents)
object.ex_act(dist)
//here util we get explosions to be less laggy, might help us identify issues after changes to splosions (because let's face it we've had a few)
world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
sleep(10)
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
if(!powernet_rebuild_was_deferred_already)
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
//here util we get explosions to be less laggy, might help us identify issues after changes to splosions (because let's face it we've had a few)
world.log << "## Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [(world.timeofday-start)/10] seconds."
return 1

View File

@@ -1,4 +1,6 @@
//TODO: Flash range does nothing currently
//NOTE: This has not yet been updated with the lighting deferal stuff. ~Carn
//Needs some work anyway.
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
spawn(0)

View File

@@ -52,7 +52,7 @@
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
sd_SetLuminosity(CANDLE_LUM)
SetLuminosity(CANDLE_LUM)
processing_objects.Add(src)
@@ -75,17 +75,17 @@
if(lit)
lit = 0
update_icon()
sd_SetLuminosity(0)
user.total_luminosity -= CANDLE_LUM
SetLuminosity(0)
user.SetLuminosity(user.luminosity - CANDLE_LUM)
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += CANDLE_LUM
SetLuminosity(0)
user.SetLuminosity(user.luminosity + CANDLE_LUM)
dropped(mob/user)
if(lit)
user.total_luminosity -= CANDLE_LUM
src.sd_SetLuminosity(CANDLE_LUM)
user.SetLuminosity(user.luminosity - CANDLE_LUM)
SetLuminosity(CANDLE_LUM)

View File

@@ -106,9 +106,6 @@ ZIPPO
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
else if(istype(W, /obj/item/device/assembly/igniter))
light("\red [user] fiddles with [W], and manages to light their [name].")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)
@@ -448,7 +445,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red After a few attempts, [user] manages to light the [src], they however burn their finger in the process.", 1)
user.total_luminosity += 2
user.SetLuminosity(user.luminosity + 2)
processing_objects.Add(src)
else
src.lit = 0
@@ -461,7 +458,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] quietly shuts off the [src].", 1)
user.total_luminosity -= 2
user.SetLuminosity(user.luminosity - 2)
processing_objects.Remove(src)
else
return ..()
@@ -490,13 +487,13 @@ ZIPPO
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += 2
src.SetLuminosity(0)
user.SetLuminosity(user.luminosity+2)
return
dropped(mob/user)
if(lit)
user.total_luminosity -= 2
src.sd_SetLuminosity(2)
user.SetLuminosity(user.luminosity-2)
src.SetLuminosity(2)
return

View File

@@ -134,8 +134,8 @@
w_class = 2.0
force_unwielded = 3
force_wielded = 30
wieldsound = 'saberon.ogg'
unwieldsound = 'saberoff.ogg'
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
flags = FPRINT | TABLEPASS | NOSHIELD
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")

View File

@@ -470,20 +470,14 @@ obj/structure/meteorhit(obj/O as obj)
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
var/turf/T = src.loc
T.sd_LumReset()
SetOpacity(0)
else
flick("[mineral]fwall_closing", src)
icon_state = "[mineral]0"
sleep(15)
src.density = 1
src.sd_SetOpacity(1)
var/turf/T = src.loc
//T.sd_LumUpdate()
SetOpacity(1)
src.relativewall()
T.sd_LumReset()
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
radiate()
@@ -583,27 +577,21 @@ obj/structure/meteorhit(obj/O as obj)
icon_state = "frwall_open"
flick("frwall_opening", src)
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
var/turf/T = src.loc
T.sd_LumReset()
density = 0
SetOpacity(0)
else
icon_state = "r_wall"
flick("frwall_closing", src)
sleep(15)
src.density = 1
src.sd_SetOpacity(1)
var/turf/T = src.loc
//T.sd_LumUpdate()
src.relativewall()
T.sd_LumReset()
density = 1
SetOpacity(1)
relativewall()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
var/turf/T = get_turf(src)
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the r wall.")
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
T.ReplaceWithWall() //Intentionally makes a regular wall instead of an r-wall (no cheap r-walls for you).
del(src)

View File

@@ -198,10 +198,7 @@
/obj/structure/mineral_door/uranium
mineralType = "uranium"
hardness = 3
New()
..()
sd_SetLuminosity(3)
luminosity = 2
/obj/structure/mineral_door/sandstone
mineralType = "sandstone"

View File

@@ -1,24 +1,10 @@
//Config stuff
#define SUPPLY_DOCKZ 2 //Z-level of the Dock.
#define SUPPLY_STATIONZ 1 //Z-level of the Station.
#define SUPPLY_POINTSPER 10 //Points per tick.
#define SUPPLY_POINTDELAY 3000 //Delay between ticks in milliseconds.
#define SUPPLY_MOVETIME 1200 //Time to station is milliseconds.
#define SUPPLY_POINTSPERCRATE 5 //Points per crate sent back.
#define SUPPLY_STATION_AREATYPE "/area/supply/station" //Type of the supply shuttle area for station
#define SUPPLY_DOCK_AREATYPE "/area/supply/dock" //Type of the supply shuttle area for dock
#define SUPPLY_POINTSPERSLIP 2 //points per packing slip sent back stamped.
var/supply_shuttle_moving = 0
var/supply_shuttle_at_station = 0
var/list/supply_shuttle_shoppinglist = new/list()
var/list/supply_shuttle_requestlist = new/list()
var/supply_shuttle_can_send = 1
var/supply_shuttle_time = 0
var/supply_shuttle_timeleft = 0
var/supply_shuttle_points = 50
var/ordernum=0
var/supplyshuttle_mech_redeem = 0 //You can redeem a full set of mech toys for a reward.
var/datum/controller/supply_shuttle/supply_shuttle = new()
var/list/mechtoys = list(
/obj/item/toy/prize/ripley,
@@ -34,18 +20,18 @@ var/list/mechtoys = list(
/obj/item/toy/prize/phazon
)
/area/supply/station //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
/area/supply/station //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
name = "supply shuttle"
icon_state = "shuttle3"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
requires_power = 0
/area/supply/dock //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
/area/supply/dock //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
name = "supply shuttle"
icon_state = "shuttle3"
luminosity = 1
sd_lighting = 0
lighting_use_dynamic = 0
requires_power = 0
//SUPPLY PACKS MOVED TO /code/defines/obj/supplypacks.dm
@@ -84,13 +70,13 @@ var/list/mechtoys = list(
desc = "Heavy duty, airtight, plastic flaps."
New() //set the turf below the flaps to block air
var/turf/T = get_turf(src.loc)
var/turf/T = get_turf(loc)
if(T)
T.blocks_air = 1
..()
Del() //lazy hack to set the turf to allow air to pass if it's a simulated floor
var/turf/T = get_turf(src.loc)
var/turf/T = get_turf(loc)
if(T)
if(istype(T, /turf/simulated/floor))
T.blocks_air = 0
@@ -103,6 +89,7 @@ var/list/mechtoys = list(
req_access = list(access_cargo)
circuit = "/obj/item/weapon/circuitboard/supplycomp"
var/temp = null
var/reqtime = 0 //Cooldown for requisitions - Quarxink
var/hacked = 0
var/can_order_contraband = 0
@@ -114,6 +101,7 @@ var/list/mechtoys = list(
var/temp = null
var/reqtime = 0 //Cooldown for requisitions - Quarxink
/*
/obj/effect/marker/supplymarker
icon_state = "X"
icon = 'icons/misc/mark.dmi'
@@ -121,8 +109,10 @@ var/list/mechtoys = list(
invisibility = 101
anchored = 1
opacity = 0
*/
/datum/supply_order
var/ordernum
var/datum/supply_packs/object = null
var/orderedby = null
var/comment = null
@@ -138,130 +128,165 @@ var/list/mechtoys = list(
var/hidden = 0
var/contraband = 0
/proc/supply_ticker()
//world << "Supply ticker ticked : Adding [SUPPLY_POINTSPER] to [supply_shuttle_points]."
supply_shuttle_points += SUPPLY_POINTSPER
//world << "New SP total is [supply_shuttle_points]"
spawn(SUPPLY_POINTDELAY) supply_ticker()
/datum/controller/supply_shuttle
var/processing = 1
var/processing_interval = 300
var/iteration = 0
//supply points
var/points = 50
var/points_per_process = 1
var/points_per_slip = 2
var/points_per_crate = 5
var/mech_redeem = 0
//control
var/ordernum
var/list/shoppinglist = list()
var/list/requestlist = list()
var/list/supply_packs = list()
//shuttle movement
var/at_station = 0
var/movetime = 1200
var/moving = 0
var/eta_timeofday
var/eta
/proc/supply_process()
while(supply_shuttle_time - world.timeofday > 0)
var/ticksleft = supply_shuttle_time - world.timeofday
New()
ordernum = rand(1,9000)
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
var/datum/supply_packs/P = new typepath()
supply_packs[P.name] = P
if(ticksleft > 1e5)
supply_shuttle_time = world.timeofday + 10 // midnight rollover
//Supply shuttle ticker - handles supply point regenertion and shuttle travelling between centcomm and the station
proc/process()
spawn(0)
set background = 1
while(1)
if(processing)
iteration++
points += points_per_process
supply_shuttle_timeleft = round( ((ticksleft / 10)/60) )
sleep(10)
supply_shuttle_moving = 0
send_supply_shuttle()
/proc/supply_can_move()
if(supply_shuttle_moving) return 0
//I know this is an absolutly horrendous way to do this, very inefficient, but it's the only reliable way I can think of.
//Check for mobs
for(var/mob/living/M in mob_list)
var/area/A = get_area(M)
if(!A || !A.type) continue
if(A.type == /area/supply/station)
return 0
//Check for beacons
for(var/obj/item/device/radio/beacon/B in world)
var/area/A = get_area(B)
if(!A || !A.type) continue
if(A.type == /area/supply/station)
return 0
//Check for mechs. I think this was added because people were somehow on centcomm and bringing back centcomm mechs.
for(var/obj/mecha/Mech in world)
var/area/A = get_area(Mech)
if(!A || !A.type) continue
if(A.type == /area/supply/station)
return 0
//Check for nuke disk This also prevents multiple nuke disks from being made -Nodrak
for(var/obj/item/weapon/disk/nuclear/N)
var/area/A = get_area(N)
if(!A || !A.type) continue
if(A.type == /area/supply/station)
return 0
return 1
/*
Teleport beacon -> wrapping paper -> backpack -> bodybag -> crate -> wrapping paper -> loaded on a mulebot
That would be a teleport beacon inside of 6-layers deep in contents. Meaning you would have to add more loops or more checks.
This method wont take into account storage items developed in the future and doesn't take into account the storage items we have currently.
-Nodrak
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
for(var/turf/T in get_area_turfs(shuttleat) )
//if((locate(/mob/living) in T) && (!locate(/mob/living/carbon/monkey) in T)) return 0 //old check for living excluded monkeys
if((locate(/mob/living) in T)) return 0
if((locate(/obj/item/device/radio/beacon) in T)) return 0
if((locate(/obj/mecha) in T)) return 0
if((locate(/obj/structure/closet/body_bag) in T)) return 0
for(var/atom/ATM in T)
if((locate(/mob/living) in ATM)) return 0
if((locate(/obj/item/device/radio/beacon) in ATM)) return 0
if((locate(/obj/mecha ) in ATM)) return 0
if((locate(/obj/structure/closet/body_bag) in ATM)) return 0
for(var/atom/ATMM in ATM) // okay jesus christ how many recursive packaging options are we going to have guys come on - Quarxink
if((locate(/mob/living) in ATMM)) return 0
if((locate(/obj/item/device/radio/beacon) in ATMM)) return 0
if((locate(/obj/mecha ) in ATMM)) return 0
if((locate(/obj/structure/closet/body_bag) in ATMM)) return 0
return 1
*/
/proc/sell_crates()
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
for(var/turf/T in get_area_turfs(shuttleat) )
var/obj/item/weapon/paper/slip = locate(/obj/item/weapon/paper/manifest) in T
if(slip)
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
supply_shuttle_points += SUPPLY_POINTSPERSLIP
del(slip)
var/crate = locate(/obj/structure/closet/crate) in T
if(crate)
if(mechtoys)
var/toysfound = 0
for(var/toytype in mechtoys)
if( !locate(toytype) in crate )
break
if(moving == 1)
var/ticksleft = (eta_timeofday - world.timeofday)
if(ticksleft > 0)
eta = round(ticksleft/600,1)
else
toysfound++
if(toysfound && toysfound == mechtoys.len)
supplyshuttle_mech_redeem++
feedback_inc("supply_mech_collection_redeemed")
del(crate)
supply_shuttle_points += SUPPLY_POINTSPERCRATE
eta = 0
send()
/obj/item/weapon/paper/manifest
name = "Supply Manifest"
/proc/process_supply_order()
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
sleep(processing_interval)
var/list/markers = new/list()
proc/send()
var/area/from
var/area/dest
var/area/the_shuttles_way
switch(at_station)
if(1)
from = locate(SUPPLY_STATION_AREATYPE)
dest = locate(SUPPLY_DOCK_AREATYPE)
the_shuttles_way = from
at_station = 0
if(0)
from = locate(SUPPLY_DOCK_AREATYPE)
dest = locate(SUPPLY_STATION_AREATYPE)
the_shuttles_way = dest
at_station = 1
moving = 0
if(!supply_shuttle_shoppinglist.len) return
//Do I really need to explain this loop?
for(var/mob/living/unlucky_person in the_shuttles_way)
unlucky_person.gib()
for(var/turf/T in get_area_turfs(shuttleat))
for(var/obj/effect/marker/supplymarker/D in T)
markers += D
from.move_contents_to(dest)
for(var/S in supply_shuttle_shoppinglist)
var/pickedloc = 0
var/found = 0
for(var/C in markers)
if ((locate(/obj/structure/closet/crate) in get_turf(C)) || (locate(/obj/structure/largecrate) in get_turf(C)))
//Check whether the shuttle is allowed to move
proc/can_move()
if(moving) return 0
var/area/shuttle = locate(/area/supply/station)
if(!shuttle) return 0
if(forbidden_atoms_check(shuttle))
return 0
return 1
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
proc/forbidden_atoms_check(atom/A)
if(istype(A,/mob/living))
return 1
if(istype(A,/obj/item/weapon/disk/nuclear))
return 1
if(istype(A,/obj/machinery/nuclearbomb))
return 1
if(istype(A,/obj/item/device/radio/beacon))
return 1
for(var/i=1, i<=A.contents.len, i++)
var/atom/B = A.contents[i]
if(.(B))
return 1
//Sellin
proc/sell()
var/shuttle_at
if(at_station) shuttle_at = SUPPLY_STATION_AREATYPE
else shuttle_at = SUPPLY_DOCK_AREATYPE
var/area/shuttle = locate(shuttle_at)
if(!shuttle) return
var/list/mechtoys_found = list()
for(var/atom/movable/MA in shuttle)
if(MA.anchored) continue
if(istype(MA,/obj/structure/closet))
points += points_per_crate
var/find_slip = 1
for(var/atom in MA)
var/atom/A = atom
if(find_slip && istype(A,/obj/item/weapon/paper/manifest))
var/obj/item/weapon/paper/slip = A
if(slip.stamped && slip.stamped.len) //yes, the clown stamp will work. clown is the highest authority on the station, it makes sense
points += points_per_slip
find_slip = 0
continue
found = 1
pickedloc = get_turf(C)
break
if (!found)
pickedloc = get_turf(pick(markers))
if(A.type in mechtoys)
mechtoys_found["[A.type]"]++
del(MA)
if(mechtoys && mechtoys.len && mechtoys_found.len >= mechtoys.len)
var/complete_sets = 10
for(var/index in mechtoys_found)
complete_sets = min(complete_sets, mechtoys_found[index])
if(complete_sets)
mech_redeem += complete_sets
//Buyin
proc/buy()
if(!shoppinglist.len) return
var/shuttle_at
if(at_station) shuttle_at = SUPPLY_STATION_AREATYPE
else shuttle_at = SUPPLY_DOCK_AREATYPE
var/area/shuttle = locate(shuttle_at)
if(!shuttle) return
var/list/clear_turfs = list()
for(var/turf/T in shuttle)
if(T.density || T.contents.len) continue
clear_turfs += T
for(var/S in shoppinglist)
if(!clear_turfs.len) break
var/i = rand(1,clear_turfs.len)
var/turf/pickedloc = clear_turfs[i]
clear_turfs.Cut(i,i+1)
var/datum/supply_order/SO = S
var/datum/supply_packs/SP = SO.object
@@ -270,22 +295,16 @@ This method wont take into account storage items developed in the future and doe
//supply manifest generation begin
if(ordernum)
ordernum++
else
ordernum = rand(500,5000) //pick a random number to start with
var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest(A)
slip.info = ""
slip.info +="<h3>[command_name()] Shipping Manifest</h3><hr><br>"
slip.info +="Order #: [ordernum]<br>"
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
slip.info +="Order #[SO.ordernum]<br>"
slip.info +="Destination: [station_name]<br>"
slip.info +="[supply_shuttle_shoppinglist.len] PACKAGES IN THIS SHIPMENT<br>"
slip.info +="[supply_shuttle.shoppinglist.len] PACKAGES IN THIS SHIPMENT<br>"
slip.info +="CONTENTS:<br><ul>"
//spawn the stuff, finish generating the manifest while you're at it
if(SP.access)
A:req_access = new/list()
A:req_access = list()
A:req_access += text2num(SP.access)
for(var/B in SP.contains)
if(!B) continue
@@ -298,52 +317,47 @@ This method wont take into account storage items developed in the future and doe
slip.info += "</ul><br>"
slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS<hr>"
if(supplyshuttle_mech_redeem)
for (var/i = 0; i < supplyshuttle_mech_redeem; i++)
var/pickedloc = 0
var/found = 0
for(var/C in markers)
if ( (locate(/obj/structure/closet/crate) in get_turf(C)) || \
(locate(/obj/structure/largecrate) in get_turf(C)) || \
(locate(/obj/mecha/combat/marauder) in get_turf(C))
)
continue
found = 1
pickedloc = get_turf(C)
break
if (!found)
pickedloc = get_turf(pick(markers))
if (!pickedloc)
return
while(0<mech_redeem)
if(!clear_turfs.len) break
mech_redeem--
var/i = rand(1,clear_turfs.len)
var/turf/pickedloc = clear_turfs[i]
clear_turfs.Cut(i,i+1)
var/obj/mecha/combat/marauder/M = new(pickedloc) //Redeeming the mech toy collection gives you your very own life-sized combat mech!
M.operation_req_access = list()
M.internals_req_access = list()
supply_shuttle.shoppinglist.Cut()
return
/obj/item/weapon/paper/manifest
name = "Supply Manifest"
/obj/machinery/computer/ordercomp/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/computer/ordercomp/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/computer/supplycomp/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/computer/supplycomp/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
/obj/machinery/computer/ordercomp/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
if (src.temp)
dat = src.temp
if(temp)
dat = temp
else
dat += {"<BR><B>Supply shuttle</B><HR>
Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"]<BR>
<HR>Supply points: [supply_shuttle_points]<BR>
Location: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Dock"]<BR>
<HR>Supply points: [supply_shuttle.points]<BR>
<BR>\n<A href='?src=\ref[src];order=1'>Request items</A><BR><BR>
<A href='?src=\ref[src];vieworders=1'>View approved orders</A><BR><BR>
<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR><BR>
@@ -357,61 +371,51 @@ This method wont take into account storage items developed in the future and doe
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
if( isturf(loc) && (in_range(src, usr) || istype(usr, /mob/living/silicon)) )
usr.machine = src
if(href_list["order"])
src.temp = "Supply points: [supply_shuttle_points]<BR><HR><BR>Request what?<BR><BR>"
for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) )
var/datum/supply_packs/N = new S()
temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden || N.contraband) continue //Have to send the type instead of a reference to
src.temp += "<A href='?src=\ref[src];doorder=[N.type]'>[N.name]</A> Cost: [N.cost] " //the obj because it would get caught by the garbage
src.temp += "<A href='?src=\ref[src];printform=[N.type]'>Print Requisition</A><br>" //collector. oh well.
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if (href_list["doorder"])
var/datum/supply_order/O = new/datum/supply_order ()
var/supplytype = href_list["doorder"]
var/datum/supply_packs/P = new supplytype ()
O.object = P
O.orderedby = usr.name
supply_shuttle_requestlist += O
src.temp = "Thanks for your request. The cargo team will process it as soon as possible.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
if(world.time < reqtime)
for(var/mob/V in hearers(src))
V.show_message("<b>[src]</b>'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"")
return
else if (href_list["printform"])
if (!reqtime)
var/supplytype = href_list["printform"]
var/datum/supply_packs/P = new supplytype ()
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(src.loc)
var/idname = "Unknown"
var/idrank = "Unknown"
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","")),1,MAX_MESSAGE_LEN)
if(!reason)
reason = "Unknown"
//Find the correct supply_pack datum
var/datum/supply_packs/P = supply_shuttle.supply_packs[href_list["doorder"]]
if(!istype(P)) return
var/timeout = world.time + 600
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
if(world.time > timeout) return
if(!reason) reason = "*None Provided*"
var/idname = "*None Provided*"
var/idrank = "*None Provided*"
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
idname = H.get_authentification_name()
idrank = H.get_assignment()
else if(issilicon(usr))
idname = usr.real_name
supply_shuttle.ordernum++
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc)
reqform.name = "Requisition Form - [P.name]"
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
if (istype(usr:wear_id, /obj/item/weapon/card/id))
if(usr:wear_id.registered_name)
idname = usr:wear_id.registered_name
if(usr:wear_id.assignment)
idrank = usr:wear_id.assignment
if (istype(usr:wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = usr:wear_id
if(pda.owner)
idname = pda.owner
if(pda.ownjob)
idrank = pda.ownjob
else
idname = usr.name
reqform.info += "INDEX: #[supply_shuttle.ordernum]<br>"
reqform.info += "REQUESTED BY: [idname]<br>"
reqform.info += "RANK: [idrank]<br>"
reqform.info += "REASON: [reason]<br>"
reqform.info += "SUPPLY CRATE TYPE: [P.name]<br>"
reqform.info += "Contents:<br><ul>"
reqform.info += "CONTENTS:<br><ul>"
for(var/B in P.contains)
var/thepath = text2path(B)
@@ -421,39 +425,41 @@ This method wont take into account storage items developed in the future and doe
reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:<br>"
reqform.update_icon() //Fix for appearing blank when printed.
reqtime = 5 //5 second cooldown initiated after each printed req, change the number to change the cooldown (in seconds) - Quarxink
spawn(0)
while(reqtime >=1 && src)
sleep(10)
reqtime --
reqtime = 0
reqtime = (world.time + 5) % 1e5
//make our supply_order datum
var/datum/supply_order/O = new /datum/supply_order()
O.ordernum = supply_shuttle.ordernum
O.object = P
O.orderedby = idname
supply_shuttle.requestlist += O
temp = "Thanks for your request. The cargo team will process it as soon as possible.<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else
for (var/mob/V in hearers(src))
V.show_message("<b>[src]</b>'s monitor flashes, \"[reqtime] seconds remaining until another requisition form may be printed.\"")
else if (href_list["vieworders"])
src.temp = "Current approved orders: <BR><BR>"
for(var/S in supply_shuttle_shoppinglist)
temp = "Current approved orders: <BR><BR>"
for(var/S in supply_shuttle.shoppinglist)
var/datum/supply_order/SO = S
src.temp += "[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "[SO.object.name] approved by [SO.orderedby] [SO.comment ? "([SO.comment])":""]<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if (href_list["viewrequests"])
src.temp = "Current requests: <BR><BR>"
for(var/S in supply_shuttle_requestlist)
temp = "Current requests: <BR><BR>"
for(var/S in supply_shuttle.requestlist)
var/datum/supply_order/SO = S
src.temp += "[SO.object.name] requested by [SO.orderedby]<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby]<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if (href_list["mainmenu"])
src.temp = null
temp = null
src.add_fingerprint(usr)
src.updateUsrDialog()
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/computer/supplycomp/attack_hand(var/mob/user as mob)
if(!src.allowed(user))
if(!allowed(user))
user << "\red Access Denied."
return
@@ -462,14 +468,14 @@ This method wont take into account storage items developed in the future and doe
user.machine = src
post_signal("supply")
var/dat
if (src.temp)
dat = src.temp
if (temp)
dat = temp
else
dat += {"<BR><B>Supply shuttle</B><HR>
\nLocation: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Away"]<BR>
<HR>\nSupply points: [supply_shuttle_points]<BR>\n<BR>
[supply_shuttle_moving ? "\n*Must be away to order items*<BR>\n<BR>":supply_shuttle_at_station ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=1'>Order items</A><BR>\n<BR>"]
[supply_shuttle_moving ? "\n*Shuttle already called*<BR>\n<BR>":supply_shuttle_at_station ? "\n<A href='?src=\ref[src];sendtodock=1'>Send away</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
\nLocation: [supply_shuttle.moving ? "Moving to station ([supply_shuttle.eta] Mins.)":supply_shuttle.at_station ? "Station":"Away"]<BR>
<HR>\nSupply points: [supply_shuttle.points]<BR>\n<BR>
[supply_shuttle.moving ? "\n*Must be away to order items*<BR>\n<BR>":supply_shuttle.at_station ? "\n*Must be away to order items*<BR>\n<BR>":"\n<A href='?src=\ref[src];order=1'>Order items</A><BR>\n<BR>"]
[supply_shuttle.moving ? "\n*Shuttle already called*<BR>\n<BR>":supply_shuttle.at_station ? "\n<A href='?src=\ref[src];send=1'>Send away</A><BR>\n<BR>":"\n<A href='?src=\ref[src];send=1'>Send to station</A><BR>\n<BR>"]
\n<A href='?src=\ref[src];viewrequests=1'>View requests</A><BR>\n<BR>
\n<A href='?src=\ref[src];vieworders=1'>View orders</A><BR>\n<BR>
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
@@ -481,18 +487,18 @@ This method wont take into account storage items developed in the future and doe
/obj/machinery/computer/supplycomp/attackby(I as obj, user as mob)
if(istype(I,/obj/item/weapon/card/emag) && !hacked)
user << "\blue Special supplies unlocked."
src.hacked = 1
hacked = 1
return
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
if (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/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
var/obj/item/weapon/circuitboard/supplycomp/M = new /obj/item/weapon/circuitboard/supplycomp( A )
for (var/obj/C in src)
C.loc = src.loc
C.loc = loc
A.circuit = M
A.state = 3
A.icon_state = "3"
@@ -500,172 +506,184 @@ This method wont take into account storage items developed in the future and doe
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
var/obj/item/weapon/circuitboard/supplycomp/M = new /obj/item/weapon/circuitboard/supplycomp( A )
if(src.can_order_contraband)
if(can_order_contraband)
M.contraband_enabled = 1
for (var/obj/C in src)
C.loc = src.loc
C.loc = loc
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
src.attack_hand(user)
attack_hand(user)
return
/obj/machinery/computer/supplycomp/Topic(href, href_list)
if(!supply_shuttle)
world.log << "## ERROR: Eek. The supply_shuttle controller datum is missing somehow."
return
if(..())
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
if(isturf(loc) && ( in_range(src, usr) || istype(usr, /mob/living/silicon) ) )
usr.machine = src
//From Station to Centcomm
if (href_list["sendtodock"])
if(!supply_shuttle_at_station || supply_shuttle_moving) return
//Calling the shuttle
if(href_list["send"])
if(!supply_shuttle.can_move())
temp = "For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
if (!supply_can_move())
usr << "\red The supply shuttle can not transport station employees, exosuits, classified nuclear codes or homing beacons."
return
src.temp = "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
src.updateUsrDialog()
else if(supply_shuttle.at_station)
supply_shuttle.moving = -1
supply_shuttle.sell()
supply_shuttle.send()
temp = "The supply shuttle has departed.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else
supply_shuttle.moving = 1
supply_shuttle.buy()
supply_shuttle.eta_timeofday = (world.timeofday + supply_shuttle.movetime) % 864000
temp = "The supply shuttle has been called and will arrive in [round(supply_shuttle.movetime/600,1)] minutes.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
post_signal("supply")
supply_shuttle_shoppinglist = null
supply_shuttle_shoppinglist = new/list()
else if (href_list["order"])
if(supply_shuttle.moving) return
temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
sell_crates()
//Remove anything or anyone that was either left behind or that bypassed supply_can_move() -Nodrak
for(var/area/supply/station/A in world)
for(var/obj/item/I in A.contents)
del(I)
for(var/mob/living/M in A.contents)
del(M)
send_supply_shuttle()
//From Centcomm to Station
else if (href_list["sendtostation"])
if(supply_shuttle_at_station || supply_shuttle_moving) return
if (!supply_can_move())
usr << "\red The supply shuttle can not transport station employees, exosuits, classified nuclear codes or homing beacons."
return
post_signal("supply")
usr << "\blue The supply shuttle has been called and will arrive in [round(((SUPPLY_MOVETIME/10)/60))] minutes."
src.temp = "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
src.updateUsrDialog()
supply_shuttle_moving = 1
process_supply_order()
supply_shuttle_time = world.timeofday + SUPPLY_MOVETIME
spawn(0)
supply_process()
if (href_list["order"])
if(supply_shuttle_moving) return
src.temp = "Supply points: [supply_shuttle_points]<BR><HR><BR>Request what?<BR><BR>"
for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) )
var/datum/supply_packs/N = new S()
if(N.hidden && !src.hacked) continue //Have to send the type instead of a reference to
if(N.contraband && !src.can_order_contraband){continue;} //Agouri -Kavalamarker
src.temp += "<A href='?src=\ref[src];doorder=[N.type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>" //collector. oh well.
for(var/supply_name in supply_shuttle.supply_packs )
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
if(N.hidden && !hacked) continue
if(N.contraband && !can_order_contraband) continue
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if (href_list["doorder"])
if(world.time < reqtime)
for(var/mob/V in hearers(src))
V.show_message("<b>[src]</b>'s monitor flashes, \"[world.time - reqtime] seconds remaining until another requisition form may be printed.\"")
return
if(locate(href_list["doorder"])) //Comes from the requestlist
var/datum/supply_order/O = locate(href_list["doorder"])
var/datum/supply_packs/P = O.object
supply_shuttle_requestlist -= O
//Find the correct supply_pack datum
var/datum/supply_packs/P = supply_shuttle.supply_packs[href_list["doorder"]]
if(!istype(P)) return
if(supply_shuttle_points >= P.cost)
O.object = P
O.orderedby = usr.name
O.comment = copytext(sanitize(input(usr,"Comment:","Enter comment","")),1,MAX_MESSAGE_LEN)
if(supply_shuttle_points >= P.cost)
supply_shuttle_points -= P.cost
supply_shuttle_shoppinglist += O
src.temp = "Thanks for your order.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else
src.temp = "Not enough supply points.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else
src.temp = "Not enough supply points.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
var/timeout = world.time + 600
var/reason = copytext(sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text),1,MAX_MESSAGE_LEN)
if(world.time > timeout) return
if(!reason) reason = "*None Provided*"
else //Comes from the orderform
var/idname = "*None Provided*"
var/idrank = "*None Provided*"
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
idname = H.get_authentification_name()
idrank = H.get_assignment()
else if(issilicon(usr))
idname = usr.real_name
supply_shuttle.ordernum++
var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(loc)
reqform.name = "Requisition Form - [P.name]"
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
reqform.info += "INDEX: #[supply_shuttle.ordernum]<br>"
reqform.info += "REQUESTED BY: [idname]<br>"
reqform.info += "RANK: [idrank]<br>"
reqform.info += "REASON: [reason]<br>"
reqform.info += "SUPPLY CRATE TYPE: [P.name]<br>"
reqform.info += "CONTENTS:<br><ul>"
for(var/B in P.contains)
var/thepath = text2path(B)
var/atom/B2 = new thepath()
reqform.info += "<li>[B2.name]</li>"
reqform.info += "</ul><hr>"
reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:<br>"
reqform.update_icon() //Fix for appearing blank when printed.
reqtime = (world.time + 5) % 1e5
//make our supply_order datum
var/datum/supply_order/O = new /datum/supply_order()
var/supplytype = href_list["doorder"]
var/datum/supply_packs/P = new supplytype ()
if(supply_shuttle_points >= P.cost)
O.ordernum = supply_shuttle.ordernum
O.object = P
O.orderedby = usr.name
O.comment = copytext(sanitize(input(usr,"Comment:","Enter comment","")),1,MAX_MESSAGE_LEN)
if(supply_shuttle_points >= P.cost)
supply_shuttle_points -= P.cost
supply_shuttle_shoppinglist += O
src.temp = "Thanks for your order.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
O.orderedby = idname
supply_shuttle.requestlist += O
temp = "Order requst placed.<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A> | <A href='?src=\ref[src];confirmorder=[O.ordernum]'>Authorize Order</A>"
else if(href_list["confirmorder"])
//Find the correct supply_order datum
var/ordernum = text2num(href_list["confirmorder"])
var/datum/supply_order/O
var/datum/supply_packs/P
temp = "Invalid Request"
for(var/i=1, i<=supply_shuttle.requestlist.len, i++)
var/datum/supply_order/SO = supply_shuttle.requestlist[i]
if(SO.ordernum == ordernum)
O = SO
P = O.object
if(supply_shuttle.points >= P.cost)
supply_shuttle.requestlist.Cut(i,i+1)
supply_shuttle.points -= P.cost
supply_shuttle.shoppinglist += O
temp = "Thanks for your order.<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else
src.temp = "Not enough supply points.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else
src.temp = "Not enough supply points.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp = "Not enough supply points.<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
break
else if (href_list["vieworders"])
src.temp = "Current approved orders: <BR><BR>"
for(var/S in supply_shuttle_shoppinglist)
temp = "Current approved orders: <BR><BR>"
for(var/S in supply_shuttle.shoppinglist)
var/datum/supply_order/SO = S
src.temp += "[SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""]<BR>"// <A href='?src=\ref[src];cancelorder=[S]'>(Cancel)</A><BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "#[SO.ordernum] - [SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""]<BR>"// <A href='?src=\ref[src];cancelorder=[S]'>(Cancel)</A><BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
/*
else if (href_list["cancelorder"])
var/datum/supply_order/remove_supply = href_list["cancelorder"]
supply_shuttle_shoppinglist -= remove_supply
supply_shuttle_points += remove_supply.object.cost
src.temp += "Canceled: [remove_supply.object.name]<BR><BR><BR>"
temp += "Canceled: [remove_supply.object.name]<BR><BR><BR>"
for(var/S in supply_shuttle_shoppinglist)
var/datum/supply_order/SO = S
src.temp += "[SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""] <A href='?src=\ref[src];cancelorder=[S]'>(Cancel)</A><BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "[SO.object.name] approved by [SO.orderedby][SO.comment ? " ([SO.comment])":""] <A href='?src=\ref[src];cancelorder=[S]'>(Cancel)</A><BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
*/
else if (href_list["viewrequests"])
src.temp = "Current requests: <BR><BR>"
for(var/S in supply_shuttle_requestlist)
temp = "Current requests: <BR><BR>"
for(var/S in supply_shuttle.requestlist)
var/datum/supply_order/SO = S
src.temp += "[SO.object.name] requested by [SO.orderedby] [supply_shuttle_moving ? "":supply_shuttle_at_station ? "":"<A href='?src=\ref[src];doorder=\ref[SO]'>Approve</A> <A href='?src=\ref[src];rreq=\ref[SO]'>Remove</A>"]<BR>"
temp += "#[SO.ordernum] - [SO.object.name] requested by [SO.orderedby] [supply_shuttle.moving ? "":supply_shuttle.at_station ? "":"<A href='?src=\ref[src];confirmorder=[SO.ordernum]'>Approve</A> <A href='?src=\ref[src];rreq=[SO.ordernum]'>Remove</A>"]<BR>"
src.temp += "<BR><A href='?src=\ref[src];clearreq=1'>Clear list</A>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
temp += "<BR><A href='?src=\ref[src];clearreq=1'>Clear list</A>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if (href_list["rreq"])
supply_shuttle_requestlist -= locate(href_list["rreq"])
src.temp = "Request removed.<BR>"
src.temp += "<BR><A href='?src=\ref[src];viewrequests=1'>OK</A>"
var/ordernum = text2num(href_list["rreq"])
temp = "Invalid Request.<BR>"
for(var/i=1, i<=supply_shuttle.requestlist.len, i++)
var/datum/supply_order/SO = supply_shuttle.requestlist[i]
if(SO.ordernum == ordernum)
supply_shuttle.requestlist.Cut(i,i+1)
temp = "Request removed.<BR>"
break
temp += "<BR><A href='?src=\ref[src];viewrequests=1'>OK</A>"
else if (href_list["clearreq"])
supply_shuttle_requestlist = null
supply_shuttle_requestlist = new/list()
src.temp = "List cleared.<BR>"
src.temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
supply_shuttle.requestlist.Cut()
temp = "List cleared.<BR>"
temp += "<BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
else if (href_list["mainmenu"])
src.temp = null
temp = null
src.add_fingerprint(usr)
src.updateUsrDialog()
add_fingerprint(usr)
updateUsrDialog()
return
/obj/machinery/computer/supplycomp/proc/post_signal(var/command)
@@ -683,23 +701,4 @@ This method wont take into account storage items developed in the future and doe
/proc/send_supply_shuttle()
if (supply_shuttle_moving) return
var/area/the_shuttles_way = locate(SUPPLY_STATION_AREATYPE)
//Do I really need to explain this loop?
for(var/mob/living/unlucky_person in the_shuttles_way)
unlucky_person.gib()
var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
var/shuttleto = !supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE
var/area/from = locate(shuttleat)
var/area/dest = locate(shuttleto)
if(!from || !dest) return
from.move_contents_to(dest)
supply_shuttle_at_station = !supply_shuttle_at_station

View File

@@ -158,7 +158,12 @@
var/atemp = 0
var/turf_count = 0
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/simulated/floor/W = new /turf/simulated/floor( locate(src.x, src.y, src.z) )
W.lighting_lumcount += old_lumcount
if(old_lumcount != W.lighting_lumcount)
W.lighting_changed = 1
lighting_controller.changed_turfs += W
//////Assimilate Air//////
for(var/direction in cardinal)//Only use cardinals to cut down on lag
@@ -186,10 +191,6 @@
if(prior_icon) W.icon_state = prior_icon
else W.icon_state = "floor"
if (!explode)
W.opacity = 1
W.sd_SetOpacity(0)
//This is probably gonna make lighting go a bit wonky in bombed areas, but sd_SetOpacity was the primary reason bombs have been so laggy. --NEO
W.levelupdate()
return W
@@ -204,7 +205,13 @@
var/turf_count = 0
//////Assimilate Air//////
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/simulated/floor/plating/W = new /turf/simulated/floor/plating( locate(src.x, src.y, src.z) )
W.lighting_lumcount += old_lumcount
if(old_lumcount != W.lighting_lumcount)
W.lighting_changed = 1
lighting_controller.changed_turfs += W
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(istype(T,/turf/space))
@@ -229,15 +236,19 @@
W.dir = old_dir
if(prior_icon) W.icon_state = prior_icon
else W.icon_state = "plating"
W.opacity = 1
W.sd_SetOpacity(0)
W.levelupdate()
return W
/turf/proc/ReplaceWithEngineFloor()
var/old_dir = dir
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/simulated/floor/engine/E = new /turf/simulated/floor/engine( locate(src.x, src.y, src.z) )
E.lighting_lumcount += old_lumcount
if(old_lumcount != E.lighting_lumcount)
E.lighting_changed = 1
lighting_controller.changed_turfs += E
E.dir = old_dir
E.icon_state = "engine"
@@ -302,49 +313,75 @@
/turf/proc/ReplaceWithSpace()
var/old_dir = dir
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.lighting_lumcount += old_lumcount
if(old_lumcount != S.lighting_lumcount)
S.lighting_changed = 1
lighting_controller.changed_turfs += S
S.dir = old_dir
S.levelupdate()
return S
/turf/proc/ReplaceWithLattice()
var/old_dir = dir
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) )
S.lighting_lumcount += old_lumcount
if(old_lumcount != S.lighting_lumcount)
S.lighting_changed = 1
lighting_controller.changed_turfs += S
S.dir = old_dir
S.sd_LumReset()
new /obj/structure/lattice( locate(src.x, src.y, src.z) )
S.levelupdate()
return S
/turf/proc/ReplaceWithWall()
var/old_icon = icon_state
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/simulated/wall/S = new /turf/simulated/wall( locate(src.x, src.y, src.z) )
S.lighting_lumcount += old_lumcount
if(old_lumcount != S.lighting_lumcount)
S.lighting_changed = 1
lighting_controller.changed_turfs += S
S.icon_old = old_icon
S.opacity = 0
S.sd_NewOpacity(1)
S.sd_LumReset()
S.levelupdate()
return S
/turf/proc/ReplaceWithRWall()
var/old_icon = icon_state
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/simulated/wall/r_wall/S = new /turf/simulated/wall/r_wall( locate(src.x, src.y, src.z) )
S.lighting_lumcount += old_lumcount
if(old_lumcount != S.lighting_lumcount)
S.lighting_changed = 1
lighting_controller.changed_turfs += S
S.icon_old = old_icon
S.opacity = 0
S.sd_NewOpacity(1)
S.sd_LumReset()
S.levelupdate()
return S
/turf/proc/ReplaceWithMineralWall(var/ore)
var/old_icon = icon_state
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
var/turf/simulated/wall/mineral/S = new /turf/simulated/wall/mineral( locate(src.x, src.y, src.z) )
S.lighting_lumcount += old_lumcount
if(old_lumcount != S.lighting_lumcount)
S.lighting_changed = 1
lighting_controller.changed_turfs += S
S.icon_old = old_icon
S.opacity = 0
S.sd_NewOpacity(1)
S.mineral = ore
S.New()//Hackish as fuck, but what can you do? -Sieve
S.sd_LumReset()
S.New()//Hackish as fuck, but what can you do? -Sieve //build it into the goddamn new() call up there ^ ~Carn
//e.g. new(turf/loc, mineral)
S.levelupdate()
return S
@@ -1010,7 +1047,7 @@
spawn(100)
if(O) del(O)
F.sd_LumReset()
// F.sd_LumReset() //TODO: ~Carn
return
/turf/simulated/wall/meteorhit(obj/M as obj)
@@ -1223,19 +1260,19 @@ turf/simulated/floor/proc/update_icon()
switch(T.state)
if(0)
icon_state = "light_on"
sd_SetLuminosity(5)
SetLuminosity(5)
if(1)
var/num = pick("1","2","3","4")
icon_state = "light_on_flicker[num]"
sd_SetLuminosity(5)
SetLuminosity(5)
if(2)
icon_state = "light_on_broken"
sd_SetLuminosity(5)
SetLuminosity(5)
if(3)
icon_state = "light_off"
sd_SetLuminosity(0)
SetLuminosity(0)
else
sd_SetLuminosity(0)
SetLuminosity(0)
icon_state = "light_off"
if(is_grass_floor())
if(!broken && !burnt)
@@ -1401,7 +1438,7 @@ turf/simulated/floor/proc/update_icon()
if(!floor_tile) return
del(floor_tile)
icon_plating = "plating"
sd_SetLuminosity(0)
SetLuminosity(0)
floor_tile = null
intact = 0
broken = 0
@@ -1417,7 +1454,7 @@ turf/simulated/floor/proc/update_icon()
broken = 0
burnt = 0
intact = 1
sd_SetLuminosity(0)
SetLuminosity(0)
if(T)
if(istype(T,/obj/item/stack/tile/plasteel))
floor_tile = T

View File

@@ -222,7 +222,7 @@
//verbs += /proc/togglebuildmode --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/debug_master_controller
verbs += /client/proc/debug_controller
else return
//Game Admin
@@ -243,7 +243,7 @@
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
verbs += /client/proc/send_space_ninja
verbs += /client/proc/restartcontroller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/restart_controller //Can call via aproccall --I_hate_easy_things.jpg, Mport --Agouri
verbs += /client/proc/Blobize //I need to remember to move/remove this later
verbs += /client/proc/Blobcount //I need to remember to move/remove this later
verbs += /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the new clickproc is being tested)
@@ -388,7 +388,7 @@
verbs -= /client/proc/air_report
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_gib_self
verbs -= /client/proc/restartcontroller
verbs -= /client/proc/restart_controller
verbs -= /client/proc/play_local_sound
verbs -= /client/proc/enable_debug_verbs
verbs -= /client/proc/toggleprayers
@@ -429,7 +429,7 @@
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
verbs -= /client/proc/kill_airgroup
verbs -= /client/proc/debug_master_controller
verbs -= /client/proc/debug_controller
verbs -= /client/proc/check_ai_laws
verbs -= /client/proc/cmd_debug_mob_lists
return

View File

@@ -213,7 +213,7 @@
if(new_value == null) return
if(variable=="luminosity")
O.sd_SetLuminosity(new_value)
O.SetLuminosity(new_value)
else
O.vars[variable] = new_value
@@ -222,7 +222,7 @@
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if(variable=="luminosity")
M.sd_SetLuminosity(new_value)
M.SetLuminosity(new_value)
else
M.vars[variable] = O.vars[variable]
@@ -230,7 +230,7 @@
for(var/obj/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
A.SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
@@ -238,7 +238,7 @@
for(var/turf/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
A.SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
@@ -247,7 +247,7 @@
for(var/mob/M in mob_list)
if (M.type == O.type)
if(variable=="luminosity")
M.sd_SetLuminosity(new_value)
M.SetLuminosity(new_value)
else
M.vars[variable] = O.vars[variable]
@@ -255,7 +255,7 @@
for(var/obj/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
A.SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
@@ -263,7 +263,7 @@
for(var/turf/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
A.SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]

View File

@@ -458,7 +458,7 @@ var/list/forbidden_varedit_object_types = list(
if(variable=="luminosity")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return
O.sd_SetLuminosity(var_new)
O.SetLuminosity(var_new)
else if(variable=="stat")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return

View File

@@ -19,22 +19,20 @@
icon_state = "hardhat[on]_[color]"
item_state = "hardhat[on]_[color]"
if(on)
user.total_luminosity += brightness_on
else
user.total_luminosity -= brightness_on
if(on) user.SetLuminosity(user.luminosity + brightness_on)
else user.SetLuminosity(user.luminosity - brightness_on)
pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity + brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity - brightness_on)
// user.UpdateLuminosity()
SetLuminosity(brightness_on)
/obj/item/clothing/head/hardhat/orange

View File

@@ -133,22 +133,20 @@
icon_state = "hardhat[on]_[color]"
item_state = "hardhat[on]_[color]"
if(on)
user.total_luminosity += brightness_on
else
user.total_luminosity -= brightness_on
if(on) user.SetLuminosity(user.luminosity + brightness_on)
else user.SetLuminosity(user.luminosity - brightness_on)
pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity + brightness_on)
// user.UpdateLuminosity()
SetLuminosity(0)
dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity - brightness_on)
// user.UpdateLuminosity()
SetLuminosity(brightness_on)
/*
* Kitty ears

View File

@@ -19,22 +19,20 @@
icon_state = "rig[on]-[color]"
// item_state = "rig[on]-[color]"
if(on)
user.total_luminosity += brightness_on
else
user.total_luminosity -= brightness_on
if(on) user.SetLuminosity(user.luminosity + brightness_on)
else user.SetLuminosity(user.luminosity - brightness_on)
pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(0)
user.SetLuminosity(user.luminosity + brightness_on)
// user.UpdateLuminosity()
SetLuminosity(0)
dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
user.SetLuminosity(user.luminosity - brightness_on)
// user.UpdateLuminosity()
SetLuminosity(brightness_on)
/obj/item/clothing/suit/space/rig
name = "engineering hardsuit"

View File

@@ -185,17 +185,16 @@
shroom.pixel_x = 0
shroom.pixel_y = 0
W = new /turf/simulated/floor/plating/airless/asteroid( locate(src.x, src.y, src.z) )
W.dir = old_dir
W.fullUpdateMineralOverlays()
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
W = new /turf/simulated/floor/plating/airless/asteroid(src)
W.lighting_lumcount += old_lumcount
if(old_lumcount != W.lighting_lumcount)
W.lighting_changed = 1
lighting_controller.changed_turfs += W
/*
W.icon_old = old_icon
if(old_icon) W.icon_state = old_icon
*/
W.opacity = 1
W.sd_SetOpacity(0)
W.sd_LumReset()
W.dir = old_dir
W.fullUpdateMineralOverlays()
W.levelupdate()
return W

View File

@@ -87,9 +87,6 @@
//stuff in the stomach
handle_stomach()
//Flashlights and such
UpdateLuminosity()
//Status updates, death etc.
handle_regular_status_updates() //TODO: optimise ~Carn
update_canmove()
@@ -745,13 +742,16 @@
if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(istype(loc,/turf)) //else, there's considered to be no light
light_amount = min(10,loc:sd_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
if(istype(loc,/turf/simulated/shuttle))//Now not only will potatomen not starve on the shuttle, they will actually be fed
light_amount = 5
if(nutrition < 500) //so they can't store nutrition to survive without light forever
if(isturf(loc)) //else, there's considered to be no light
var/turf/T = loc
var/area/A = T.loc
if(A)
if(A.lighting_use_dynamic) light_amount = min(10,T.lighting_lumcount) - 5 //hardcapped so it's not abused by having a ton of flashlights
else light_amount = 5
nutrition += light_amount
if(light_amount > 0) //if there's enough light, heal
if(nutrition > 500)
nutrition = 500
if(light_amount > 2) //if there's enough light, heal
heal_overall_damage(1,1)
adjustToxLoss(-1)
adjustOxyLoss(-1)
@@ -1150,7 +1150,7 @@
//0.1% chance of playing a scary sound to someone who's in complete darkness
if(isturf(loc) && rand(1,1000) == 1)
var/turf/currentTurf = loc
if(!currentTurf.sd_lumcount)
if(!currentTurf.lighting_lumcount)
playsound_local(src,pick(scarySounds),50, 1, -1)
proc/handle_virus_updates()

View File

@@ -53,9 +53,6 @@
if(environment) // More error checking -- TLE
handle_environment(environment)
//Flashlights and such
UpdateLuminosity()
//Status updates, death etc.
handle_regular_status_updates()
update_canmove()

View File

@@ -429,12 +429,13 @@
/mob/living/silicon/ai/reset_view(atom/A)
if(current)
current.sd_SetLuminosity(0)
current.SetLuminosity(0)
if(istype(A,/obj/machinery/camera))
current = A
..()
if(istype(A,/obj/machinery/camera))
A.sd_SetLuminosity(camera_light_on * AI_CAMERA_LUMINOSITY)
if(camera_light_on) A.SetLuminosity(AI_CAMERA_LUMINOSITY)
else A.SetLuminosity(0)
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
@@ -641,7 +642,7 @@
src << "Camera lights [camera_light_on ? "activated" : "deactivated"]."
if(!camera_light_on)
if(src.current)
src.current.sd_SetLuminosity(0)
src.current.SetLuminosity(0)
else
src.lightNearbyCamera()
@@ -656,16 +657,16 @@
// I have to use range instead of view or the darkness gets in the way.
var/camera = near_range_camera(src.eyeobj)
if(camera && src.current != camera)
src.current.sd_SetLuminosity(0)
src.current.SetLuminosity(0)
src.current = camera
src.current.sd_SetLuminosity(lum)
src.current.SetLuminosity(lum)
else if(isnull(camera))
src.current.sd_SetLuminosity(0)
src.current.SetLuminosity(0)
src.current = null
camera_light_on = world.timeofday + 1 * 10 // Update the light every 2 seconds.
else
src.current = near_range_camera(src.eyeobj)
if(src.current) src.current.sd_SetLuminosity(lum)
if(src.current) src.current.SetLuminosity(lum)
#undef AI_CAMERA_LUMINOSITY

View File

@@ -90,7 +90,7 @@
for(var/turf/t in visRemoved)
if(t in obscuredTurfs)
if(!t.obscured)
t.obscured = image('effects/cameravis.dmi', t, "black", 15)
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
obscured += t.obscured
for(var/mob/aiEye/m in seenby)
@@ -129,7 +129,7 @@
for(var/turf/t in obscuredTurfs)
if(!t.obscured)
t.obscured = image('effects/cameravis.dmi', t, "black", 15)
t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
obscured += t.obscured
#undef UPDATE_BUFFER

View File

@@ -62,7 +62,7 @@
if(src.can_use())
cameranet.addCamera(src)
else
src.sd_SetLuminosity(0)
src.SetLuminosity(0)
cameranet.removeCamera(src)
/obj/machinery/camera/New()

View File

@@ -13,7 +13,6 @@
handle_regular_status_updates()
if(client)
UpdateLuminosity()
handle_regular_hud_updates()
update_items()
if (src.stat != DEAD) //still using power

View File

@@ -78,7 +78,7 @@
emote_hear = list("barks", "woofs", "yaps","pants")
emote_see = list("shakes its head", "shivers")
desc = "It's a corgi."
src.sd_SetLuminosity(0)
SetLuminosity(0)
inventory_head.loc = src.loc
inventory_head = null
else
@@ -214,7 +214,7 @@
name = "Rudolph the Red-Nosed Corgi"
emote_hear = list("barks christmas songs", "yaps")
desc = "He has a very shiny nose."
src.sd_SetLuminosity(6)
SetLuminosity(6)
if(/obj/item/clothing/head/soft)
name = "Corgi Tech [real_name]"
speak = list("Needs a stamp!", "Request DENIED!", "Fill these out in triplicate!")

View File

@@ -505,11 +505,6 @@ var/list/slot_equipment_priority = list( \
// ..()
return
/mob/proc/UpdateLuminosity()
if(src.total_luminosity == src.last_luminosity) return 0//nothing to do here
src.last_luminosity = src.total_luminosity
sd_SetLuminosity(min(src.total_luminosity,7))//Current hardcode max at 7, should likely be a const somewhere else
return 1
/mob/MouseDrop(mob/M as mob)
..()

View File

@@ -31,9 +31,6 @@
var/obj/screen/pressure = null
var/obj/screen/damageoverlay = null
var/total_luminosity = 0 //This controls luminosity for mobs, when you pick up lights and such this is edited. If you want the mob to use lights it must update its lum in its life proc or such. Note clamp this value around 7 or such to prevent massive light lag.
var/last_luminosity = 0
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
The current method unnecessarily clusters up the variable list, especially for humans (although rearranging won't really clean it up a lot but the difference will be noticable for other mobs).

View File

@@ -177,7 +177,7 @@
// update the APC icon to show the three base states
// also add overlays for indicator lights
/obj/machinery/power/apc/proc/updateicon()
src.overlays = null
overlays.Cut()
if(opened)
var/basestate = "apc[ cell ? "2" : "1" ]" // if opened, show cell if it's inserted
if (opened==1)
@@ -200,12 +200,9 @@
icon_state = "apc0"
// if closed, update overlays for channel status
if(!(stat & (BROKEN|MAINT)))
overlays += image('icons/obj/power.dmi', "apcox-[locked]") // 0=blue 1=red
overlays += image('icons/obj/power.dmi', "apco3-[charging]") // 0=red, 1=yellow/black 2=green
overlays.Add("apcox-[locked]","apco3-[charging]") // 0=blue 1=red // 0=red, 1=yellow/black 2=green
if(operating)
overlays += image('icons/obj/power.dmi', "apco0-[equipment]") // 0=red, 1=green, 2=blue
overlays += image('icons/obj/power.dmi', "apco1-[lighting]")
overlays += image('icons/obj/power.dmi', "apco2-[environ]")
overlays.Add("apco0-[equipment]","apco1-[lighting]","apco2-[environ]") // 0=red, 1=green, 2=blue
//attack with an item - open/close cover, insert cell, or (un)lock interface

View File

@@ -215,7 +215,7 @@
icon_state = "bulb1"
base_state = "bulb"
fitting = "bulb"
brightness = 3
brightness = 4
desc = "A small lighting fixture."
light_type = /obj/item/weapon/light/bulb
@@ -224,7 +224,7 @@
name = "spotlight"
fitting = "large tube"
light_type = /obj/item/weapon/light/tube/large
brightness = 15
brightness = 12
/obj/machinery/light/built/New()
status = LIGHT_EMPTY
@@ -280,34 +280,28 @@
/obj/machinery/light/proc/update(var/trigger = 1)
update_icon()
if(!on)
use_power = 1
else
use_power = 2
var/oldlum = luminosity
//luminosity = on * brightness
sd_SetLuminosity(on * brightness) // *DAL*
// if the state changed, inc the switching counter
if(oldlum != luminosity)
if(on)
if(luminosity != brightness)
switchcount++
// now check to see if the bulb is burned out
if(rigged)
if(status == LIGHT_OK && trigger)
if(on && rigged)
explode()
if( prob( min(60, switchcount*switchcount*0.01) ) )
else if( prob( min(60, switchcount*switchcount*0.01) ) )
if(status == LIGHT_OK && trigger)
status = LIGHT_BURNED
icon_state = "[base_state]-burned"
on = 0
sd_SetLuminosity(0)
active_power_usage = (luminosity * 20)
SetLuminosity(0)
else
use_power = 2
SetLuminosity(brightness)
else
use_power = 1
SetLuminosity(0)
active_power_usage = (luminosity * 10)
if(on != on_gs)
on_gs = on
// var/area/A = get_area(src)
// if(A)
// A.update_lights()
// attempt to set the light's on/off status

View File

@@ -1,596 +0,0 @@
/* Overview of sd_DynamicAreaLighting as modified for SS13
*
*
* Use sd_SetLuminosity(value) to change the luminosity of an atom
* rather than setting the luminosity var directly.
* Avoid having luminous objects at compile-time since this can mess up
* the lighting system during map load. Instead use sd_SetLuminosity() in
* the atom's New() proc after a small spawn delay.
*
* Use sd_SetOpacity(value) to change the opacity of an atom (e.g. doors)
* rather than setting the opacity var directly. This ensures that lighting
* will be blocked/unblocked as necessary.
*
* If creating a new opaque atom (e.g. a wall) at runtime, create the atom,
* set its opacity var to zero, then perform sd_SetOpacity(1)
* e.g.:
*
* var/obj/block/B = new(loc)
* B.opacity = 0
* B.sd_SetOpacity(1)
*
*
* The library creates multiple instances of each /area to split a mapped area
* into different lighting levels. Each area created has a "master" variable
* which is a reference to the original un-split area, and a "related" variable
* which is a reference to the list of split areas.
*/
/********************************************************************\
sd_DynamicAreaLighting.dm
Shadowdarke (shadowdarke@hotmail.com)
December 12, 2002
The sd_DynamicAreaLighting library provides dynamic lighting
with minimal cpu and bandwidth usage by shifting turfs between
five areas which represent varying shades of darkness.
**********************************************************************
Using sd_DynamicAreaLighting
This library uses BYOND's built in luminousity variable. In most
cases, all you have to do is set luminosity and let the library
worry about the work.
There are three cases that the library does not automatically
compensate for, so you will need to use library procs:
1) Luminosity changes at run time.
If your program makes changes in luminosity while it is
running, you need to use sd_SetLuminosity(new_luminosity)
so the library can remove the effect of the old luminosity
and apply the new effect.
2) Opacity changes at run time.
As with luminosity changes, you need to use
sd_SetOpacity(new_opacity) if your program changes the opacity
of atoms at runtime.
3) New atoms that change the opacity of a location.
This is somewhat more complex, and the library doesn't
have a simple proc to take care of it yet. You should use
sd_StripLocalLum() to strip the luminosity effect of
anything shining on that space, create the new atom, then
use sd_ApplyLocalLum() to reapply the luminosity effect.
Examine the sd_SetOpacity() proc for an example of the
procedure.
All areas will automatically use the sd_DynamicAreaLighting
library when it is included in your project. You may disable
lighting effect in an area by specifically setting the area's
sd_lighting var to 0. For example:
area/always_lit
luminosity = 1
sd_lighting = 0
This library chops areas into 5 separate areas of differing
light effect, so you may want to modify area Enter(), Exit(),
Entered(), and Exited() procs to make sure the atom has moved
from a different area instead of a different light zone of the
same area.
IMPORTANT NOTE: Since sd_DynamicAreaLighting uses the view()
proc, large luminosity settings may cause strange effect. You
should limit luminosity to (world.view * 2) or less.
----------------------------------------------------------------------
CUSTOM DARKNESS ICONS
sd_DynamicAreaLighting was designed in a barbaric age when BYOND
did not support alpha transperency. Thankfully that age is over.
I left the old icon as the default, since not everyone has
upgraded to BYOND 4.0 or in some cases like software graphics
mode, in which case the old dithered icon is the better choice.
The dithered icon used 4 standard dithers for the darkness shades
and I saw little reason to allow variation. Starting with sd_DAL
version 10, the library can support more or less shades of
darkness as well.
To change the icon and/or number of shades of darkness for your
game, just call the sd_SetDarkIcon(dark_icon, num_shades) proc,
where dark_icon is the new icon and num_shades is the number of
shades of darkness in the icon. This is best done in the
world.New() proc, to set it once for the entire game instance.
For example, to make the included 7 shade alpha transparency icon
your game's darkness icon, use the following code in your game.
world
New()
..()
sd_SetDarkIcon('sd_dark_alpha7.dmi', 7)
There are several demo icons included with this library:
sd_darkstates.dmi - the original 4 shade dithered icon
sd_dark_dither3.dmi - 3 shade dithered icon
sd_dark_alpha4.dmi - 4 shade alpha transparency icon
sd_dark_alpha4b.dmi - lighter version 4 shade alpha
transparency icon
sd_dark_alpha7.dmi - 7 shade alpha transparency icon
If you want to design your own custom darkness icons, they
have to follow a specific format for the library to use them
properly. The shades of darkness should have be numbered from 0
as the darkest shade to the number of shades minus one as the
lightest shade.
For example, the four shade 4 shade transparent icon
sd_dark_alpha4.dmi has 4 icon states:
"0" is black with 204 alpha (80% darkness)
"1" is black with 153 alpha (60% darkness)
"2" is black with 102 alpha (40% darkness)
"3" is black with 51 alpha (20% darkness)
The lightest shade ("3" in this case) is NOT completely clear.
There will be no darkness overlay for completely lit areas. The
lightest shade will only be used for places that are just beginning
to get dark.
The darkest shade ("0") likewise is not 100% obscured. "0" will
be used in completely dark areas, but by leaving it slightly
transparent, characters will be able to barely make out their
immediate surroundings in the darkness (based on the mob
see_in_dark var.) You might prefer to lighten the darkness for
this purpose, like in demo icon sd_dark_alpha4b.dmi.
----------------------------------------------------------------------
DAY/NIGHT CYCLES
sd_DynamicAreaLighting allows for separate indoor and outdoor
lighting. Areas used for outdoor light cycles should be
designated by setting the area's sd_outside var to 1. For example:
area/outside
sd_outside = 1
You will need to write your own routine for the day/night
cycle so that you can control the timing and degree of lighting
changes. There is an example routine in lightingdemo.dm.
After your routine determines the amount of light outdoors,
call sd_OutsideLight(light_level) to update the light levels in
all outside areas. light_level should be a value from 0 to
sd_dark_shades, where 0 is darkest and sd_dark_shades is full
light.
The sd_OutsideLight() proc does not automatically detect a
range out of bounds in case you want to use nonstandard values
for interesting effect. For instance, you could use a negative
value to dampen light sources.
If you want daylight to spill indoors:
You will need to add turfs to sd_light_spill_turfs. The
library will automatically add any turf created with
sd_light_spill set, or you may add the turfs yourself at
runtime.
The turfs in this list act as a source of daylight, shining
into the any areas that are not flagged with sd_outside.
**********************************************************************
LIBRARY PROCS:
Except in the cases noted above, you shouldn't need to use the procs
in this library. This reference is provided for advanced users.
Global vars and procs:
var
sd_dark_icon
This is the icon used for the darkness in your world.
DEFAULT VALUE: 'sd_darkstates.dmi' (A dithered icon
designed for BYOND releases before 4.0.)
sd_dark_shades
The number of darkness icon states in your sd_dark_icon.
DEFAULT VALUE: 4
sd_light_layer
The graphic layer that darkness overlays appear on.
This should be higher than anything on the map, but
lower than any HUD displays.
DEFAULT VALUE: 50
sd_light_outside
This var is how bright it currently is outside. It
should be a number between 0 and sd_dark_shades.
DEFAULT VALUE: 0
sd_top_luminosity
keeps track of the highest luminosity in the world to
prevent getting larger lists than necessary.
list/sd_outside
A list of outside areas.
list/sd_light_spill_turfs
A list of turfs where light spills from outside areas into
inside areas.
proc/sd_OutsideLight(n as num)
Changes the level of light outside (sd_light_outside) to n
and updates all the atoms in sd_outside.
proc/sd_SetDarkIcon(icon, shades)
Changes the darkness icon and the number shades of darkness
in that icon.
All atoms have the following procs:
sd_ApplyLum(list/V = view(luminosity,src), center = src)
This proc adds a value to the sd_lumcount of all the
turfs in V, depending on src.luminosity and the
distance between the turf and center.
sd_StripLum(list/V = view(luminosity,src), center = src)
The reverse of sd_ApplyLum(), sd_StripLum removes luminosity
effect.
sd_ApplyLocalLum(list/affected = viewers(20,src))
Applies the lighting effect of all atoms in affected. This
proc is used with sd_StripLocalLum() for effect that may
change the opacity of a turf.
sd_StripLocalLum()
Strips effect of all local luminous atoms.
RETURNS: list of all the luminous atoms stripped
IMPORTANT! Each sd_StripLocalLum() call should have a matching
sd_ApplyLocalLum() to restore the local effect.
sd_SetLuminosity(new_luminosity as num)
Sets the atom's luminosity, making adjustments to the
sd_lumcount of local turfs.
sd_SetOpacity(new_opacity as num)
Sets the atom's opacity, making adjustments to the
sd_lumcount of local turfs.
Areas have one additional proc and 4 variables:
var
sd_lighting
Turn this flag off to prevent sd_DynamicAreaLighting
from effecting this area.
DEFAULT VALUE: 1 (allow dynamic lighting)
sd_outside
Set this flag to automatically add this area to the
list of outside areas.
DEAFAULT VALUE: 0 (not an outside area)
sd_light_level
The current light level of the area. You should use
the sd_LightLevel() proc to set this value, so the
darkness overlays will be changed as well.
DEFAULT VALUE: 0
sd_darkimage
Tracks the darkness image of the area for easy
removal in the sd_LightLevel() proc
proc
sd_LightLevel(level = sd_light_level as num,keep = 1)
Updates the darkness overlay of the area.
If keep = 1, it also updates the area's
sd_light_level var.
Turfs have these additional procs and vars:
var
sd_lumcount
Used to track the brightness of a turf.
sd_light_spill
If set, the turf will automatically be added to the
global list sd_light_spill_turfs when created.
DEFAULT VALUE: 0
proc
sd_LumUpdate()
Places the turf in the appropriate sd_dark area,
depending on its brightness (sd_lumcount).
sd_LumReset()
Resets a turf's lumcount by stripping local luminosity,
zeroing the lumcount, then reapplying local luminosity.
sd_ApplySpill()
Applies to effect of daylight spilling into inside
areas in view of this turf.
sd_StripSpill()
Removes to effect of daylight spilling into inside
areas in view of this turf.
\********************************************************************/
var/const/sd_dark_icon = 'icons/effects/ss13_dark_alpha7.dmi' // icon used for darkness
var/const/sd_dark_shades = 7 // number of icon state in sd_dark_icon
var/const/sd_light_layer = 10 // graphics layer for light effect
var/sd_top_luminosity = 0
// since we're not using these, comment out all occurances to save CPU
/*
list
sd_outside_areas = list() // list of outside areas
sd_light_spill_turfs = list() // list of turfs to calculate light spill from
*/
// slog = file("DALlog.txt")
/*
proc
sd_OutsideLight(n as num)
// set the brightness of the outside sunlight
if(sd_light_outside == n) return // same level, no update
if(sd_light_outside)
for(var/turf/T in sd_light_spill_turfs)
T.sd_StripSpill()
sd_light_outside = n
// make all the outside areas update themselves
for(var/area/A in sd_outside_areas)
A.sd_LightLevel(sd_light_outside + A.sd_light_level,0)
if(n)
for(var/turf/T in sd_light_spill_turfs)
T.sd_ApplySpill()
*/
/*
proc/sd_SetDarkIcon(icon, shades)
// reset the darkness icon and number of shades of darkness
sd_dark_icon = icon
sd_dark_shades = shades
// change existing areas
for(var/area/A)
if(A.sd_darkimage) A.sd_LightLevel(A.sd_light_level,0)
*/
atom/New()
..()
// if this is not an area and is luminous
if(!isarea(src)&&(luminosity>0))
spawn(1) // delay to allow map load
sd_ApplyLum()
atom/Del()
// if this is not an area and is luminous
if(!isarea(src)&&(luminosity>0))
sd_StripLum()
..()
atom/proc/sd_ApplyLum(list/V = view(luminosity,src), center = src)
if(src.luminosity>sd_top_luminosity)
sd_top_luminosity = src.luminosity
// loop through all the turfs in V
for(var/turf/T in V)
/* increase the turf's brightness depending on the
brightness and distance of the lightsource */
T.sd_lumcount += (luminosity-get_dist(center,T))
T.sd_LumUpdate()
atom/proc/sd_StripLum(list/V = view(luminosity,src), center = src)
// loop through all the turfs in V
for(var/turf/T in V)
/* increase the turf's brightness depending on the
brightness and distance of the lightsource */
T.sd_lumcount -= (luminosity-get_dist(center,T))
// T.sd_lumcount = max(0, T.sd_lumcount)
// update the turf's area
T.sd_LumUpdate()
atom/proc/sd_ApplyLocalLum(list/affected = view(sd_top_luminosity,src))
// Reapplies the lighting effect of all atoms in affected.
for(var/atom/A in affected)
if(A.luminosity) A.sd_ApplyLum()
atom/proc/sd_StripLocalLum()
/* strips all local luminosity
RETURNS: list of all the luminous atoms stripped
IMPORTANT! Each sd_StripLocalLum() call should have a matching
sd_ApplyLocalLum() to restore the local effect. */
var/list/affected = list()
for(var/atom/A in view(sd_top_luminosity,src))
var/turfflag = (isturf(src)?1:0)
if(A.luminosity && (get_dist(src,A) <= A.luminosity + turfflag))
A.sd_StripLum()
affected += A
return affected
atom/proc/sd_SetLuminosity(new_luminosity as num)
/* This proc should be called everytime you want to change the
luminosity of an atom instead of setting it directly.
new_luminosity is the new value for luminosity. */
if(luminosity>0)
sd_StripLum()
luminosity = new_luminosity
if(luminosity>0)
sd_ApplyLum()
atom/proc/sd_SetOpacity(new_opacity as num)
if(opacity == (new_opacity ? 1 : 0)) return
var/list/affected = new
var/atom/A
var/turf/T
var/turf/ATurf
for(A in range(sd_top_luminosity,src))
T = A
while(T && !istype(T)) T = T.loc
if(T)
var/list/V = view(A.luminosity,T)
if(!(src in V)) continue
var/turfflag = 0
if(A == T) turfflag = 1
if(A.luminosity && get_dist(A,src)<=A.luminosity+turfflag)
affected[A] = V
opacity = new_opacity
if(opacity)
for(A in affected)
ATurf = A
while(ATurf && !istype(ATurf)) ATurf = ATurf.loc
if(ATurf)
for(T in affected[A]-view(A.luminosity, ATurf))
T.sd_lumcount -= (A.luminosity-get_dist(A,T))
// T.sd_lumcount = max(0, T.sd_lumcount)
T.sd_LumUpdate()
else
for(A in affected)
ATurf = A
while(ATurf && !istype(ATurf)) ATurf = ATurf.loc
if(ATurf)
for(T in view(A.luminosity, ATurf) - affected[A])
T.sd_lumcount += (A.luminosity-get_dist(A,T))
T.sd_LumUpdate()
///
atom/proc/sd_NewOpacity(var/new_opacity)
if(opacity != new_opacity)
var/list/affected = sd_StripLocalLum()
opacity = new_opacity
var/atom/T = src
while(T && !isturf(T))
T = T.loc
if(T)
T:sd_lumcount = 0
sd_ApplyLocalLum(affected)
///
turf
var/tmp/sd_lumcount = 0 // the brightness of the turf
turf/proc/sd_LumReset()
/* Clear local lum, reset this turf's sd_lumcount, and
re-apply local lum*/
var/list/affected = sd_StripLocalLum()
sd_lumcount = 0
sd_ApplyLocalLum(affected)
turf/proc/sd_LumUpdate()
set background = 1
var/area/Loc = loc
if(!istype(Loc) || !Loc.sd_lighting) return
// change the turf's area depending on its brightness
// restrict light to valid levels
var/light = min(max(sd_lumcount,0),sd_dark_shades)
var/ltag = copytext(Loc.tag,1,findtext(Loc.tag,"sd_L")) + "sd_L[light]"
if(Loc.tag!=ltag) //skip if already in this area
var/area/A = locate(ltag) // find an appropriate area
if(!A)
A = new Loc.type() // create area if it wasn't found
// replicate vars
for(var/V in Loc.vars-"contents")
if(issaved(Loc.vars[V])) A.vars[V] = Loc.vars[V]
A.tag = ltag
A.sd_LightLevel(light)
A.contents += src // move the turf into the area
atom/movable/Move() // when something moves
var/turf/oldloc = loc // remember for range calculations
// list turfs in view and luminosity range of old loc
var/list/oldview
if(luminosity>0) // if atom is luminous
if(isturf(loc))
oldview = view(luminosity,loc)
else
oldview = list()
. = ..()
if(.&&(luminosity>0)) // if the atom actually moved
if(istype(oldloc))
sd_StripLum(oldview,oldloc)
oldloc.sd_lumcount++ // correct "off by 1" error in oldloc
sd_ApplyLum()
area
var/sd_lighting = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
var/sd_light_level = 0 //This is the current light level of the area
var/sd_darkimage //This tracks the darkness image of the area for easy removal
area/proc/sd_LightLevel(slevel = sd_light_level as num, keep = 1)
if(!src) return
overlays -= sd_darkimage
if(keep) sd_light_level = slevel
// slevel = min(max(slevel,0),sd_dark_shades) // restrict range
if(slevel > 0)
luminosity = 1
else
luminosity = 0
sd_darkimage = image(sd_dark_icon,,num2text(slevel),sd_light_layer)
overlays += sd_darkimage
area/proc/sd_New(sd_created)
if(!tag) tag = "[type]"
spawn(1) // wait a tick
if(sd_lighting)
// see if this area was created by the library
if(!sd_created)
/* show the dark overlay so areas outside of luminous regions
won't be bright as day when they should be dark. */
sd_LightLevel()
area/Del()
..()
related -= src
/* extend the mob procs to compensate for sight settings. */
mob/sd_ApplyLum(list/V, center = src)
if(!V)
if(isturf(loc))
V = view(luminosity,loc)
else
V = view(luminosity,get_turf(src))
. = ..(V, center)
mob/sd_StripLum(list/V, center = src)
if(!V)
if(isturf(loc))
V = view(luminosity,loc)
else
V = view(luminosity,get_turf(src))
. = ..(V, center)
mob/sd_ApplyLocalLum(list/affected)
if(!affected)
if(isturf(loc))
affected = view(sd_top_luminosity,loc)
else
affected = view(sd_top_luminosity,src)
. = ..(affected)

View File

@@ -9,15 +9,11 @@
density = 0
unacidable = 1
use_power = 0
luminosity = 4
var/obj/machinery/field_generator/FG1 = null
var/obj/machinery/field_generator/FG2 = null
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/containment_field/New()
spawn(1)
src.sd_SetLuminosity(5)
/obj/machinery/containment_field/Del()
if(FG1 && !FG1.clean_up)
FG1.cleanup()

View File

@@ -13,6 +13,7 @@ var/global/list/uneatable = list(
anchored = 1
density = 1
layer = 6
luminosity = 6
unacidable = 1 //Don't comment this out.
use_power = 0
var/current_size = 1
@@ -279,7 +280,7 @@ var/global/list/uneatable = list(
continue
if(O.invisibility == 101)
src.consume(O)
A:ReplaceWithSpace()
T.ReplaceWithSpace()
gain = 2
src.energy += gain
return

View File

@@ -61,6 +61,6 @@
log_game("[key_name_admin(user)] used a grenade ([src.name]).")
F.active = 1
F.icon_state = initial(icon_state) + "_active"
playsound(user.loc, 'armbomb.ogg', 75, 1, -3)
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(15)
F.prime()

View File

@@ -61,7 +61,7 @@
return
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user as mob)
playsound(src.loc, 'pop.ogg', 50, 0) //Change the mode
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) //Change the mode
if(mode == 1)
mode = 2
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.

View File

@@ -33,7 +33,7 @@
spawn(5)
reagents.trans_to(M, 10)
playsound(M.loc,'drink.ogg', rand(10,50), 1)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
else if( istype(M, /mob/living/carbon/human) )
@@ -54,7 +54,7 @@
spawn(5)
reagents.trans_to(M, 10)
playsound(M.loc,'drink.ogg', rand(10,50), 1)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
return 0

View File

@@ -33,7 +33,7 @@
spawn(5)
reagents.trans_to(M, gulp_size)
playsound(M.loc,'drink.ogg', rand(10,50), 1)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
else if( istype(M, /mob/living/carbon/human) )
@@ -61,7 +61,7 @@
spawn(600)
R.add_reagent(refill, fillevel)
playsound(M.loc,'drink.ogg', rand(10,50), 1)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
return 1
return 0

View File

@@ -75,7 +75,7 @@
return
if(reagents) //Handle ingestion of the reagent.
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
if(reagents.total_volume)
reagents.reaction(M, INGEST)
spawn(5)

View File

@@ -216,16 +216,16 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/Del()
if(istype(loc,/mob))
loc.sd_SetLuminosity(loc.luminosity - potency/5)
loc.SetLuminosity(round(loc.luminosity - potency/5,1))
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/pickup(mob/user)
src.sd_SetLuminosity(0)
user.total_luminosity += potency/5
src.SetLuminosity(0)
user.SetLuminosity(round(user.luminosity + (potency/5),1))
/obj/item/weapon/reagent_containers/food/snacks/grown/glowberries/dropped(mob/user)
user.total_luminosity -= potency/5
src.sd_SetLuminosity(potency/5)
user.SetLuminosity(round(user.luminosity - (potency/5),1))
src.SetLuminosity(round(potency/5,1))
/obj/item/weapon/reagent_containers/food/snacks/grown/cocoapod
seed = "/obj/item/seeds/cocoapodseed"
@@ -771,7 +771,7 @@
if(istype(src.loc,/mob))
pickup(src.loc)
else
src.sd_SetLuminosity(potency/10)
src.SetLuminosity(round(potency/10,1))
lifespan = 120 //ten times that is the delay
endurance = 30
maturation = 15
@@ -795,16 +795,16 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/Del()
if(istype(loc,/mob))
loc.sd_SetLuminosity(loc.luminosity - potency/10)
loc.SetLuminosity(round(loc.luminosity - potency/10,1))
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/pickup(mob/user)
src.sd_SetLuminosity(0)
user.total_luminosity += potency/10
SetLuminosity(0)
user.SetLuminosity(round(user.luminosity + (potency/10),1))
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/dropped(mob/user)
user.total_luminosity -= potency/10
src.sd_SetLuminosity(potency/10)
user.SetLuminosity(round(user.luminosity + (potency/10),1))
SetLuminosity(round(potency/10,1))
// *************************************
// Complex Grown Object Defines -

View File

@@ -58,7 +58,7 @@
sleep(3)
del(D)
playsound(src.loc, 'spray2.ogg', 50, 1, -6)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from a spray bottle.")
@@ -181,7 +181,7 @@
sleep(2)
del(D)
playsound(src.loc, 'spray2.ogg', 50, 1, -6)
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from a chem sprayer.")

View File

@@ -56,7 +56,7 @@
del(S)
D.icon_state = "syringeproj"
D.name = "syringe"
playsound(user.loc, 'syringeproj.ogg', 50, 1)
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if(!D) break

View File

@@ -49,8 +49,16 @@ should be listed in the changelog upon commit tho. Thanks. -->
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
<div class="commit sansserif">
<h2 class="date">August 25, 2012</h2>
<h3 class="author">Carnwennan updated:</h3>
<ul class="changes bgimages16">
<li class="experiment">New lighting. It should look and feel the same as the old lighting whilst being less taxing on the server. Space has a minimum brightness (IC starlight) and areas that do not use dynamic lighting default to a lighting level of 4, so they aren't dark, but they aren't superbright. Replacing turfs should preserve dynamic lighting. Singulo/bombs should cause a lot less lighting-related lag. There are some minor known issues, see the commit log for details.</li>
<li class="tweak">Admins can now access most controller datums with the "Debug Controller" verb. Time to break all the things!</li>
<li class="tweak">Supply shuttle now uses a controller datum. This means admins can see/edit supply orders etc.</li>
<li class="tweak">Changeling fakedeath can be initiated after death again. Next time you want something reverted, just ask rather than being obnoxious.</li>
</ul>
<h3 class="author">Giacom updated:</h3>
<ul class="changes bgimages16">
<li class="experiment">AIs can now look around like a ghost with the exception that they cannot see what cameras cannot see. Meaning if you're in maintenance, and there's no cameras near you, the AI will not know what you are doing. This also means there's no X-Ray vision cameras anymore.</li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -6494,7 +6494,7 @@
"cuT" = (/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/simulated/shuttle/plating,/area/shuttle/administration/centcom)
"cuU" = (/turf/unsimulated/floor{tag = "icon-warnplate (EAST)"; icon_state = "warnplate"; dir = 4},/area/centcom)
"cuV" = (/turf/simulated/shuttle/wall{tag = "icon-swall3"; icon_state = "swall3"; dir = 2},/area/supply/dock)
"cuW" = (/obj/effect/marker/supplymarker,/turf/simulated/shuttle/floor,/area/supply/dock)
"cuW" = (/turf/simulated/shuttle/floor,/area/supply/dock)
"cuX" = (/obj/machinery/door/window{base_state = "right"; dir = 4; icon_state = "right"; name = "Infirmary"},/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start)
"cuY" = (/obj/machinery/door/window{dir = 8; icon = 'icons/obj/doors/windoor.dmi'; name = "Tool Storage"},/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start)
"cuZ" = (/obj/structure/table,/turf/unsimulated/floor{icon = 'icons/turf/shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start)
@@ -6536,7 +6536,7 @@
"cvJ" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/shaker,/turf/unsimulated/floor{icon_state = "cafeteria"; dir = 2},/area/centcom/living)
"cvK" = (/obj/structure/table,/turf/unsimulated/floor{icon_state = "cafeteria"; dir = 2},/area/centcom/living)
"cvL" = (/obj/machinery/door/airlock/centcom{name = "Living Quarters"; opacity = 1; req_access_txt = "105"},/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/living)
"cvM" = (/obj/effect/marker/supplymarker,/obj/machinery/door_control{dir = 2; id = "QMLoaddoor2"; name = "Loading Doors"; pixel_x = 24; pixel_y = 8},/obj/machinery/door_control{id = "QMLoaddoor"; name = "Loading Doors"; pixel_x = 24; pixel_y = -8},/turf/simulated/shuttle/floor,/area/supply/dock)
"cvM" = (/obj/machinery/door_control{dir = 2; id = "QMLoaddoor2"; name = "Loading Doors"; pixel_x = 24; pixel_y = 8},/obj/machinery/door_control{id = "QMLoaddoor"; name = "Loading Doors"; pixel_x = 24; pixel_y = -8},/turf/simulated/shuttle/floor,/area/supply/dock)
"cvN" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_l"; icon_state = "propulsion_l"},/turf/space,/area/syndicate_station/start)
"cvO" = (/obj/structure/shuttle/engine/propulsion,/turf/space,/area/syndicate_station/start)
"cvP" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_r"; icon_state = "propulsion_r"},/turf/space,/area/syndicate_station/start)

View File

@@ -3,517 +3,9 @@
// New source code should be placed in .dm files: choose File/New --> Code File.
// BEGIN_INTERNALS
// END_INTERNALS
// BEGIN_FILE_DIR
#define FILE_DIR .
#define FILE_DIR ".svn"
#define FILE_DIR ".svn/pristine"
#define FILE_DIR ".svn/pristine/00"
#define FILE_DIR ".svn/pristine/01"
#define FILE_DIR ".svn/pristine/02"
#define FILE_DIR ".svn/pristine/03"
#define FILE_DIR ".svn/pristine/04"
#define FILE_DIR ".svn/pristine/05"
#define FILE_DIR ".svn/pristine/06"
#define FILE_DIR ".svn/pristine/07"
#define FILE_DIR ".svn/pristine/08"
#define FILE_DIR ".svn/pristine/09"
#define FILE_DIR ".svn/pristine/0a"
#define FILE_DIR ".svn/pristine/0b"
#define FILE_DIR ".svn/pristine/0c"
#define FILE_DIR ".svn/pristine/0d"
#define FILE_DIR ".svn/pristine/0e"
#define FILE_DIR ".svn/pristine/0f"
#define FILE_DIR ".svn/pristine/10"
#define FILE_DIR ".svn/pristine/11"
#define FILE_DIR ".svn/pristine/12"
#define FILE_DIR ".svn/pristine/13"
#define FILE_DIR ".svn/pristine/14"
#define FILE_DIR ".svn/pristine/15"
#define FILE_DIR ".svn/pristine/16"
#define FILE_DIR ".svn/pristine/17"
#define FILE_DIR ".svn/pristine/18"
#define FILE_DIR ".svn/pristine/19"
#define FILE_DIR ".svn/pristine/1a"
#define FILE_DIR ".svn/pristine/1b"
#define FILE_DIR ".svn/pristine/1c"
#define FILE_DIR ".svn/pristine/1d"
#define FILE_DIR ".svn/pristine/1e"
#define FILE_DIR ".svn/pristine/1f"
#define FILE_DIR ".svn/pristine/20"
#define FILE_DIR ".svn/pristine/21"
#define FILE_DIR ".svn/pristine/22"
#define FILE_DIR ".svn/pristine/23"
#define FILE_DIR ".svn/pristine/24"
#define FILE_DIR ".svn/pristine/25"
#define FILE_DIR ".svn/pristine/26"
#define FILE_DIR ".svn/pristine/27"
#define FILE_DIR ".svn/pristine/28"
#define FILE_DIR ".svn/pristine/29"
#define FILE_DIR ".svn/pristine/2a"
#define FILE_DIR ".svn/pristine/2b"
#define FILE_DIR ".svn/pristine/2c"
#define FILE_DIR ".svn/pristine/2d"
#define FILE_DIR ".svn/pristine/2e"
#define FILE_DIR ".svn/pristine/2f"
#define FILE_DIR ".svn/pristine/30"
#define FILE_DIR ".svn/pristine/31"
#define FILE_DIR ".svn/pristine/32"
#define FILE_DIR ".svn/pristine/33"
#define FILE_DIR ".svn/pristine/34"
#define FILE_DIR ".svn/pristine/35"
#define FILE_DIR ".svn/pristine/36"
#define FILE_DIR ".svn/pristine/37"
#define FILE_DIR ".svn/pristine/38"
#define FILE_DIR ".svn/pristine/39"
#define FILE_DIR ".svn/pristine/3a"
#define FILE_DIR ".svn/pristine/3b"
#define FILE_DIR ".svn/pristine/3c"
#define FILE_DIR ".svn/pristine/3d"
#define FILE_DIR ".svn/pristine/3e"
#define FILE_DIR ".svn/pristine/3f"
#define FILE_DIR ".svn/pristine/40"
#define FILE_DIR ".svn/pristine/41"
#define FILE_DIR ".svn/pristine/42"
#define FILE_DIR ".svn/pristine/43"
#define FILE_DIR ".svn/pristine/44"
#define FILE_DIR ".svn/pristine/45"
#define FILE_DIR ".svn/pristine/46"
#define FILE_DIR ".svn/pristine/47"
#define FILE_DIR ".svn/pristine/48"
#define FILE_DIR ".svn/pristine/49"
#define FILE_DIR ".svn/pristine/4a"
#define FILE_DIR ".svn/pristine/4b"
#define FILE_DIR ".svn/pristine/4c"
#define FILE_DIR ".svn/pristine/4d"
#define FILE_DIR ".svn/pristine/4e"
#define FILE_DIR ".svn/pristine/4f"
#define FILE_DIR ".svn/pristine/50"
#define FILE_DIR ".svn/pristine/51"
#define FILE_DIR ".svn/pristine/52"
#define FILE_DIR ".svn/pristine/53"
#define FILE_DIR ".svn/pristine/54"
#define FILE_DIR ".svn/pristine/55"
#define FILE_DIR ".svn/pristine/56"
#define FILE_DIR ".svn/pristine/57"
#define FILE_DIR ".svn/pristine/58"
#define FILE_DIR ".svn/pristine/59"
#define FILE_DIR ".svn/pristine/5a"
#define FILE_DIR ".svn/pristine/5b"
#define FILE_DIR ".svn/pristine/5c"
#define FILE_DIR ".svn/pristine/5d"
#define FILE_DIR ".svn/pristine/5e"
#define FILE_DIR ".svn/pristine/5f"
#define FILE_DIR ".svn/pristine/60"
#define FILE_DIR ".svn/pristine/61"
#define FILE_DIR ".svn/pristine/62"
#define FILE_DIR ".svn/pristine/63"
#define FILE_DIR ".svn/pristine/64"
#define FILE_DIR ".svn/pristine/65"
#define FILE_DIR ".svn/pristine/66"
#define FILE_DIR ".svn/pristine/67"
#define FILE_DIR ".svn/pristine/68"
#define FILE_DIR ".svn/pristine/69"
#define FILE_DIR ".svn/pristine/6a"
#define FILE_DIR ".svn/pristine/6b"
#define FILE_DIR ".svn/pristine/6c"
#define FILE_DIR ".svn/pristine/6d"
#define FILE_DIR ".svn/pristine/6e"
#define FILE_DIR ".svn/pristine/6f"
#define FILE_DIR ".svn/pristine/70"
#define FILE_DIR ".svn/pristine/71"
#define FILE_DIR ".svn/pristine/72"
#define FILE_DIR ".svn/pristine/73"
#define FILE_DIR ".svn/pristine/74"
#define FILE_DIR ".svn/pristine/75"
#define FILE_DIR ".svn/pristine/76"
#define FILE_DIR ".svn/pristine/77"
#define FILE_DIR ".svn/pristine/78"
#define FILE_DIR ".svn/pristine/79"
#define FILE_DIR ".svn/pristine/7a"
#define FILE_DIR ".svn/pristine/7b"
#define FILE_DIR ".svn/pristine/7c"
#define FILE_DIR ".svn/pristine/7d"
#define FILE_DIR ".svn/pristine/7e"
#define FILE_DIR ".svn/pristine/7f"
#define FILE_DIR ".svn/pristine/80"
#define FILE_DIR ".svn/pristine/81"
#define FILE_DIR ".svn/pristine/82"
#define FILE_DIR ".svn/pristine/83"
#define FILE_DIR ".svn/pristine/84"
#define FILE_DIR ".svn/pristine/85"
#define FILE_DIR ".svn/pristine/86"
#define FILE_DIR ".svn/pristine/87"
#define FILE_DIR ".svn/pristine/88"
#define FILE_DIR ".svn/pristine/89"
#define FILE_DIR ".svn/pristine/8a"
#define FILE_DIR ".svn/pristine/8b"
#define FILE_DIR ".svn/pristine/8c"
#define FILE_DIR ".svn/pristine/8d"
#define FILE_DIR ".svn/pristine/8e"
#define FILE_DIR ".svn/pristine/8f"
#define FILE_DIR ".svn/pristine/90"
#define FILE_DIR ".svn/pristine/91"
#define FILE_DIR ".svn/pristine/92"
#define FILE_DIR ".svn/pristine/93"
#define FILE_DIR ".svn/pristine/94"
#define FILE_DIR ".svn/pristine/95"
#define FILE_DIR ".svn/pristine/96"
#define FILE_DIR ".svn/pristine/97"
#define FILE_DIR ".svn/pristine/98"
#define FILE_DIR ".svn/pristine/99"
#define FILE_DIR ".svn/pristine/9a"
#define FILE_DIR ".svn/pristine/9b"
#define FILE_DIR ".svn/pristine/9c"
#define FILE_DIR ".svn/pristine/9d"
#define FILE_DIR ".svn/pristine/9e"
#define FILE_DIR ".svn/pristine/9f"
#define FILE_DIR ".svn/pristine/a0"
#define FILE_DIR ".svn/pristine/a1"
#define FILE_DIR ".svn/pristine/a2"
#define FILE_DIR ".svn/pristine/a3"
#define FILE_DIR ".svn/pristine/a4"
#define FILE_DIR ".svn/pristine/a5"
#define FILE_DIR ".svn/pristine/a6"
#define FILE_DIR ".svn/pristine/a7"
#define FILE_DIR ".svn/pristine/a8"
#define FILE_DIR ".svn/pristine/a9"
#define FILE_DIR ".svn/pristine/aa"
#define FILE_DIR ".svn/pristine/ab"
#define FILE_DIR ".svn/pristine/ac"
#define FILE_DIR ".svn/pristine/ad"
#define FILE_DIR ".svn/pristine/ae"
#define FILE_DIR ".svn/pristine/af"
#define FILE_DIR ".svn/pristine/b0"
#define FILE_DIR ".svn/pristine/b1"
#define FILE_DIR ".svn/pristine/b2"
#define FILE_DIR ".svn/pristine/b3"
#define FILE_DIR ".svn/pristine/b4"
#define FILE_DIR ".svn/pristine/b5"
#define FILE_DIR ".svn/pristine/b6"
#define FILE_DIR ".svn/pristine/b7"
#define FILE_DIR ".svn/pristine/b8"
#define FILE_DIR ".svn/pristine/b9"
#define FILE_DIR ".svn/pristine/ba"
#define FILE_DIR ".svn/pristine/bb"
#define FILE_DIR ".svn/pristine/bc"
#define FILE_DIR ".svn/pristine/bd"
#define FILE_DIR ".svn/pristine/be"
#define FILE_DIR ".svn/pristine/bf"
#define FILE_DIR ".svn/pristine/c0"
#define FILE_DIR ".svn/pristine/c1"
#define FILE_DIR ".svn/pristine/c2"
#define FILE_DIR ".svn/pristine/c3"
#define FILE_DIR ".svn/pristine/c4"
#define FILE_DIR ".svn/pristine/c5"
#define FILE_DIR ".svn/pristine/c6"
#define FILE_DIR ".svn/pristine/c7"
#define FILE_DIR ".svn/pristine/c8"
#define FILE_DIR ".svn/pristine/c9"
#define FILE_DIR ".svn/pristine/ca"
#define FILE_DIR ".svn/pristine/cb"
#define FILE_DIR ".svn/pristine/cc"
#define FILE_DIR ".svn/pristine/cd"
#define FILE_DIR ".svn/pristine/ce"
#define FILE_DIR ".svn/pristine/cf"
#define FILE_DIR ".svn/pristine/d0"
#define FILE_DIR ".svn/pristine/d1"
#define FILE_DIR ".svn/pristine/d2"
#define FILE_DIR ".svn/pristine/d3"
#define FILE_DIR ".svn/pristine/d4"
#define FILE_DIR ".svn/pristine/d5"
#define FILE_DIR ".svn/pristine/d6"
#define FILE_DIR ".svn/pristine/d7"
#define FILE_DIR ".svn/pristine/d8"
#define FILE_DIR ".svn/pristine/d9"
#define FILE_DIR ".svn/pristine/da"
#define FILE_DIR ".svn/pristine/db"
#define FILE_DIR ".svn/pristine/dc"
#define FILE_DIR ".svn/pristine/dd"
#define FILE_DIR ".svn/pristine/de"
#define FILE_DIR ".svn/pristine/df"
#define FILE_DIR ".svn/pristine/e0"
#define FILE_DIR ".svn/pristine/e1"
#define FILE_DIR ".svn/pristine/e2"
#define FILE_DIR ".svn/pristine/e3"
#define FILE_DIR ".svn/pristine/e4"
#define FILE_DIR ".svn/pristine/e5"
#define FILE_DIR ".svn/pristine/e6"
#define FILE_DIR ".svn/pristine/e7"
#define FILE_DIR ".svn/pristine/e8"
#define FILE_DIR ".svn/pristine/e9"
#define FILE_DIR ".svn/pristine/ea"
#define FILE_DIR ".svn/pristine/eb"
#define FILE_DIR ".svn/pristine/ec"
#define FILE_DIR ".svn/pristine/ed"
#define FILE_DIR ".svn/pristine/ee"
#define FILE_DIR ".svn/pristine/ef"
#define FILE_DIR ".svn/pristine/f0"
#define FILE_DIR ".svn/pristine/f1"
#define FILE_DIR ".svn/pristine/f2"
#define FILE_DIR ".svn/pristine/f3"
#define FILE_DIR ".svn/pristine/f4"
#define FILE_DIR ".svn/pristine/f5"
#define FILE_DIR ".svn/pristine/f6"
#define FILE_DIR ".svn/pristine/f7"
#define FILE_DIR ".svn/pristine/f8"
#define FILE_DIR ".svn/pristine/f9"
#define FILE_DIR ".svn/pristine/fa"
#define FILE_DIR ".svn/pristine/fb"
#define FILE_DIR ".svn/pristine/fc"
#define FILE_DIR ".svn/pristine/fd"
#define FILE_DIR ".svn/pristine/fe"
#define FILE_DIR ".svn/pristine/ff"
#define FILE_DIR "bot"
#define FILE_DIR "bot/Marakov"
#define FILE_DIR "code"
#define FILE_DIR "code/ATMOSPHERICS"
#define FILE_DIR "code/ATMOSPHERICS/components"
#define FILE_DIR "code/ATMOSPHERICS/components/binary_devices"
#define FILE_DIR "code/ATMOSPHERICS/components/trinary_devices"
#define FILE_DIR "code/ATMOSPHERICS/components/unary"
#define FILE_DIR "code/datums"
#define FILE_DIR "code/datums/diseases"
#define FILE_DIR "code/datums/helper_datums"
#define FILE_DIR "code/datums/spells"
#define FILE_DIR "code/defines"
#define FILE_DIR "code/defines/area"
#define FILE_DIR "code/defines/obj"
#define FILE_DIR "code/defines/procs"
#define FILE_DIR "code/defines/tanning"
#define FILE_DIR "code/FEA"
#define FILE_DIR "code/game"
#define FILE_DIR "code/game/area"
#define FILE_DIR "code/game/asteroid"
#define FILE_DIR "code/game/gamemodes"
#define FILE_DIR "code/game/gamemodes/alien"
#define FILE_DIR "code/game/gamemodes/blob"
#define FILE_DIR "code/game/gamemodes/blob/blobs"
#define FILE_DIR "code/game/gamemodes/changeling"
#define FILE_DIR "code/game/gamemodes/cult"
#define FILE_DIR "code/game/gamemodes/events"
#define FILE_DIR "code/game/gamemodes/events/holidays"
#define FILE_DIR "code/game/gamemodes/extended"
#define FILE_DIR "code/game/gamemodes/malfunction"
#define FILE_DIR "code/game/gamemodes/meteor"
#define FILE_DIR "code/game/gamemodes/nuclear"
#define FILE_DIR "code/game/gamemodes/revolution"
#define FILE_DIR "code/game/gamemodes/sandbox"
#define FILE_DIR "code/game/gamemodes/traitor"
#define FILE_DIR "code/game/gamemodes/wizard"
#define FILE_DIR "code/game/jobs"
#define FILE_DIR "code/game/jobs/job"
#define FILE_DIR "code/game/machinery"
#define FILE_DIR "code/game/machinery/atmoalter"
#define FILE_DIR "code/game/machinery/bots"
#define FILE_DIR "code/game/machinery/computer"
#define FILE_DIR "code/game/machinery/doors"
#define FILE_DIR "code/game/machinery/embedded_controller"
#define FILE_DIR "code/game/machinery/kitchen"
#define FILE_DIR "code/game/machinery/pipe"
#define FILE_DIR "code/game/machinery/telecomms"
#define FILE_DIR "code/game/mecha"
#define FILE_DIR "code/game/mecha/combat"
#define FILE_DIR "code/game/mecha/equipment"
#define FILE_DIR "code/game/mecha/equipment/tools"
#define FILE_DIR "code/game/mecha/equipment/weapons"
#define FILE_DIR "code/game/mecha/medical"
#define FILE_DIR "code/game/mecha/working"
#define FILE_DIR "code/game/objects"
#define FILE_DIR "code/game/objects/devices"
#define FILE_DIR "code/game/objects/devices/PDA"
#define FILE_DIR "code/game/objects/effects"
#define FILE_DIR "code/game/objects/effects/decals"
#define FILE_DIR "code/game/objects/effects/spawners"
#define FILE_DIR "code/game/objects/grenades"
#define FILE_DIR "code/game/objects/items"
#define FILE_DIR "code/game/objects/items/weapons"
#define FILE_DIR "code/game/objects/items/weapons/implants"
#define FILE_DIR "code/game/objects/radio"
#define FILE_DIR "code/game/objects/secstorage"
#define FILE_DIR "code/game/objects/stacks"
#define FILE_DIR "code/game/objects/storage"
#define FILE_DIR "code/game/objects/structures"
#define FILE_DIR "code/game/objects/structures/crates_lockers"
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
#define FILE_DIR "code/game/objects/tanks"
#define FILE_DIR "code/game/turfs"
#define FILE_DIR "code/game/vehicles"
#define FILE_DIR "code/game/vehicles/airtight"
#define FILE_DIR "code/game/verbs"
#define FILE_DIR "code/js"
#define FILE_DIR "code/modules"
#define FILE_DIR "code/modules/admin"
#define FILE_DIR "code/modules/admin/DB ban"
#define FILE_DIR "code/modules/admin/verbs"
#define FILE_DIR "code/modules/assembly"
#define FILE_DIR "code/modules/client"
#define FILE_DIR "code/modules/clothing"
#define FILE_DIR "code/modules/clothing/glasses"
#define FILE_DIR "code/modules/clothing/gloves"
#define FILE_DIR "code/modules/clothing/head"
#define FILE_DIR "code/modules/clothing/masks"
#define FILE_DIR "code/modules/clothing/shoes"
#define FILE_DIR "code/modules/clothing/spacesuits"
#define FILE_DIR "code/modules/clothing/suits"
#define FILE_DIR "code/modules/clothing/under"
#define FILE_DIR "code/modules/clothing/under/jobs"
#define FILE_DIR "code/modules/critters"
#define FILE_DIR "code/modules/critters/hivebots"
#define FILE_DIR "code/modules/detectivework"
#define FILE_DIR "code/modules/flufftext"
#define FILE_DIR "code/modules/food"
#define FILE_DIR "code/modules/library"
#define FILE_DIR "code/modules/maps"
#define FILE_DIR "code/modules/mining"
#define FILE_DIR "code/modules/mob"
#define FILE_DIR "code/modules/mob/dead"
#define FILE_DIR "code/modules/mob/dead/observer"
#define FILE_DIR "code/modules/mob/living"
#define FILE_DIR "code/modules/mob/living/blob"
#define FILE_DIR "code/modules/mob/living/carbon"
#define FILE_DIR "code/modules/mob/living/carbon/alien"
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid"
#define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste"
#define FILE_DIR "code/modules/mob/living/carbon/alien/larva"
#define FILE_DIR "code/modules/mob/living/carbon/brain"
#define FILE_DIR "code/modules/mob/living/carbon/human"
#define FILE_DIR "code/modules/mob/living/carbon/metroid"
#define FILE_DIR "code/modules/mob/living/carbon/monkey"
#define FILE_DIR "code/modules/mob/living/silicon"
#define FILE_DIR "code/modules/mob/living/silicon/ai"
#define FILE_DIR "code/modules/mob/living/silicon/ai/freelook"
#define FILE_DIR "code/modules/mob/living/silicon/decoy"
#define FILE_DIR "code/modules/mob/living/silicon/pai"
#define FILE_DIR "code/modules/mob/living/silicon/robot"
#define FILE_DIR "code/modules/mob/living/simple_animal"
#define FILE_DIR "code/modules/mob/new_player"
#define FILE_DIR "code/modules/mob/organ"
#define FILE_DIR "code/modules/paperwork"
#define FILE_DIR "code/modules/power"
#define FILE_DIR "code/modules/power/antimatter"
#define FILE_DIR "code/modules/power/singularity"
#define FILE_DIR "code/modules/power/singularity/particle_accelerator"
#define FILE_DIR "code/modules/projectiles"
#define FILE_DIR "code/modules/projectiles/ammunition"
#define FILE_DIR "code/modules/projectiles/guns"
#define FILE_DIR "code/modules/projectiles/guns/energy"
#define FILE_DIR "code/modules/projectiles/guns/projectile"
#define FILE_DIR "code/modules/projectiles/projectile"
#define FILE_DIR "code/modules/reagents"
#define FILE_DIR "code/modules/reagents/reagent_containers"
#define FILE_DIR "code/modules/reagents/reagent_containers/food"
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks"
#define FILE_DIR "code/modules/reagents/reagent_containers/food/drinks/bottle"
#define FILE_DIR "code/modules/reagents/reagent_containers/food/snacks"
#define FILE_DIR "code/modules/reagents/reagent_containers/glass"
#define FILE_DIR "code/modules/reagents/reagent_containers/glass/bottle"
#define FILE_DIR "code/modules/recycling"
#define FILE_DIR "code/modules/research"
#define FILE_DIR "code/modules/scripting"
#define FILE_DIR "code/modules/scripting/AST"
#define FILE_DIR "code/modules/scripting/AST/Operators"
#define FILE_DIR "code/modules/scripting/Implementations"
#define FILE_DIR "code/modules/scripting/Interpreter"
#define FILE_DIR "code/modules/scripting/Parser"
#define FILE_DIR "code/modules/scripting/Scanner"
#define FILE_DIR "code/modules/security levels"
#define FILE_DIR "code/unused"
#define FILE_DIR "code/unused/beast"
#define FILE_DIR "code/unused/computer2"
#define FILE_DIR "code/unused/disease2"
#define FILE_DIR "code/unused/gamemodes"
#define FILE_DIR "code/unused/hivebot"
#define FILE_DIR "code/unused/mining"
#define FILE_DIR "code/unused/optics"
#define FILE_DIR "code/unused/pda2"
#define FILE_DIR "code/unused/powerarmor"
#define FILE_DIR "code/unused/spacecraft"
#define FILE_DIR "code/WorkInProgress"
#define FILE_DIR "code/WorkInProgress/carn"
#define FILE_DIR "code/WorkInProgress/mapload"
#define FILE_DIR "code/WorkInProgress/organs"
#define FILE_DIR "code/WorkInProgress/virus2"
#define FILE_DIR "config"
#define FILE_DIR "config/names"
#define FILE_DIR "data"
#define FILE_DIR "data/logs"
#define FILE_DIR "data/logs/2012"
#define FILE_DIR "data/logs/2012/07-July"
#define FILE_DIR "data/logs/2012/08-August"
#define FILE_DIR "data/player_saves"
#define FILE_DIR "data/player_saves/c"
#define FILE_DIR "data/player_saves/c/calasmere"
#define FILE_DIR "data/player_saves/c/cheridan"
#define FILE_DIR "data/player_saves/c/cindikate"
#define FILE_DIR "data/player_saves/d"
#define FILE_DIR "data/player_saves/d/darktechnomancer"
#define FILE_DIR "data/player_saves/d/doohl"
#define FILE_DIR "data/player_saves/g"
#define FILE_DIR "data/player_saves/g/giacomand"
#define FILE_DIR "data/player_saves/g/giacomt"
#define FILE_DIR "data/player_saves/m"
#define FILE_DIR "data/player_saves/m/milofaust"
#define FILE_DIR "data/player_saves/n"
#define FILE_DIR "data/player_saves/n/nodrak"
#define FILE_DIR "data/player_saves/p"
#define FILE_DIR "data/player_saves/p/petethegoat"
#define FILE_DIR "data/player_saves/r"
#define FILE_DIR "data/player_saves/r/rockdtben"
#define FILE_DIR "data/player_saves/s"
#define FILE_DIR "data/player_saves/s/s0ldi3rkr4s0"
#define FILE_DIR "data/player_saves/t"
#define FILE_DIR "data/player_saves/t/tanknut"
#define FILE_DIR "data/player_saves/t/terranaut"
#define FILE_DIR "data/player_saves/t/thunder12345"
#define FILE_DIR "html"
#define FILE_DIR "icons"
#define FILE_DIR "icons/effects"
#define FILE_DIR "icons/mecha"
#define FILE_DIR "icons/misc"
#define FILE_DIR "icons/mob"
#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/machines"
#define FILE_DIR "icons/obj/pipes"
#define FILE_DIR "icons/pda_icons"
#define FILE_DIR "icons/PSD files"
#define FILE_DIR "icons/spideros_icons"
#define FILE_DIR "icons/Testing"
#define FILE_DIR "icons/turf"
#define FILE_DIR "icons/vehicles"
#define FILE_DIR "icons/vending_icons"
#define FILE_DIR "interface"
#define FILE_DIR "maps"
#define FILE_DIR "maps/RandomZLevels"
#define FILE_DIR "music"
#define FILE_DIR "sound"
#define FILE_DIR "sound/AI"
#define FILE_DIR "sound/ambience"
#define FILE_DIR "sound/effects"
#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/piano"
#define FILE_DIR "sound/voice"
#define FILE_DIR "sound/weapons"
#define FILE_DIR "SQL"
#define FILE_DIR "tools"
#define FILE_DIR "tools/Redirector"
#define FILE_DIR "tools/Runtime Condenser"
#define FILE_DIR "tools/UnstandardnessTestForDM"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/bin/Debug"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/obj/x86/Debug"
#define FILE_DIR "tools/UnstandardnessTestForDM/UnstandardnessTestForDM/Properties"
// END_FILE_DIR
// BEGIN_PREFERENCES
@@ -550,9 +42,14 @@
#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\lighting_controller.dm"
#include "code\controllers\master_controller.dm"
#include "code\controllers\shuttle_controller.dm"
#include "code\controllers\verbs.dm"
#include "code\datums\ai_laws.dm"
#include "code\datums\computerfiles.dm"
#include "code\datums\configuration.dm"
#include "code\datums\datacore.dm"
#include "code\datums\datumvars.dm"
#include "code\datums\disease.dm"
@@ -561,7 +58,6 @@
#include "code\datums\modules.dm"
#include "code\datums\organs.dm"
#include "code\datums\recipe.dm"
#include "code\datums\shuttle_controller.dm"
#include "code\datums\spell.dm"
#include "code\datums\sun.dm"
#include "code\datums\vote.dm"
@@ -657,7 +153,6 @@
#include "code\game\dna.dm"
#include "code\game\hud.dm"
#include "code\game\landmarks.dm"
#include "code\game\master_controller.dm"
#include "code\game\prisonshuttle.dm"
#include "code\game\shuttle_engines.dm"
#include "code\game\skincmd.dm"
@@ -1088,7 +583,6 @@
#include "code\modules\admin\verbs\getlogs.dm"
#include "code\modules\admin\verbs\mapping.dm"
#include "code\modules\admin\verbs\massmodvar.dm"
#include "code\modules\admin\verbs\MC.dm"
#include "code\modules\admin\verbs\modifyvariables.dm"
#include "code\modules\admin\verbs\onlyone.dm"
#include "code\modules\admin\verbs\playsound.dm"
@@ -1371,7 +865,6 @@
#include "code\modules\power\lighting.dm"
#include "code\modules\power\port_gen.dm"
#include "code\modules\power\power.dm"
#include "code\modules\power\sd_DynamicAreaLighting.dm"
#include "code\modules\power\smes.dm"
#include "code\modules\power\solar.dm"
#include "code\modules\power\switch.dm"