mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-27 23:28:10 +01:00
Merge remote-tracking branch 'PolarisSS13/master' into spriteadd
This commit is contained in:
@@ -100,6 +100,7 @@ var/datum/controller/supply/supply_controller = new()
|
||||
EC.name = "\proper[MA.name]"
|
||||
EC.value = 0
|
||||
EC.contents = list()
|
||||
var/base_value = 0
|
||||
|
||||
// Must be in a crate!
|
||||
if(istype(MA,/obj/structure/closet/crate))
|
||||
@@ -107,6 +108,8 @@ var/datum/controller/supply/supply_controller = new()
|
||||
callHook("sell_crate", list(CR, area_shuttle))
|
||||
|
||||
points += CR.points_per_crate
|
||||
if(CR.points_per_crate)
|
||||
base_value = CR.points_per_crate
|
||||
var/find_slip = 1
|
||||
|
||||
for(var/atom/A in CR)
|
||||
@@ -151,6 +154,7 @@ var/datum/controller/supply/supply_controller = new()
|
||||
|
||||
exported_crates += EC
|
||||
points += EC.value
|
||||
EC.value += base_value
|
||||
|
||||
// Duplicate the receipt for the admin-side log
|
||||
var/datum/exported_crate/adm = new()
|
||||
|
||||
@@ -57,10 +57,13 @@ var/list/gamemode_cache = list()
|
||||
var/list/modes = list() // allowed modes
|
||||
var/list/votable_modes = list() // votable modes
|
||||
var/list/probabilities = list() // relative probability of each mode
|
||||
var/list/player_requirements = list() // Overrides for how many players readied up a gamemode needs to start.
|
||||
var/list/player_requirements_secret = list() // Same as above, but for the secret gamemode.
|
||||
var/humans_need_surnames = 0
|
||||
var/allow_random_events = 0 // enables random events mid-round when set to 1
|
||||
var/allow_ai = 1 // allow ai job
|
||||
var/allow_ai_drones = 0 // allow ai controlled drones
|
||||
var/allow_ai_shells = FALSE // allow AIs to enter and leave special borg shells at will, and for those shells to be buildable.
|
||||
var/give_free_ai_shell = FALSE // allows a specific spawner object to instantiate a premade AI Shell
|
||||
var/hostedby = null
|
||||
var/respawn = 1
|
||||
var/guest_jobban = 1
|
||||
@@ -236,6 +239,7 @@ var/list/gamemode_cache = list()
|
||||
var/radiation_lower_limit = 0.35 //If the radiation level for a turf would be below this, ignore it.
|
||||
|
||||
var/random_submap_orientation = FALSE // If true, submaps loaded automatically can be rotated.
|
||||
var/autostart_solars = FALSE // If true, specifically mapped in solar control computers will set themselves up when the round starts.
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
@@ -247,9 +251,11 @@ var/list/gamemode_cache = list()
|
||||
gamemode_cache[M.config_tag] = M // So we don't instantiate them repeatedly.
|
||||
if(!(M.config_tag in modes)) // ensure each mode is added only once
|
||||
log_misc("Adding game mode [M.name] ([M.config_tag]) to configuration.")
|
||||
src.modes += M.config_tag
|
||||
src.mode_names[M.config_tag] = M.name
|
||||
src.probabilities[M.config_tag] = M.probability
|
||||
modes += M.config_tag
|
||||
mode_names[M.config_tag] = M.name
|
||||
probabilities[M.config_tag] = M.probability
|
||||
player_requirements[M.config_tag] = M.required_players
|
||||
player_requirements_secret[M.config_tag] = M.required_players_secret
|
||||
if (M.votable)
|
||||
src.votable_modes += M.config_tag
|
||||
src.votable_modes += "secret"
|
||||
@@ -410,8 +416,11 @@ var/list/gamemode_cache = list()
|
||||
if ("allow_ai")
|
||||
config.allow_ai = 1
|
||||
|
||||
if ("allow_ai_drones")
|
||||
config.allow_ai_drones = 1
|
||||
if ("allow_ai_shells")
|
||||
config.allow_ai_shells = TRUE
|
||||
|
||||
if("give_free_ai_shell")
|
||||
config.give_free_ai_shell = TRUE
|
||||
|
||||
// if ("authentication")
|
||||
// config.enable_authentication = 1
|
||||
@@ -518,6 +527,25 @@ var/list/gamemode_cache = list()
|
||||
else
|
||||
log_misc("Incorrect probability configuration definition: [prob_name] [prob_value].")
|
||||
|
||||
if ("required_players", "required_players_secret")
|
||||
var/req_pos = findtext(value, " ")
|
||||
var/req_name = null
|
||||
var/req_value = null
|
||||
var/is_secret_override = findtext(name, "required_players_secret") // Being extra sure we're not picking up an override for Secret by accident.
|
||||
|
||||
if(req_pos)
|
||||
req_name = lowertext(copytext(value, 1, req_pos))
|
||||
req_value = copytext(value, req_pos + 1)
|
||||
if(req_name in config.modes)
|
||||
if(is_secret_override)
|
||||
config.player_requirements_secret[req_name] = text2num(req_value)
|
||||
else
|
||||
config.player_requirements[req_name] = text2num(req_value)
|
||||
else
|
||||
log_misc("Unknown game mode player requirement configuration definition: [req_name].")
|
||||
else
|
||||
log_misc("Incorrect player requirement configuration definition: [req_name] [req_value].")
|
||||
|
||||
if("allow_random_events")
|
||||
config.allow_random_events = 1
|
||||
|
||||
@@ -760,6 +788,9 @@ var/list/gamemode_cache = list()
|
||||
if("random_submap_orientation")
|
||||
config.random_submap_orientation = 1
|
||||
|
||||
if("autostart_solars")
|
||||
config.autostart_solars = TRUE
|
||||
|
||||
else
|
||||
log_misc("Unknown setting in configuration: '[name]'")
|
||||
|
||||
|
||||
@@ -195,6 +195,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
|
||||
//returns 1 if the shuttle is not idle at centcom
|
||||
/datum/emergency_shuttle_controller/proc/online()
|
||||
if(!shuttle)
|
||||
return FALSE
|
||||
if (!shuttle.location) //not at centcom
|
||||
return 1
|
||||
if (wait_for_launch || shuttle.moving_status != SHUTTLE_IDLE)
|
||||
|
||||
@@ -31,6 +31,24 @@ SUBSYSTEM_DEF(vote)
|
||||
reset()
|
||||
|
||||
/datum/controller/subsystem/vote/proc/autotransfer()
|
||||
// Before doing the vote, see if anyone is playing.
|
||||
// If not, just do the transfer.
|
||||
var/players_are_in_round = FALSE
|
||||
for(var/a in player_list) // Mobs with clients attached.
|
||||
var/mob/living/L = a
|
||||
if(!istype(L)) // Exclude ghosts and other weird things.
|
||||
continue
|
||||
if(L.stat == DEAD) // Dead mobs aren't playing.
|
||||
continue
|
||||
// Everything else is, however.
|
||||
players_are_in_round = TRUE
|
||||
break
|
||||
|
||||
if(!players_are_in_round)
|
||||
log_debug("The crew transfer shuttle was automatically called at vote time due to no players being present.")
|
||||
init_shift_change(null, 1)
|
||||
return
|
||||
|
||||
initiate_vote(VOTE_CREW_TRANSFER, "the server", 1)
|
||||
log_debug("The server has called a crew transfer vote.")
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(xenoarch)
|
||||
|
||||
/datum/controller/subsystem/xenoarch/proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in turfs)
|
||||
if(!M.density)
|
||||
if(!M.density || M.z in using_map.xenoarch_exempt_levels)
|
||||
continue
|
||||
|
||||
if(isnull(M.geologic_data))
|
||||
|
||||
Reference in New Issue
Block a user