April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
/obj/machinery/dominator/New()
|
||||
..()
|
||||
set_light(2)
|
||||
poi_list |= src
|
||||
GLOB.poi_list |= src
|
||||
spark_system = new
|
||||
spark_system.set_up(5, 1, src)
|
||||
countdown = new(src)
|
||||
@@ -54,12 +54,12 @@
|
||||
warned = 1
|
||||
var/area/domloc = get_area(loc)
|
||||
gang.message_gangtools("Less than 3 minutes remains in hostile takeover. Defend your dominator at [domloc.map_name]!")
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(G != gang)
|
||||
G.message_gangtools("WARNING: [gang.name] Gang takeover imminent. Their dominator at [domloc.map_name] must be destroyed!",1,1)
|
||||
|
||||
if(!.)
|
||||
STOP_PROCESSING(SSmachine, src)
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
|
||||
/obj/machinery/dominator/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
@@ -102,7 +102,7 @@
|
||||
gang.is_dominating = FALSE
|
||||
|
||||
var/takeover_in_progress = 0
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(G.is_dominating)
|
||||
takeover_in_progress = 1
|
||||
break
|
||||
@@ -122,17 +122,17 @@
|
||||
cut_overlays()
|
||||
operating = 0
|
||||
stat |= BROKEN
|
||||
STOP_PROCESSING(SSmachine, src)
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
|
||||
/obj/machinery/dominator/Destroy()
|
||||
if(!(stat & BROKEN))
|
||||
set_broken()
|
||||
poi_list.Remove(src)
|
||||
GLOB.poi_list.Remove(src)
|
||||
gang = null
|
||||
qdel(spark_system)
|
||||
qdel(countdown)
|
||||
countdown = null
|
||||
STOP_PROCESSING(SSmachine, src)
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/dominator/emp_act(severity)
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
var/datum/gang/tempgang
|
||||
|
||||
if(user.mind in ticker.mode.get_all_gangsters())
|
||||
if(user.mind in SSticker.mode.get_all_gangsters())
|
||||
tempgang = user.mind.gang_datum
|
||||
else
|
||||
examine(user)
|
||||
@@ -161,7 +161,7 @@
|
||||
return
|
||||
|
||||
var/time = round(determine_domination_time(tempgang)/60,0.1)
|
||||
if(alert(user,"With [round((tempgang.territory.len/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready")
|
||||
if(alert(user,"With [round((tempgang.territory.len/GLOB.start_state.num_territories)*100, 1)]% station control, a takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready")
|
||||
if((tempgang.is_dominating) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc))
|
||||
return 0
|
||||
|
||||
@@ -181,9 +181,9 @@
|
||||
countdown.start()
|
||||
|
||||
set_light(3)
|
||||
START_PROCESSING(SSmachine, src)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
|
||||
gang.message_gangtools("Hostile takeover in progress: Estimated [time] minutes until victory.[gang.dom_attempts ? "" : " This is your final attempt."]")
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(G != gang)
|
||||
G.message_gangtools("Enemy takeover attempt detected in [locname]: Estimated [time] minutes until our defeat.",1,1)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//gang.dm
|
||||
//Gang War Game Mode
|
||||
|
||||
var/list/gang_name_pool = list("Clandestine", "Prima", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Donk", "Gene", "Gib", "Tunnel", "Diablo", "Psyke", "Osiron", "Sirius", "Sleeping Carp")
|
||||
var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple")
|
||||
GLOBAL_LIST_INIT(gang_name_pool, list("Clandestine", "Prima", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Donk", "Gene", "Gib", "Tunnel", "Diablo", "Psyke", "Osiron", "Sirius", "Sleeping Carp"))
|
||||
GLOBAL_LIST_INIT(gang_colors_pool, list("red","orange","yellow","green","blue","purple"))
|
||||
|
||||
/datum/game_mode
|
||||
var/list/datum/gang/gangs = list()
|
||||
@@ -248,7 +248,7 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple"
|
||||
return gang_bosses
|
||||
|
||||
/proc/determine_domination_time(var/datum/gang/G)
|
||||
return max(180,900 - (round((G.territory.len/start_state.num_territories)*100, 1) * 12))
|
||||
return max(180,900 - (round((G.territory.len/GLOB.start_state.num_territories)*100, 1) * 12))
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//Announces the end of the game with all relavent information stated//
|
||||
@@ -261,15 +261,15 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple"
|
||||
to_chat(world, "<span class='redtext'>The station was [station_was_nuked ? "destroyed!" : "evacuated before a gang could claim it! The station wins!"]</span><br>")
|
||||
feedback_set_details("round_end_result","loss - gangs failed takeover")
|
||||
|
||||
ticker.news_report = GANG_LOSS
|
||||
SSticker.news_report = GANG_LOSS
|
||||
else
|
||||
to_chat(world, "<span class='redtext'>The [winner.name] Gang successfully performed a hostile takeover of the station!</span><br>")
|
||||
feedback_set_details("round_end_result","win - gang domination complete")
|
||||
|
||||
ticker.news_report = GANG_TAKEOVER
|
||||
SSticker.news_report = GANG_TAKEOVER
|
||||
|
||||
for(var/datum/gang/G in gangs)
|
||||
var/text = "<b>The [G.name] Gang was [winner==G ? "<span class='greenannounce'>victorious</span>" : "<span class='boldannounce'>defeated</span>"] with [round((G.territory.len/start_state.num_territories)*100, 1)]% control of the station!</b>"
|
||||
var/text = "<b>The [G.name] Gang was [winner==G ? "<span class='greenannounce'>victorious</span>" : "<span class='boldannounce'>defeated</span>"] with [round((G.territory.len/GLOB.start_state.num_territories)*100, 1)]% control of the station!</b>"
|
||||
text += "<br>The [G.name] Gang Bosses were:"
|
||||
for(var/datum/mind/boss in G.bosses)
|
||||
text += printplayer(boss, 1)
|
||||
@@ -294,7 +294,7 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple"
|
||||
/datum/gang_points/process(seconds)
|
||||
var/list/winners = list() //stores the winners if there are any
|
||||
|
||||
for(var/datum/gang/G in ticker.mode.gangs)
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
if(world.time > next_point_time)
|
||||
G.income()
|
||||
|
||||
@@ -311,7 +311,7 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple"
|
||||
G.domination(0.5)
|
||||
priority_announce("Multiple station takeover attempts have made simultaneously. Conflicting takeover attempts appears to have restarted.","Network Alert")
|
||||
else
|
||||
ticker.mode.explosion_in_progress = 1
|
||||
ticker.station_explosion_cinematic(1)
|
||||
ticker.mode.explosion_in_progress = 0
|
||||
ticker.force_ending = pick(winners)
|
||||
SSticker.mode.explosion_in_progress = 1
|
||||
SSticker.station_explosion_cinematic(1)
|
||||
SSticker.mode.explosion_in_progress = 0
|
||||
SSticker.force_ending = pick(winners)
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
)
|
||||
|
||||
/datum/gang/New(loc,gangname)
|
||||
if(!gang_colors_pool.len)
|
||||
if(!GLOB.gang_colors_pool.len)
|
||||
message_admins("WARNING: Maximum number of gangs have been exceeded!")
|
||||
throw EXCEPTION("Maximum number of gangs has been exceeded")
|
||||
return
|
||||
else
|
||||
color = pick(gang_colors_pool)
|
||||
gang_colors_pool -= color
|
||||
color = pick(GLOB.gang_colors_pool)
|
||||
GLOB.gang_colors_pool -= color
|
||||
switch(color)
|
||||
if("red")
|
||||
color_hex = "#DA0000"
|
||||
@@ -63,8 +63,8 @@
|
||||
if("purple")
|
||||
color_hex = "#DA00FF"
|
||||
|
||||
name = (gangname ? gangname : pick(gang_name_pool))
|
||||
gang_name_pool -= name
|
||||
name = (gangname ? gangname : pick(GLOB.gang_name_pool))
|
||||
GLOB.gang_name_pool -= name
|
||||
|
||||
ganghud = new()
|
||||
ganghud.color = color_hex
|
||||
@@ -85,11 +85,11 @@
|
||||
|
||||
/datum/gang/proc/add_gang_hud(datum/mind/recruit_mind)
|
||||
ganghud.join_hud(recruit_mind.current)
|
||||
ticker.mode.set_antag_hud(recruit_mind.current, ((recruit_mind in bosses) ? "gang_boss" : "gangster"))
|
||||
SSticker.mode.set_antag_hud(recruit_mind.current, ((recruit_mind in bosses) ? "gang_boss" : "gangster"))
|
||||
|
||||
/datum/gang/proc/remove_gang_hud(datum/mind/defector_mind)
|
||||
ganghud.leave_hud(defector_mind.current)
|
||||
ticker.mode.set_antag_hud(defector_mind.current, null)
|
||||
SSticker.mode.set_antag_hud(defector_mind.current, null)
|
||||
|
||||
/datum/gang/proc/domination(modifier=1)
|
||||
set_domination_time(determine_domination_time(src) * modifier)
|
||||
@@ -113,7 +113,7 @@
|
||||
return 0
|
||||
|
||||
var/gang_style_list = list("Gang Colors","Black Suits","White Suits","Leather Jackets","Leather Overcoats","Puffer Jackets","Military Jackets","Tactical Turtlenecks","Soviet Uniforms")
|
||||
if(!style && (user.mind in ticker.mode.get_gang_bosses())) //Only the boss gets to pick a style
|
||||
if(!style && (user.mind in SSticker.mode.get_gang_bosses())) //Only the boss gets to pick a style
|
||||
style = input("Pick an outfit style.", "Pick Style") as null|anything in gang_style_list
|
||||
|
||||
if(gangtool.can_use(user) && (gangtool.outfits >= 1))
|
||||
@@ -240,7 +240,7 @@
|
||||
territory_new = list()
|
||||
territory_lost = list()
|
||||
|
||||
var/control = round((territory.len/start_state.num_territories)*100, 1)
|
||||
var/control = round((territory.len/GLOB.start_state.num_territories)*100, 1)
|
||||
message += "Your gang now has <b>[control]% control</b> of the station.<BR>*---------*"
|
||||
message_gangtools(message)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(!istype(M))
|
||||
return
|
||||
if(ishuman(M) && ishuman(user) && M.stat != DEAD)
|
||||
if(user.mind && (user.mind in ticker.mode.get_gang_bosses()))
|
||||
if(user.mind && (user.mind in SSticker.mode.get_gang_bosses()))
|
||||
if(..(M,user,1))
|
||||
if(cooldown)
|
||||
to_chat(user, "<span class='warning'>[src] needs more time to recharge before it can be used.</span>")
|
||||
@@ -23,7 +23,7 @@
|
||||
if(M.client)
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
var/datum/gang/G = user.mind.gang_datum
|
||||
var/recruitable = ticker.mode.add_gangster(M.mind,G)
|
||||
var/recruitable = SSticker.mode.add_gangster(M.mind,G)
|
||||
switch(recruitable)
|
||||
if(2)
|
||||
M.Paralyse(5)
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
var/free_pen = 0
|
||||
var/promotable = 0
|
||||
|
||||
/obj/item/device/gangtool/New() //Initialize supply point income if it hasn't already been started
|
||||
if(!ticker.mode.gang_points)
|
||||
ticker.mode.gang_points = new /datum/gang_points(ticker.mode)
|
||||
/obj/item/device/gangtool/Initialize() //Initialize supply point income if it hasn't already been started
|
||||
..()
|
||||
if(!SSticker.mode.gang_points)
|
||||
SSticker.mode.gang_points = new /datum/gang_points(SSticker.mode)
|
||||
|
||||
/obj/item/device/gangtool/attack_self(mob/user)
|
||||
if (!can_use(user))
|
||||
@@ -27,7 +28,7 @@
|
||||
var/dat
|
||||
if(!gang)
|
||||
dat += "This device is not registered.<br><br>"
|
||||
if(user.mind in ticker.mode.get_gang_bosses())
|
||||
if(user.mind in SSticker.mode.get_gang_bosses())
|
||||
if(promotable && user.mind.gang_datum.bosses.len < 3)
|
||||
dat += "Give this device to another member of your organization to use to promote them to Lieutenant.<br><br>"
|
||||
dat += "If this is meant as a spare device for yourself:<br>"
|
||||
@@ -46,9 +47,9 @@
|
||||
|
||||
var/isboss = (user.mind == gang.bosses[1])
|
||||
dat += "Registration: <B>[gang.name] Gang [isboss ? "Boss" : "Lieutenant"]</B><br>"
|
||||
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/start_state.num_territories)*100, 1)]%</B><br>"
|
||||
dat += "Organization Size: <B>[gang.gangsters.len + gang.bosses.len]</B> | Station Control: <B>[round((gang.territory.len/GLOB.start_state.num_territories)*100, 1)]%</B><br>"
|
||||
dat += "Gang Influence: <B>[gang.points]</B><br>"
|
||||
dat += "Time until Influence grows: <B>[(gang.points >= 999) ? ("--:--") : (time2text(ticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
|
||||
dat += "Time until Influence grows: <B>[(gang.points >= 999) ? ("--:--") : (time2text(SSticker.mode.gang_points.next_point_time - world.time, "mm:ss"))]</B><br>"
|
||||
dat += "<hr>"
|
||||
|
||||
|
||||
@@ -130,7 +131,7 @@
|
||||
for(var/datum/mind/ganger in members)
|
||||
if(ganger.current && (ganger.current.z <= 2) && (ganger.current.stat == CONSCIOUS))
|
||||
to_chat(ganger.current, ping)
|
||||
for(var/mob/M in dead_mob_list)
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [ping]")
|
||||
log_game("[key_name(user)] Messaged [gang.name] Gang: [message].")
|
||||
@@ -139,12 +140,12 @@
|
||||
/obj/item/device/gangtool/proc/register_device(mob/user)
|
||||
if(gang) //It's already been registered!
|
||||
return
|
||||
if((promotable && (user.mind in ticker.mode.get_gangsters())) || (user.mind in ticker.mode.get_gang_bosses()))
|
||||
if((promotable && (user.mind in SSticker.mode.get_gangsters())) || (user.mind in SSticker.mode.get_gang_bosses()))
|
||||
gang = user.mind.gang_datum
|
||||
gang.gangtools += src
|
||||
icon_state = "gangtool-[gang.color]"
|
||||
if(!(user.mind in gang.bosses))
|
||||
ticker.mode.remove_gangster(user.mind, 0, 2)
|
||||
SSticker.mode.remove_gangster(user.mind, 0, 2)
|
||||
gang.bosses += user.mind
|
||||
user.mind.gang_datum = gang
|
||||
user.mind.special_role = "[gang.name] Gang Lieutenant"
|
||||
@@ -153,8 +154,8 @@
|
||||
free_pen = 1
|
||||
gang.message_gangtools("[user] has been promoted to Lieutenant.")
|
||||
to_chat(user, "<FONT size=3 color=red><B>You have been promoted to Lieutenant!</B></FONT>")
|
||||
ticker.mode.forge_gang_objectives(user.mind)
|
||||
ticker.mode.greet_gang(user.mind,0)
|
||||
SSticker.mode.forge_gang_objectives(user.mind)
|
||||
SSticker.mode.greet_gang(user.mind,0)
|
||||
to_chat(user, "The <b>Gangtool</b> you registered will allow you to purchase weapons and equipment, and send messages to your gang.")
|
||||
to_chat(user, "Unlike regular gangsters, you may use <b>recruitment pens</b> to add recruits to your gang. Use them on unsuspecting crew members to recruit them. Don't forget to get your one free pen from the gangtool.")
|
||||
else
|
||||
@@ -194,7 +195,7 @@
|
||||
return 0
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
if((100 * start_state.score(end_state)) < 80) //Shuttle cannot be recalled if the station is too damaged
|
||||
if((100 * GLOB.start_state.score(end_state)) < 80) //Shuttle cannot be recalled if the station is too damaged
|
||||
to_chat(user, "<span class='warning'>\icon[src]Error: Station communication systems compromised. Unable to establish connection.</span>")
|
||||
recalling = 0
|
||||
return 0
|
||||
@@ -227,7 +228,7 @@
|
||||
if(user.mind in gang.bosses)
|
||||
return 1
|
||||
else //If it's not registered, any gangster can use this to register
|
||||
if(user.mind in ticker.mode.get_all_gangsters())
|
||||
if(user.mind in SSticker.mode.get_all_gangsters())
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user