From 54015ccdf4dbd9063d7a2fea57b2c12745af5172 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 9 Jan 2014 22:06:26 +1030 Subject: [PATCH 1/5] Fixes some items remaining after the pod procs. --- code/game/machinery/cryopod.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 605b575bd9..2f0f8af0da 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -184,11 +184,17 @@ obj/machinery/computer/cryopod/Topic(href, href_list) if(!occupant.client && occupant.stat<2) //Occupant is living and has no client. - //Delete all items not on the preservation list and drop all others into the pod. + //Drop all items into the pod. for(var/obj/item/W in occupant) occupant.drop_from_inventory(W) W.loc = src + if(W.contents.len) //Make sure we catch anything not handled by del() on the items. + for(var/obj/item/O in W.contents) + O.loc = src + + //Delete all items not on the preservation list. + for(var/obj/item/W in occupant) var/preserve = null for(var/T in preserve_items) if(istype(W,T)) From a81fd94db15699b1880e6900193d838294a31134 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 9 Jan 2014 22:59:16 +1030 Subject: [PATCH 2/5] Objectives will now updated when the target enters cryostorage. --- code/game/machinery/cryopod.dm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 2f0f8af0da..3ab87eb3ed 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -194,7 +194,11 @@ obj/machinery/computer/cryopod/Topic(href, href_list) O.loc = src //Delete all items not on the preservation list. - for(var/obj/item/W in occupant) + var/list/items = src.contents + items -= occupant // Don't delete the occupant + items -= announce // or the autosay radio. + + for(var/obj/item/W in items) var/preserve = null for(var/T in preserve_items) if(istype(W,T)) @@ -206,12 +210,28 @@ obj/machinery/computer/cryopod/Topic(href, href_list) else frozen_items += W + //Update any existing objectives involving this mob. + for(var/mob/living/M in world) //There has to be a more efficient way to do this. + if(!(M.mind) || !(M.mind.objectives.len)) continue + + for(var/datum/objective/O in M.mind.objectives) + if(O.target && istype(O.target,/datum/mind)) + if(O.target == occupant.mind) + if(O.owner && O.owner.current) + O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..." + O.target = null + spawn(1) //This should ideally fire after the occupant is deleted. + if(!O) return + O.find_target() + if(!(O.target)) + O.owner.objectives -= O + + //Handle job slot/tater cleanup. var/job = occupant.mind.assigned_role - var/role = occupant.mind.special_role job_master.FreeRole(job) - if(role == "traitor" || role == "MODE") + if(occupant.mind.objectives.len) del(occupant.mind.objectives) occupant.mind.special_role = null else From f3111776540ae4cd87443c7a88f67e0bd5b6779f Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Fri, 10 Jan 2014 01:24:24 +1030 Subject: [PATCH 3/5] Changed world loop to all_objective loop in cryopod check. Added all_objective add/remove procs to datum/objective. --- code/game/gamemodes/objective.dm | 6 ++++++ code/game/machinery/cryopod.dm | 28 +++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 12ac544784..e4fd4eeacb 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1,4 +1,5 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 +var/global/list/all_objectives = list() datum/objective var/datum/mind/owner = null //Who owns the objective. @@ -8,9 +9,14 @@ datum/objective var/completed = 0 //currently only used for custom objectives. New(var/text) + all_objectives |= src if(text) explanation_text = text + Del() + all_objectives -= src + ..() + proc/check_completion() return completed diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 3ab87eb3ed..95215daf65 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -96,7 +96,6 @@ obj/machinery/computer/cryopod/Topic(href, href_list) frozen_items -= I else if(href_list["crew"]) - user << "\red Functionality unavailable at this time." src.updateUsrDialog() @@ -211,20 +210,19 @@ obj/machinery/computer/cryopod/Topic(href, href_list) frozen_items += W //Update any existing objectives involving this mob. - for(var/mob/living/M in world) //There has to be a more efficient way to do this. - if(!(M.mind) || !(M.mind.objectives.len)) continue - - for(var/datum/objective/O in M.mind.objectives) - if(O.target && istype(O.target,/datum/mind)) - if(O.target == occupant.mind) - if(O.owner && O.owner.current) - O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..." - O.target = null - spawn(1) //This should ideally fire after the occupant is deleted. - if(!O) return - O.find_target() - if(!(O.target)) - O.owner.objectives -= O + for(var/datum/objective/O in all_objectives) + if(O.target && istype(O.target,/datum/mind)) + if(O.target == occupant.mind) + if(O.owner && O.owner.current) + O.owner.current << "\red You get the feeling your target is no longer within your reach. Time for Plan [pick(list("A","B","C","D","X","Y","Z"))]..." + O.target = null + spawn(1) //This should ideally fire after the occupant is deleted. + if(!O) return + O.find_target() + if(!(O.target)) + all_objectives -= O + O.owner.objectives -= O + del(O) //Handle job slot/tater cleanup. var/job = occupant.mind.assigned_role From c47be94b42cf1b385a577e9489f4e5817b19d33c Mon Sep 17 00:00:00 2001 From: RKF45 Date: Thu, 9 Jan 2014 21:49:21 +0100 Subject: [PATCH 4/5] Removes braindeath as IC term --- code/game/gamemodes/cult/ritual.dm | 2 +- code/modules/mob/living/carbon/human/examine.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 2d408a1a4f..ac89f04647 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -248,7 +248,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",

