merge conflict and job/dept discounts support.

This commit is contained in:
Ghommie
2020-05-03 02:11:05 +02:00
308 changed files with 6846 additions and 9140 deletions
@@ -219,7 +219,8 @@
config_entry_value = list( //DEFAULTS
/mob/living/simple_animal = 1,
/mob/living/silicon/pai = 1,
/mob/living/carbon/alien/humanoid/hunter = -1,
/mob/living/carbon/alien/humanoid/sentinel = 0.25,
/mob/living/carbon/alien/humanoid/drone = 0.5,
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
/mob/living/carbon/alien/humanoid/royal/queen = 3
)
@@ -250,8 +251,18 @@
/datum/config_entry/number/movedelay/run_delay
/datum/config_entry/number/movedelay/run_delay/ValidateAndSet()
. = ..()
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/run)
M.sync()
/datum/config_entry/number/movedelay/walk_delay
/datum/config_entry/number/movedelay/walk_delay/ValidateAndSet()
. = ..()
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk)
M.sync()
/datum/config_entry/number/movedelay/sprint_speed_increase
config_entry_value = 1
@@ -290,6 +301,8 @@
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
/datum/config_entry/flag/roundstart_vr //Will virtual reality missions be loaded?
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
config_entry_value = 18000
min_val = 0
+40 -30
View File
@@ -1,3 +1,5 @@
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
SUBSYSTEM_DEF(mapping)
name = "Mapping"
init_order = INIT_ORDER_MAPPING
@@ -81,7 +83,9 @@ SUBSYSTEM_DEF(mapping)
// Pick a random away mission.
if(CONFIG_GET(flag/roundstart_away))
createRandomZlevel()
// Pick a random VR level.
if(CONFIG_GET(flag/roundstart_vr))
createRandomZlevel(VIRT_REALITY_NAME, list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE), GLOB.potential_vr_levels)
// Generate mining ruins
loading_ruins = TRUE
@@ -181,7 +185,6 @@ SUBSYSTEM_DEF(mapping)
z_list = SSmapping.z_list
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE)
. = list()
var/start_time = REALTIMEOFDAY
@@ -265,7 +268,6 @@ SUBSYSTEM_DEF(mapping)
msg += ", [FailedZs[I]]"
msg += ". Yell at your server host!"
INIT_ANNOUNCE(msg)
#undef INIT_ANNOUNCE
GLOBAL_LIST_EMPTY(the_station_areas)
@@ -410,55 +412,63 @@ GLOBAL_LIST_EMPTY(the_station_areas)
//Manual loading of away missions.
/client/proc/admin_away()
set name = "Load Away Mission"
set name = "Load Away Mission / Virtual Reality"
set category = "Fun"
if(!holder ||!check_rights(R_FUN))
return
var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel")
if(!GLOB.the_gateway)
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
var/list/possible_options
var/list/ztraits
switch(choice)
if(VIRT_REALITY_NAME)
possible_options = GLOB.potential_vr_levels
ztraits = list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE)
if(AWAY_MISSION_NAME)
if(!GLOB.the_gateway)
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
return
possible_options = GLOB.potential_away_levels
ztraits = list(ZTRAIT_AWAY = TRUE)
else
return
var/list/possible_options = GLOB.potentialRandomZlevels + "Custom"
var/away_name
var/datum/space_level/away_level
possible_options += "Custom"
var/lvl_name
var/datum/space_level/level
var/answer = input("What kind ? ","Away") as null|anything in possible_options
var/answer = input("What kind ? ","Away/VR") as null|anything in possible_options
switch(answer)
if(null)
return
if("Custom")
var/mapfile = input("Pick file:", "File") as null|file
if(!mapfile)
return
away_name = "[mapfile] custom"
to_chat(usr,"<span class='notice'>Loading [away_name]...</span>")
var/datum/map_template/template = new(mapfile, "Away Mission")
away_level = template.load_new_z()
lvl_name = "[mapfile] custom"
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
var/datum/map_template/template = new(mapfile, choice, ztraits)
level = template.load_new_z(ztraits)
else
if(answer in GLOB.potentialRandomZlevels)
away_name = answer
var/list/traits = list(ZTRAIT_AWAY = TRUE)
if(answer in GLOB.potentialRandomVRlevels)
traits[ZTRAIT_VIRTUAL_REALITY] = TRUE
to_chat(usr,"<span class='notice'>Loading [away_name]...</span>")
var/datum/map_template/template = new(away_name, "Away Mission")
away_level = template.load_new_z(traits)
else
return
lvl_name = answer
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
var/datum/map_template/template = new(lvl_name, choice)
level = template.load_new_z(ztraits)
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
if(!away_level)
message_admins("Loading [away_name] failed!")
message_admins("Admin [key_name_admin(usr)] has loaded [lvl_name] [choice].")
log_admin("Admin [key_name(usr)] has loaded [lvl_name] [choice].")
if(!level)
message_admins("Loading [lvl_name] failed!")
return
if(GLOB.the_gateway)
if(choice == AWAY_MISSION_NAME && GLOB.the_gateway)
//Link any found away gate with station gate
var/obj/machinery/gateway/centeraway/new_gate
for(var/obj/machinery/gateway/centeraway/G in GLOB.machines)
if(G.z == away_level.z_value) //I'll have to refactor gateway shitcode before multi-away support.
if(G.z == level.z_value) //I'll have to refactor gateway shitcode before multi-away support.
new_gate = G
break
//Link station gate with away gate and remove wait time.
+4 -4
View File
@@ -212,13 +212,13 @@ SUBSYSTEM_DEF(shuttle)
call_reason = trim(html_encode(call_reason))
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH && seclevel2num(get_security_level()) > SEC_LEVEL_GREEN)
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH && GLOB.security_level > SEC_LEVEL_GREEN)
to_chat(user, "You must provide a reason.")
return
var/area/signal_origin = get_area(user)
var/emergency_reason = "\nNature of emergency:\n\n[call_reason]"
var/security_num = seclevel2num(get_security_level())
var/security_num = GLOB.security_level
switch(security_num)
if(SEC_LEVEL_RED,SEC_LEVEL_DELTA)
emergency.request(null, signal_origin, html_decode(emergency_reason), 1) //There is a serious threat we gotta move no time to give them five minutes.
@@ -280,7 +280,7 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/proc/canRecall()
if(!emergency || emergency.mode != SHUTTLE_CALL || emergencyNoRecall || SSticker.mode.name == "meteor")
return
var/security_num = seclevel2num(get_security_level())
var/security_num = GLOB.security_level
switch(security_num)
if(SEC_LEVEL_GREEN)
if(emergency.timeLeft(1) < emergencyCallTime)
@@ -636,7 +636,7 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end without being a proper shuttle call?
if(EMERGENCY_IDLE_OR_RECALLED)
SSshuttle.emergency.request(silent = TRUE)
priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority")
priority_announce("The shift has come to an end and the shuttle called. [GLOB.security_level == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority")
log_game("Round end vote passed. Shuttle has been auto-called.")
message_admins("Round end vote passed. Shuttle has been auto-called.")
emergencyNoRecall = TRUE
+3
View File
@@ -387,6 +387,9 @@ SUBSYSTEM_DEF(ticker)
for(var/mob/dead/new_player/N in GLOB.player_list)
var/mob/living/carbon/human/player = N.new_character
if(istype(player) && player.mind && player.mind.assigned_role)
var/datum/job/J = SSjob.GetJob(player.mind.assigned_role)
if(J)
J.standard_assign_skills(player.mind)
if(player.mind.assigned_role == "Captain")
captainless=0
if(player.mind.assigned_role != player.mind.special_role)
+2 -2
View File
@@ -94,7 +94,7 @@ SUBSYSTEM_DEF(timer)
if(ctime_timer.flags & TIMER_LOOP)
ctime_timer.spent = 0
ctime_timer.timeToRun = REALTIMEOFDAY + ctime_timer.wait
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, timeToRun)
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
else
qdel(ctime_timer)
@@ -423,7 +423,7 @@ SUBSYSTEM_DEF(timer)
L = SStimer.second_queue
if(L)
BINARY_INSERT(src, L, datum/timedevent, timeToRun)
BINARY_INSERT(src, L, datum/timedevent, src, timeToRun, COMPARE_KEY)
return
//get the list of buckets
+2 -2
View File
@@ -352,7 +352,6 @@ SUBSYSTEM_DEF(vote)
if("dynamic")
if(SSticker.current_state > GAME_STATE_PREGAME)//Don't change the mode if the round already started.
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
GLOB.master_mode = "dynamic"
var/list/runnable_storytellers = config.get_runnable_storytellers()
var/datum/dynamic_storyteller/picked
for(var/T in runnable_storytellers)
@@ -361,7 +360,7 @@ SUBSYSTEM_DEF(vote)
picked = S
runnable_storytellers[S] *= round(stored_gamemode_votes[initial(S.name)]*100000,1)
if(!picked)
picked = pickweightAllowZero(runnable_storytellers)
picked = pickweight(runnable_storytellers, 0)
GLOB.dynamic_storyteller_type = picked
if("map")
var/datum/map_config/VM = config.maplist[.]
@@ -489,6 +488,7 @@ SUBSYSTEM_DEF(vote)
modes_to_add -= "traitor" // makes it so that traitor is always available
choices.Add(modes_to_add)
if("dynamic")
GLOB.master_mode = "dynamic"
var/list/probabilities = CONFIG_GET(keyed_list/storyteller_weight)
for(var/T in config.storyteller_cache)
var/datum/dynamic_storyteller/S = T