From 5ae43f0875b596008c71b1eb1967f0f27161aed5 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 5 Aug 2015 21:52:17 -0400 Subject: [PATCH 1/2] Shadowling Surgery and Fixes --- code/datums/mind.dm | 2 +- code/game/gamemodes/shadowling/shadowling.dm | 6 +-- .../shadowling/shadowling_abilities.dm | 4 +- code/game/gamemodes/vampire/vampire.dm | 24 +++++------ code/game/gamemodes/vampire/vampire_powers.dm | 12 +++--- code/game/machinery/cloning.dm | 18 ++++----- code/modules/admin/player_panel.dm | 4 +- code/modules/mob/living/login.dm | 2 +- code/modules/surgery/organs_internal.dm | 40 +++++++++++++++++++ 9 files changed, 76 insertions(+), 36 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 1b0503faad6..c465f7e371e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -261,7 +261,7 @@ datum/mind else text += "yes|NO" - if(src in ticker.mode.enthralled) + if(src in ticker.mode.vampire_enthralled) text += "YES|no" else text += "yes|NO" diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 3d85f9ae4f9..a4606bf6852 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -166,9 +166,9 @@ Made by Xhuis return 1 /datum/game_mode/proc/remove_thrall(datum/mind/thrall_mind, var/kill = 0) - if(!istype(thrall_mind) || !(thrall_mind in thralls) || !isliving(thrall_mind.current)) + if(!istype(thrall_mind) || !(thrall_mind in shadowling_thralls) || !isliving(thrall_mind.current)) return 0 //If there is no mind, the mind isn't a thrall, or the mind's mob isn't alive, return - thralls.Remove(thrall_mind) + shadowling_thralls.Remove(thrall_mind) thrall_mind.current.attack_log += "\[[time_stamp()]\] Dethralled" thrall_mind.special_role = null update_shadow_icons_removed(thrall_mind) @@ -315,7 +315,7 @@ Made by Xhuis if((I.icon_state == "thrall" || I.icon_state == "shadowling") && I.loc == shadow_mind.current) qdel(I) - for(var/datum/mind/thrall in thralls) + for(var/datum/mind/thrall in shadowling_thralls) if(thrall.current) if(thrall.current.client) for(var/image/I in thrall.current.client.images) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 09f089d1400..43a0c5f7d47 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -240,8 +240,8 @@ /obj/effect/proc_holder/spell/wizard/targeted/enthrall/cast(list/targets) var/mob/living/carbon/human/user = usr - listclearnulls(ticker.mode.thralls) - if(ticker.mode.thralls.len >= 5 && (!istype(user.species, /datum/species/shadow/ling))) + listclearnulls(ticker.mode.shadowling_thralls) + if(ticker.mode.shadowling_thralls.len >= 5 && (!istype(user.species, /datum/species/shadow/ling))) user << "With your telepathic abilities suppressed, your human form will not allow you to enthrall any others. Hatch first." charge_counter = charge_max return diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index e9757a4a83b..36d0638fc92 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -2,8 +2,8 @@ //They get a traitor objective and a blood sucking objective /datum/game_mode var/list/datum/mind/vampires = list() - var/list/datum/mind/enthralled = list() //those controlled by a vampire - var/list/thralls = list() //vammpires controlling somebody + var/list/datum/mind/vampire_enthralled = list() //those controlled by a vampire + var/list/vampire_thralls = list() //vammpires controlling somebody /datum/game_mode/vampire name = "vampire" config_tag = "vampire" @@ -124,9 +124,9 @@ return 1 /datum/game_mode/proc/auto_declare_completion_enthralled() - if(enthralled.len) + if(vampire_enthralled.len) var/text = "The Enthralled were:" - for(var/datum/mind/Mind in enthralled) + for(var/datum/mind/Mind in vampire_enthralled) text += "
[Mind.key] was [Mind.name] (" if(Mind.current) if(Mind.current.stat == DEAD) @@ -386,13 +386,13 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha //prepare for copypaste /datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind) var/ref = "\ref[vampire_mind]" - if(ref in thralls) + if(ref in vampire_thralls) if(vampire_mind.current) if(vampire_mind.current.client) var/I = image('icons/mob/mob.dmi', loc = vampire_mind.current, icon_state = "vampire") vampire_mind.current.client.images += I - for(var/headref in thralls) - for(var/datum/mind/t_mind in thralls[headref]) + for(var/headref in vampire_thralls) + for(var/datum/mind/t_mind in vampire_thralls[headref]) var/datum/mind/head = locate(headref) if(head) if(head.current) @@ -409,9 +409,9 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha t_mind.current.client.images += I /datum/game_mode/proc/update_vampire_icons_removed(datum/mind/vampire_mind) - for(var/headref in thralls) + for(var/headref in vampire_thralls) var/datum/mind/head = locate(headref) - for(var/datum/mind/t_mind in thralls[headref]) + for(var/datum/mind/t_mind in vampire_thralls[headref]) if(t_mind.current) if(t_mind.current.client) for(var/image/I in t_mind.current.client.images) @@ -437,9 +437,9 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha if(!istype(head)) head = vampire_mind //workaround for removing a thrall's control over the enthralled var/ref = "\ref[head]" - if(ref in thralls) - thralls[ref] -= vampire_mind - enthralled -= vampire_mind + if(ref in vampire_thralls) + vampire_thralls[ref] -= vampire_mind + vampire_enthralled -= vampire_mind vampire_mind.special_role = null update_vampire_icons_removed(vampire_mind) //world << "Removed [vampire_mind.current.name] from vampire shit" diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 009126c5731..eff70300720 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -305,7 +305,7 @@ if(!C.mind) src << "\red [C.name]'s mind is not there for you to enthrall." return 0 - if(enthrall_safe || ( C.mind in ticker.mode.vampires )||( C.mind.vampire )||( C.mind in ticker.mode.enthralled )) + if(enthrall_safe || ( C.mind in ticker.mode.vampires )||( C.mind.vampire )||( C.mind in ticker.mode.vampire_enthralled )) C.visible_message("\red [C] seems to resist the takeover!", "\blue You feel a familiar sensation in your skull that quickly dissipates.") return 0 if(!C.vampire_affected(mind)) @@ -320,12 +320,12 @@ src << "\red SOMETHING WENT WRONG, YELL AT POMF OR NEXIS" return 0 var/ref = "\ref[src.mind]" - if(!(ref in ticker.mode.thralls)) - ticker.mode.thralls[ref] = list(H.mind) + if(!(ref in ticker.mode.vampire_thralls)) + ticker.mode.vampire_thralls[ref] = list(H.mind) else - ticker.mode.thralls[ref] += H.mind - ticker.mode.enthralled.Add(H.mind) - ticker.mode.enthralled[H.mind] = src.mind + ticker.mode.vampire_thralls[ref] += H.mind + ticker.mode.vampire_enthralled.Add(H.mind) + ticker.mode.vampire_enthralled[H.mind] = src.mind H.mind.special_role = "VampThrall" H << "\red You have been Enthralled by [name]. Follow their every command." src << "\red You have successfully Enthralled [H.name]. If they refuse to do as you say just adminhelp." diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 49e9cc299fe..9f8411d9f0e 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -20,7 +20,7 @@ var/mess = 0 //Need to clean out it if it's full of exploded clone. var/attempting = 0 //One clone attempt at a time thanks var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk - var/biomass = 0 + var/biomass = 0 var/speed_coeff var/efficiency @@ -31,7 +31,7 @@ set_light(2) else set_light(0) - + /obj/machinery/clonepod/biomass biomass = CLONE_BIOMASS @@ -48,7 +48,7 @@ component_parts += new /obj/item/stack/cable_coil(null, 1) RefreshParts() update_icon() - + /obj/machinery/clonepod/upgraded/New() ..() component_parts = list() @@ -62,7 +62,7 @@ component_parts += new /obj/item/stack/cable_coil(null, 1) biomass = CLONE_BIOMASS RefreshParts() - + /obj/machinery/clonepod/Destroy() if(connected) connected.pods -= src @@ -254,7 +254,7 @@ ticker.mode.update_all_cult_icons() //So the icon actually appears if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted)) ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears - if(("\ref[H.mind]" in ticker.mode.thralls) || (H.mind in ticker.mode.enthralled)) + if(("\ref[H.mind]" in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled)) ticker.mode.update_vampire_icons_added(H.mind) // -- End mode specific stuff @@ -280,7 +280,7 @@ H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") */ H.set_species(R.dna.species) - + update_icon() for(var/datum/language/L in R.languages) @@ -356,7 +356,7 @@ if(panel_open) default_deconstruction_crowbar(W) return - + if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) if (!src.check_access(W)) user << "\red Access Denied." @@ -399,7 +399,7 @@ return else ..() - + /obj/machinery/clonepod/emag_act(user as mob) if (isnull(src.occupant)) return @@ -466,7 +466,7 @@ spawn(5) qdel(src.occupant) return - + /obj/machinery/clonepod/update_icon() ..() icon_state = "pod_0" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 13813fe2edb..8d9a61b10e9 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -534,8 +534,8 @@ if(ticker.mode.vampires.len) dat += check_role_table("Vampires", ticker.mode.vampires, src) - if(ticker.mode.enthralled.len) - dat += check_role_table("Vampire Thralls", ticker.mode.enthralled, src) + if(ticker.mode.vampire_enthralled.len) + dat += check_role_table("Vampire Thralls", ticker.mode.vampire_enthralled, src) if(ticker.mode.xenos.len) dat += check_role_table("Xenos", ticker.mode.xenos, src) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 3d107d3857a..d4fbd5c1ec0 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -31,7 +31,7 @@ if(mode) mode.update_all_icons() if("vampire") - if((ref in ticker.mode.thralls) || (mind in ticker.mode.enthralled)) + if((ref in ticker.mode.vampire_thralls) || (mind in ticker.mode.vampire_enthralled)) ticker.mode.update_vampire_icons_added(mind) if("shadowling") if((mind in ticker.mode.shadowling_thralls) || (mind in ticker.mode.shadows)) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 17ffe76d69e..0338ea21932 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -12,6 +12,46 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == (affected.encased ? 3 : 2) +////////////////////////////////////////////////////////////////// +// Dethrall Shadowling // +////////////////////////////////////////////////////////////////// +/datum/surgery_step/internal/dethrall + allowed_tools = list( + /obj/item/weapon/hemostat = 100, \ + /obj/item/weapon/wirecutters = 75, \ + /obj/item/weapon/kitchen/utensil/fork = 20 + ) + + min_duration = 120 + max_duration = 120 + + can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if (!hasorgans(target)) + return + var/obj/item/organ/external/affected = target.get_organ(target_zone) + return ..() && affected && is_thrall(target) && affected.open == 3 && target_zone == "head" + + begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] begins looking around in [target]'s head.", "You begin looking for foreign influences on [target]'s brain...") + user << "You locate a small, pulsing black tumor on the side of [target]'s brain and begin to remove it." + target << "A small part of your head pulses with agony as the light impacts it." + user.visible_message("[user] begins removing something from [target]'s head.", \ + "You begin carefully extracting the tumor...") + ..() + + end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + user.visible_message("[user] carefully extracts the tumor from [target]'s brain!", \ + "You extract the black tumor from [target]'s head. It quickly shrivels and burns away.") + ticker.mode.remove_thrall(target.mind,0) + + fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) + if(prob(50)) + user.visible_message("[user] slips and rips the tumor out from [target]'s head!", \ + "You fumble and tear out [target]'s tumor!") + ticker.mode.remove_thrall(target.mind,1) + else + user.visible_message("[user] screws up!") + ////////////////////////////////////////////////////////////////// // ALIEN EMBRYO SURGERY // ////////////////////////////////////////////////////////////////// From 1e0ce5416513d3e2b9298a674fa90c172402a5b2 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 5 Aug 2015 23:00:21 -0400 Subject: [PATCH 2/2] more fixes and tweaks --- code/game/machinery/cloning.dm | 2 ++ code/modules/surgery/organs_internal.dm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 9f8411d9f0e..85f7c838656 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -256,6 +256,8 @@ ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears if(("\ref[H.mind]" in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled)) ticker.mode.update_vampire_icons_added(H.mind) + if(("\ref[H.mind]" in ticker.mode.shadowling_thralls) || (H.mind in ticker.mode.shadows)) + ticker.mode.update_shadow_icons_added(H.mind) // -- End mode specific stuff diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 0338ea21932..f3d50555bb0 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -50,7 +50,7 @@ "You fumble and tear out [target]'s tumor!") ticker.mode.remove_thrall(target.mind,1) else - user.visible_message("[user] screws up!") + user.visible_message("[user]'s hand slips and fumbles! Luckily, they didn't damage anything!") ////////////////////////////////////////////////////////////////// // ALIEN EMBRYO SURGERY //