From 3eb8d1c2b9cda319b16397961cf464d6ae946449 Mon Sep 17 00:00:00 2001 From: jack-fractal Date: Fri, 22 Nov 2013 20:09:24 -0500 Subject: [PATCH] - lots of debugging - modifying how runes are called to use reflection - adding highlander code to make sure that there can only be one mask - adding Spread Shadows spell - adding cult admin investigation log - adding mask icon --- baystation12.dme | 1 + baystation12.int | 4 +- code/datums/mind.dm | 21 +- code/game/gamemodes/cult/cult.dm | 37 +--- code/game/gamemodes/cult/ritual.dm | 226 ++++++++++------------ code/game/gamemodes/cult/runes.dm | 22 ++- code/modules/admin/admin_investigate.dm | 38 ++-- code/modules/mob/mob.dm | 11 +- code/modules/mob/new_player/new_player.dm | 4 +- code/modules/mob/spirit/mask/mask.dm | 109 ++++++++--- code/modules/mob/spirit/mask/respawn.dm | 20 ++ code/modules/mob/spirit/movement.dm | 2 + code/modules/mob/spirit/viewpoint.dm | 7 + code/modules/mob/transform_procs.dm | 72 +++---- icons/mob/spirits/mask.dmi | Bin 0 -> 972 bytes 15 files changed, 307 insertions(+), 267 deletions(-) create mode 100644 code/modules/mob/spirit/mask/respawn.dm create mode 100644 icons/mob/spirits/mask.dmi diff --git a/baystation12.dme b/baystation12.dme index f64b9f8e6b..b8631a47eb 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1031,6 +1031,7 @@ #include "code\modules\mob\spirit\spirit.dm" #include "code\modules\mob\spirit\viewpoint.dm" #include "code\modules\mob\spirit\mask\mask.dm" +#include "code\modules\mob\spirit\mask\respawn.dm" #include "code\modules\nano\_JSON.dm" #include "code\modules\nano\JSON Reader.dm" #include "code\modules\nano\JSON Writer.dm" diff --git a/baystation12.int b/baystation12.int index aefda4d8d7..ac308bf822 100644 --- a/baystation12.int +++ b/baystation12.int @@ -2,8 +2,8 @@ /* MAP_ICON_TYPE: 0 LAST_COMPILE_VERSION: 501.1217 -DIR: code code\datums code\datums\visibility_networks code\defines\obj code\game code\game\gamemodes code\game\gamemodes\cult code\game\gamemodes\malfunction code\game\machinery code\game\machinery\camera code\modules code\modules\admin code\modules\mob code\modules\mob\living code\modules\mob\living\carbon code\modules\mob\living\carbon\human -LAST_COMPILE_TIME: 1384721250 +DIR: code code\_onclick code\datums code\datums\visibility_networks code\defines\obj code\game code\game\gamemodes code\game\gamemodes\blob code\game\gamemodes\blob\blobs code\game\gamemodes\cult code\game\gamemodes\events code\game\gamemodes\malfunction code\modules code\modules\mob code\modules\mob\dead code\modules\mob\dead\observer code\modules\mob\spirit code\modules\mob\spirit\mask icons icons\mob icons\mob\spirits +LAST_COMPILE_TIME: 1385167549 AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/datums/mind.dm b/code/datums/mind.dm index d41a521ac3..01f68d3ac0 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -578,14 +578,7 @@ datum/mind switch(href_list["cult"]) if("clear") if(src in ticker.mode.cult) - ticker.mode.cult -= src - ticker.mode.update_cult_icons_removed(src) - special_role = null - var/datum/game_mode/cult/cult = ticker.mode - if (istype(cult)) - cult.memoize_cult_objectives(src) - current << "\red You have been brainwashed! You are no longer a cultist!" - memory = "" + ticker.mode.remove_cultist(src) log_admin("[key_name_admin(usr)] has de-cult'ed [current].") if("cultist") if(!(src in ticker.mode.cult)) @@ -593,18 +586,6 @@ datum/mind special_role = "Cultist" current << "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie." current << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." - /* - ticker.mode.cult += src - ticker.mode.update_cult_icons_added(src) - special_role = "Cultist" - current << "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie." - current << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." - var/datum/game_mode/cult/cult = ticker.mode - if (istype(cult)) - cult.memoize_cult_objectives(src) - var/obj/cult_viewpoint/viewpoint = new(current) - viewpoint.loc = current - */ log_admin("[key_name_admin(usr)] has cult'ed [current].") if("tome") var/mob/living/carbon/human/H = current diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 401644c631..26d984641f 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -8,6 +8,7 @@ /proc/iscultist(mob/living/M as mob) return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.cult) + /proc/is_convertable_to_cult(datum/mind/mind) if(!istype(mind)) return 0 if(istype(mind.current, /mob/living/carbon/human) && (mind.assigned_role in list("Captain", "Chaplain"))) return 0 @@ -133,7 +134,6 @@ mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." mob.mutations.Remove(CLUMSY) - var/obj/cult_viewpoint/viewpoint = new(mob) viewpoint.loc = mob world << "Spawning viewpoint on [mob]" @@ -205,7 +205,7 @@ for(var/mob/M in viewers(cult_mind.current)) M << "[cult_mind.current] looks like they just reverted to their old faith!" - + /datum/game_mode/proc/update_all_cult_icons() spawn(0) // reset the cult @@ -322,35 +322,6 @@ for(var/mob/spirit/currentSpirit in spirits) remove_cult_icon_from_spirit(currentSpirit,cult_mind) -/* -/datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind) - spawn(0) - for(var/datum/mind/cultist in cult) - if(cultist.current) - if(cultist.current.client) - var/I = image('icons/mob/mob.dmi', loc = cult_mind.current, icon_state = "cult") - cultist.current.client.images += I - if(cult_mind.current) - if(cult_mind.current.client) - var/image/J = image('icons/mob/mob.dmi', loc = cultist.current, icon_state = "cult") - cult_mind.current.client.images += J - - -/datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind) - spawn(0) - for(var/datum/mind/cultist in cult) - if(cultist.current) - if(cultist.current.client) - for(var/image/I in cultist.current.client.images) - if(I.icon_state == "cult" && I.loc == cult_mind.current) - del(I) - - if(cult_mind.current) - if(cult_mind.current.client) - for(var/image/I in cult_mind.current.client.images) - if(I.icon_state == "cult") - del(I) -*/ /datum/game_mode/cult/proc/get_unconvertables() var/list/ucs = list() @@ -386,6 +357,10 @@ return 1 +/atom/proc/cult_log(var/message) + investigate_log(message, "cult") + + /datum/game_mode/cult/declare_completion() if(!check_cult_victory()) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 69bd5cc42b..0686a1842b 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -1,6 +1,7 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 var/cultwords = list() +var/rune_to_english = list() var/runedec = 0 var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", "self", "see", "other", "hide") @@ -16,9 +17,12 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", /proc/runerandom() //randomizes word meaning var/list/runewords=list("ire","ego","nahlizet","certum","veri","jatkaa","mgar","balaq", "karazet", "geeri") ///"orkan" and "allaq" removed. for (var/word in engwords) - cultwords[word] = pick(runewords) + var/runeword = pick(runewords) + cultwords[word] = runeword + rune_to_english[runeword] = word runewords-=cultwords[word] + /obj/effect/rune desc = "" anchored = 1 @@ -29,7 +33,6 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", unacidable = 1 layer = TURF_LAYER - var/word1 var/word2 var/word3 @@ -62,129 +65,110 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", // self other technology - Communication rune //was other hear blood // join hide technology - stun rune. Rune color: bright pink. - New() - ..() - var/image/blood = image(loc = src) - blood.override = 1 - for(var/mob/living/silicon/ai/AI in player_list) - AI.client.images += blood - cultNetwork.viewpoints+=src - cultNetwork.addViewpoint(src) + +/obj/effect/rune/New() + ..() + var/image/blood = image(loc = src) + blood.override = 1 + for(var/mob/living/silicon/ai/AI in player_list) + AI.client.images += blood + cultNetwork.viewpoints+=src + cultNetwork.addViewpoint(src) + +/obj/effect/rune/Del() + ..() + cultNetwork.viewpoints-=src + cultNetwork.removeViewpoint(src) + +/obj/effect/rune/examine() + set src in view(2) + + if(!iscultist(usr) && !isSpirit(usr)) + usr << "A strange collection of symbols drawn in blood." + return + if(!desc) + usr << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." + else + usr << "Explosive Runes inscription in blood. It reads: [desc]." + + return + + +/obj/effect/rune/attackby(I as obj, user as mob) + if(istype(I, /obj/item/weapon/tome) && iscultist(user)) + user << "You retrace your steps, carefully undoing the lines of the rune." + del(src) + return + else if(istype(I, /obj/item/weapon/nullrod)) + user << "\blue You disrupt the vile magic with the deadening field of the null rod!" + del(src) + return + return + + +/obj/effect/rune/proc/get_word_string() + if (word1 == cultwords["travel"]) + if (word2 == cultwords["self"]) + return "teleport" + if (word2 == cultwords["other"]) + return "itemport" + return "[rune_to_english[word1]]_[rune_to_english[word2]]_[rune_to_english[word3]]" + + +/obj/effect/rune + var/list/effect_dictionary = list( "teleport"=/obj/effect/rune/proc/teleportRune, + "itemport"=/obj/effect/rune/proc/itemportRune, + "see_blood_hell"=/obj/effect/rune/proc/tomesummon, + "hell_destroy_other"=/obj/effect/rune/proc/armor, + "join_blood_self"=/obj/effect/rune/proc/convert, + "hell_join_self"=/obj/effect/rune/proc/tearreality, + "destroy_see_technology"=/obj/effect/rune/proc/empRune, + "travel_blood_self"=/obj/effect/rune/proc/drain, + "see_hell_join"=/obj/effect/rune/proc/seer, + "blood_join_hell"=/obj/effect/rune/proc/raise, + "hide_see_blood"=/obj/effect/rune/proc/obscureRune, + "hell_travel_self"=/obj/effect/rune/proc/ajourney, + "blood_see_travel"=/obj/effect/rune/proc/manifest, + "hell_technology_join"=/obj/effect/rune/proc/talisman, + "hell_blood_join"=/obj/effect/rune/proc/sacrifice, + "blood_see_hide"=/obj/effect/rune/proc/revealrunesrune, + "destroy_travel_self"=/obj/effect/rune/proc/wall, + "travel_technology_other"=/obj/effect/rune/proc/freedom, + "join_other_self"=/obj/effect/rune/proc/cultsummon, + "hide_other_see"=/obj/effect/rune/proc/deafen, + "destroy_see_other"=/obj/effect/rune/proc/blind, + "destroy_see_blood"=/obj/effect/rune/proc/bloodboil, + "self_other_technology"=/obj/effect/rune/proc/communicate, + "join_hide_technology"=/obj/effect/rune/proc/runestun ) + +/obj/effect/rune/attack_hand(mob/living/user as mob) + if(!iscultist(user)) + user << "You can't mouth the arcane scratchings without fumbling over them." + return + if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle)) + user << "You are unable to speak the words of the rune." + return + if(!word1 || !word2 || !word3 || prob(user.getBrainLoss())) + return fizzle() - Del() - ..() - cultNetwork.viewpoints-=src - cultNetwork.removeViewpoint(src) - - examine() - set src in view(2) - - if(!iscultist(usr) && !isSpirit(usr)) - usr << "A strange collection of symbols drawn in blood." - return - /* Explosions... really? - if(desc && !usr.stat) - usr << "It reads: [desc]." - sleep(30) - explosion(src.loc, 0, 2, 5, 5) - if(src) - del(src) - */ - if(!desc) - usr << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." - else - usr << "Explosive Runes inscription in blood. It reads: [desc]." - - return + var/word_string = get_word_string() + if (word_string in effect_dictionary) + cult_log("of type [effect_dictionary[word_string]] activated by [key_name_admin(user)].") + return call(src,effect_dictionary[word_string])() + return fizzle() - attackby(I as obj, user as mob) - if(istype(I, /obj/item/weapon/tome) && iscultist(user)) - user << "You retrace your steps, carefully undoing the lines of the rune." - del(src) - return - else if(istype(I, /obj/item/weapon/nullrod)) - user << "\blue You disrupt the vile magic with the deadening field of the null rod!" - del(src) - return - return +/obj/effect/rune/proc/fizzle() + if(istype(src,/obj/effect/rune)) + usr.say(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix.")) + else + usr.whisper(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix.")) + for (var/mob/V in viewers(src)) + V.show_message("\red The markings pulse with a small burst of light, then fall dark.", 3, "\red You hear a faint fizzle.", 2) + return - - attack_hand(mob/living/user as mob) - if(!iscultist(user)) - user << "You can't mouth the arcane scratchings without fumbling over them." - return - if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle)) - user << "You are unable to speak the words of the rune." - return - if(!word1 || !word2 || !word3 || prob(user.getBrainLoss())) - return fizzle() -// if(!src.visibility) -// src.visibility=1 - if(word1 == cultwords["travel"] && word2 == cultwords["self"]) - return teleport(src.word3) - if(word1 == cultwords["see"] && word2 == cultwords["blood"] && word3 == cultwords["hell"]) - return tomesummon() - if(word1 == cultwords["hell"] && word2 == cultwords["destroy"] && word3 == cultwords["other"]) - return armor() - if(word1 == cultwords["join"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) - return convert() - if(word1 == cultwords["hell"] && word2 == cultwords["join"] && word3 == cultwords["self"]) - return tearreality() - if(word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["technology"]) - return emp(src.loc,3) - if(word1 == cultwords["travel"] && word2 == cultwords["blood"] && word3 == cultwords["self"]) - return drain() - if(word1 == cultwords["see"] && word2 == cultwords["hell"] && word3 == cultwords["join"]) - return seer() - if(word1 == cultwords["blood"] && word2 == cultwords["join"] && word3 == cultwords["hell"]) - return raise() - if(word1 == cultwords["hide"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) - return obscure(4) - if(word1 == cultwords["hell"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) - return ajourney() - if(word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["travel"]) - return manifest() - if(word1 == cultwords["hell"] && word2 == cultwords["technology"] && word3 == cultwords["join"]) - return talisman() - if(word1 == cultwords["hell"] && word2 == cultwords["blood"] && word3 == cultwords["join"]) - return sacrifice() - if(word1 == cultwords["blood"] && word2 == cultwords["see"] && word3 == cultwords["hide"]) - return revealrunes(src) - if(word1 == cultwords["destroy"] && word2 == cultwords["travel"] && word3 == cultwords["self"]) - return wall() - if(word1 == cultwords["travel"] && word2 == cultwords["technology"] && word3 == cultwords["other"]) - return freedom() - if(word1 == cultwords["join"] && word2 == cultwords["other"] && word3 == cultwords["self"]) - return cultsummon() - if(word1 == cultwords["hide"] && word2 == cultwords["other"] && word3 == cultwords["see"]) - return deafen() - if(word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["other"]) - return blind() - if(word1 == cultwords["destroy"] && word2 == cultwords["see"] && word3 == cultwords["blood"]) - return bloodboil() - if(word1 == cultwords["self"] && word2 == cultwords["other"] && word3 == cultwords["technology"]) - return communicate() - if(word1 == cultwords["travel"] && word2 == cultwords["other"]) - return itemport(src.word3) - if(word1 == cultwords["join"] && word2 == cultwords["hide"] && word3 == cultwords["technology"]) - return runestun() - else - return fizzle() - - - proc - fizzle() - if(istype(src,/obj/effect/rune)) - usr.say(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix.")) - else - usr.whisper(pick("Hakkrutju gopoenjim.", "Nherasai pivroiashan.", "Firjji prhiv mazenhor.", "Tanah eh wakantahe.", "Obliyae na oraie.", "Miyf hon vnor'c.", "Wakabai hij fen juswix.")) - for (var/mob/V in viewers(src)) - V.show_message("\red The markings pulse with a small burst of light, then fall dark.", 3, "\red You hear a faint fizzle.", 2) - return - - check_icon() - icon = get_uristrune_cult(word1, word2, word3) +/obj/effect/rune/proc/check_icon() + icon = get_uristrune_cult(word1, word2, word3) /obj/item/weapon/tome name = "arcane tome" diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index d17f9022aa..e7f1e2ff26 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -2,6 +2,9 @@ var/list/sacrificed = list() /////////////////////////////////////////FIRST RUNE +/obj/effect/rune/proc/teleportRune() + return teleport(src.word3) + /obj/effect/rune/proc/teleport(var/key) var/mob/living/user = usr var/allrunesloc[] @@ -36,7 +39,8 @@ var/list/sacrificed = list() call(/obj/effect/rune/proc/fizzle)() return - +/obj/effect/rune/proc/itemportRune() + return itemport(src.word3) /obj/effect/rune/proc/itemport(var/key) // var/allrunesloc[] // allrunesloc = new/list() @@ -106,6 +110,7 @@ var/list/sacrificed = list() M.visible_message("\red [M] writhes in pain as the markings below him glow a bloody red.", \ "\red AAAAAAHHHH!.", \ "\red You hear an anguished scream.") + cult_log("[key_name_admin(usr)] tried to convert [key_name_admin(M)]") if(is_convertable_to_cult(M.mind) && !jobban_isbanned(M, "cultist"))//putting jobban check here because is_convertable uses mind as argument ticker.mode.add_cultist(M.mind) M.mind.special_role = "Cultist" @@ -130,6 +135,7 @@ var/list/sacrificed = list() M.say("Tok-lyr rqa'nap g[pick("'","`")]lt-ulotf!") cultist_count += 1 if(cultist_count >= 9) + cult_log("THE CULT HAS SUMMONED NAR'SIE. GGNORE") new /obj/machinery/singularity/narsie/large(src.loc) if(ticker.mode.name == "cult") ticker.mode:eldergod = 0 @@ -138,7 +144,9 @@ var/list/sacrificed = list() return fizzle() /////////////////////////////////////////FIFTH RUNE - +/obj/effect/rune/proc/empRune() + emp(src.loc,3) + /obj/effect/rune/proc/emp(var/U,var/range_red) //range_red - var which determines by which number to reduce the default emp range, U is the source loc, needed because of talisman emps which are held in hand at the moment of using and that apparently messes things up -- Urist if(istype(src,/obj/effect/rune)) usr.say("Ta'gh fara[pick("'","`")]qha fel d'amar det!") @@ -161,6 +169,7 @@ var/list/sacrificed = list() if(R.word1==cultwords["travel"] && R.word2==cultwords["blood"] && R.word3==cultwords["self"]) for(var/mob/living/carbon/D in R.loc) if(D.stat!=2) + cult_log("[key_name_admin(usr)] has drained blood from [key_name_admin(D)]") var/bdrain = rand(1,25) D << "\red You feel weakened." D.take_overall_damage(bdrain, 0) @@ -298,6 +307,8 @@ var/list/sacrificed = list() /////////////////////////////////////////NINETH RUNE +/obj/effect/rune/proc/obscureRune() + return obscure(4) /obj/effect/rune/proc/obscure(var/rad) var/S=0 for(var/obj/effect/rune/R in orange(rad,src)) @@ -520,6 +531,9 @@ var/list/sacrificed = list() return 0 else return 0 + + // record this + cult_log("[key_name(usr,0)] says : [input]") var/obj/cult_viewpoint/vp = getCultViewpoint(usr) if (!vp) @@ -698,6 +712,9 @@ var/list/sacrificed = list() /////////////////////////////////////////SIXTEENTH RUNE +/obj/effect/rune/proc/revealrunesrune() + revealrunes(src) + /obj/effect/rune/proc/revealrunes(var/obj/W as obj) var/go=0 var/rad @@ -940,6 +957,7 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in M if(N) continue + cult_log(": Blood Boil damaged [key_name_admin(M)].") M.take_overall_damage(51,51) M << "\red Your blood boils!" if(prob(5)) diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index e601f069c6..7e1e967fc5 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -22,25 +22,29 @@ F << "[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z]) || [src] [message]
" //ADMINVERBS -/client/proc/investigate_show( subject in list("hrefs","notes","singulo") ) +/client/proc/investigate_show( subject in list("hrefs","notes","singulo","cult") ) set name = "Investigate" set category = "Admin" if(!holder) return - switch(subject) - if("singulo") //general one-round-only stuff - var/F = investigate_subject2file(subject) - if(!F) - src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." - return - src << browse(F,"window=investigate[subject];size=800x300") - - if("hrefs") //persistant logs and stuff - if(config && config.log_hrefs) - if(href_logfile) - src << browse(href_logfile,"window=investigate[subject];size=800x300") - else - src << "Error: admin_investigate: No href logfile found." - return + + var/list/basic_subjects = list("singulo","cult") + + if(subject in basic_subjects) + var/F = investigate_subject2file(subject) + if(!F) + src << "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed." + return + src << browse(F,"window=investigate[subject];size=800x300") + return + + + if(subject=="hrefs") //persistant logs and stuff + if(config && config.log_hrefs) + if(href_logfile) + src << browse(href_logfile,"window=investigate[subject];size=800x300") else - src << "Error: admin_investigate: Href Logging is not on." + src << "Error: admin_investigate: No href logfile found." return + else + src << "Error: admin_investigate: Href Logging is not on." + return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 8f9623565f..0d4455b578 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -333,6 +333,9 @@ var/list/slot_equipment_priority = list( \ return */ +/mob + var/newPlayerType = /mob/new_player + /mob/verb/abandon_mob() set name = "Respawn" set category = "OOC" @@ -376,14 +379,12 @@ var/list/slot_equipment_priority = list( \ log_game("[usr.key] AM failed due to disconnect.") return - var/mob/new_player/M = new /mob/new_player() + var/mob/newPlayer = new newPlayerType() if(!client) log_game("[usr.key] AM failed due to disconnect.") - del(M) + del(newPlayer) return - - M.key = key -// M.Login() //wat + newPlayer.key = key return /client/verb/changes() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 77b4dbd884..e63ea883a6 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -299,9 +299,9 @@ data_core.manifest_inject(character) ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn AnnounceArrival(character, rank) - + return character else - character.Robotize() + return character.Robotize() del(src) proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank) diff --git a/code/modules/mob/spirit/mask/mask.dm b/code/modules/mob/spirit/mask/mask.dm index 87bf07cd45..404cd15387 100644 --- a/code/modules/mob/spirit/mask/mask.dm +++ b/code/modules/mob/spirit/mask/mask.dm @@ -1,10 +1,12 @@ mob/spirit/mask - + icon = 'icons/mob/spirits/mask.dmi' + icon_state = "depressurized" mob/spirit/mask/New() ..() spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(src) spell_list += new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(src) + spell_list += new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(src) mob/spirit/mask/verb/go_to_follower() @@ -15,19 +17,22 @@ mob/spirit/mask/verb/go_to_follower() var/obj/cult_viewpoint/cultist = pick_cultist() if (cultist) follow_cultist(cultist.owner) + cult_log("[key_name_admin(src)] started following [key_name_admin(cultist)].") src << "You start following [cultist.get_display_name()]." -mob/spirit/mask/verb/set_specific_urge() +mob/spirit/mask/verb/urge_cultist() set category = "Mask" - set name = "Set urge on cultist" - set desc = "Set urge on target" + set name = "Urge cultist" + set desc = "Push your cultists to do something." var/obj/cult_viewpoint/cultist = pick_cultist() if (cultist) - var/newUrge = stripped_input(usr, "", "Set Urge", "") - cultist.set_urge(newUrge) - src << "You urge [cultist.owner.name] to [newUrge]." + if (cultist.owner) + var/newUrge = stripped_input(usr, "", "Set Urge", "") + cultist.set_urge(newUrge) + src << "You urge [cultist.owner.name] to [newUrge]." + cult_log("controlled by [key_name_admin(src)] has urged [key_name_admin(cultist.owner)] to [newUrge].") mob/spirit/mask/verb/set_cult_name() set category = "Mask" @@ -41,17 +46,20 @@ mob/spirit/mask/verb/set_cult_name() return cultist.set_cult_name(newName) src << "You grant [cultist.owner.name] the secret name of [newName]." + if (cultist.owner) + cult_log("[key_name_admin(src)] has set [key_name_admin(cultist.owner)] to \'[newName]\'") -mob/spirit/mask/verb/set_global_urge() +mob/spirit/mask/verb/urge_cult() set category = "Mask" - set name = "Set global urge" + set name = "Urge Cult" set desc = "Set urge on the entire cult." var/newUrge = stripped_input(usr, "Please choose an urge.", "Set Urge", "") for(var/obj/cult_viewpoint/viewpoint in cult_viewpoints) viewpoint.set_urge(newUrge) src << "You urge the entire cult to [newUrge]." + cult_log("[key_name_admin(src)] has urged the entire cult to [newUrge]") mob/spirit/mask/verb/set_favor_for_cultist() @@ -61,20 +69,27 @@ mob/spirit/mask/verb/set_favor_for_cultist() var/obj/cult_viewpoint/cultist = pick_cultist() if (cultist) - var/list/favor = list("Pleased", "Displeased", "Indifference") - var/emotion = input("Pick your emotion", "Mask", null, null) in favor - switch(emotion) - if("Pleased") - cultist.set_favor(1) - if("Displeased") - cultist.set_favor(-1) - if("Indifference") - cultist.set_favor(0) + if (cultist.owner) + var/list/favor = list("Pleased", "Displeased", "Indifference") + var/emotion = input("Pick your emotion", "Mask", null, null) in favor + switch(emotion) + if("Pleased") + cultist.set_favor(1) + cult_log("[key_name_admin(src)] is pleased with [key_name_admin(cultist.owner)]") + if("Displeased") + cultist.set_favor(-1) + cult_log("[key_name_admin(src)] is displeased with [key_name_admin(cultist.owner)]") + if("Indifference") + cultist.set_favor(0) + cult_log("[key_name_admin(src)] is indifferent too [key_name_admin(cultist.owner)]") mob/spirit/mask/proc/set_name() - var/newName = stripped_input(usr, "Please pick a name.", "Pick Name for Mask", "") - name = newName ? newName : "Mask of Nar'sie" + spawn(0) + var/newName = stripped_input(src, "Please pick a name.", "Pick Name for Mask", "") + name = newName ? newName : "Mask of Nar'sie" + src << "You have set your name to [name]." + return name mob/spirit/mask/proc/pick_cultist() @@ -86,13 +101,26 @@ mob/spirit/mask/proc/pick_cultist() return result +// this proc makes the mask visible very briefly +/mob/spirit/mask/proc/flicker() + spawn(0) + alpha = 127 + invisibility=0 + sleep(5) + invisibility=initial(invisibility) + alpha = 255 + +/proc/flicker_mask(mob/spirit/mask/target) + if(istype(target)) + target.flicker() + // SPELLS /obj/effect/proc_holder/spell/aoe_turf/blood_speech name = "Speak to your Acolytes" desc = "This spell allows you to speak to your flock." school = "unknown evil" charge_type = "recharge" - charge_max = 300 + charge_max = 2000 clothes_req = 0 invocation = "none" invocation_type = "none" @@ -102,20 +130,46 @@ mob/spirit/mask/proc/pick_cultist() var/input = stripped_input(usr, "Please choose a message to tell your acolytes.", "Voice of Blood", "") if(!input) revert_cast(usr) + cult_log("[key_name_admin(usr)]says : [input]") + flicker_mask(usr) for(var/datum/mind/H in ticker.mode.cult) if (H.current) H.current << "[usr.name]: [input]" for(var/mob/spirit/spirit in spirits) - spirit << "[usr.name]: [input]" + spirit << "[usr.name]: [input]" - + +/obj/effect/proc_holder/spell/aoe_turf/shatter_lights + name = "Spread Shadows" + desc = "This spell breaks lights near the mask." + school = "unknown evil" + charge_type = "recharge" + charge_max = 1000 + clothes_req = 0 + invocation = "none" + invocation_type = "none" + range = 0 + +/obj/effect/proc_holder/spell/aoe_turf/shatter_lights/cast(list/targets) + cult_log("[key_name_admin(usr)] used Spread Shadows.") + flicker_mask(usr) + spawn(0) + for(var/area/A in range(3,get_turf(usr))) + for(var/obj/machinery/light/L in A) + L.on = 1 + L.broken() + sleep(1) + for(var/obj/item/device/flashlight/F in A) + F.on = 0 + + /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman name = "Create Talisman" desc = "This spell conjures a talisman" school = "conjuration" charge_type = "recharge" - charge_max = 300 + charge_max = 3000 clothes_req = 0 invocation = "none" invocation_type = "none" @@ -145,6 +199,9 @@ mob/spirit/mask/proc/pick_cultist() revert_cast(usr) return + cult_log("[key_name_admin(usr,0)] created a talisman of type [talisman].") + flicker_mask(usr) + switch(talisman) if ("Teleport") @@ -168,4 +225,6 @@ mob/spirit/mask/proc/pick_cultist() summon_type = list(/obj/item/weapon/paper/talisman) newVars = list("imbue" = "[imbue_value]") - ..() \ No newline at end of file + ..() + + diff --git a/code/modules/mob/spirit/mask/respawn.dm b/code/modules/mob/spirit/mask/respawn.dm new file mode 100644 index 0000000000..acfb69073c --- /dev/null +++ b/code/modules/mob/spirit/mask/respawn.dm @@ -0,0 +1,20 @@ +/proc/there_can_be_only_one_mask(var/mob/spirit/mask/target) + if(!istype(target)) + return + for(var/mob/spirit/mask/currentSpirit in spirits) + if(currentSpirit) + if(currentSpirit!=target) + // create the ghost + var/mob/dead/observer/ghost = currentSpirit.ghostize(TRUE) + // let the deposed mask respawn immediately, the poor dear + ghost.timeofdeath = world.time - 20000 + ghost.newPlayerType = /mob/new_player/cultist + // remove old mask body + del(currentSpirit) + + +/mob/new_player/cultist/AttemptLateSpawn(rank) + var/mob/newCharacter = ..(rank) + if(ticker.mode) + if(is_convertable_to_cult(newCharacter.mind)) + ticker.mode.add_cultist(newCharacter.mind) \ No newline at end of file diff --git a/code/modules/mob/spirit/movement.dm b/code/modules/mob/spirit/movement.dm index c6e6fb3a09..d8847cb480 100644 --- a/code/modules/mob/spirit/movement.dm +++ b/code/modules/mob/spirit/movement.dm @@ -18,6 +18,8 @@ mob/spirit/proc/Spirit_Move(direct) if(step) setLoc(step) + dir = direct // update our sprite + cooldown = world.timeofday + 5 if(acceleration) sprint = min(sprint + 0.5, max_sprint) diff --git a/code/modules/mob/spirit/viewpoint.dm b/code/modules/mob/spirit/viewpoint.dm index 56f5b154b5..5e06356129 100644 --- a/code/modules/mob/spirit/viewpoint.dm +++ b/code/modules/mob/spirit/viewpoint.dm @@ -76,6 +76,7 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list() if(FAVOR_DISPLEASED) owner << "\red \b You cringe at your gods displeasure." + /obj/cult_viewpoint/verb/pray_to_mask() set category = "Cult" set desc = "Pray to your god" @@ -86,6 +87,7 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list() if(!input) return + cult_log("[key_name(usr,0)](Pray):[input]") owner << "You pray to Nar'Sie: [input]" for(var/mob/spirit/spirit in spirits) @@ -145,12 +147,17 @@ var/obj/cult_viewpoint/list/cult_viewpoints = list() set desc = "Sacrifice your life and become a Mask of Nar'sie." set src in usr + cult_log("[key_name(usr,0)] has tried to become a Mask of Nar'sie.") + if (!active_mask()) var/transformation_type = alert(owner.client, "You are about to become a Mask. Do you want it to be subtle or violent?", "Mask", "Subtle", "Violent") if(!active_mask()) + cult_log("[key_name(usr,0)] has become a Mask of Nar'sie.") if (transformation_type=="Subtle") + log_admin("[key_name_admin(owner)] has subtly become a Mask of Nar'sie") owner.make_into_mask(0,0) else + log_admin("[key_name_admin(owner)] has violently become a Mask of Nar'sie") owner.make_into_mask(1,1) else owner << "\b You cannot become a mask of Nar'Sie because a Mask already exists." diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 59917edd52..ea45eca49e 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -142,46 +142,28 @@ /mob/proc/make_into_mask(var/should_gib = 0, var/should_remove_items = 0) - if (should_gib) - var/mob/spirit/mask/new_spirit = new() - - if(mind) - new_spirit.mind = mind - new_spirit.mind.assigned_role = "Mask" - new_spirit.mind.original = new_spirit - - new_spirit.key = key - new_spirit.loc=loc - - spawn(0) - src.gib() // gib the body - - new_spirit.set_name() - - // let spirits identify cultists - if(ticker.mode) - ticker.mode.reset_cult_icons_for_spirit(new_spirit) - - return new_spirit - - else - if(should_remove_items) - for(var/obj/item/W in src) - drop_from_inventory(W) - + if(!should_gib) icon = null invisibility = 101 + + if(!should_remove_items) + for(var/obj/item/W in src) + drop_from_inventory(W) - var/mob/spirit/mask/new_spirit = new() - - if(mind) - new_spirit.mind = mind - new_spirit.mind.assigned_role = "Mask" - new_spirit.mind.original = new_spirit - - new_spirit.key = key - new_spirit.loc=loc - + var/mob/spirit/mask/new_spirit = new() + + if(mind) + new_spirit.mind = mind + new_spirit.mind.assigned_role = "Mask" + new_spirit.mind.original = new_spirit + + new_spirit.key = key + new_spirit.loc=loc + + if (should_gib) + spawn(0) + src.gib() // gib the body + else spawn(0)//To prevent the proc from returning null. src.visible_message( \ "[src] disappears into the shadows, never to be seen again.", \ @@ -189,13 +171,19 @@ "You hear strange noise, you can't quite place it.") del(src) - new_spirit.set_name() + new_spirit << "You are a Mask of Nar'sie now. You are a tiny fragment of the unknowable entity that is the god." + new_spirit << "Your job is to help your acolytes complete their goals. Be spooky. Do evil." - // let spirits identify cultists - if(ticker.mode) - ticker.mode.reset_cult_icons_for_spirit(new_spirit) + new_spirit.set_name() - return new_spirit + // let spirits identify cultists + if(ticker.mode) + ticker.mode.reset_cult_icons_for_spirit(new_spirit) + + // highlander test + there_can_be_only_one_mask(new_spirit) + + return new_spirit //human -> robot diff --git a/icons/mob/spirits/mask.dmi b/icons/mob/spirits/mask.dmi new file mode 100644 index 0000000000000000000000000000000000000000..20fe26c4bced41886718c66c2569db7bd9b7fbd7 GIT binary patch literal 972 zcmV;-12g=IP){f|1VR6J#Mc^K`AXmVMIPFJvJXTFe5%V zBsVf292pHHAs8-Ws%~RG_TXpZ00001bW%=J06^y0W&i*Ha(Yx)bVOxyV{&P5bZKvH z004NLQ&wT#GdI(F^OKlJp@5n z3+G-O)8xJHrvs6nx=Jo`A42HJ5lVMOTR3O5vEub0sZCjjSC?tfNQ;& zK6vu6ItKLD>y-nO$OcF?z(PxiVV|95=x+*0iLqo6UOE8LE>r;TS@i(;Ad*O!m#Pir z2=ZM4`!;4D*!0L{JfY_fApF3h`WmvPI3ky^yAdh?ive_(N)G~b5^;o#+Y+Ls0l*3r ziavGTw1mni7{Ijv=r48&goSN_0ulh}Cjg-V2#Glb?|5y#XYT;vyCZ$n0DbfUs87%7 zlAwartl$8!05iVJ%<490{9$YgLDCW3NTEc0DL<2AMkPjjQ|G(DltqR z7xDE_cduOM@4PNZsrJqHG*O`Th;e1lmco(_K`aU1nK3Kum%us!Fue{St#864FeEs$ zpD&LG?`D+Cm49sj=tb%;rrM1VoC|=*uIy zkP((@e#pAJ&L21{Sovcz>+MAEvlXEFs)QWi%{rZAi(NKG6p%bXv=vZ!gU%I{b$~I0 z+($$JkbKfz7Ut?A^mqe+#s+YhrQp&Pz>_2exFY~XFRlSVcQL0dBS2OFjJFNIY-XK+ zwKhNM3Wx^aZ4TH0vi?j9plK^MKnyByq5vKO)-fQT0hAM9L}<*BEAa;C^gw5zRLqfE z28TDP0PgoTplE2dA);Y^yl#M@c`^WibOGzp7t{7`TRe8R|8bBWq;2s