From 11ffb0a39053485beabd5af366d7510cfdf19b34 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Mon, 13 Jul 2015 09:24:01 -0600 Subject: [PATCH 1/3] Halves Domination Time Domination time will also be displayed in minutes on everything but the active countdown itself --- code/game/gamemodes/gang/dominator.dm | 8 +++--- code/game/gamemodes/gang/gang.dm | 2 ++ code/game/gamemodes/gang/gang_datum.dm | 2 +- code/game/gamemodes/gang/recaller.dm | 2 +- html/changelogs/ikarrus-gangtime.yml | 36 ++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 html/changelogs/ikarrus-gangtime.yml diff --git a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm index 2c0e0b413bb..206a1f7d230 100644 --- a/code/game/gamemodes/gang/dominator.dm +++ b/code/game/gamemodes/gang/dominator.dm @@ -167,8 +167,8 @@ user << "Error: Unable to breach station network. Firewall has logged our signature and is blocking all further attempts." return - var/time = max(300,900 - ((round((tempgang.territory.len/start_state.num_territories)*200, 1) - 60) * 15)) - if(alert(user,"With [round((tempgang.territory.len/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] seconds.\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") + var/time = round(get_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 (!tempgang.dom_attempts || !in_range(src, user) || !istype(src.loc, /turf)) return 0 @@ -182,10 +182,10 @@ var/area/A = get_area(loc) var/locname = initial(A.name) priority_announce("Network breach detected in [locname]. The [gang.name] Gang is attempting to seize control of the station!","Network Alert") - gang.message_gangtools("Hostile takeover in progress: Estimated [time] seconds until victory.[gang.dom_attempts ? "" : " This is your final attempt."]") + 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) if(G != gang) - G.message_gangtools("Enemy takeover attempt detected in [locname]: Estimated [time] seconds until our defeat.",1,1) + G.message_gangtools("Enemy takeover attempt detected in [locname]: Estimated [time] minutes until our defeat.",1,1) /obj/machinery/dominator/attack_alien(mob/living/user) user.do_attack_animation(src) diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index b8fe4eaa51a..d4d0d7eea00 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -231,6 +231,8 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple" gang_bosses += G.bosses return gang_bosses +/proc/get_domination_time(var/datum/gang/G) + return max(300,900 - (round((G.territory.len/start_state.num_territories)*100, 1) * 12)) ////////////////////////////////////////////////////////////////////// //Announces the end of the game with all relavent information stated// diff --git a/code/game/gamemodes/gang/gang_datum.dm b/code/game/gamemodes/gang/gang_datum.dm index 6a38e990196..b587cd4ee87 100644 --- a/code/game/gamemodes/gang/gang_datum.dm +++ b/code/game/gamemodes/gang/gang_datum.dm @@ -56,7 +56,7 @@ ticker.mode.set_antag_hud(defector_mind.current, null) /datum/gang/proc/domination(var/modifier=1) - dom_timer = max(300,900 - ((round((territory.len/start_state.num_territories)*200, 1) - 60) * 15)) * modifier + dom_timer = get_domination_time(src) * modifier set_security_level("delta") SSshuttle.emergencyNoEscape = 1 diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm index 296cb7958b9..6cfc0a742ad 100644 --- a/code/game/gamemodes/gang/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -174,7 +174,7 @@ dat += "Station Dominator
" else dat += "Station Dominator
" - dat += "(Estimated Takeover Time: [round(max(300,900 - ((round((gang.territory.len/start_state.num_territories)*200, 10) - 60) * 15))/60,1)] minutes)
" + dat += "(Estimated Takeover Time: [round(get_domination_time(gang)/60,0.1)] minutes)
" dat += "
" dat += "Refresh
" diff --git a/html/changelogs/ikarrus-gangtime.yml b/html/changelogs/ikarrus-gangtime.yml new file mode 100644 index 00000000000..ccaf6902d08 --- /dev/null +++ b/html/changelogs/ikarrus-gangtime.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: Ikarrus + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Halved Domination Time." \ No newline at end of file From 1c7639775c266cec926bd30b819c82df19059b26 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Mon, 13 Jul 2015 19:56:21 -0600 Subject: [PATCH 2/3] Minimum time reduced to 3 minutes Doubled uniform bonus for domination timer --- code/game/gamemodes/gang/gang.dm | 2 +- code/game/gamemodes/gang/gang_datum.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index d4d0d7eea00..254725f0ffe 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -232,7 +232,7 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple" return gang_bosses /proc/get_domination_time(var/datum/gang/G) - return max(300,900 - (round((G.territory.len/start_state.num_territories)*100, 1) * 12)) + return max(180,900 - (round((G.territory.len/start_state.num_territories)*100, 1) * 12)) ////////////////////////////////////////////////////////////////////// //Announces the end of the game with all relavent information stated// diff --git a/code/game/gamemodes/gang/gang_datum.dm b/code/game/gamemodes/gang/gang_datum.dm index b587cd4ee87..9fda51eb919 100644 --- a/code/game/gamemodes/gang/gang_datum.dm +++ b/code/game/gamemodes/gang/gang_datum.dm @@ -166,7 +166,7 @@ //Calculate and report influence growth var/message = "[src] Gang Status Report:
*---------*
" if(isnum(dom_timer)) - var/new_time = max(300,dom_timer - ((territory.len + uniformed) * 2)) + var/new_time = max(180,dom_timer - (uniformed * 4) - (territory.len * 2)) if(new_time < dom_timer) message += "Takeover shortened by [dom_timer - new_time] seconds for defending [territory.len] territories and [uniformed] uniformed gangsters.
" dom_timer = new_time From 1016e4e2b1a1b81e3d0feb327466a399a7626abc Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Mon, 13 Jul 2015 20:21:37 -0600 Subject: [PATCH 3/3] Fixes round-end report bug --- code/game/gamemodes/gang/gang.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index 254725f0ffe..3b46ffd0330 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -239,11 +239,12 @@ var/list/gang_colors_pool = list("red","orange","yellow","green","blue","purple" ////////////////////////////////////////////////////////////////////// /datum/game_mode/proc/auto_declare_completion_gang(datum/gang/winner) - if(!winner) - world << "The station was [station_was_nuked ? "destroyed!" : "evacuated before a gang could claim it! The station wins!"]
" - else - world << "The [winner.name] Gang successfully performed a hostile takeover of the station!
" - ..() + if(gangs.len) + if(!winner) + world << "The station was [station_was_nuked ? "destroyed!" : "evacuated before a gang could claim it! The station wins!"]
" + else + world << "The [winner.name] Gang successfully performed a hostile takeover of the station!
" + for(var/datum/gang/G in gangs) world << "
The [G.name] Gang was [winner==G ? "victorious" : "defeated"] with [round((G.territory.len/start_state.num_territories)*100, 1)]% control of the station!" world << "
The [G.name] Gang Bosses were:"