Drain Blood

This rune instantly heals you of some brute damage at the expense of a person placed on top of the rune. Whenever you invoke a drain rune, ALL drain runes on the station are activated, draining blood from anyone located on top of those runes. This includes yourself, though the blood you drain from yourself just comes back to you. This might help you identify this rune when studying words. One drain gives up to 25HP per each victim, but you can repeat it if you need more. Draining only works on living people, so you might need to recharge your "Battery" once its empty. Drinking too much blood at once might cause blood hunger.

Raise Dead

- This rune allows for the resurrection of any dead person. You will need a dead human body and a living human sacrifice. Make 2 raise dead runes. Put a living non-braindead human on top of one, and a dead body on the other one. When you invoke the rune, the life force of the living human will be transferred into the dead body, allowing a ghost standing on top of the dead body to enter it, instantly and fully healing it. Use other runes to ensure there is a ghost ready to be resurrected.
+ This rune allows for the resurrection of any dead person. You will need a dead human body and a living human sacrifice. Make 2 raise dead runes. Put a living, awake human on top of one, and a dead body on the other one. When you invoke the rune, the life force of the living human will be transferred into the dead body, allowing a ghost standing on top of the dead body to enter it, instantly and fully healing it. Use other runes to ensure there is a ghost ready to be resurrected.

Hide runes

This rune makes all nearby runes completely invisible. They are still there and will work if activated somehow, but you cannot invoke them directly if you do not see them.

Reveal runes

diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 1b1d5a72c7..c1bb0af84d 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -243,7 +243,7 @@ if(!key && brain_op_stage != 4 && stat != DEAD) msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely\n" else if(!client && brain_op_stage != 4 && stat != DEAD) - msg += "[t_He] [t_has] a vacant, braindead stare...\n" + msg += "[t_He] [t_has] suddenly fallen asleep.\n" var/list/wound_flavor_text = list() var/list/is_destroyed = list() From 8885ad630e580ddea2fbee75c4d0ad084aee58e2 Mon Sep 17 00:00:00 2001 From: SkyMarshal Date: Thu, 9 Jan 2014 17:17:56 -0700 Subject: [PATCH 5/5] Fix for mining. Fixes #4249 --- code/modules/mining/mine_turfs.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index e83bc6c9a8..749de26f33 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -162,7 +162,7 @@ var/list/artifact_spawn = list() // Runtime fix for geometry loading before cont if(do_after(user,P.digspeed)) user << "\blue You finish [P.drill_verb] the rock." - if(finds.len) + if(finds && finds.len) var/datum/find/F = finds[1] if(round(excavation_level + P.excavation_amount) == F.excavation_required) //Chance to extract any items here perfectly, otherwise just pull them out along with the rock surrounding them @@ -196,15 +196,15 @@ var/list/artifact_spawn = list() // Runtime fix for geometry loading before cont else GetDrilled(1) return - else - excavation_level += P.excavation_amount - //archaeo overlays - if(!archaeo_overlay && finds.len) - var/datum/find/F = finds[1] - if(F.excavation_required <= excavation_level + F.view_range) - archaeo_overlay = "overlay_archaeo[rand(1,3)]" - overlays += archaeo_overlay + excavation_level += P.excavation_amount + + //archaeo overlays + if(!archaeo_overlay && finds && finds.len) + var/datum/find/F = finds[1] + if(F.excavation_required <= excavation_level + F.view_range) + archaeo_overlay = "overlay_archaeo[rand(1,3)]" + overlays += archaeo_overlay //there's got to be a better way to do this var/update_excav_overlay = 0