From d6fc1c7096e92ef8d3332d8296f193156d105e95 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Sat, 6 Aug 2016 15:37:27 -0400 Subject: [PATCH 1/3] Fixes Accidental Greentext for Maroon and Redtext for Assassination Objectives. If you had the maroon objective as a traitor and your target was in any sort of locker on the shuttle when it docked, it would give you green text. Maroon objectives now check if the target's in a locker and, if so, checks the locker's location in order to correctly evaluate objective completion. If you had the assassination objective as a traitor and you killed them, yet they were on a Z-level greater than the Derelict, it would give you red text. Assassinations are now location insensitive. --- code/game/gamemodes/objective.dm | 16 +++------------- .../objects/structures/crates_lockers/closets.dm | 4 +--- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index b6b1094b103..ae49b640adf 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -78,7 +78,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ check_completion() if(target && target.current) // TODO: Tie into space manager - if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite + if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 return 0 return 1 @@ -174,10 +174,10 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ check_completion() if(target && target.current) // TODO: Tie into space manager - if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > ZLEVEL_DERELICT || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite + if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 // TODO: Tie into space manager - if((target.current.z in config.admin_levels)) + if((target.current.z in config.admin_levels) || ((target.current.loc.type in typesof(/obj/structure/closet)) && (target.current.loc.z in config.admin_levels))) //No hiding in lockers and cheezing greentext. return 0 return 1 @@ -342,16 +342,6 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ /datum/objective/escape explanation_text = "Escape on the shuttle or an escape pod alive and free." - var/escape_areas = list(/area/shuttle/escape, - /area/shuttle/escape_pod1/centcom, - /area/shuttle/escape_pod1/transit, - /area/shuttle/escape_pod2/centcom, - /area/shuttle/escape_pod2/transit, - /area/shuttle/escape_pod3/centcom, - /area/shuttle/escape_pod3/transit, - /area/shuttle/escape_pod5/centcom, - /area/shuttle/escape_pod5/transit, - /area/centcom/evac) check_completion() if(issilicon(owner.current)) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 4fe639160d4..366470d00cb 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -63,9 +63,7 @@ M.client.perspective = MOB_PERSPECTIVE /obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination) - loc.Exited(M) - M.loc = destination - loc.Entered(M, ignoreRest = 1) + M.forceMove(destination) for(var/atom/movable/AM in loc) if(istype(AM, /obj/item)) continue From 7b502a0989a5e85293f46bf8d36a8355c53d4640 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Sat, 6 Aug 2016 16:10:06 -0400 Subject: [PATCH 2/3] get_turf instead of snowflake_check --- code/game/gamemodes/objective.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index ae49b640adf..f0a8f8957b2 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -177,7 +177,8 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \ if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite return 1 // TODO: Tie into space manager - if((target.current.z in config.admin_levels) || ((target.current.loc.type in typesof(/obj/structure/closet)) && (target.current.loc.z in config.admin_levels))) //No hiding in lockers and cheezing greentext. + var/turf/target_location = get_turf(target.current) + if(target_location.z in config.admin_levels) //No hiding in lockers and cheezing greentext. return 0 return 1 From 6edee2b55a6feb580a882c96f6b10b1ca3a29f26 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Sun, 7 Aug 2016 11:48:09 -0400 Subject: [PATCH 3/3] No locker permastuns. --- code/game/objects/structures/crates_lockers/closets.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 366470d00cb..4fe639160d4 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -63,7 +63,9 @@ M.client.perspective = MOB_PERSPECTIVE /obj/structure/closet/proc/moveMob(var/mob/M, var/atom/destination) - M.forceMove(destination) + loc.Exited(M) + M.loc = destination + loc.Entered(M, ignoreRest = 1) for(var/atom/movable/AM in loc) if(istype(AM, /obj/item)) continue