From 7b89ef11f4dfaad6ebaefe90c01e1ce97d77e1dc Mon Sep 17 00:00:00 2001 From: Tenebrosity Date: Mon, 13 Jan 2014 12:35:30 +1300 Subject: [PATCH 1/5] Fixes a bug that prevents killing AIs before roundstart --- code/controllers/shuttle_controller.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index 2d6af5d0c45..0ee9264a211 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -105,8 +105,8 @@ datum/shuttle_controller callshuttle = 0 //if there's an alive AI or a communication console on the station z level, we don't call the shuttle break - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction") - callshuttle = 0 + if(ticker && ticker.mode && (ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction")) + callshuttle = 0 if(callshuttle) if(!online && direction == 1) //we don't call the shuttle if it's already coming From 7d309d56ff24b9d7991bbeaeeb3e32fe18e2fe5d Mon Sep 17 00:00:00 2001 From: Jesus Hussein Chris Date: Mon, 13 Jan 2014 12:37:18 +1300 Subject: [PATCH 2/5] Adds the ability to spawn dead AIs, dead facehuggers and dead slimes on away mission maps. Expands on dead human spawning. --- code/modules/awaymissions/corpse.dm | 48 ++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index ef7b01c90e2..817b1d97790 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -7,6 +7,7 @@ /obj/effect/landmark/corpse name = "Unknown" var/mobname = "Unknown" //Unused now but it'd fuck up maps to remove it now + var/mobgender = "male" //Set to male by default due to the patriarchy var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse. var/corpsesuit = null var/corpseshoes = null @@ -23,6 +24,9 @@ var/corpseidjob = null // Needs to be in quotes, such as "Clown" or "Chef." This just determines what the ID reads as, not their access var/corpseidaccess = null //This is for access. See access.dm for which jobs give what access. Again, put in quotes. Use "Captain" if you want it to be all access. var/corpseidicon = null //For setting it to be a gold, silver, centcom etc ID + var/corpsehusk = null + var/corpsebrute = null //set brute damage on the corpse + var/corpseoxy = null //set suffocation damage on the corpse /obj/effect/landmark/corpse/initialize() createCorpse() @@ -30,7 +34,12 @@ /obj/effect/landmark/corpse/proc/createCorpse() //Creates a mob and checks for gear in each slot before attempting to equip it. var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc) M.real_name = src.name + M.gender = src.mobgender M.death(1) //Kills the new mob + if(src.corpsehusk) + M.Drain() + M.adjustBruteLoss(src.corpsebrute) + M.adjustOxyLoss(src.corpseoxy) if(src.corpseuniform) M.equip_to_slot_or_del(new src.corpseuniform(M), slot_w_uniform) if(src.corpsesuit) @@ -57,7 +66,7 @@ M.equip_to_slot_or_del(new src.corpseback(M), slot_back) if(src.corpseid == 1) var/obj/item/weapon/card/id/W = new(M) - W.name = "[M.real_name]'s ID Card" + W.name = "[M.real_name]'s ID Card ([corpseidjob])" var/datum/job/jobdatum for(var/jobtype in typesof(/datum/job)) var/datum/job/J = new jobtype @@ -77,6 +86,43 @@ M.equip_to_slot_or_del(W, slot_wear_id) del(src) +/obj/effect/landmark/AICorpse + +/obj/effect/landmark/AICorpse/initialize() + createAICorpse() + +/obj/effect/landmark/AICorpse/proc/createAICorpse() //Creates an AI corpse, amazingly + var/A = locate(/mob/living/silicon/ai) in loc //stops multiple dead ais spawning, apparently hacky, ¯\_(?)_/¯ (who's that pokemon?) + if(A) + return + var/L = new /datum/ai_laws/asimov //avoid runtimes + var/B = new /obj/item/device/mmi/ //avoid runtimes + var/mob/living/silicon/ai/M = new(src.loc, L, B, 1) + M.death() + M.name = src.name //name is that of the landmark that spawned it + M.real_name = M.name + del(src) //delete the landmark now that we're done with it + +/obj/effect/landmark/slimeCorpse + +/obj/effect/landmark/slimeCorpse/initialize() + createSlimeCorpse() + +/obj/effect/landmark/slimeCorpse/proc/createSlimeCorpse() //Creates a mob + var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/ (src.loc) + M.death(1) + +obj/effect/landmark/facehugCorpse + +/obj/effect/landmark/facehugCorpse/initialize() + createfacehugCorpse() + +/obj/effect/landmark/facehugCorpse/proc/createfacehugCorpse() //Creates a facehugger + var/obj/item/clothing/mask/facehugger/O = new /obj/item/clothing/mask/facehugger (src.loc) + O.Die() + + O.name = src.name + // I'll work on making a list of corpses people request for maps, or that I think will be commonly used. Syndicate operatives for example. From 68a6131c228d0ad6e2a01bc7f2033bbf35bf626e Mon Sep 17 00:00:00 2001 From: Jesus Hussein Chris Date: Mon, 13 Jan 2014 12:38:31 +1300 Subject: [PATCH 3/5] Fixes bugs that prevent spawning dead slimes and dead monkeys before roundstart. --- code/modules/mob/living/carbon/metroid/death.dm | 3 ++- code/modules/mob/living/carbon/monkey/death.dm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/metroid/death.dm b/code/modules/mob/living/carbon/metroid/death.dm index 92ecf85b4ce..f83311add3e 100644 --- a/code/modules/mob/living/carbon/metroid/death.dm +++ b/code/modules/mob/living/carbon/metroid/death.dm @@ -22,6 +22,7 @@ update_canmove() if(blind) blind.layer = 0 - ticker.mode.check_win() + if(ticker && ticker.mode) + ticker.mode.check_win() return ..(gibbed) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/death.dm b/code/modules/mob/living/carbon/monkey/death.dm index 2aa321ffdee..cecda79cfc9 100644 --- a/code/modules/mob/living/carbon/monkey/death.dm +++ b/code/modules/mob/living/carbon/monkey/death.dm @@ -18,6 +18,7 @@ update_canmove() if(blind) blind.layer = 0 - ticker.mode.check_win() + if(ticker && ticker.mode) + ticker.mode.check_win() return ..(gibbed) \ No newline at end of file From 73005ca98253fffca2877dc04a7e291d8099dc59 Mon Sep 17 00:00:00 2001 From: Tenebrosity Date: Tue, 14 Jan 2014 13:18:13 +1300 Subject: [PATCH 4/5] Hopefully fixes Giacom's complaints --- code/modules/awaymissions/corpse.dm | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 817b1d97790..e618d1409bb 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -7,7 +7,7 @@ /obj/effect/landmark/corpse name = "Unknown" var/mobname = "Unknown" //Unused now but it'd fuck up maps to remove it now - var/mobgender = "male" //Set to male by default due to the patriarchy + var/mobgender = MALE //Set to male by default due to the patriarchy. Other options include FEMALE and NEUTER var/corpseuniform = null //Set this to an object path to have the slot filled with said object on the corpse. var/corpsesuit = null var/corpseshoes = null @@ -86,12 +86,10 @@ M.equip_to_slot_or_del(W, slot_wear_id) del(src) -/obj/effect/landmark/AICorpse - /obj/effect/landmark/AICorpse/initialize() - createAICorpse() + createCorpse() -/obj/effect/landmark/AICorpse/proc/createAICorpse() //Creates an AI corpse, amazingly +/obj/effect/landmark/AICorpse/proc/createCorpse() //Creates an AI corpse, amazingly var/A = locate(/mob/living/silicon/ai) in loc //stops multiple dead ais spawning, apparently hacky, ¯\_(?)_/¯ (who's that pokemon?) if(A) return @@ -101,26 +99,20 @@ M.death() M.name = src.name //name is that of the landmark that spawned it M.real_name = M.name - del(src) //delete the landmark now that we're done with it - -/obj/effect/landmark/slimeCorpse /obj/effect/landmark/slimeCorpse/initialize() - createSlimeCorpse() + createCorpse() -/obj/effect/landmark/slimeCorpse/proc/createSlimeCorpse() //Creates a mob +/obj/effect/landmark/slimeCorpse/proc/createCorpse() var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/ (src.loc) M.death(1) -obj/effect/landmark/facehugCorpse - /obj/effect/landmark/facehugCorpse/initialize() - createfacehugCorpse() + createCorpse() -/obj/effect/landmark/facehugCorpse/proc/createfacehugCorpse() //Creates a facehugger +/obj/effect/landmark/facehugCorpse/proc/createCorpse() var/obj/item/clothing/mask/facehugger/O = new /obj/item/clothing/mask/facehugger (src.loc) O.Die() - O.name = src.name From 245dc528338eafd6ccd540f856423ebbda012f7d Mon Sep 17 00:00:00 2001 From: Jesus Hussein Chris Date: Tue, 14 Jan 2014 21:30:35 +1300 Subject: [PATCH 5/5] Removes unneeded code as pointed out by Cheridan. Thanks for the help. --- code/modules/awaymissions/corpse.dm | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index e618d1409bb..20865f5313d 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -86,10 +86,7 @@ M.equip_to_slot_or_del(W, slot_wear_id) del(src) -/obj/effect/landmark/AICorpse/initialize() - createCorpse() - -/obj/effect/landmark/AICorpse/proc/createCorpse() //Creates an AI corpse, amazingly +/obj/effect/landmark/corpse/AICorpse/createCorpse() //Creates a corrupted AI var/A = locate(/mob/living/silicon/ai) in loc //stops multiple dead ais spawning, apparently hacky, ¯\_(?)_/¯ (who's that pokemon?) if(A) return @@ -100,29 +97,19 @@ M.name = src.name //name is that of the landmark that spawned it M.real_name = M.name -/obj/effect/landmark/slimeCorpse/initialize() - createCorpse() - -/obj/effect/landmark/slimeCorpse/proc/createCorpse() +/obj/effect/landmark/corpse/slimeCorpse/createCorpse() //Creates a dead slime var/mob/living/carbon/slime/M = new /mob/living/carbon/slime/ (src.loc) M.death(1) + M.name = src.name -/obj/effect/landmark/facehugCorpse/initialize() - createCorpse() - -/obj/effect/landmark/facehugCorpse/proc/createCorpse() +/obj/effect/landmark/corpse/facehugCorpse/createCorpse() //Creates a squashed facehugger var/obj/item/clothing/mask/facehugger/O = new /obj/item/clothing/mask/facehugger (src.loc) O.Die() O.name = src.name - // I'll work on making a list of corpses people request for maps, or that I think will be commonly used. Syndicate operatives for example. - - - - /obj/effect/landmark/corpse/syndicatesoldier name = "Syndicate Operative" corpseuniform = /obj/item/clothing/under/syndicate