Merge branch 'master' into upstream-merge-31116
This commit is contained in:
@@ -78,7 +78,7 @@ GLOBAL_LIST_EMPTY(blobs_legit) //used for win-score calculations, contains only
|
||||
var/mob/camera/blob/B = blob.current.become_overmind(TRUE, round(blob_base_starting_points/blob_overminds.len))
|
||||
B.mind.name = B.name
|
||||
var/turf/T = pick(GLOB.blobstart)
|
||||
B.loc = T
|
||||
B.forceMove(T)
|
||||
B.base_point_rate = blob_point_rate
|
||||
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
if(B.blob_core || !B.placed)
|
||||
return 0
|
||||
if(!GLOB.blob_cores.len) //blob is dead
|
||||
if(config.continuous["blob"])
|
||||
if(CONFIG_GET(keyed_flag_list/continuous)["blob"])
|
||||
message_sent = FALSE //disable the win count at this point
|
||||
continuous_sanity_checked = 1 //Nonstandard definition of "alive" gets past the check otherwise
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
set name = "Jump to Core"
|
||||
set desc = "Move your camera to your core."
|
||||
if(blob_core)
|
||||
src.loc = blob_core.loc
|
||||
forceMove(blob_core.drop_location())
|
||||
|
||||
/mob/camera/blob/verb/jump_to_node()
|
||||
set category = "Blob"
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
B.density = TRUE
|
||||
if(T.Enter(B,src)) //NOW we can attempt to move into the tile
|
||||
B.density = initial(B.density)
|
||||
B.loc = T
|
||||
B.forceMove(T)
|
||||
B.update_icon()
|
||||
if(B.overmind && expand_reaction)
|
||||
B.overmind.blob_reagent_datum.expand_reaction(src, B, T, controller)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/datum/objective_team/brother_team/proc/forge_brother_objectives()
|
||||
objectives = list()
|
||||
var/is_hijacker = prob(10)
|
||||
for(var/i = 1 to max(1, config.brother_objectives_amount + (members.len > 2) - is_hijacker))
|
||||
for(var/i = 1 to max(1, CONFIG_GET(number/brother_objectives_amount) + (members.len > 2) - is_hijacker))
|
||||
forge_single_objective()
|
||||
if(is_hijacker)
|
||||
if(!locate(/datum/objective/hijack) in objectives)
|
||||
@@ -58,16 +58,17 @@
|
||||
var/meeting_areas = list("The Bar", "Dorms", "Escape Dock", "Arrivals", "Holodeck", "Primary Tool Storage", "Recreation Area", "Chapel", "Library")
|
||||
|
||||
/datum/game_mode/traitor/bros/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
var/list/datum/mind/possible_brothers = get_players_for_role(ROLE_BROTHER)
|
||||
|
||||
var/num_teams = team_amount
|
||||
if(config.brother_scaling_coeff)
|
||||
num_teams = max(1, round(num_players()/config.brother_scaling_coeff))
|
||||
var/bsc = CONFIG_GET(number/brother_scaling_coeff)
|
||||
if(bsc)
|
||||
num_teams = max(1, round(num_players() / bsc))
|
||||
|
||||
for(var/j = 1 to num_teams)
|
||||
if(possible_brothers.len < min_team_size || antag_candidates.len <= required_enemies)
|
||||
|
||||
@@ -52,16 +52,17 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
|
||||
|
||||
/datum/game_mode/changeling/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
var/num_changelings = 1
|
||||
|
||||
if(config.changeling_scaling_coeff)
|
||||
num_changelings = max(1, min( round(num_players()/(config.changeling_scaling_coeff*2))+2, round(num_players()/config.changeling_scaling_coeff) ))
|
||||
var/csc = CONFIG_GET(number/changeling_scaling_coeff)
|
||||
if(csc)
|
||||
num_changelings = max(1, min(round(num_players() / (csc * 2)) + 2, round(num_players() / csc)))
|
||||
else
|
||||
num_changelings = max(1, min(num_players(), changeling_amount))
|
||||
|
||||
@@ -102,10 +103,11 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
|
||||
..()
|
||||
|
||||
/datum/game_mode/changeling/make_antag_chance(mob/living/carbon/human/character) //Assigns changeling to latejoiners
|
||||
var/changelingcap = min( round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*2))+2, round(GLOB.joined_player_list.len/config.changeling_scaling_coeff) )
|
||||
var/csc = CONFIG_GET(number/changeling_scaling_coeff)
|
||||
var/changelingcap = min(round(GLOB.joined_player_list.len / (csc * 2)) + 2, round(GLOB.joined_player_list.len / csc))
|
||||
if(SSticker.mode.changelings.len >= changelingcap) //Caps number of latejoin antagonists
|
||||
return
|
||||
if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 - (config.changeling_scaling_coeff*2)))
|
||||
if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 - (csc * 2)))
|
||||
if(ROLE_CHANGELING in character.client.prefs.be_special)
|
||||
if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate"))
|
||||
if(age_check(character.client))
|
||||
@@ -131,10 +133,16 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
|
||||
changeling.objectives += absorb_objective
|
||||
|
||||
if(prob(60))
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = changeling
|
||||
steal_objective.find_target()
|
||||
changeling.objectives += steal_objective
|
||||
if(prob(85))
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = changeling
|
||||
steal_objective.find_target()
|
||||
changeling.objectives += steal_objective
|
||||
else
|
||||
var/datum/objective/download/download_objective = new
|
||||
download_objective.owner = changeling
|
||||
download_objective.gen_amount_goal()
|
||||
changeling.objectives += download_objective
|
||||
|
||||
var/list/active_ais = active_ais()
|
||||
if(active_ais.len && prob(100/GLOB.joined_player_list.len))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
sleep(5) // So it's not killed in explosion
|
||||
var/mob/living/simple_animal/hostile/headcrab/crab = new(turf)
|
||||
for(var/obj/item/organ/I in organs)
|
||||
I.loc = crab
|
||||
I.forceMove(crab)
|
||||
crab.origin = M
|
||||
if(crab.origin)
|
||||
crab.origin.active = 1
|
||||
|
||||
@@ -25,18 +25,19 @@
|
||||
return 1
|
||||
|
||||
/datum/game_mode/traitor/changeling/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
var/list/datum/mind/possible_changelings = get_players_for_role(ROLE_CHANGELING)
|
||||
|
||||
var/num_changelings = 1
|
||||
|
||||
if(config.changeling_scaling_coeff)
|
||||
num_changelings = max(1, min( round(num_players()/(config.changeling_scaling_coeff*4))+2, round(num_players()/(config.changeling_scaling_coeff*2)) ))
|
||||
var/csc = CONFIG_GET(number/changeling_scaling_coeff)
|
||||
if(csc)
|
||||
num_changelings = max(1, min(round(num_players() / (csc * 4)) + 2, round(num_players() / (csc * 2))))
|
||||
else
|
||||
num_changelings = max(1, min(num_players(), changeling_amount/2))
|
||||
|
||||
@@ -64,11 +65,12 @@
|
||||
return
|
||||
|
||||
/datum/game_mode/traitor/changeling/make_antag_chance(mob/living/carbon/human/character) //Assigns changeling to latejoiners
|
||||
var/changelingcap = min( round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*4))+2, round(GLOB.joined_player_list.len/(config.changeling_scaling_coeff*2)) )
|
||||
var/csc = CONFIG_GET(number/changeling_scaling_coeff)
|
||||
var/changelingcap = min( round(GLOB.joined_player_list.len / (csc * 4)) + 2, round(GLOB.joined_player_list.len / (csc * 2)))
|
||||
if(SSticker.mode.changelings.len >= changelingcap) //Caps number of latejoin antagonists
|
||||
..()
|
||||
return
|
||||
if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 / (config.changeling_scaling_coeff * 4)))
|
||||
if(SSticker.mode.changelings.len <= (changelingcap - 2) || prob(100 / (csc * 4)))
|
||||
if(ROLE_CHANGELING in character.client.prefs.be_special)
|
||||
if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, "Syndicate"))
|
||||
if(age_check(character.client))
|
||||
|
||||
@@ -107,9 +107,9 @@ Credit where due:
|
||||
var/ark_time //In minutes, how long the Ark waits before activation; this is equal to 30 + (number of players / 5) (max 40 mins.)
|
||||
|
||||
/datum/game_mode/clockwork_cult/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
var/starter_servants = 4 //Guaranteed four servants
|
||||
var/number_players = num_players()
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
/datum/game_mode/cult/pre_setup()
|
||||
cult_objectives += "sacrifice"
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
//cult scaling goes here
|
||||
|
||||
@@ -20,15 +20,16 @@
|
||||
+ <span class='notice'>Crew</span>: Resist the lure of sin and remain pure!"
|
||||
|
||||
/datum/game_mode/devil/pre_setup()
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
var/num_devils = 1
|
||||
|
||||
if(config.traitor_scaling_coeff)
|
||||
num_devils = max(minimum_devils, min( round(num_players()/(config.traitor_scaling_coeff*3))+ 2 + num_modifier, round(num_players()/(config.traitor_scaling_coeff*1.5)) + num_modifier ))
|
||||
var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
|
||||
if(tsc)
|
||||
num_devils = max(minimum_devils, min( round(num_players() / (tsc * 3))+ 2 + num_modifier, round(num_players() / (tsc * 1.5)) + num_modifier))
|
||||
else
|
||||
num_devils = max(minimum_devils, min(num_players(), traitors_possible))
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
|
||||
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
|
||||
if(!report)
|
||||
report = config.intercept
|
||||
report = !CONFIG_GET(flag/no_intercept_report)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/display_roundstart_logout_report), ROUNDSTART_LOGOUT_REPORT_TIME)
|
||||
|
||||
if(SSdbcore.Connect())
|
||||
@@ -113,8 +113,9 @@
|
||||
for(var/mob/Player in GLOB.mob_list)
|
||||
if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) && !isbrain(Player) && Player.client)
|
||||
living_crew += Player
|
||||
if(living_crew.len / GLOB.joined_player_list.len <= config.midround_antag_life_check) //If a lot of the player base died, we start fresh
|
||||
message_admins("Convert_roundtype failed due to too many dead people. Limit is [config.midround_antag_life_check * 100]% living crew")
|
||||
var/malc = CONFIG_GET(number/midround_antag_life_check)
|
||||
if(living_crew.len / GLOB.joined_player_list.len <= malc) //If a lot of the player base died, we start fresh
|
||||
message_admins("Convert_roundtype failed due to too many dead people. Limit is [malc * 100]% living crew")
|
||||
return null
|
||||
|
||||
var/list/datum/game_mode/runnable_modes = config.get_runnable_midround_modes(living_crew.len)
|
||||
@@ -138,8 +139,9 @@
|
||||
if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5)
|
||||
return 1
|
||||
|
||||
if(world.time >= (config.midround_antag_time_check * 600))
|
||||
message_admins("Convert_roundtype failed due to round length. Limit is [config.midround_antag_time_check] minutes.")
|
||||
var/matc = CONFIG_GET(number/midround_antag_time_check)
|
||||
if(world.time >= (matc * 600))
|
||||
message_admins("Convert_roundtype failed due to round length. Limit is [matc] minutes.")
|
||||
return null
|
||||
|
||||
var/list/antag_candidates = list()
|
||||
@@ -154,9 +156,9 @@
|
||||
|
||||
antag_candidates = shuffle(antag_candidates)
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
replacementmode.restricted_jobs += replacementmode.protected_jobs
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
replacementmode.restricted_jobs += "Assistant"
|
||||
|
||||
message_admins("The roundtype will be converted. If you have other plans for the station or feel the station is too messed up to inhabit <A HREF='?_src_=holder;[HrefToken()];toggle_midround_antag=\ref[usr]'>stop the creation of antags</A> or <A HREF='?_src_=holder;[HrefToken()];end_round=\ref[usr]'>end the round now</A>.")
|
||||
@@ -168,7 +170,7 @@
|
||||
round_converted = 0
|
||||
return
|
||||
//somewhere between 1 and 3 minutes from now
|
||||
if(!config.midround_antag[SSticker.mode.config_tag])
|
||||
if(!CONFIG_GET(keyed_flag_list/midround_antag)[SSticker.mode.config_tag])
|
||||
round_converted = 0
|
||||
return 1
|
||||
for(var/mob/living/carbon/human/H in antag_candidates)
|
||||
@@ -189,7 +191,9 @@
|
||||
return TRUE
|
||||
if(station_was_nuked)
|
||||
return TRUE
|
||||
if(!round_converted && (!config.continuous[config_tag] || (config.continuous[config_tag] && config.midround_antag[config_tag]))) //Non-continuous or continous with replacement antags
|
||||
var/list/continuous = CONFIG_GET(keyed_flag_list/continuous)
|
||||
var/list/midround_antag = CONFIG_GET(keyed_flag_list/midround_antag)
|
||||
if(!round_converted && (!continuous[config_tag] || (continuous[config_tag] && midround_antag[config_tag]))) //Non-continuous or continous with replacement antags
|
||||
if(!continuous_sanity_checked) //make sure we have antags to be checking in the first place
|
||||
for(var/mob/Player in GLOB.mob_list)
|
||||
if(Player.mind)
|
||||
@@ -198,8 +202,8 @@
|
||||
return 0
|
||||
if(!continuous_sanity_checked)
|
||||
message_admins("The roundtype ([config_tag]) has no antagonists, continuous round has been defaulted to on and midround_antag has been defaulted to off.")
|
||||
config.continuous[config_tag] = 1
|
||||
config.midround_antag[config_tag] = 0
|
||||
continuous[config_tag] = TRUE
|
||||
midround_antag[config_tag] = FALSE
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
return 0
|
||||
|
||||
@@ -213,7 +217,7 @@
|
||||
living_antag_player = Player
|
||||
return 0
|
||||
|
||||
if(!config.continuous[config_tag] || force_ending)
|
||||
if(!continuous[config_tag] || force_ending)
|
||||
return 1
|
||||
|
||||
else
|
||||
@@ -222,7 +226,7 @@
|
||||
if(round_ends_with_antag_death)
|
||||
return 1
|
||||
else
|
||||
config.midround_antag[config_tag] = 0
|
||||
midround_antag[config_tag] = 0
|
||||
return 0
|
||||
|
||||
return 0
|
||||
@@ -517,7 +521,7 @@
|
||||
/datum/game_mode/proc/get_remaining_days(client/C)
|
||||
if(!C)
|
||||
return 0
|
||||
if(!config.use_age_restriction_for_jobs)
|
||||
if(!CONFIG_GET(flag/use_age_restriction_for_jobs))
|
||||
return 0
|
||||
if(!isnum(C.player_age))
|
||||
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
to_chat(world, "<b>Crew</b> - don't get abducted and stop the abductors.")
|
||||
|
||||
/datum/game_mode/abduction/pre_setup()
|
||||
var/num_teams = max(1, min(max_teams, round(num_players() / config.abductor_scaling_coeff)))
|
||||
var/num_teams = max(1, min(max_teams, round(num_players() / CONFIG_GET(number/abductor_scaling_coeff))))
|
||||
var/possible_teams = max(1, round(antag_candidates.len / 2))
|
||||
num_teams = min(num_teams, possible_teams)
|
||||
|
||||
|
||||
@@ -60,9 +60,8 @@
|
||||
|
||||
/obj/machinery/abductor/gland_dispenser/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/organ/heart/gland))
|
||||
if(!user.drop_item())
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
W.loc = src
|
||||
for(var/i=1,i<=gland_colors.len,i++)
|
||||
if(gland_types[i] == W.type)
|
||||
amounts[i]++
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
/obj/machinery/abductor/experiment/proc/dissection_icon(mob/living/carbon/human/H)
|
||||
var/icon/photo = null
|
||||
var/g = (H.gender == FEMALE) ? "f" : "m"
|
||||
if(!config.mutant_races || H.dna.species.use_skintones)
|
||||
if(!CONFIG_GET(flag/join_with_mutant_race) || H.dna.species.use_skintones)
|
||||
photo = icon("icon" = 'icons/mob/human.dmi', "icon_state" = "[H.skin_tone]_[g]")
|
||||
else
|
||||
photo = icon("icon" = 'icons/mob/human.dmi', "icon_state" = "[H.dna.species.id]_[g]")
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(target.loc)
|
||||
M.amount = 5
|
||||
for(var/obj/item/I in target.component_parts)
|
||||
I.loc = M.loc
|
||||
I.forceMove(M.drop_location())
|
||||
var/obj/effect/temp_visual/swarmer/disintegration/N = new /obj/effect/temp_visual/swarmer/disintegration(get_turf(target))
|
||||
N.pixel_x = target.pixel_x
|
||||
N.pixel_y = target.pixel_y
|
||||
@@ -511,7 +511,7 @@
|
||||
if(istype(target, /obj/machinery/computer))
|
||||
var/obj/machinery/computer/C = target
|
||||
if(C.circuit)
|
||||
C.circuit.loc = M.loc
|
||||
C.circuit.forceMove(M.drop_location())
|
||||
qdel(target)
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
/mob/living/simple_animal/hostile/morph/proc/eat(atom/movable/A)
|
||||
if(A && A.loc != src)
|
||||
visible_message("<span class='warning'>[src] swallows [A] whole!</span>")
|
||||
A.loc = src
|
||||
A.forceMove(src)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/morph/proc/barf_contents()
|
||||
for(var/atom/movable/AM in src)
|
||||
AM.loc = loc
|
||||
AM.forceMove(loc)
|
||||
if(prob(90))
|
||||
step(AM, pick(GLOB.alldirs))
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
P.info = "The nuclear authorization code is: <b>[nuke_code]</b>"
|
||||
P.name = "nuclear bomb code"
|
||||
var/mob/living/carbon/human/H = synd_mind.current
|
||||
P.loc = H.loc
|
||||
P.forceMove(H.drop_location())
|
||||
H.put_in_hands_or_del(P)
|
||||
H.update_icons()
|
||||
else
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
U.hidden_uplink.owner = "[user.key]"
|
||||
U.hidden_uplink.telecrystals = CHALLENGE_TELECRYSTALS
|
||||
U.hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
|
||||
config.shuttle_refuel_delay = max(config.shuttle_refuel_delay, CHALLENGE_SHUTTLE_DELAY)
|
||||
CONFIG_SET(number/shuttle_refuel_delay, max(CONFIG_GET(number/shuttle_refuel_delay), CHALLENGE_SHUTTLE_DELAY))
|
||||
SSblackbox.set_val("nuclear_challenge_mode",1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -506,24 +506,31 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
explanation_text = "Download [target_amount] research level\s."
|
||||
return target_amount
|
||||
|
||||
/datum/objective/download/check_completion()//NINJACODE.
|
||||
var/current_amount = 0
|
||||
/datum/objective/download/check_completion()
|
||||
var/list/current_tech = list()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
for(var/datum/mind/M in owners)
|
||||
if(!ishuman(owner.current))
|
||||
continue
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
if(!H || H.stat == DEAD || !istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
continue
|
||||
var/obj/item/clothing/suit/space/space_ninja/SN = H.wear_suit
|
||||
if(!SN.s_initialized)
|
||||
continue
|
||||
for(var/datum/tech/current_data in SN.stored_research)
|
||||
if(current_data.level)
|
||||
current_amount += (current_data.level-1)
|
||||
return current_amount >= target_amount
|
||||
|
||||
|
||||
for(var/datum/mind/owner in owners)
|
||||
if(ismob(owner.current))
|
||||
var/mob/M = owner.current //Yeah if you get morphed and you eat a quantum tech disk with the RD's latest backup good on you soldier.
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H && (H.stat != DEAD) && istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = H.wear_suit
|
||||
for(var/datum/tech/T in S.stored_research)
|
||||
current_tech[T.id] = T.level? T.level : 0
|
||||
var/list/otherwise = M.GetAllContents()
|
||||
for(var/obj/item/disk/tech_disk/TD in otherwise)
|
||||
for(var/datum/tech/T in TD.tech_stored)
|
||||
if(!T.id || !T.level)
|
||||
continue
|
||||
else if(!current_tech[T.id])
|
||||
current_tech[T.id] = T.level
|
||||
else if(T.level > current_tech[T.id])
|
||||
current_tech[T.id] = T.level
|
||||
var/total = 0
|
||||
for(var/i in current_tech)
|
||||
total += current_tech[i]
|
||||
return total >= target_amount
|
||||
|
||||
/datum/objective/capture
|
||||
|
||||
@@ -586,7 +593,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
for(var/datum/mind/M in owners)
|
||||
if(!owner || !owner.changeling || !owner.changeling.stored_profiles)
|
||||
continue
|
||||
absorbedcount += M.changeling.absorbedcount
|
||||
absorbedcount += M.changeling.absorbedcount
|
||||
return absorbedcount >= target_amount
|
||||
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/datum/game_mode/revolution/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
for (var/i=1 to max_headrevs)
|
||||
@@ -230,7 +230,7 @@
|
||||
//Checks if the round is over//
|
||||
///////////////////////////////
|
||||
/datum/game_mode/revolution/check_finished()
|
||||
if(config.continuous["revolution"])
|
||||
if(CONFIG_GET(keyed_flag_list/continuous)["revolution"])
|
||||
if(finished)
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
return ..()
|
||||
|
||||
@@ -1,303 +1,303 @@
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
|
||||
/mob
|
||||
var/datum/hSB/sandbox = null
|
||||
/mob/proc/CanBuild()
|
||||
sandbox = new/datum/hSB
|
||||
sandbox.owner = src.ckey
|
||||
if(src.client.holder)
|
||||
sandbox.admin = 1
|
||||
verbs += new/mob/proc/sandbox_panel
|
||||
/mob/proc/sandbox_panel()
|
||||
set name = "Sandbox Panel"
|
||||
if(sandbox)
|
||||
sandbox.update()
|
||||
|
||||
/datum/hSB
|
||||
var/owner = null
|
||||
var/admin = 0
|
||||
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
|
||||
/mob
|
||||
var/datum/hSB/sandbox = null
|
||||
/mob/proc/CanBuild()
|
||||
sandbox = new/datum/hSB
|
||||
sandbox.owner = src.ckey
|
||||
if(src.client.holder)
|
||||
sandbox.admin = 1
|
||||
verbs += new/mob/proc/sandbox_panel
|
||||
/mob/proc/sandbox_panel()
|
||||
set name = "Sandbox Panel"
|
||||
if(sandbox)
|
||||
sandbox.update()
|
||||
|
||||
/datum/hSB
|
||||
var/owner = null
|
||||
var/admin = 0
|
||||
|
||||
var/static/clothinfo = null
|
||||
var/static/reaginfo = null
|
||||
var/static/objinfo = null
|
||||
var/canisterinfo = null
|
||||
var/hsbinfo = null
|
||||
//items that shouldn't spawn on the floor because they would bug or act weird
|
||||
var/global/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
var/canisterinfo = null
|
||||
var/hsbinfo = null
|
||||
//items that shouldn't spawn on the floor because they would bug or act weird
|
||||
var/global/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
/obj/item/assembly, /obj/item/device/onetankbomb, /obj/item/radio, /obj/item/device/pda/ai,
|
||||
/obj/item/device/uplink, /obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/device/uplink, /obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
var/global/list/hrefs = list(
|
||||
"Space Gear",
|
||||
"Suit Up (Space Travel Gear)" = "hsbsuit",
|
||||
"Spawn Gas Mask" = "hsbspawn&path=[/obj/item/clothing/mask/gas]",
|
||||
"Spawn Emergency Air Tank" = "hsbspawn&path=[/obj/item/tank/internals/emergency_oxygen/double]",
|
||||
|
||||
"Standard Tools",
|
||||
"Spawn Flashlight" = "hsbspawn&path=[/obj/item/device/flashlight]",
|
||||
"Spawn Toolbox" = "hsbspawn&path=[/obj/item/storage/toolbox/mechanical]",
|
||||
"Spawn Light Replacer" = "hsbspawn&path=[/obj/item/device/lightreplacer]",
|
||||
"Spawn Medical Kit" = "hsbspawn&path=[/obj/item/storage/firstaid/regular]",
|
||||
"Spawn All-Access ID" = "hsbaaid",
|
||||
|
||||
"Building Supplies",
|
||||
"Spawn 50 Wood" = "hsbwood",
|
||||
"Spawn 50 Metal" = "hsbmetal",
|
||||
"Spawn 50 Plasteel" = "hsbplasteel",
|
||||
"Spawn 50 Reinforced Glass" = "hsbrglass",
|
||||
"Spawn 50 Glass" = "hsbglass",
|
||||
"Spawn Full Cable Coil" = "hsbspawn&path=[/obj/item/stack/cable_coil]",
|
||||
"Spawn Hyper Capacity Power Cell" = "hsbspawn&path=[/obj/item/stock_parts/cell/hyper]",
|
||||
"Spawn Inf. Capacity Power Cell" = "hsbspawn&path=[/obj/item/stock_parts/cell/infinite]",
|
||||
"Spawn Rapid Construction Device" = "hsbrcd",
|
||||
"Spawn RCD Ammo" = "hsb_safespawn&path=[/obj/item/rcd_ammo]",
|
||||
"Spawn Airlock" = "hsbairlock",
|
||||
|
||||
"Miscellaneous",
|
||||
"Spawn Air Scrubber" = "hsbscrubber",
|
||||
"Spawn Welding Fuel Tank" = "hsbspawn&path=[/obj/structure/reagent_dispensers/fueltank]",
|
||||
"Spawn Water Tank" = "hsbspawn&path=[/obj/structure/reagent_dispensers/watertank]",
|
||||
|
||||
"Bots",
|
||||
"Spawn Cleanbot" = "hsbspawn&path=[/mob/living/simple_animal/bot/cleanbot]",
|
||||
"Spawn Floorbot" = "hsbspawn&path=[/mob/living/simple_animal/bot/floorbot]",
|
||||
"Spawn Medbot" = "hsbspawn&path=[/mob/living/simple_animal/bot/medbot]",
|
||||
|
||||
"Canisters",
|
||||
"Spawn O2 Canister" = "hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/oxygen]",
|
||||
"Spawn Air Canister" = "hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/air]")
|
||||
|
||||
|
||||
if(!hsbinfo)
|
||||
hsbinfo = "<center><b>Sandbox Panel</b></center><hr>"
|
||||
if(admin)
|
||||
hsbinfo += "<b>Administration</b><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbtobj'>Toggle Object Spawning</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbtac'>Toggle Item Spawn Panel Auto-close</a><br>"
|
||||
hsbinfo += "<b>Canister Spawning</b><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/toxins]'>Spawn Plasma Canister</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/carbon_dioxide]'>Spawn CO2 Canister</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/nitrogen]'>Spawn Nitrogen Canister</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/nitrous_oxide]'>Spawn N2O Canister</a><hr>"
|
||||
else
|
||||
hsbinfo += "<i>Some item spawning may be disabled by the administrators.</i><br>"
|
||||
hsbinfo += "<i>Only administrators may spawn dangerous canisters.</i><br>"
|
||||
for(var/T in hrefs)
|
||||
var/href = hrefs[T]
|
||||
if(href)
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=[hrefs[T]]'>[T]</a><br>"
|
||||
else
|
||||
hsbinfo += "<br><b>[T]</b><br>"
|
||||
hsbinfo += "<hr>"
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=hsbcloth'>Spawn Clothing...</a><br>"
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=hsbreag'>Spawn Reagent Container...</a><br>"
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=hsbobj'>Spawn Other Item...</a><br><br>"
|
||||
|
||||
usr << browse(hsbinfo, "window=hsbpanel")
|
||||
|
||||
/datum/hSB/Topic(href, href_list)
|
||||
if(!usr || !src || !(src.owner == usr.ckey))
|
||||
if(usr)
|
||||
usr << browse(null,"window=sandbox")
|
||||
return
|
||||
|
||||
if(href_list["hsb"])
|
||||
switch(href_list["hsb"])
|
||||
//
|
||||
// Admin: toggle spawning
|
||||
//
|
||||
if("hsbtobj")
|
||||
if(!admin) return
|
||||
if(GLOB.hsboxspawn)
|
||||
to_chat(world, "<span class='boldannounce'>Sandbox:</span> <b>\black[usr.key] has disabled object spawning!</b>")
|
||||
GLOB.hsboxspawn = FALSE
|
||||
return
|
||||
else
|
||||
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black[usr.key] has enabled object spawning!</b>")
|
||||
GLOB.hsboxspawn = TRUE
|
||||
return
|
||||
//
|
||||
// Admin: Toggle auto-close
|
||||
//
|
||||
if("hsbtac")
|
||||
if(!admin) return
|
||||
if(config.sandbox_autoclose)
|
||||
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black [usr.key] has removed the object spawn limiter.</b>")
|
||||
config.sandbox_autoclose = FALSE
|
||||
else
|
||||
to_chat(world, "<span class='danger'>Sandbox:</span> <b>\black [usr.key] has added a limiter to object spawning. The window will now auto-close after use.</b>")
|
||||
config.sandbox_autoclose = TRUE
|
||||
return
|
||||
//
|
||||
// Spacesuit with full air jetpack set as internals
|
||||
//
|
||||
if("hsbsuit")
|
||||
var/mob/living/carbon/human/P = usr
|
||||
if(!istype(P)) return
|
||||
if(P.wear_suit)
|
||||
P.wear_suit.loc = P.loc
|
||||
P.wear_suit.layer = initial(P.wear_suit.layer)
|
||||
P.wear_suit.plane = initial(P.wear_suit.plane)
|
||||
P.wear_suit = null
|
||||
P.wear_suit = new/obj/item/clothing/suit/space(P)
|
||||
P.wear_suit.layer = ABOVE_HUD_LAYER
|
||||
P.wear_suit.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_wear_suit()
|
||||
if(P.head)
|
||||
P.head.loc = P.loc
|
||||
P.head.layer = initial(P.head.layer)
|
||||
P.head.plane = initial(P.head.plane)
|
||||
P.head = null
|
||||
P.head = new/obj/item/clothing/head/helmet/space(P)
|
||||
P.head.layer = ABOVE_HUD_LAYER
|
||||
P.head.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_head()
|
||||
if(P.wear_mask)
|
||||
P.wear_mask.loc = P.loc
|
||||
P.wear_mask.layer = initial(P.wear_mask.layer)
|
||||
P.wear_mask.plane = initial(P.wear_mask.plane)
|
||||
P.wear_mask = null
|
||||
P.wear_mask = new/obj/item/clothing/mask/gas(P)
|
||||
P.wear_mask.layer = ABOVE_HUD_LAYER
|
||||
P.wear_mask.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_wear_mask()
|
||||
if(P.back)
|
||||
P.back.loc = P.loc
|
||||
P.back.layer = initial(P.back.layer)
|
||||
P.back.plane = initial(P.back.plane)
|
||||
P.back = null
|
||||
P.back = new/obj/item/tank/jetpack/oxygen(P)
|
||||
P.back.layer = ABOVE_HUD_LAYER
|
||||
P.back.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_back()
|
||||
P.internal = P.back
|
||||
P.update_internals_hud_icon(1)
|
||||
|
||||
if("hsbscrubber") // This is beyond its normal capability but this is sandbox and you spawned one, I assume you need it
|
||||
var/obj/hsb = new/obj/machinery/portable_atmospherics/scrubber{volume_rate=50*ONE_ATMOSPHERE;on=1}(usr.loc)
|
||||
hsb.update_icon() // hackish but it wasn't meant to be spawned I guess?
|
||||
|
||||
//
|
||||
// Stacked Materials
|
||||
//
|
||||
|
||||
if("hsbrglass")
|
||||
new/obj/item/stack/sheet/rglass{amount=50}(usr.loc)
|
||||
|
||||
if("hsbmetal")
|
||||
new/obj/item/stack/sheet/metal{amount=50}(usr.loc)
|
||||
|
||||
if("hsbplasteel")
|
||||
new/obj/item/stack/sheet/plasteel{amount=50}(usr.loc)
|
||||
|
||||
if("hsbglass")
|
||||
new/obj/item/stack/sheet/glass{amount=50}(usr.loc)
|
||||
|
||||
if("hsbwood")
|
||||
new/obj/item/stack/sheet/mineral/wood{amount=50}(usr.loc)
|
||||
|
||||
//
|
||||
// All access ID
|
||||
//
|
||||
if("hsbaaid")
|
||||
var/obj/item/card/id/gold/ID = new(usr.loc)
|
||||
ID.registered_name = usr.real_name
|
||||
ID.assignment = "Sandbox"
|
||||
ID.access = get_all_accesses()
|
||||
ID.update_label()
|
||||
|
||||
//
|
||||
// RCD - starts with full clip
|
||||
// Spawn check due to grief potential (destroying floors, walls, etc)
|
||||
//
|
||||
if("hsbrcd")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
new/obj/item/construction/rcd/combat(usr.loc)
|
||||
|
||||
//
|
||||
// New sandbox airlock maker
|
||||
//
|
||||
if("hsbairlock")
|
||||
new /datum/airlock_maker(usr.loc)
|
||||
|
||||
//
|
||||
// Object spawn window
|
||||
//
|
||||
|
||||
// Clothing
|
||||
if("hsbcloth")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
if(!clothinfo)
|
||||
clothinfo = "<b>Clothing</b> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
||||
var/list/all_items = subtypesof(/obj/item/clothing)
|
||||
for(var/typekey in spawn_forbidden)
|
||||
all_items -= typesof(typekey)
|
||||
for(var/O in reverseRange(all_items))
|
||||
clothinfo += "<a href='?src=\ref[src];hsb=hsb_safespawn&path=[O]'>[O]</a><br>"
|
||||
|
||||
usr << browse(clothinfo,"window=sandbox")
|
||||
|
||||
// Reagent containers
|
||||
if("hsbreag")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
if(!reaginfo)
|
||||
reaginfo = "<b>Reagent Containers</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
||||
var/list/all_items = subtypesof(/obj/item/reagent_containers)
|
||||
for(var/typekey in spawn_forbidden)
|
||||
all_items -= typesof(typekey)
|
||||
for(var/O in reverseRange(all_items))
|
||||
reaginfo += "<a href='?src=\ref[src];hsb=hsb_safespawn&path=[O]'>[O]</a><br>"
|
||||
|
||||
usr << browse(reaginfo,"window=sandbox")
|
||||
|
||||
// Other items
|
||||
if("hsbobj")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
if(!objinfo)
|
||||
objinfo = "<b>Other Items</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a><hr><br>"
|
||||
var/list/all_items = subtypesof(/obj/item/) - typesof(/obj/item/clothing) - typesof(/obj/item/reagent_containers)
|
||||
for(var/typekey in spawn_forbidden)
|
||||
all_items -= typesof(typekey)
|
||||
|
||||
for(var/O in reverseRange(all_items))
|
||||
objinfo += "<a href='?src=\ref[src];hsb=hsb_safespawn&path=[O]'>[O]</a><br>"
|
||||
|
||||
usr << browse(objinfo,"window=sandbox")
|
||||
|
||||
//
|
||||
// Safespawn checks to see if spawning is disabled.
|
||||
//
|
||||
if("hsb_safespawn")
|
||||
if(!GLOB.hsboxspawn)
|
||||
usr << browse(null,"window=sandbox")
|
||||
return
|
||||
|
||||
var/typepath = text2path(href_list["path"])
|
||||
if(!typepath)
|
||||
to_chat(usr, "Bad path: \"[href_list["path"]]\"")
|
||||
return
|
||||
new typepath(usr.loc)
|
||||
|
||||
if(config.sandbox_autoclose)
|
||||
usr << browse(null,"window=sandbox")
|
||||
//
|
||||
// For everything else in the href list
|
||||
//
|
||||
if("hsbspawn")
|
||||
var/typepath = text2path(href_list["path"])
|
||||
if(!typepath)
|
||||
to_chat(usr, "Bad path: \"[href_list["path"]]\"")
|
||||
return
|
||||
new typepath(usr.loc)
|
||||
|
||||
if(config.sandbox_autoclose)
|
||||
usr << browse(null,"window=sandbox")
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
var/global/list/hrefs = list(
|
||||
"Space Gear",
|
||||
"Suit Up (Space Travel Gear)" = "hsbsuit",
|
||||
"Spawn Gas Mask" = "hsbspawn&path=[/obj/item/clothing/mask/gas]",
|
||||
"Spawn Emergency Air Tank" = "hsbspawn&path=[/obj/item/tank/internals/emergency_oxygen/double]",
|
||||
|
||||
"Standard Tools",
|
||||
"Spawn Flashlight" = "hsbspawn&path=[/obj/item/device/flashlight]",
|
||||
"Spawn Toolbox" = "hsbspawn&path=[/obj/item/storage/toolbox/mechanical]",
|
||||
"Spawn Light Replacer" = "hsbspawn&path=[/obj/item/device/lightreplacer]",
|
||||
"Spawn Medical Kit" = "hsbspawn&path=[/obj/item/storage/firstaid/regular]",
|
||||
"Spawn All-Access ID" = "hsbaaid",
|
||||
|
||||
"Building Supplies",
|
||||
"Spawn 50 Wood" = "hsbwood",
|
||||
"Spawn 50 Metal" = "hsbmetal",
|
||||
"Spawn 50 Plasteel" = "hsbplasteel",
|
||||
"Spawn 50 Reinforced Glass" = "hsbrglass",
|
||||
"Spawn 50 Glass" = "hsbglass",
|
||||
"Spawn Full Cable Coil" = "hsbspawn&path=[/obj/item/stack/cable_coil]",
|
||||
"Spawn Hyper Capacity Power Cell" = "hsbspawn&path=[/obj/item/stock_parts/cell/hyper]",
|
||||
"Spawn Inf. Capacity Power Cell" = "hsbspawn&path=[/obj/item/stock_parts/cell/infinite]",
|
||||
"Spawn Rapid Construction Device" = "hsbrcd",
|
||||
"Spawn RCD Ammo" = "hsb_safespawn&path=[/obj/item/rcd_ammo]",
|
||||
"Spawn Airlock" = "hsbairlock",
|
||||
|
||||
"Miscellaneous",
|
||||
"Spawn Air Scrubber" = "hsbscrubber",
|
||||
"Spawn Welding Fuel Tank" = "hsbspawn&path=[/obj/structure/reagent_dispensers/fueltank]",
|
||||
"Spawn Water Tank" = "hsbspawn&path=[/obj/structure/reagent_dispensers/watertank]",
|
||||
|
||||
"Bots",
|
||||
"Spawn Cleanbot" = "hsbspawn&path=[/mob/living/simple_animal/bot/cleanbot]",
|
||||
"Spawn Floorbot" = "hsbspawn&path=[/mob/living/simple_animal/bot/floorbot]",
|
||||
"Spawn Medbot" = "hsbspawn&path=[/mob/living/simple_animal/bot/medbot]",
|
||||
|
||||
"Canisters",
|
||||
"Spawn O2 Canister" = "hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/oxygen]",
|
||||
"Spawn Air Canister" = "hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/air]")
|
||||
|
||||
|
||||
if(!hsbinfo)
|
||||
hsbinfo = "<center><b>Sandbox Panel</b></center><hr>"
|
||||
if(admin)
|
||||
hsbinfo += "<b>Administration</b><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbtobj'>Toggle Object Spawning</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbtac'>Toggle Item Spawn Panel Auto-close</a><br>"
|
||||
hsbinfo += "<b>Canister Spawning</b><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/toxins]'>Spawn Plasma Canister</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/carbon_dioxide]'>Spawn CO2 Canister</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/nitrogen]'>Spawn Nitrogen Canister</a><br>"
|
||||
hsbinfo += "- <a href='?src=\ref[src];hsb=hsbspawn&path=[/obj/machinery/portable_atmospherics/canister/nitrous_oxide]'>Spawn N2O Canister</a><hr>"
|
||||
else
|
||||
hsbinfo += "<i>Some item spawning may be disabled by the administrators.</i><br>"
|
||||
hsbinfo += "<i>Only administrators may spawn dangerous canisters.</i><br>"
|
||||
for(var/T in hrefs)
|
||||
var/href = hrefs[T]
|
||||
if(href)
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=[hrefs[T]]'>[T]</a><br>"
|
||||
else
|
||||
hsbinfo += "<br><b>[T]</b><br>"
|
||||
hsbinfo += "<hr>"
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=hsbcloth'>Spawn Clothing...</a><br>"
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=hsbreag'>Spawn Reagent Container...</a><br>"
|
||||
hsbinfo += "- <a href='?\ref[src];hsb=hsbobj'>Spawn Other Item...</a><br><br>"
|
||||
|
||||
usr << browse(hsbinfo, "window=hsbpanel")
|
||||
|
||||
/datum/hSB/Topic(href, href_list)
|
||||
if(!usr || !src || !(src.owner == usr.ckey))
|
||||
if(usr)
|
||||
usr << browse(null,"window=sandbox")
|
||||
return
|
||||
|
||||
if(href_list["hsb"])
|
||||
switch(href_list["hsb"])
|
||||
//
|
||||
// Admin: toggle spawning
|
||||
//
|
||||
if("hsbtobj")
|
||||
if(!admin) return
|
||||
if(GLOB.hsboxspawn)
|
||||
to_chat(world, "<span class='boldannounce'>Sandbox:</span> <b>\black[usr.key] has disabled object spawning!</b>")
|
||||
GLOB.hsboxspawn = FALSE
|
||||
return
|
||||
else
|
||||
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black[usr.key] has enabled object spawning!</b>")
|
||||
GLOB.hsboxspawn = TRUE
|
||||
return
|
||||
//
|
||||
// Admin: Toggle auto-close
|
||||
//
|
||||
if("hsbtac")
|
||||
if(!admin) return
|
||||
var/sbac = CONFIG_GET(flag/sandbox_autoclose)
|
||||
if(sbac)
|
||||
to_chat(world, "<span class='boldnotice'>Sandbox:</span> <b>\black [usr.key] has removed the object spawn limiter.</b>")
|
||||
else
|
||||
to_chat(world, "<span class='danger'>Sandbox:</span> <b>\black [usr.key] has added a limiter to object spawning. The window will now auto-close after use.</b>")
|
||||
CONFIG_SET(flag/sandbox_autoclose, !sbac)
|
||||
return
|
||||
//
|
||||
// Spacesuit with full air jetpack set as internals
|
||||
//
|
||||
if("hsbsuit")
|
||||
var/mob/living/carbon/human/P = usr
|
||||
if(!istype(P)) return
|
||||
if(P.wear_suit)
|
||||
P.wear_suit.forceMove(P.drop_location())
|
||||
P.wear_suit.layer = initial(P.wear_suit.layer)
|
||||
P.wear_suit.plane = initial(P.wear_suit.plane)
|
||||
P.wear_suit = null
|
||||
P.wear_suit = new/obj/item/clothing/suit/space(P)
|
||||
P.wear_suit.layer = ABOVE_HUD_LAYER
|
||||
P.wear_suit.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_wear_suit()
|
||||
if(P.head)
|
||||
P.head.forceMove(P.drop_location())
|
||||
P.head.layer = initial(P.head.layer)
|
||||
P.head.plane = initial(P.head.plane)
|
||||
P.head = null
|
||||
P.head = new/obj/item/clothing/head/helmet/space(P)
|
||||
P.head.layer = ABOVE_HUD_LAYER
|
||||
P.head.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_head()
|
||||
if(P.wear_mask)
|
||||
P.wear_mask.forceMove(P.drop_location())
|
||||
P.wear_mask.layer = initial(P.wear_mask.layer)
|
||||
P.wear_mask.plane = initial(P.wear_mask.plane)
|
||||
P.wear_mask = null
|
||||
P.wear_mask = new/obj/item/clothing/mask/gas(P)
|
||||
P.wear_mask.layer = ABOVE_HUD_LAYER
|
||||
P.wear_mask.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_wear_mask()
|
||||
if(P.back)
|
||||
P.back.forceMove(P.drop_location())
|
||||
P.back.layer = initial(P.back.layer)
|
||||
P.back.plane = initial(P.back.plane)
|
||||
P.back = null
|
||||
P.back = new/obj/item/tank/jetpack/oxygen(P)
|
||||
P.back.layer = ABOVE_HUD_LAYER
|
||||
P.back.plane = ABOVE_HUD_PLANE
|
||||
P.update_inv_back()
|
||||
P.internal = P.back
|
||||
P.update_internals_hud_icon(1)
|
||||
|
||||
if("hsbscrubber") // This is beyond its normal capability but this is sandbox and you spawned one, I assume you need it
|
||||
var/obj/hsb = new/obj/machinery/portable_atmospherics/scrubber{volume_rate=50*ONE_ATMOSPHERE;on=1}(usr.loc)
|
||||
hsb.update_icon() // hackish but it wasn't meant to be spawned I guess?
|
||||
|
||||
//
|
||||
// Stacked Materials
|
||||
//
|
||||
|
||||
if("hsbrglass")
|
||||
new/obj/item/stack/sheet/rglass{amount=50}(usr.loc)
|
||||
|
||||
if("hsbmetal")
|
||||
new/obj/item/stack/sheet/metal{amount=50}(usr.loc)
|
||||
|
||||
if("hsbplasteel")
|
||||
new/obj/item/stack/sheet/plasteel{amount=50}(usr.loc)
|
||||
|
||||
if("hsbglass")
|
||||
new/obj/item/stack/sheet/glass{amount=50}(usr.loc)
|
||||
|
||||
if("hsbwood")
|
||||
new/obj/item/stack/sheet/mineral/wood{amount=50}(usr.loc)
|
||||
|
||||
//
|
||||
// All access ID
|
||||
//
|
||||
if("hsbaaid")
|
||||
var/obj/item/card/id/gold/ID = new(usr.loc)
|
||||
ID.registered_name = usr.real_name
|
||||
ID.assignment = "Sandbox"
|
||||
ID.access = get_all_accesses()
|
||||
ID.update_label()
|
||||
|
||||
//
|
||||
// RCD - starts with full clip
|
||||
// Spawn check due to grief potential (destroying floors, walls, etc)
|
||||
//
|
||||
if("hsbrcd")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
new/obj/item/construction/rcd/combat(usr.loc)
|
||||
|
||||
//
|
||||
// New sandbox airlock maker
|
||||
//
|
||||
if("hsbairlock")
|
||||
new /datum/airlock_maker(usr.loc)
|
||||
|
||||
//
|
||||
// Object spawn window
|
||||
//
|
||||
|
||||
// Clothing
|
||||
if("hsbcloth")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
if(!clothinfo)
|
||||
clothinfo = "<b>Clothing</b> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
||||
var/list/all_items = subtypesof(/obj/item/clothing)
|
||||
for(var/typekey in spawn_forbidden)
|
||||
all_items -= typesof(typekey)
|
||||
for(var/O in reverseRange(all_items))
|
||||
clothinfo += "<a href='?src=\ref[src];hsb=hsb_safespawn&path=[O]'>[O]</a><br>"
|
||||
|
||||
usr << browse(clothinfo,"window=sandbox")
|
||||
|
||||
// Reagent containers
|
||||
if("hsbreag")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
if(!reaginfo)
|
||||
reaginfo = "<b>Reagent Containers</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbobj'>(Other Items)</a><hr><br>"
|
||||
var/list/all_items = subtypesof(/obj/item/reagent_containers)
|
||||
for(var/typekey in spawn_forbidden)
|
||||
all_items -= typesof(typekey)
|
||||
for(var/O in reverseRange(all_items))
|
||||
reaginfo += "<a href='?src=\ref[src];hsb=hsb_safespawn&path=[O]'>[O]</a><br>"
|
||||
|
||||
usr << browse(reaginfo,"window=sandbox")
|
||||
|
||||
// Other items
|
||||
if("hsbobj")
|
||||
if(!GLOB.hsboxspawn) return
|
||||
|
||||
if(!objinfo)
|
||||
objinfo = "<b>Other Items</b> <a href='?\ref[src];hsb=hsbcloth'>(Clothing)</a> <a href='?\ref[src];hsb=hsbreag'>(Reagent Containers)</a><hr><br>"
|
||||
var/list/all_items = subtypesof(/obj/item/) - typesof(/obj/item/clothing) - typesof(/obj/item/reagent_containers)
|
||||
for(var/typekey in spawn_forbidden)
|
||||
all_items -= typesof(typekey)
|
||||
|
||||
for(var/O in reverseRange(all_items))
|
||||
objinfo += "<a href='?src=\ref[src];hsb=hsb_safespawn&path=[O]'>[O]</a><br>"
|
||||
|
||||
usr << browse(objinfo,"window=sandbox")
|
||||
|
||||
//
|
||||
// Safespawn checks to see if spawning is disabled.
|
||||
//
|
||||
if("hsb_safespawn")
|
||||
if(!GLOB.hsboxspawn)
|
||||
usr << browse(null,"window=sandbox")
|
||||
return
|
||||
|
||||
var/typepath = text2path(href_list["path"])
|
||||
if(!typepath)
|
||||
to_chat(usr, "Bad path: \"[href_list["path"]]\"")
|
||||
return
|
||||
new typepath(usr.loc)
|
||||
|
||||
if(CONFIG_GET(flag/sandbox_autoclose))
|
||||
usr << browse(null,"window=sandbox")
|
||||
//
|
||||
// For everything else in the href list
|
||||
//
|
||||
if("hsbspawn")
|
||||
var/typepath = text2path(href_list["path"])
|
||||
if(!typepath)
|
||||
to_chat(usr, "Bad path: \"[href_list["path"]]\"")
|
||||
return
|
||||
new typepath(usr.loc)
|
||||
|
||||
if(CONFIG_GET(flag/sandbox_autoclose))
|
||||
usr << browse(null,"window=sandbox")
|
||||
|
||||
@@ -31,16 +31,17 @@
|
||||
|
||||
/datum/game_mode/traitor/pre_setup()
|
||||
|
||||
if(config.protect_roles_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
|
||||
if(config.protect_assistant_from_antagonist)
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
restricted_jobs += "Assistant"
|
||||
|
||||
var/num_traitors = 1
|
||||
|
||||
if(config.traitor_scaling_coeff)
|
||||
num_traitors = max(1, min( round(num_players()/(config.traitor_scaling_coeff*2))+ 2 + num_modifier, round(num_players()/(config.traitor_scaling_coeff)) + num_modifier ))
|
||||
var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
|
||||
if(tsc)
|
||||
num_traitors = max(1, min(round(num_players() / (tsc * 2)) + 2 + num_modifier, round(num_players() / tsc) + num_modifier))
|
||||
else
|
||||
num_traitors = max(1, min(num_players(), traitors_possible))
|
||||
|
||||
@@ -68,10 +69,11 @@
|
||||
return 1
|
||||
|
||||
/datum/game_mode/traitor/make_antag_chance(mob/living/carbon/human/character) //Assigns traitor to latejoiners
|
||||
var/traitorcap = min(round(GLOB.joined_player_list.len / (config.traitor_scaling_coeff * 2)) + 2 + num_modifier, round(GLOB.joined_player_list.len/config.traitor_scaling_coeff) + num_modifier )
|
||||
var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
|
||||
var/traitorcap = min(round(GLOB.joined_player_list.len / (tsc * 2)) + 2 + num_modifier, round(GLOB.joined_player_list.len / tsc) + num_modifier)
|
||||
if((SSticker.mode.traitors.len + pre_traitors.len) >= traitorcap) //Upper cap for number of latejoin antagonists
|
||||
return
|
||||
if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (config.traitor_scaling_coeff * 2)))
|
||||
if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (tsc * 2)))
|
||||
if(ROLE_TRAITOR in character.client.prefs.be_special)
|
||||
if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate"))
|
||||
if(age_check(character.client))
|
||||
|
||||
@@ -234,11 +234,10 @@
|
||||
|
||||
if(!link)
|
||||
if(I.loc == user && istype(I) && I.w_class <= WEIGHT_CLASS_SMALL)
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
link = I
|
||||
to_chat(user, "You attach [I] to the doll.")
|
||||
update_targets()
|
||||
if (user.transferItemToLoc(I,src))
|
||||
link = I
|
||||
to_chat(user, "You attach [I] to the doll.")
|
||||
update_targets()
|
||||
|
||||
/obj/item/voodoo/check_eye(mob/user)
|
||||
if(loc != user)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
if(contents.len)
|
||||
to_chat(user, "<span class='userdanger'>Capture failed!</span>: The soulstone is full! Free an existing soul to make room.")
|
||||
else
|
||||
T.loc = src //put shade in stone
|
||||
T.forceMove(src) //put shade in stone
|
||||
T.status_flags |= GODMODE
|
||||
T.canmove = 0
|
||||
T.health = T.maxHealth
|
||||
|
||||
@@ -478,7 +478,7 @@
|
||||
/datum/spellbook_entry/summon/guns/IsAvailible()
|
||||
if(!SSticker.mode) // In case spellbook is placed on map
|
||||
return 0
|
||||
return (!config.no_summon_guns)
|
||||
return !CONFIG_GET(flag/no_summon_guns)
|
||||
|
||||
/datum/spellbook_entry/summon/guns/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
|
||||
SSblackbox.add_details("wizard_spell_learned", name)
|
||||
@@ -495,7 +495,7 @@
|
||||
/datum/spellbook_entry/summon/magic/IsAvailible()
|
||||
if(!SSticker.mode) // In case spellbook is placed on map
|
||||
return 0
|
||||
return (!config.no_summon_magic)
|
||||
return !CONFIG_GET(flag/no_summon_magic)
|
||||
|
||||
/datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
|
||||
SSblackbox.add_details("wizard_spell_learned", name)
|
||||
@@ -513,7 +513,7 @@
|
||||
/datum/spellbook_entry/summon/events/IsAvailible()
|
||||
if(!SSticker.mode) // In case spellbook is placed on map
|
||||
return 0
|
||||
return (!config.no_summon_events)
|
||||
return !CONFIG_GET(flag/no_summon_events)
|
||||
|
||||
/datum/spellbook_entry/summon/events/Buy(mob/living/carbon/human/user,obj/item/spellbook/book)
|
||||
SSblackbox.add_details("wizard_spell_learned", name)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
to_chat(wizard.current, "<span class='boldannounce'>A starting location for you could not be found, please report this bug!</span>")
|
||||
return 0
|
||||
for(var/datum/mind/wiz in wizards)
|
||||
wiz.current.loc = pick(GLOB.wizardstart)
|
||||
wiz.current.forceMove(pick(GLOB.wizardstart))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user