From 81c55b666da5cc68f490bead820d3450d0558990 Mon Sep 17 00:00:00 2001 From: Twinmold Date: Fri, 22 Jul 2016 06:35:10 -0500 Subject: [PATCH 1/2] Vox Raider Check Kills for Inviolate Effectively, adds the check that makes it so you aren't allowed to kill (many, at least) under the Inviolate. Doesn't check for deaths in the server itself, only kills in the raiders minds, which the original code failed to do by adding all deaths to voxkills. As we currently have, it's a auto-complete objective, which is just a poor fix to the original issue. ```var/vox_allowed_kills = 3``` gives them a little leeway, but can easily be changed to any acceptable number. :cl: Twinmold Tweak: Vox Objective 4 now calculates the kills vox raiders actually have, instead of always complete. /:cl: --- code/game/gamemodes/objective.dm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index ae687d70116..cc0482588a9 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -799,7 +799,17 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ /datum/objective/heist/inviolate_death explanation_text = "Follow the Inviolate. Minimise death and loss of resources." - completed = 1 + + check_completion() + var/vox_allowed_kills = 3 // The number of people the vox can accidently kill. Mostly a counter to people killing themselves if a raider touches them to force fail. + var/vox_total_kills = 0 + + var/datum/game_mode/heist/H = ticker.mode + for(var/datum/mind/raider in H.raiders) + vox_total_kills = vox_total_kills + raider.kills.len // Kills are listed in the mind; uses this to calculate vox kills + + if(vox_total_kills > vox_allowed_kills) return 0 + return 1 // Traders From ed27fd3799832ab0800bc82873fc3c27fa839be6 Mon Sep 17 00:00:00 2001 From: Twinmold Date: Fri, 22 Jul 2016 07:35:24 -0500 Subject: [PATCH 2/2] total += kills Uses byond's simplier form... Damn Lua code is stuck in my head... --- code/game/gamemodes/objective.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index cc0482588a9..825e1183529 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -806,7 +806,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ var/datum/game_mode/heist/H = ticker.mode for(var/datum/mind/raider in H.raiders) - vox_total_kills = vox_total_kills + raider.kills.len // Kills are listed in the mind; uses this to calculate vox kills + vox_total_kills += raider.kills.len // Kills are listed in the mind; uses this to calculate vox kills if(vox_total_kills > vox_allowed_kills) return 0 return 1