Final merge

Merge branch 'development-2' into development

# Conflicts:
#	baystation12.dme
#	code/_helpers/icons.dm
#	code/controllers/master_controller.dm
#	code/game/machinery/Sleeper.dm
#	code/game/machinery/computer3/laptop.dm
#	code/game/machinery/doors/door.dm
#	code/game/machinery/floorlayer.dm
#	code/game/machinery/vending.dm
#	code/game/mecha/mech_fabricator.dm
#	code/game/objects/effects/decals/contraband.dm
#	code/game/objects/explosion.dm
#	code/game/objects/items/robot/robot_upgrades.dm
#	code/game/objects/items/weapons/melee/misc.dm
#	code/game/objects/items/weapons/storage/boxes.dm
#	code/game/objects/structures/crates_lockers/closets/secure/security.dm
#	code/game/objects/structures/window.dm
#	code/modules/clothing/spacesuits/rig/rig.dm
#	code/modules/clothing/suits/jobs.dm
#	code/modules/mob/freelook/update_triggers.dm
#	code/modules/mob/living/carbon/human/human_defense.dm
#	code/modules/mob/living/carbon/human/human_movement.dm
#	code/modules/mob/living/carbon/human/life.dm
#	code/modules/mob/living/carbon/human/species/species.dm
#	code/modules/mob/living/carbon/human/species/station/station.dm
#	code/modules/mob/living/living_defines.dm
#	code/modules/mob/mob_helpers.dm
#	code/modules/mob/mob_movement.dm
#	code/modules/projectiles/ammunition/boxes.dm
#	nano/templates/sleeper.tmpl
This commit is contained in:
skull132
2016-11-12 00:10:21 +02:00
187 changed files with 6193 additions and 1183 deletions
@@ -107,6 +107,8 @@
last_task = 0
last_object = null
/datum/controller/process/proc/preStart()
/datum/controller/process/proc/started()
var/timeofhour = TimeOfHour
// Initialize last_slept so we can record timing information
@@ -84,10 +84,16 @@ var/global/datum/controller/processScheduler/processScheduler
isRunning = 1
// tick_lag will have been set by now, so re-initialize these
scheduler_sleep_interval = world.tick_lag
callPreStart()
updateStartDelays()
spawn(0)
process()
/datum/controller/processScheduler/proc/callPreStart()
for (var/datum/controller/process/P in processes)
if (!P.disabled)
P.preStart()
/datum/controller/processScheduler/proc/process()
while(isRunning)
checkRunningProcesses()
+22
View File
@@ -0,0 +1,22 @@
/datum/controller/process/modifier/setup()
name = "modifiers"
schedule_interval = 10
start_delay = 8
/datum/controller/process/modifier/started()
..()
if(!processing_modifiers)
processing_modifiers = list()
/datum/controller/process/modifier/doWork()
for(last_object in processing_modifiers)
var/datum/modifier/O = last_object
if(isnull(O.gcDestroyed))
O.process()
else
catchBadType(O)
processing_objects -= O
/datum/controller/process/modifier/statProcess()
..()
stat(null, "[processing_modifiers.len] modifiers")
@@ -0,0 +1,89 @@
/datum/controller/process/night_lighting/
var/isactive = 0
var/firstrun = 1
var/list/area/lighting_areas = list(
/area/hallway/primary/fore,
/area/hallway/primary/starboard,
/area/hallway/primary/aft,
/area/hallway/primary/port,
/area/hallway/primary/central_one,
/area/hallway/primary/central_two,
/area/hallway/primary/central_three,
/area/hallway/secondary/exit,
/area/hallway/secondary/entry/fore,
/area/hallway/secondary/entry/port,
/area/hallway/secondary/entry/starboard,
/area/hallway/secondary/entry/aft,
/area/crew_quarters/sleep,
/area/crew_quarters/locker,
/area/crew_quarters/fitness,
/area/crew_quarters/bar,
/area/engineering/foyer,
/area/security/lobby,
/area/storage/tools,
/area/storage/primary
)
/datum/controller/process/night_lighting/setup()
name = "night lighting controller"
schedule_interval = 3600 // Every 5 minutes.
if (!config.night_lighting)
// Stop trying to delete processes. Not how it goes.
disabled = 1
/datum/controller/process/night_lighting/preStart()
switch (worldtime2ticks())
if (0 to MORNING_LIGHT_RESET)
deactivate()
if (NIGHT_LIGHT_ACTIVE to TICKS_IN_DAY)
activate()
/datum/controller/process/night_lighting/doWork()
switch (worldtime2ticks())
if (0 to MORNING_LIGHT_RESET)
if (isactive)
command_announcement.Announce("Good morning. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now return the public hallway lighting levels to normal.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg')
deactivate()
if (NIGHT_LIGHT_ACTIVE to TICKS_IN_DAY)
if (!isactive)
command_announcement.Announce("Good evening. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now dim lighting in the public hallways in order to accommodate the circadian rhythm of some species.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg')
activate()
else
if (isactive)
deactivate()
/datum/controller/process/night_lighting/proc/activate()
for (var/obj/machinery/power/apc/APC in get_apc_list())
APC.toggle_nightlight("on")
isactive = 1
SCHECK
/datum/controller/process/night_lighting/proc/deactivate()
for (var/obj/machinery/power/apc/APC in get_apc_list())
APC.toggle_nightlight("off")
isactive = 0
SCHECK
/datum/controller/process/night_lighting/proc/get_apc_list()
var/list/obj/machinery/power/apc/lighting_apcs = list()
for (var/A in all_areas)
var/area/B = A
if (!(B.type in lighting_areas))
continue
if (B.apc)
lighting_apcs += B.apc
SCHECK
return lighting_apcs
+16 -3
View File
@@ -145,8 +145,10 @@ var/list/gamemode_cache = list()
//Used for modifying movement speed for mobs.
//Unversal modifiers
var/run_speed = 0
var/walk_speed = 0
var/walk_delay_multiplier = 1
var/run_delay_multiplier = 1
var/vehicle_delay_multiplier = 1
//Mob specific modifiers. NOTE: These will affect different mob types in different ways
var/human_delay = 0
@@ -173,6 +175,8 @@ var/list/gamemode_cache = list()
var/gateway_delay = 18000 //How long the gateway takes before it activates. Default is half an hour.
var/ghost_interaction = 0
var/night_lighting = 0
var/comms_password = ""
var/enter_allowed = 1
@@ -615,6 +619,9 @@ var/list/gamemode_cache = list()
if("ghost_interaction")
config.ghost_interaction = 1
if("night_lighting")
config.night_lighting = 1
if("disable_player_mice")
config.disable_player_mice = 1
@@ -810,11 +817,17 @@ var/list/gamemode_cache = list()
if("limbs_can_break")
config.limbs_can_break = value
if("run_speed")
config.run_speed = value
if("walk_speed")
config.walk_speed = value
// These should never go to 0 or below. So, we clamp them.
if("walk_delay_multiplier")
config.walk_delay_multiplier = max(0.1, value)
if("run_delay_multiplier")
config.run_delay_multiplier = max(0.1, value)
if("vehicle_delay_multiplier")
config.vehicle_delay_multiplier = max(0.1, value)
if("human_delay")
config.human_delay = value
if("robot_delay")
+11
View File
@@ -70,6 +70,17 @@ datum/controller/game_controller/proc/setup_objects()
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
T.broadcast_status()
//Spawn the contents of the cargo warehouse
sleep(-1)
spawn_cargo_stock()
// Create the mining ore distribution map.
// These values determine the specific area that the map is applied to.
// If you do not use the official Baycode asteroid map, you will need to change them.
asteroid_ore_map = new /datum/random_map/ore(null,13,32,5,217,223)
// Set up antagonists.
populate_antag_type_list()