Game folder

This commit is contained in:
Poojawa
2018-09-11 04:06:45 -05:00
parent b6430559e9
commit 8b9ef1e400
270 changed files with 3120 additions and 2523 deletions
+6 -4
View File
@@ -4,11 +4,11 @@ GLOBAL_VAR_INIT(servants_active, FALSE) //This var controls whether or not a lot
CLOCKWORK CULT: Based off of the failed pull requests from /vg/
While Nar-Sie is the oldest and most prominent of the elder gods, there are other forces at work in the universe.
Ratvar, the Clockwork Justiciar, a homage to Nar-Sie granted sentience by its own power, is one such other force.
While Nar'Sie is the oldest and most prominent of the elder gods, there are other forces at work in the universe.
Ratvar, the Clockwork Justiciar, a homage to Nar'Sie granted sentience by its own power, is one such other force.
Imprisoned within a massive construct known as the Celestial Derelict - or Reebe - an intense hatred of the Blood God festers.
Ratvar, unable to act in the mortal plane, seeks to return and forms covenants with mortals in order to bolster his influence.
Due to his mechanical nature, Ratvar is also capable of influencing silicon-based lifeforms, unlike Nar-Sie, who can only influence natural life.
Due to his mechanical nature, Ratvar is also capable of influencing silicon-based lifeforms, unlike Nar'Sie, who can only influence natural life.
This is a team-based gamemode, and the team's objective is shared by all cultists. Their goal is to defend an object called the Ark on a separate z-level.
@@ -148,11 +148,13 @@ Credit where due:
/datum/game_mode/clockwork_cult/pre_setup()
var/list/errorList = list()
SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
if(errorList.len) // reebe failed to load
message_admins("Reebe failed to load!")
log_game("Reebe failed to load!")
return FALSE
for(var/datum/parsed_map/PM in reebes)
PM.initTemplateBounds()
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs += protected_jobs
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
@@ -74,7 +74,7 @@
. = ..()
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
GET_COMPONENT(slipper, /datum/component/slippery)
slipper.enabled = active
slipper.signal_enabled = active
/obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user)
..()
@@ -99,7 +99,7 @@
/obj/item/melee/transforming/energy/sword/bananium/transform_weapon(mob/living/user, supress_message_text)
..()
GET_COMPONENT(slipper, /datum/component/slippery)
slipper.enabled = active
slipper.signal_enabled = active
/obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user)
return ""
@@ -131,12 +131,12 @@
. = ..()
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
GET_COMPONENT(slipper, /datum/component/slippery)
slipper.enabled = active
slipper.signal_enabled = active
/obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user)
..()
GET_COMPONENT(slipper, /datum/component/slippery)
slipper.enabled = active
slipper.signal_enabled = active
/obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1)
if(active)
+3 -3
View File
@@ -43,8 +43,8 @@
enemy_minimum_age = 14
announce_span = "cult"
announce_text = "Some crew members are trying to start a cult to Nar-Sie!\n\
<span class='cult'>Cultists</span>: Carry out Nar-Sie's will.\n\
announce_text = "Some crew members are trying to start a cult to Nar'Sie!\n\
<span class='cult'>Cultists</span>: Carry out Nar'Sie's will.\n\
<span class='notice'>Crew</span>: Prevent the cult from expanding and drive it out."
var/finished = 0
@@ -158,7 +158,7 @@
/datum/game_mode/cult/generate_report()
return "Some stations in your sector have reported evidence of blood sacrifice and strange magic. Ties to the Wizards' Federation have been proven not to exist, and many employees \
have disappeared; even Central Command employees light-years away have felt strange presences and at times hysterical compulsions. Interrogations point towards this being the work of \
the cult of Nar-Sie. If evidence of this cult is discovered aboard your station, extreme caution and extreme vigilance must be taken going forward, and all resources should be \
the cult of Nar'Sie. If evidence of this cult is discovered aboard your station, extreme caution and extreme vigilance must be taken going forward, and all resources should be \
devoted to stopping this cult. Note that holy water seems to weaken and eventually return the minds of cultists that ingest it, and mindshield implants will prevent conversion \
altogether."
+6 -7
View File
@@ -47,9 +47,8 @@
var/allow_persistence_save = TRUE
var/gamemode_ready = FALSE //Is the gamemode all set up and ready to start checking for ending conditions.
var/flipseclevel = FALSE //CIT CHANGE - adds a 10% chance for the alert level to be the opposite of what the gamemode is supposed to have
var/setup_error //What stopepd setting up the mode.
var/flipseclevel = FALSE //CIT CHANGE - adds a 10% chance for the alert level to be the opposite of what the gamemode is supposed to have
/datum/game_mode/proc/announce() //Shows the gamemode's name and a fast description.
to_chat(world, "<b>The gamemode is: <span class='[announce_span]'>[name]</span>!</b>")
@@ -87,7 +86,6 @@
if(prob(20)) //CIT CHANGE - adds a 20% chance for the security level to be the opposite of what it normally is
flipseclevel = TRUE
if(SSdbcore.Connect())
var/sql
if(SSticker.mode)
@@ -181,12 +179,13 @@
round_converted = 0
return
//somewhere between 1 and 3 minutes from now
if(!CONFIG_GET(keyed_flag_list/midround_antag)[SSticker.mode.config_tag])
if(!CONFIG_GET(keyed_list/midround_antag)[SSticker.mode.config_tag])
round_converted = 0
return 1
for(var/mob/living/carbon/human/H in antag_candidates)
if(H.client)
replacementmode.make_antag_chance(H)
replacementmode.gamemode_ready = TRUE //Awful but we're not doing standard setup here.
round_converted = 2
message_admins("-- IMPORTANT: The roundtype has been converted to [replacementmode.name], antagonists may have been created! --")
@@ -209,8 +208,8 @@
return TRUE
if(station_was_nuked)
return TRUE
var/list/continuous = CONFIG_GET(keyed_flag_list/continuous)
var/list/midround_antag = CONFIG_GET(keyed_flag_list/midround_antag)
var/list/continuous = CONFIG_GET(keyed_list/continuous)
var/list/midround_antag = CONFIG_GET(keyed_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)
@@ -226,7 +225,7 @@
return 0
if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player))
if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player) && (living_antag_player.mind.special_role || LAZYLEN(living_antag_player.mind.antag_datums)))
return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
for(var/mob/Player in GLOB.alive_mob_list)
+3 -3
View File
@@ -132,7 +132,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
timerid = QDEL_IN(src, lifetime)
chase_target(target)
/obj/effect/meteor/Collide(atom/A)
/obj/effect/meteor/Bump(atom/A)
if(A)
ram_turf(get_turf(A))
playsound(src.loc, meteorsound, 40, 1)
@@ -301,7 +301,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
if(!isspaceturf(T))
new /obj/effect/decal/cleanable/blood(T)
/obj/effect/meteor/meaty/Collide(atom/A)
/obj/effect/meteor/meaty/Bump(atom/A)
A.ex_act(hitpwr)
get_hit()
@@ -340,7 +340,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
..()
explosion(src.loc, 5, 10, 15, 20, 0)
/obj/effect/meteor/tunguska/Collide()
/obj/effect/meteor/tunguska/Bump()
..()
if(prob(20))
explosion(src.loc,2,4,6,8)
+6 -10
View File
@@ -64,17 +64,13 @@
return FALSE
return TRUE
/datum/game_mode/nuclear/check_finished() //to be called by SSticker
if(replacementmode && round_converted == 2)
return replacementmode.check_finished()
if((SSshuttle.emergency.mode == SHUTTLE_ENDGAME) || station_was_nuked)
return TRUE
/datum/game_mode/nuclear/check_finished()
//Keep the round going if ops are dead but bomb is ticking.
if(nuke_team.operatives_dead())
var/obj/machinery/nuclearbomb/N
pass(N) //suppress unused warning
if(N.bomb_set) //snaaaaaaaaaake! It's not over yet!
return FALSE //its a static var btw
..()
for(var/obj/machinery/nuclearbomb/N in GLOB.nuke_list)
if(N.proper_bomb && (N.timing || N.exploding))
return FALSE
return ..()
/datum/game_mode/nuclear/set_round_result()
..()
+5 -3
View File
@@ -25,12 +25,14 @@ GLOBAL_LIST_EMPTY(objectives)
/datum/objective/proc/considered_escaped(datum/mind/M)
if(!considered_alive(M))
return FALSE
if(M.force_escaped)
return TRUE
if(SSticker.force_ending || SSticker.mode.station_was_nuked) // Just let them win.
return TRUE
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
return FALSE
var/turf/location = get_turf(M.current)
if(!location || istype(location, /turf/open/floor/plasteel/shuttle/red) || istype(location, /turf/open/floor/mineral/plastitanium/brig)) // Fails if they are in the shuttle brig
if(!location || istype(location, /turf/open/floor/plasteel/shuttle/red) || istype(location, /turf/open/floor/mineral/plastitanium/red/brig)) // Fails if they are in the shuttle brig
return FALSE
return location.onCentCom() || location.onSyndieBase()
@@ -161,7 +163,7 @@ GLOBAL_LIST_EMPTY(objectives)
if(!target || !considered_alive(target) || considered_afk(target))
return TRUE
var/turf/T = get_turf(target.current)
return T && !is_station_level(T.z)
return !T || !is_station_level(T.z)
/datum/objective/mutiny/update_explanation_text()
..()
@@ -546,7 +548,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
var/captured_amount = 0
var/area/centcom/holding/A = locate() in GLOB.sortedAreas
var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding]
for(var/mob/living/carbon/human/M in A)//Humans.
if(M.stat == DEAD)//Dead folks are worth less.
captured_amount+=0.5
+152
View File
@@ -0,0 +1,152 @@
// This is a point based objective. You can only lose if you fail to even handle one single command personnel, else you win. But, if you win, you're given a certain number of points,
// based on the role of the head (Captain, HoP/HoS, other heads, warden, security officers) and whether you converted them, exiled or just killed (applying a modifier of 1.5, 1 and 0.5 respectively)
// because this is meant for the overthrow gamemode, which is a bloodless coup, unlike revs.
// Point system:
// Base points for each role:
// AI, Captain = 5;
// Head of Personnel, Head of Security, target = 4;
// Chief Engineer, Chief Medical Officer, Research Director = 3;
// Modifiers:
// Converting: 1.5 for the converting team, 1 for all the other ones;
// Exiling: 1;
// Killing: 0.5
#define CAPPTS 5
#define AIPTS 5
#define HOPPTS 4
#define HOSPTS 4
#define TARGETPTS 4
#define CEPTS 3
#define CMOPTS 3
#define RDPTS 3
#define CONVERTED_OURS 1.5
#define CONVERTED 1
#define EXILED 1
#define KILLED 0.5
// Parent type holding the get_points proc used for round end log.
/datum/objective/overthrow
/datum/objective/overthrow/check_completion()
return get_points() ? TRUE : FALSE
/datum/objective/overthrow/proc/get_points()
return 0 // int, not bool
/datum/objective/overthrow/proc/result_points(datum/mind/the_dude, base_points) // App
var/initial_points = base_points
if(the_dude)
var/datum/antagonist/overthrow/O = the_dude.has_antag_datum(/datum/antagonist/overthrow)
if(!the_dude.current || the_dude.current.stat == DEAD)
initial_points *= KILLED
else if(!is_station_level(the_dude.current.z) && !is_centcom_level(the_dude.current.z)) // exiled.
initial_points *= EXILED
else if(O)
initial_points *= CONVERTED
if(team == O.team)
initial_points *= CONVERTED_OURS
else
initial_points = 0
else
initial_points = 0
return initial_points
// Heads overthrow objective. This targets the heads only, assigning points based on the rank of the head, captain being the highest target.
/datum/objective/overthrow/heads
var/list/targets = list() // We want one objective for all the heads, instead of 1 objective per head like how it's done for revs, because you don't lose if you get atleast one head.
// Also, this is an associative list, target = role. Modifiers (defines) are applied on points calculation at round end.
/datum/objective/overthrow/heads/proc/find_targets()
var/list/datum/mind/owners = get_owners()
for(var/datum/mind/possible_target in get_crewmember_minds()) // i would use SSjob.get_all_heads() but jesus christ that proc's shit, i ain't using it
if(!(possible_target in owners) && ishuman(possible_target.current))
if(possible_target.assigned_role in GLOB.command_positions)
targets[possible_target] = possible_target.assigned_role
update_explanation_text()
/datum/objective/overthrow/heads/update_explanation_text()
if(targets.len)
explanation_text = "Work with your team to convert, exile or kill "
explanation_text += english_list(targets)
explanation_text += ". Converting to your team will give you more points, whereas killing will give you the least. Syndicates don't want to stir up too many troubles."
else
explanation_text = "Wait until any heads arrive. Once that happens, check your objectives again to see the updated objective. It may require around [OBJECTIVE_UPDATING_TIME] seconds to update."
/datum/objective/overthrow/heads/check_completion()
if(!targets.len)
return TRUE
. = ..()
// Amount of points = foreach head, result += head basepoints * modifier.
/datum/objective/overthrow/heads/get_points()
var/base_points = 0
for(var/i in targets)
var/datum/mind/M = i
if(M)
var/target_points
var/role = targets[M]
switch(role)
if("Captain")
target_points = CAPPTS
if("Head of Personnel")
target_points = HOPPTS
if("Head of Security")
target_points = HOSPTS
if("Chief Engineer")
target_points = CEPTS
if("Research Director")
target_points = RDPTS
if("Chief Medical Officer")
target_points = CMOPTS
base_points += result_points(M, target_points)
return base_points
// AI converting objective. The team who managed to convert the AI with the overthrow module gets the normal 1.5x boost.
/datum/objective/overthrow/AI
explanation_text = "Enslave the AIs to your team using the special AI module board in your storage implant. It is required you use said module."
/datum/objective/overthrow/AI/get_points() // If you simply kill the Ai you get nothing, you need it to overthrow the heads.
. = 0 // Support for multiple AIs. More AIs means more control over the station.
for(var/i in GLOB.ai_list)
var/mob/living/silicon/ai/AI = i
if(AI.mind)
var/datum/mind/M = AI.mind
var/datum/antagonist/overthrow/O = M.has_antag_datum(/datum/antagonist/overthrow)
if(M)
. += (O.team == team) ? AIPTS*CONVERTED_OURS : AIPTS
/datum/objective/overthrow/AI/update_explanation_text()
if(!GLOB.ai_list.len)
explanation_text = "Nothing."
else
explanation_text = "Enslave the AIs to your team using the special AI module board in your storage implant. It is required you use said module."
/datum/objective/overthrow/AI/check_completion()
if(!GLOB.ai_list.len)
return TRUE
. = ..()
// Overthrow target objective. A crewmember in particular has a certain bond with some centcom officials, and the Syndicate want you to target him in particular, even though he's not a head.
/datum/objective/overthrow/target
/datum/objective/overthrow/target/update_explanation_text()
if(target)
explanation_text = "Work with your team to convert, exile or kill [target.name], the [target.assigned_role]. Converting to your team will give you more points, whereas killing will give you the least. Syndicates don't want to stir up too many troubles."
else
explanation_text = "Nothing."
/datum/objective/overthrow/target/is_unique_objective(datum/mind/possible_target)
if(possible_target.assigned_role in GLOB.command_positions)
return FALSE
return TRUE
/datum/objective/overthrow/target/check_completion()
if(!target)
return TRUE
. = ..()
/datum/objective/overthrow/target/get_points()
return result_points(target, TARGETPTS)
@@ -0,0 +1,76 @@
// Overthrow gamemode, based on the sleeping agent antagonist.
/datum/game_mode/overthrow
name = "overthrow"
config_tag = "overthrow"
antag_flag = ROLE_OVERTHROW
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
required_players = 20 // the core idea is of a swift, bloodless coup, so it shouldn't be as chaotic as revs.
required_enemies = 2 // minimum two teams, otherwise it's just nerfed revs.
recommended_enemies = 4
announce_span = "danger"
announce_text = "There are sleeping Syndicate agents on the station who are trying to stage a coup!\n\
<span class='danger'>Agents</span>: Accomplish your objectives, convert heads and targets, take control of the AI.\n\
<span class='notice'>Crew</span>: Do not let the agents succeed!"
var/list/initial_agents = list() // Why doesn't this exist at /game_mode level? Literally every gamemode has some sort of version for this, what the fuck
/datum/game_mode/overthrow/pre_setup()
if(CONFIG_GET(flag/protect_roles_from_antagonist))
restricted_jobs += protected_jobs
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
restricted_jobs += "Assistant"
var/sleeping_agents = required_enemies + round(num_players()*0.05) // At 100 players, it'd be 2 + 5 = 7 teams existing.
for (var/i in 1 to sleeping_agents)
if (!antag_candidates.len)
break
var/datum/mind/sleeping_agent = antag_pick(antag_candidates)
antag_candidates -= sleeping_agent
initial_agents += sleeping_agent
sleeping_agent.restricted_roles = restricted_jobs
sleeping_agent.special_role = ROLE_OVERTHROW
if(initial_agents.len < required_enemies)
setup_error = "Not enough initial sleeping agents candidates"
return FALSE
return TRUE
/datum/game_mode/overthrow/post_setup()
for(var/i in initial_agents) // each agent will have its own team.
var/datum/mind/agent = i
var/datum/antagonist/overthrow/O = agent.add_antag_datum(/datum/antagonist/overthrow) // create_team called on_gain will create the team
O.equip_initial_overthrow_agent()
return ..()
/datum/game_mode/overthrow/generate_report()
return "Some sleeping agents have managed to get aboard. Their objective is to stage a coup and take over the station stealthly."
// Calculates points for each team and displays the winners.
/datum/game_mode/overthrow/special_report() // so many for loops, I am deeply sorry
var/list/teams = list()
for(var/datum/antagonist/overthrow/I in GLOB.antagonists)
var/datum/team/overthrow/Oteam = I.team
if(istype(Oteam)) // same
teams |= Oteam
var/max_points = 0 // the maximum amount of points reached
for(var/j in teams)
var/datum/team/T = j
var/points = 0 // Sum of points of all the objectives done
for(var/k in T.objectives)
var/datum/objective/overthrow/obj = k
if(istype(obj))
points += obj.get_points()
if(max_points < points)
max_points = points
teams[T] = points
// Now we will have a list of team=points and a max_points var. Let's fetch all the teams with points=maxpoints and display them as winner. This code allows multiple teams to win if they both achieved
// the same amount of points and they got the most points out of all the teams.
var/list/winners = list()
for(var/l in teams)
var/datum/team/Tagain = l
if(teams[Tagain] == max_points)
winners += Tagain.name
return "<span class='greentext big'>The [english_list(winners)] team[winners.len > 1 ? "s tied" : " won"] with [max_points] points!</span>"
+1 -1
View File
@@ -133,7 +133,7 @@
//Checks if the round is over//
///////////////////////////////
/datum/game_mode/revolution/check_finished()
if(CONFIG_GET(keyed_flag_list/continuous)["revolution"])
if(CONFIG_GET(keyed_list/continuous)["revolution"])
if(finished)
SSshuttle.clearHostileEnvironment(src)
return ..()
+2 -1
View File
@@ -11,6 +11,7 @@
recommended_enemies = 8
reroll_friendly = 0
traitor_name = "Nanotrasen Internal Affairs Agent"
antag_flag = ROLE_INTERNAL_AFFAIRS
traitors_possible = 10 //hard limit on traitors if scaling is turned off
num_modifier = 4 // Four additional traitors
@@ -28,7 +29,7 @@
i++
if(i + 1 > pre_traitors.len)
i = 0
target_list[traitor] = pre_traitors[i+1]
target_list[traitor] = pre_traitors[i+1]
..()
+1 -1
View File
@@ -84,7 +84,7 @@
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 / (tsc * 2)))
if(ROLE_TRAITOR in character.client.prefs.be_special)
if(antag_flag in character.client.prefs.be_special)
if(!jobban_isbanned(character, ROLE_TRAITOR) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character))
if(age_check(character.client))
if(!(character.job in restricted_jobs))