From d3ea1c7902d99ce890e369953665c2c3352c8984 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Mon, 6 Jul 2015 00:05:59 -0600 Subject: [PATCH 1/3] Fixed Badmins being able to exceed the gang limit with excessive button pressing --- code/datums/mind.dm | 2 +- code/modules/admin/verbs/one_click_antag.dm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index d67753cd647..5bc5ad42072 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -316,7 +316,7 @@ text += "gang leader" text += "
" - if(gang_colors_pool) + if(gang_colors_pool.len) text += "Create New Gang" sections["gang"] = text diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index e294c26928b..ded4b22b239 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -399,7 +399,7 @@ if(candidates.len >= 2) for(var/needs_assigned=2,needs_assigned>0,needs_assigned--) H = pick(candidates) - if(gang_colors_pool) + if(gang_colors_pool.len) var/datum/gang/newgang = new() ticker.mode.gangs += newgang H.mind.make_Gang(newgang) @@ -590,9 +590,9 @@ temp.abductors |= list(agent_mind,scientist_mind) temp.make_abductor_team(number,preset_scientist=scientist_mind,preset_agent=agent_mind) temp.post_setup_team(number) - + ticker.mode.abductor_teams++ - + if(ticker.mode.config_tag != "abduction") ticker.mode.abductors |= temp.abductors From e67b18d93e46d109ffc3df94a0bea6146ac428fa Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Mon, 6 Jul 2015 00:42:02 -0600 Subject: [PATCH 2/3] - Fixed bug that prevented implant breakers from recruiting security. - Gangs are reminded of imminent defeat/victory and the dominator's location when a timer drops below 3 minutes. (+3 squashed commit) Squashed commit: [49b614c] - Raised threshold of station damage before gang heads can no longer recall - Implanters are now only blocked by helmets with THICKMATERIAL - Changelog [76f9662] Fixes runtime with gang messages sent to minds without mobs [d81148e] Speeds up recruitment a bit (+1 squashed commits) Squashed commits: [d81148e] Speeds up recruitment a bit --- code/game/gamemodes/gang/dominator.dm | 10 ++++- code/game/gamemodes/gang/gang_pen.dm | 11 ++++-- code/game/gamemodes/gang/recaller.dm | 6 ++- .../items/weapons/implants/implanter.dm | 4 +- html/changelogs/ikarrus-gangtuning.yml | 38 +++++++++++++++++++ 5 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 html/changelogs/ikarrus-gangtuning.yml diff --git a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm index 401671fa383..2c0e0b413bb 100644 --- a/code/game/gamemodes/gang/dominator.dm +++ b/code/game/gamemodes/gang/dominator.dm @@ -9,7 +9,8 @@ var/maxhealth = 200 var/health = 200 var/datum/gang/gang - var/operating = 0 + var/operating = 0 //-1=broken, 0=standby, 1=takeover + var/warned = 0 //if this device has set off the warning at <3 minutes yet /obj/machinery/dominator/New() ..() @@ -37,6 +38,13 @@ if(gang && isnum(gang.dom_timer)) if(gang.dom_timer > 0) playsound(loc, 'sound/items/timer.ogg', 30, 0) + if(!warned && (gang.dom_timer < 180)) + warned = 1 + var/area/domloc = get_area(loc) + gang.message_gangtools("Less than 3 minutes remain in hostile takeover. Defend your dominator at [initial(domloc.name)]!") + for(var/datum/gang/G in ticker.mode.gangs) + if(G != gang) + G.message_gangtools("WARNING: [gang.name] Gang takeover imminent. Their dominator at [initial(domloc.name)] must be destroyed!",1,1) else SSmachine.processing -= src diff --git a/code/game/gamemodes/gang/gang_pen.dm b/code/game/gamemodes/gang/gang_pen.dm index 4572ea9bd85..afc3776342f 100644 --- a/code/game/gamemodes/gang/gang_pen.dm +++ b/code/game/gamemodes/gang/gang_pen.dm @@ -36,7 +36,7 @@ ..() /obj/item/weapon/pen/gang/proc/cooldown(datum/gang/gang) - var/cooldown_time = 300+(900*gang.bosses.len) // 1recruiter=2mins, 2recruiters=3.5mins, 3recruiters=5mins + var/cooldown_time = 600+(600*gang.bosses.len) // 1recruiter=2mins, 2recruiters=3mins, 3recruiters=4mins cooldown = 1 icon_state = "pen_blink" @@ -93,8 +93,11 @@ var/success if(target.stat != DEAD) - if(ticker.mode.remove_gangster(target.mind,0,1)) - success = 1 + if(target.mind in ticker.mode.get_gangsters()) + if(ticker.mode.remove_gangster(target.mind,0,1)) + success = 1 //Was not a gang boss, convert as usual + else + success = 1 //Not a gangster, convert as usual if(!target.mind) return @@ -102,7 +105,7 @@ if(ishuman(target)) var/mob/living/carbon/human/H = target H.sec_hud_set_implants() - if(success && ticker.mode.add_gangster(target.mind,gang)) + if(success && ticker.mode.add_gangster(target.mind,gang,0)) target.Paralyse(5) else target.visible_message("[target] seems to resist the implant!", "You feel the influence of your enemies try to invade your mind!") diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm index bf5d28d5a55..296cb7958b9 100644 --- a/code/game/gamemodes/gang/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -328,7 +328,7 @@ if(members.len) var/ping = "[gang.name] [(user.mind in ticker.mode.get_gang_bosses()) ? "Gang Boss" : "Lieutenant"]: [message]" for(var/datum/mind/ganger in members) - if((ganger.current.z <= 2) && (ganger.current.stat == CONSCIOUS)) + if(ganger.current && (ganger.current.z <= 2) && (ganger.current.stat == CONSCIOUS)) ganger.current << ping for(var/mob/M in dead_mob_list) M << ping @@ -336,6 +336,8 @@ /obj/item/device/gangtool/proc/register_device(var/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())) gang = user.mind.gang_datum gang.gangtools += src @@ -391,7 +393,7 @@ return 0 var/datum/station_state/end_state = new /datum/station_state() end_state.count() - if((100 * start_state.score(end_state)) < 70) //Shuttle cannot be recalled if the station is too damaged + if((100 * start_state.score(end_state)) < 80) //Shuttle cannot be recalled if the station is too damaged user << "\icon[src]Error: Station communication systems compromised. Unable to establish connection." recalling = 0 return 0 diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 77d634dc35f..41a00b05019 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -20,7 +20,7 @@ if(!iscarbon(M)) return if(user && imp) - if(M.head) + if(M.head && (M.head.flags & THICKMATERIAL)) user << "[M]'s [M.head.name] is in the way! Take it off first!" return M.visible_message("[user] is attemping to implant [M].") @@ -28,7 +28,7 @@ var/turf/T = get_turf(M) if(T && (M == user || do_after(user, 50, target = M))) if(user && M && (get_turf(M) == T) && src && imp) - if(M.head) + if(M.head && (M.head.flags & THICKMATERIAL)) return M.visible_message("[user] has implanted [M].", "[user] implants you with the implant.") add_logs(user, M, "implanted", object="[name]") diff --git a/html/changelogs/ikarrus-gangtuning.yml b/html/changelogs/ikarrus-gangtuning.yml new file mode 100644 index 00000000000..2a208b24d4e --- /dev/null +++ b/html/changelogs/ikarrus-gangtuning.yml @@ -0,0 +1,38 @@ +################################ +# 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: N3X15 + +# 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: + - bugfix: "Fixed bug where gang messages would occasionally fail to send." + - bugfix: "Fixed bug that prevented implant breakers from recruiting security." + - tweak: "Implanters are now only blocked by helmets with THICKMATERIAL" \ No newline at end of file From 004f0c221e371aa7ca8d1ce26dc76204c59a3375 Mon Sep 17 00:00:00 2001 From: Ikarrus Date: Tue, 7 Jul 2015 07:22:51 -0600 Subject: [PATCH 3/3] Update ikarrus-gangtuning.yml --- html/changelogs/ikarrus-gangtuning.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/changelogs/ikarrus-gangtuning.yml b/html/changelogs/ikarrus-gangtuning.yml index 2a208b24d4e..15f64b7d5a9 100644 --- a/html/changelogs/ikarrus-gangtuning.yml +++ b/html/changelogs/ikarrus-gangtuning.yml @@ -22,7 +22,7 @@ ################################# # Your name. -author: N3X15 +author: Ikarrus # Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. delete-after: True @@ -35,4 +35,4 @@ delete-after: True changes: - bugfix: "Fixed bug where gang messages would occasionally fail to send." - bugfix: "Fixed bug that prevented implant breakers from recruiting security." - - tweak: "Implanters are now only blocked by helmets with THICKMATERIAL" \ No newline at end of file + - tweak: "Implanters are now only blocked by helmets with THICKMATERIAL"