From 19135de9eb073ecdb7eb697f34890c82e472bb51 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Wed, 22 Aug 2012 15:50:09 +0000 Subject: [PATCH] Changes to the file structure! There are many files, folders and chunks of code in areas that make absolutely no sense and thanks to the defines being located mostly in a completely separate file, it can be damn-near impossible to find something. Before moving defines to where the rest of their code is located; I'm going to move some code around into places that actually make sense to begin with. I'll mainly be focusing on the code/game/objects folder. This commit mainly lays the groundwork for the work I'll be doing by adding in the effects, structures, decals and turfs folders. I'll slowly be moving appropriate files and code into these folders. I may end up moving machinery into 'objects' and mech stuff into its own module folder but I'll ask for some opinions on coderbus before doing that. I've also gotten rid of the /magic/ folder. I've moved the library stuff into its own folder in modules/library, the cult stuff is now in gamemode/cult with the rest of it and musician.dm is now in objects/structures since the piano is a structure apparently. I think I've got the hang of how DM and SVN handles folders and files but it's quite possible that something will break simply by svn committing it oddly. Please let me know if that's the case! Remember to clean compile. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4513 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/procs/helper_text.dm | 12 + .../cultist => gamemodes/cult}/ritual.dm | 0 .../cultist => gamemodes/cult}/runes.dm | 2076 ++++++++--------- .../cultist => gamemodes/cult}/talisman.dm | 0 code/game/machinery/ai_slipper.dm | 1 - .../{magic => objects/structures}/musician.dm | 0 code/game/{ => turfs}/turf.dm | 0 code/modules/library/lib_items.dm | 236 ++ .../library/lib_machines.dm} | 356 +-- code/modules/library/lib_readme.dm | 61 + tgstation.dme | 19 +- 11 files changed, 1382 insertions(+), 1379 deletions(-) rename code/game/{magic/cultist => gamemodes/cult}/ritual.dm (100%) rename code/game/{magic/cultist => gamemodes/cult}/runes.dm (97%) rename code/game/{magic/cultist => gamemodes/cult}/talisman.dm (100%) rename code/game/{magic => objects/structures}/musician.dm (100%) rename code/game/{ => turfs}/turf.dm (100%) create mode 100644 code/modules/library/lib_items.dm rename code/{game/magic/library.dm => modules/library/lib_machines.dm} (61%) create mode 100644 code/modules/library/lib_readme.dm diff --git a/code/defines/procs/helper_text.dm b/code/defines/procs/helper_text.dm index d5379b9dae..2ea37cf854 100644 --- a/code/defines/procs/helper_text.dm +++ b/code/defines/procs/helper_text.dm @@ -1,12 +1,24 @@ /* * Holds procs designed to help with filtering text * Contains groups: + * SQL sanitization * Text sanitization * Text searches * Text modification * Misc */ + +/* + * SQL sanitization + */ + +// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts. +/proc/sanitizeSQL(var/t as text) + var/sanitized_text = dd_replacetext(t, "'", "\\'") + sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"") + return sanitized_text + /* * Text sanitization */ diff --git a/code/game/magic/cultist/ritual.dm b/code/game/gamemodes/cult/ritual.dm similarity index 100% rename from code/game/magic/cultist/ritual.dm rename to code/game/gamemodes/cult/ritual.dm diff --git a/code/game/magic/cultist/runes.dm b/code/game/gamemodes/cult/runes.dm similarity index 97% rename from code/game/magic/cultist/runes.dm rename to code/game/gamemodes/cult/runes.dm index aa468cbba2..ecac0e026e 100644 --- a/code/game/magic/cultist/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1,1038 +1,1038 @@ -var/list/sacrificed = list() - -/obj/effect/rune -/////////////////////////////////////////FIRST RUNE - proc - teleport(var/key) - var/mob/living/user = usr - var/allrunesloc[] - allrunesloc = new/list() - var/index = 0 - // var/tempnum = 0 - for(var/obj/effect/rune/R in world) - if(R == src) - continue - if(R.word1 == wordtravel && R.word2 == wordself && R.word3 == key && R.z != 2) - index++ - allrunesloc.len = index - allrunesloc[index] = R.loc - if(index >= 5) - user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric" - if (istype(user, /mob/living)) - user.take_overall_damage(5, 0) - del(src) - if(allrunesloc && index != 0) - if(istype(src,/obj/effect/rune)) - user.say("Sas[pick("'","`")]so c'arta forbici!")//Only you can stop auto-muting - else - user.whisper("Sas[pick("'","`")]so c'arta forbici!") - user.visible_message("\red [user] disappears in a flash of red light!", \ - "\red You feel as your body gets dragged through the dimension of Nar-Sie!", \ - "\red You hear a sickening crunch and sloshing of viscera.") - user.loc = allrunesloc[rand(1,index)] - return - if(istype(src,/obj/effect/rune)) - return fizzle() //Use friggin manuals, Dorf, your list was of zero length. - else - call(/obj/effect/rune/proc/fizzle)() - return - - - itemport(var/key) -// var/allrunesloc[] -// allrunesloc = new/list() -// var/index = 0 - // var/tempnum = 0 - var/culcount = 0 - var/runecount = 0 - var/obj/effect/rune/IP = null - var/mob/living/user = usr - for(var/obj/effect/rune/R in world) - if(R == src) - continue - if(R.word1 == wordtravel && R.word2 == wordother && R.word3 == key) - IP = R - runecount++ - if(runecount >= 2) - user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric" - if (istype(user, /mob/living)) - user.take_overall_damage(5, 0) - del(src) - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - culcount++ - if(culcount>=3) - user.say("Sas[pick("'","`")]so c'arta forbici tarem!") - user.visible_message("\red You feel air moving from the rune - like as it was swapped with somewhere else.", \ - "\red You feel air moving from the rune - like as it was swapped with somewhere else.", \ - "\red You smell ozone.") - for(var/obj/O in src.loc) - if(!O.anchored) - O.loc = IP.loc - for(var/mob/M in src.loc) - M.loc = IP.loc - return - - return fizzle() - - -/////////////////////////////////////////SECOND RUNE - - tomesummon() - if(istype(src,/obj/effect/rune)) - usr.say("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!") - else - usr.whisper("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!") - usr.visible_message("\red Rune disappears with a flash of red light, and in its place now a book lies.", \ - "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a book.", \ - "\red You hear a pop and smell ozone.") - if(istype(src,/obj/effect/rune)) - new /obj/item/weapon/tome(src.loc) - else - new /obj/item/weapon/tome(usr.loc) - del(src) - return - - - -/////////////////////////////////////////THIRD RUNE - - convert() - for(var/mob/living/carbon/M in src.loc) - if(iscultist(M)) - continue - if(M.stat==2) - continue - usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!") - 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.") - if(is_convertable_to_cult(M.mind)) - ticker.mode.add_cultist(M.mind) - M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - M << "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." - return 1 - else - M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - M << "And not a single fuck was given, exterminate the cult at all costs." - return 0 - - return fizzle() - - - -/////////////////////////////////////////FOURTH RUNE - - tearreality() - var/cultist_count = 0 - for(var/mob/M in range(1,src)) - if(iscultist(M) && !M.stat) - M.say("Tok-lyr rqa'nap g[pick("'","`")]lt-ulotf!") - cultist_count += 1 - if(cultist_count >= 9) - new /obj/machinery/singularity/narsie(src.loc) - if(ticker.mode.name == "cult") - ticker.mode:eldergod = 0 - return - else - return fizzle() - -/////////////////////////////////////////FIFTH RUNE - - 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!") - else - usr.whisper("Ta'gh fara[pick("'","`")]qha fel d'amar det!") - playsound(U, 'sound/items/Welder2.ogg', 25, 1) - var/turf/T = get_turf(U) - if(T) - T.hotspot_expose(700,125) - var/rune = src // detaching the proc - in theory - empulse(U, (range_red - 2), range_red) - del(rune) - return - -/////////////////////////////////////////SIXTH RUNE - - drain() - var/drain = 0 - for(var/obj/effect/rune/R in world) - if(R.word1==wordtravel && R.word2==wordblood && R.word3==wordself) - for(var/mob/living/carbon/D in R.loc) - if(D.stat!=2) - var/bdrain = rand(1,25) - D << "\red You feel weakened." - D.take_overall_damage(bdrain, 0) - drain += bdrain - if(!drain) - return fizzle() - usr.say ("Yu[pick("'","`")]gular faras desdae. Havas mithum javara. Umathar uf'kal thenar!") - usr.visible_message("\red Blood flows from the rune into [usr]!", \ - "\red The blood starts flowing from the rune and into your frail mortal body. You feel... empowered.", \ - "\red You hear a liquid flowing.") - var/mob/living/user = usr - if(user.bhunger) - user.bhunger = max(user.bhunger-2*drain,0) - if(drain>=50) - user.visible_message("\red [user]'s eyes give off eerie red glow!", \ - "\red ...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within.", \ - "\red You hear a heartbeat.") - user.bhunger += drain - src = user - spawn() - for (,user.bhunger>0,user.bhunger--) - sleep(50) - user.take_overall_damage(3, 0) - return - user.heal_organ_damage(drain%5, 0) - drain-=drain%5 - for (,drain>0,drain-=5) - sleep(2) - user.heal_organ_damage(5, 0) - return - - - - - - -/////////////////////////////////////////SEVENTH RUNE - - seer() - if(usr.loc==src.loc) - usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium vivira. Itonis al'ra matum!") - if(usr.see_invisible!=0 && usr.see_invisible!=15) - usr << "\red The world beyond flashes your eyes but disappears quickly, as if something is disrupting your vision." - else - usr << "\red The world beyond opens to your eyes." - usr.see_invisible = SEE_INVISIBLE_OBSERVER - usr.seer = 1 - return - return fizzle() - -/////////////////////////////////////////EIGHTH RUNE - - raise() - var/mob/living/carbon/human/corpse_to_raise - var/mob/living/carbon/human/body_to_sacrifice - - var/is_sacrifice_target = 0 - for(var/mob/living/carbon/human/M in src.loc) - if(M.stat == DEAD) - if(ticker.mode.name == "cult" && M.mind == ticker.mode:sacrifice_target) - is_sacrifice_target = 1 - else - corpse_to_raise = M - if(M.key) - M.ghostize(1) //kick them out of their body - break - if(!corpse_to_raise) - if(is_sacrifice_target) - usr << "\red The Geometer of blood wants this mortal for himself." - return fizzle() - - - is_sacrifice_target = 0 - find_sacrifice: - for(var/obj/effect/rune/R in world) - if(R.word1==wordblood && R.word2==wordjoin && R.word3==wordhell) - for(var/mob/living/carbon/human/N in R.loc) - if(ticker.mode.name == "cult" && N.mind && N.mind == ticker.mode:sacrifice_target) - is_sacrifice_target = 1 - else - if(N.stat!= DEAD) - body_to_sacrifice = N - break find_sacrifice - - if(!body_to_sacrifice) - if (is_sacrifice_target) - usr << "\red The Geometer of blood wants that corpse for himself." - else - usr << "\red The sacrifical corpse is not dead. You must free it from this world of illusions before it may be used." - return fizzle() - - var/mob/dead/observer/ghost - for(var/mob/dead/observer/O in loc) - if(!O.client) continue - if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue - ghost = O - break - - if(!ghost) - usr << "\red You require a restless spirit which clings to this world. Beckon their prescence with the sacred chants of Nar-Sie." - return fizzle() - - for(var/datum/organ/external/affecting in corpse_to_raise.organs) - affecting.heal_damage(1000, 1000) - corpse_to_raise.setToxLoss(0) - corpse_to_raise.setOxyLoss(0) - corpse_to_raise.SetParalysis(0) - corpse_to_raise.SetStunned(0) - corpse_to_raise.SetWeakened(0) - corpse_to_raise.radiation = 0 -// corpse_to_raise.buckled = null -// if(corpse_to_raise.handcuffed) -// del(corpse_to_raise.handcuffed) -// corpse_to_raise.update_inv_handcuffed(0) - corpse_to_raise.stat = CONSCIOUS - corpse_to_raise.updatehealth() - corpse_to_raise.UpdateDamageIcon() - - corpse_to_raise.key = ghost.key //the corpse will keep its old mind! but a new player takes ownership of it (they are essentially possessed) - //This means, should that player leave the body, the original may re-enter - usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") - corpse_to_raise.visible_message("\red [corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.", \ - "\red Life... I'm alive again...", \ - "\red You hear a faint, slightly familiar whisper.") - body_to_sacrifice.visible_message("\red [body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from his remains!", \ - "\red You feel as your blood boils, tearing you apart.", \ - "\red You hear a thousand voices, all crying in pain.") - body_to_sacrifice.gib() - -// if(ticker.mode.name == "cult") -// ticker.mode:add_cultist(corpse_to_raise.mind) -// else -// ticker.mode.cult |= corpse_to_raise.mind - - corpse_to_raise << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - corpse_to_raise << "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." - return - - - - - -/////////////////////////////////////////NINETH RUNE - - obscure(var/rad) - var/S=0 - for(var/obj/effect/rune/R in orange(rad,src)) - if(R!=src) - R:visibility=0 - S=1 - if(S) - if(istype(src,/obj/effect/rune)) - usr.say("Kla[pick("'","`")]atu barada nikt'o!") - for (var/mob/V in viewers(src)) - V.show_message("\red The rune turns into gray dust, veiling the surrounding runes.", 3) - del(src) - else - usr.whisper("Kla[pick("'","`")]atu barada nikt'o!") - usr << "\red Your talisman turns into gray dust, veiling the surrounding runes." - for (var/mob/V in orange(1,src)) - if(V!=usr) - V.show_message("\red Dust emanates from [usr]'s hands for a moment.", 3) - - return - if(istype(src,/obj/effect/rune)) - return fizzle() - else - call(/obj/effect/rune/proc/fizzle)() - return - -/////////////////////////////////////////TENTH RUNE - - ajourney() //some bits copypastaed from admin tools - Urist - if(usr.loc==src.loc) - var/mob/living/carbon/human/L = usr - usr.say("Fwe[pick("'","`")]sh mah erl nyag r'ya!") - usr.visible_message("\red [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.", \ - "\red The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry...", \ - "\red You hear only complete silence for a moment.") - usr.ghostize(1) - L.ajourn = 1 - while(L) - if(L.key) - L.ajourn=0 - return - else - L.take_organ_damage(10, 0) - sleep(100) - return fizzle() - - - - -/////////////////////////////////////////ELEVENTH RUNE - - manifest() - var/obj/effect/rune/this_rune = src - src = null - if(usr.loc!=this_rune.loc) - return this_rune.fizzle() - var/mob/dead/observer/ghost - for(var/mob/dead/observer/O in this_rune.loc) - if(!O.client) continue - if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue - ghost = O - break - if(!ghost) - return this_rune.fizzle() - - usr.say("Gal'h'rfikk harfrandid mud[pick("'","`")]gib!") - var/mob/living/carbon/human/dummy/D = new(this_rune.loc) - usr.visible_message("\red A shape forms in the center of the rune. A shape of... a man.", \ - "\red A shape forms in the center of the rune. A shape of... a man.", \ - "\red You hear liquid flowing.") - D.real_name = "Unknown" - for(var/obj/item/weapon/paper/P in this_rune.loc) - if(length(P.name)<=24) - D.real_name = P.name - break - D.universal_speak = 1 - D.nodamage = 0 - - D.key = ghost.key - - if(ticker.mode.name == "cult") - ticker.mode:add_cultist(D.mind) - else - ticker.mode.cult+=D.mind - - D << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - D << "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/mob/living/user = usr - while(this_rune && user && user.stat==CONSCIOUS && user.client && user.loc==this_rune.loc) - user.take_organ_damage(1, 0) - sleep(30) - if(D) - D.visible_message("\red [D] slowly dissipates into dust and bones.", \ - "\red You feel pain, as bonds formed between your soul and this homunculus break.", \ - "\red You hear faint rustle.") - D.dust() - return - - - - - -/////////////////////////////////////////TWELFTH RUNE - - talisman()//only hide, emp, teleport, deafen, blind and tome runes can be imbued atm - var/obj/item/weapon/paper/newtalisman - var/unsuitable_newtalisman = 0 - for(var/obj/item/weapon/paper/P in src.loc) - if(!P.info) - newtalisman = P - break - else - unsuitable_newtalisman = 1 - if (!newtalisman) - if (unsuitable_newtalisman) - usr << "\red The blank is tainted. It is unsuitable." - return fizzle() - - var/obj/effect/rune/imbued_from - var/obj/item/weapon/paper/talisman/T - for(var/obj/effect/rune/R in orange(1,src)) - if(R==src) - continue - if(R.word1==wordtravel && R.word2==wordself) //teleport - T = new(src.loc) - T.imbue = "[R.word3]" - T.info = "[R.word3]" - imbued_from = R - break - if(R.word1==wordsee && R.word2==wordblood && R.word3==wordhell) //tome - T = new(src.loc) - T.imbue = "newtome" - imbued_from = R - break - if(R.word1==worddestr && R.word2==wordsee && R.word3==wordtech) //emp - T = new(src.loc) - T.imbue = "emp" - imbued_from = R - break - if(R.word1==wordblood && R.word2==wordsee && R.word3==worddestr) //conceal - T = new(src.loc) - T.imbue = "conceal" - imbued_from = R - break - if(R.word1==wordhell && R.word2==worddestr && R.word3==wordother) //armor - T = new(src.loc) - T.imbue = "armor" - imbued_from = R - break - if(R.word1==wordblood && R.word2==wordsee && R.word3==wordhide) //reveal - T = new(src.loc) - T.imbue = "revealrunes" - imbued_from = R - break - if(R.word1==wordhide && R.word2==wordother && R.word3==wordsee) //deafen - T = new(src.loc) - T.imbue = "deafen" - imbued_from = R - break - if(R.word1==worddestr && R.word2==wordsee && R.word3==wordother) //blind - T = new(src.loc) - T.imbue = "blind" - imbued_from = R - break - if(R.word1==wordself && R.word2==wordother && R.word3==wordtech) //communicat - T = new(src.loc) - T.imbue = "communicate" - imbued_from = R - break - if(R.word1==wordjoin && R.word2==wordhide && R.word3==wordtech) //communicat - T = new(src.loc) - T.imbue = "runestun" - imbued_from = R - break - if (imbued_from) - for (var/mob/V in viewers(src)) - V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) - usr.say("H'drak v[pick("'","`")]loso, mir'kanas verbot!") - del(imbued_from) - del(newtalisman) - else - return fizzle() - -/////////////////////////////////////////THIRTEENTH RUNE - - mend() - var/mob/living/user = usr - src = null - user.say("Uhrast ka'hfa heldsagen ver[pick("'","`")]lot!") - user.take_overall_damage(200, 0) - runedec+=10 - user.visible_message("\red [user] keels over dead, his blood glowing blue as it escapes his body and dissipates into thin air.", \ - "\red In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood.", \ - "\red You hear faint rustle.") - for(,user.stat==2) - sleep(600) - if (!user) - return - runedec-=10 - return - - -/////////////////////////////////////////FOURTEETH RUNE - - // returns 0 if the rune is not used. returns 1 if the rune is used. - communicate() - . = 1 // Default output is 1. If the rune is deleted it will return 1 - var/input = copytext(sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null),1,MAX_MESSAGE_LEN) - if(!input) - if (istype(src)) - fizzle() - return 0 - else - return 0 - if(istype(src,/obj/effect/rune)) - usr.say("O bidai nabora se[pick("'","`")]sma!") - else - usr.whisper("O bidai nabora se[pick("'","`")]sma!") - var/input_s = sanitize(input) - if(istype(src,/obj/effect/rune)) - usr.say("[input]") - else - usr.whisper("[input]") - for(var/datum/mind/H in ticker.mode.cult) - if (H.current) - H.current << "\red \b [input_s]" - del(src) - return 1 - -/////////////////////////////////////////FIFTEENTH RUNE - - sacrifice() - var/list/mob/living/carbon/human/cultsinrange = list() - var/list/mob/living/carbon/human/victims = list() - for(var/mob/living/carbon/human/V in src.loc)//Checks for non-cultist humans to sacrifice - if(ishuman(V)) - if(!(iscultist(V))) - victims += V//Checks for cult status and mob type - for(var/obj/item/I in src.loc)//Checks for MMIs/brains/Intellicards - if(istype(I,/obj/item/brain)) - var/obj/item/brain/B = I - victims += B.brainmob - else if(istype(I,/obj/item/device/mmi)) - var/obj/item/device/mmi/B = I - victims += B.brainmob - else if(istype(I,/obj/item/device/aicard)) - for(var/mob/living/silicon/ai/A in I) - victims += A - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - cultsinrange += C - C.say("Barhah hra zar[pick("'","`")]garis!") - for(var/mob/H in victims) - if (ticker.mode.name == "cult") - if(H.mind == ticker.mode:sacrifice_target) - if(cultsinrange.len >= 3) - sacrificed += H.mind - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete." - else - usr << "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual." - else - if(cultsinrange.len >= 3) - if(H.stat !=2) - if(prob(80)) - usr << "\red The Geometer of Blood accepts this sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, this soul was not enough to gain His favor." - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(prob(40)) - usr << "\red The Geometer of blood accepts this sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, a mere dead body is not enough to satisfy Him." - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(H.stat !=2) - usr << "\red The victim is still alive, you will need more cultists chanting for the sacrifice to succeed." - else - if(prob(40)) - usr << "\red The Geometer of blood accepts this sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, a mere dead body is not enough to satisfy Him." - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(cultsinrange.len >= 3) - if(H.stat !=2) - if(prob(80)) - usr << "\red The Geometer of Blood accepts this sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, this soul was not enough to gain His favor." - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(prob(40)) - usr << "\red The Geometer of blood accepts this sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, a mere dead body is not enough to satisfy Him." - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - else - if(H.stat !=2) - usr << "\red The victim is still alive, you will need more cultists chanting for the sacrifice to succeed." - else - if(prob(40)) - usr << "\red The Geometer of blood accepts this sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, a mere dead body is not enough to satisfy Him." - if(isrobot(H)) - H.dust()//To prevent the MMI from remaining - else - H.gib() - for(var/mob/living/carbon/monkey/M in src.loc) - if (ticker.mode.name == "cult") - if(M.mind == ticker.mode:sacrifice_target) - if(cultsinrange.len >= 3) - sacrificed += M.mind - usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete." - else - usr << "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual." - continue - else - if(prob(20)) - usr << "\red The Geometer of Blood accepts your meager sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of blood accepts this sacrifice." - usr << "\red However, a mere monkey is not enough to satisfy Him." - else - usr << "\red The Geometer of Blood accepts your meager sacrifice." - if(prob(20)) - ticker.mode.grant_runeword(usr) - M.gib() -/* for(var/mob/living/carbon/alien/A) - for(var/mob/K in cultsinrange) - K.say("Barhah hra zar'garis!") - A.dust() /// A.gib() doesnt work for some reason, and dust() leaves that skull and bones thingy which we dont really need. - if (ticker.mode.name == "cult") - if(prob(75)) - usr << "\red The Geometer of Blood accepts your exotic sacrifice." - ticker.mode:grant_runeword(usr) - else - usr << "\red The Geometer of Blood accepts your exotic sacrifice." - usr << "\red However, this alien is not enough to gain His favor." - else - usr << "\red The Geometer of Blood accepts your exotic sacrifice." - return - return fizzle() */ - -/////////////////////////////////////////SIXTEENTH RUNE - - revealrunes(var/obj/W as obj) - var/go=0 - var/rad - var/S=0 - if(istype(W,/obj/effect/rune)) - rad = 6 - go = 1 - if (istype(W,/obj/item/weapon/paper/talisman)) - rad = 4 - go = 1 - if (istype(W,/obj/item/weapon/nullrod)) - rad = 1 - go = 1 - if(go) - for(var/obj/effect/rune/R in orange(rad,src)) - if(R!=src) - R:visibility=15 - S=1 - if(S) - if(istype(W,/obj/item/weapon/nullrod)) - usr << "\red Arcane markings suddenly glow from underneath a thin layer of dust!" - return - if(istype(W,/obj/effect/rune)) - usr.say("Nikt[pick("'","`")]o barada kla'atu!") - for (var/mob/V in viewers(src)) - V.show_message("\red The rune turns into red dust, reveaing the surrounding runes.", 3) - del(src) - return - if(istype(W,/obj/item/weapon/paper/talisman)) - usr.whisper("Nikt[pick("'","`")]o barada kla'atu!") - usr << "\red Your talisman turns into red dust, revealing the surrounding runes." - for (var/mob/V in orange(1,usr.loc)) - if(V!=usr) - V.show_message("\red Red dust emanates from [usr]'s hands for a moment.", 3) - return - return - if(istype(W,/obj/effect/rune)) - return fizzle() - if(istype(W,/obj/item/weapon/paper/talisman)) - call(/obj/effect/rune/proc/fizzle)() - return - -/////////////////////////////////////////SEVENTEENTH RUNE - - wall() - usr.say("Khari[pick("'","`")]d! Eske'te tannin!") - src.density = !src.density - var/mob/living/user = usr - user.take_organ_damage(2, 0) - if(src.density) - usr << "\red Your blood flows into the rune, and you feel that the very space over the rune thickens." - else - usr << "\red Your blood flows into the rune, and you feel as the rune releases its grasp on space." - return - -/////////////////////////////////////////EIGHTTEENTH RUNE - - freedom() - var/mob/living/user = usr - var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if (istype(H.current,/mob/living/carbon)) - cultists+=H.current - var/list/mob/living/carbon/users = new - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - users+=C - if(users.len>=3) - var/mob/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users) - if(!cultist) - return fizzle() - if (cultist == user) //just to be sure. - return - if(!(cultist.buckled || \ - cultist.handcuffed || \ - istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle) || \ - (istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) || \ - (istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) || \ - (istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) \ - )) - user << "\red The [cultist] is already free." - return - cultist.buckled = null - if (cultist.handcuffed) - cultist.handcuffed.loc = cultist.loc - cultist.handcuffed = null - cultist.update_inv_handcuffed() - if (cultist.legcuffed) - cultist.legcuffed.loc = cultist.loc - cultist.legcuffed = null - cultist.update_inv_legcuffed() - if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle)) - cultist.u_equip(cultist.wear_mask) - if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) - cultist.loc:welded = 0 - if(istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) - cultist.loc:locked = 0 - if(istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) - cultist.loc:locked = 0 - for(var/mob/living/carbon/C in users) - user.take_overall_damage(15, 0) - C.say("Khari[pick("'","`")]d! Gual'te nikka!") - del(src) - return fizzle() - -/////////////////////////////////////////NINETEENTH RUNE - - cultsummon() - var/mob/living/user = usr - var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if (istype(H.current,/mob/living/carbon)) - cultists+=H.current - var/list/mob/living/carbon/users = new - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - users+=C - if(users.len>=3) - var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user) - if(!cultist) - return fizzle() - if (cultist == user) //just to be sure. - return - if(cultist.buckled || cultist.handcuffed || (!isturf(cultist.loc) && !istype(cultist.loc, /obj/structure/closet))) - user << "\red You cannot summon the [cultist], for his shackles of blood are strong" - return fizzle() - cultist.loc = src.loc - cultist.lying = 1 - cultist.regenerate_icons() - for(var/mob/living/carbon/human/C in orange(1,src)) - if(iscultist(C) && !C.stat) - C.say("N'ath reth sh'yro eth d[pick("'","`")]rekkathnor!") - C.take_overall_damage(25, 0) - user.visible_message("\red Rune disappears with a flash of red light, and in its place now a body lies.", \ - "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a body.", \ - "\red You hear a pop and smell ozone.") - del(src) - return fizzle() - -/////////////////////////////////////////TWENTIETH RUNES - - deafen() - if(istype(src,/obj/effect/rune)) - var/affected = 0 - for(var/mob/living/carbon/C in range(7,src)) - if (iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.ear_deaf += 50 - C.show_message("\red The world around you suddenly becomes quiet.", 3) - affected++ - if(prob(1)) - C.sdisabilities |= DEAF - if(affected) - usr.say("Sti[pick("'","`")] kaliedir!") - usr << "\red The world becomes quiet as the deafening rune dissipates into fine dust." - del(src) - else - return fizzle() - else - var/affected = 0 - for(var/mob/living/carbon/C in range(7,usr)) - if (iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.ear_deaf += 30 - //talismans is weaker. - C.show_message("\red The world around you suddenly becomes quiet.", 3) - affected++ - if(affected) - usr.whisper("Sti[pick("'","`")] kaliedir!") - usr << "\red Your talisman turns into gray dust, deafening everyone around." - for (var/mob/V in orange(1,src)) - if(!(iscultist(V))) - V.show_message("\red Dust flows from [usr]'s hands for a moment, and the world suddenly becomes quiet..", 3) - return - - blind() - if(istype(src,/obj/effect/rune)) - var/affected = 0 - for(var/mob/living/carbon/C in viewers(src)) - if (iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.eye_blurry += 50 - C.eye_blind += 20 - if(prob(5)) - C.disabilities |= NEARSIGHTED - if(prob(10)) - C.sdisabilities |= BLIND - C.show_message("\red Suddenly you see red flash that blinds you.", 3) - affected++ - if(affected) - usr.say("Sti[pick("'","`")] kaliesin!") - usr << "\red The rune flashes, blinding those who not follow the Nar-Sie, and dissipates into fine dust." - del(src) - else - return fizzle() - else - var/affected = 0 - for(var/mob/living/carbon/C in view(2,usr)) - if (iscultist(C)) - continue - var/obj/item/weapon/nullrod/N = locate() in C - if(N) - continue - C.eye_blurry += 30 - C.eye_blind += 10 - //talismans is weaker. - affected++ - C.show_message("\red You feel a sharp pain in your eyes, and the world disappears into darkness..", 3) - if(affected) - usr.whisper("Sti[pick("'","`")] kaliesin!") - usr << "\red Your talisman turns into gray dust, blinding those who not follow the Nar-Sie." - return - - - bloodboil() //cultists need at least one DANGEROUS rune. Even if they're all stealthy. -/* - var/list/mob/living/carbon/cultists = new - for(var/datum/mind/H in ticker.mode.cult) - if (istype(H.current,/mob/living/carbon)) - cultists+=H.current -*/ - var/culcount = 0 //also, wording for it is old wording for obscure rune, which is now hide-see-blood. -// var/list/cultboil = list(cultists-usr) //and for this words are destroy-see-blood. - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - culcount++ - if(culcount>=3) - for(var/mob/living/carbon/M in viewers(usr)) - if(iscultist(M)) - continue - var/obj/item/weapon/nullrod/N = locate() in M - if(N) - continue - M.take_overall_damage(51,51) - M << "\red Your blood boils!" - if(prob(5)) - spawn(5) - M.gib() - for(var/obj/effect/rune/R in view(src)) - if(prob(10)) - explosion(R.loc, -1, 0, 1, 5) - for(var/mob/living/carbon/human/C in orange(1,src)) - if(iscultist(C) && !C.stat) - C.say("Dedo ol[pick("'","`")]btoh!") - C.take_overall_damage(15, 0) - del(src) - else - return fizzle() - return - -// WIP rune, I'll wait for Rastaf0 to add limited blood. - - burningblood() - var/culcount = 0 - for(var/mob/living/carbon/C in orange(1,src)) - if(iscultist(C) && !C.stat) - culcount++ - if(culcount >= 5) - for(var/obj/effect/rune/R in world) - if(R.blood_DNA == src.blood_DNA) - for(var/mob/living/M in orange(2,R)) - M.take_overall_damage(0,15) - if (R.invisibility>M.see_invisible) - M << "\red Aargh it burns!" - else - M << "\red Rune suddenly ignites, burning you!" - var/turf/T = get_turf(R) - T.hotspot_expose(700,125) - for(var/obj/effect/decal/cleanable/blood/B in world) - if(B.blood_DNA == src.blood_DNA) - for(var/mob/living/M in orange(1,B)) - M.take_overall_damage(0,5) - M << "\red Blood suddenly ignites, burning you!" - var/turf/T = get_turf(B) - T.hotspot_expose(700,125) - del(B) - del(src) - -////////// Rune 24 (counting burningblood, which kinda doesnt work yet.) - - runestun(var/mob/living/T as mob) - if(istype(src,/obj/effect/rune)) ///When invoked as rune, flash and stun everyone around. - usr.say("Fuu ma[pick("'","`")]jin!") - for(var/mob/living/L in viewers(src)) - - if(iscarbon(L)) - var/mob/living/carbon/C = L - flick("e_flash", C.flash) - if(C.stuttering < 1 && (!(HULK in C.mutations))) - C.stuttering = 1 - C.Weaken(1) - C.Stun(1) - C.show_message("\red The rune explodes in a bright flash.", 3) - - else if(issilicon(L)) - var/mob/living/silicon/S = L - S.Weaken(5) - S.show_message("\red BZZZT... The rune has exploded in a bright flash.", 3) - del(src) - else ///When invoked as talisman, stun and mute the target mob. - usr.say("Dream sign ''Evil sealing talisman'[pick("'","`")]!") - var/obj/item/weapon/nullrod/N = locate() in T - if(N) - for(var/mob/O in viewers(T, null)) - O.show_message(text("\red [] invokes a talisman at [], but they are unaffected!", usr, T), 1) - else - for(var/mob/O in viewers(T, null)) - O.show_message(text("\red [] invokes a talisman at []", usr, T), 1) - - if(issilicon(T)) - T.Weaken(15) - - else if(iscarbon(T)) - var/mob/living/carbon/C = T - flick("e_flash", C.flash) - if (!(HULK in C.mutations)) - C.silent += 15 - C.Weaken(25) - C.Stun(25) - return - -/////////////////////////////////////////TWENTY-FIFTH RUNE - - armor() - var/mob/living/carbon/human/user = usr - if(istype(src,/obj/effect/rune)) - usr.say("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!") - else - usr.whisper("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!") - usr.visible_message("\red The rune disappears with a flash of red light, and a set of armor appears on [usr]...", \ - "\red You are blinded by the flash of red light! After you're able to see again, you see that you are now wearing a set of armor.") - - user.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(user), slot_head) - user.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit) - user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(user), slot_shoes) - user.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/cultpack(user), slot_back) - //the above update their overlay icons cache but do not call update_icons() - //the below calls update_icons() at the end, which will update overlay icons by using the (now updated) cache - user.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) //put in hands or on floor - - del(src) - return +var/list/sacrificed = list() + +/obj/effect/rune +/////////////////////////////////////////FIRST RUNE + proc + teleport(var/key) + var/mob/living/user = usr + var/allrunesloc[] + allrunesloc = new/list() + var/index = 0 + // var/tempnum = 0 + for(var/obj/effect/rune/R in world) + if(R == src) + continue + if(R.word1 == wordtravel && R.word2 == wordself && R.word3 == key && R.z != 2) + index++ + allrunesloc.len = index + allrunesloc[index] = R.loc + if(index >= 5) + user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric" + if (istype(user, /mob/living)) + user.take_overall_damage(5, 0) + del(src) + if(allrunesloc && index != 0) + if(istype(src,/obj/effect/rune)) + user.say("Sas[pick("'","`")]so c'arta forbici!")//Only you can stop auto-muting + else + user.whisper("Sas[pick("'","`")]so c'arta forbici!") + user.visible_message("\red [user] disappears in a flash of red light!", \ + "\red You feel as your body gets dragged through the dimension of Nar-Sie!", \ + "\red You hear a sickening crunch and sloshing of viscera.") + user.loc = allrunesloc[rand(1,index)] + return + if(istype(src,/obj/effect/rune)) + return fizzle() //Use friggin manuals, Dorf, your list was of zero length. + else + call(/obj/effect/rune/proc/fizzle)() + return + + + itemport(var/key) +// var/allrunesloc[] +// allrunesloc = new/list() +// var/index = 0 + // var/tempnum = 0 + var/culcount = 0 + var/runecount = 0 + var/obj/effect/rune/IP = null + var/mob/living/user = usr + for(var/obj/effect/rune/R in world) + if(R == src) + continue + if(R.word1 == wordtravel && R.word2 == wordother && R.word3 == key) + IP = R + runecount++ + if(runecount >= 2) + user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric" + if (istype(user, /mob/living)) + user.take_overall_damage(5, 0) + del(src) + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C) && !C.stat) + culcount++ + if(culcount>=3) + user.say("Sas[pick("'","`")]so c'arta forbici tarem!") + user.visible_message("\red You feel air moving from the rune - like as it was swapped with somewhere else.", \ + "\red You feel air moving from the rune - like as it was swapped with somewhere else.", \ + "\red You smell ozone.") + for(var/obj/O in src.loc) + if(!O.anchored) + O.loc = IP.loc + for(var/mob/M in src.loc) + M.loc = IP.loc + return + + return fizzle() + + +/////////////////////////////////////////SECOND RUNE + + tomesummon() + if(istype(src,/obj/effect/rune)) + usr.say("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!") + else + usr.whisper("N[pick("'","`")]ath reth sh'yro eth d'raggathnor!") + usr.visible_message("\red Rune disappears with a flash of red light, and in its place now a book lies.", \ + "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a book.", \ + "\red You hear a pop and smell ozone.") + if(istype(src,/obj/effect/rune)) + new /obj/item/weapon/tome(src.loc) + else + new /obj/item/weapon/tome(usr.loc) + del(src) + return + + + +/////////////////////////////////////////THIRD RUNE + + convert() + for(var/mob/living/carbon/M in src.loc) + if(iscultist(M)) + continue + if(M.stat==2) + continue + usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!") + 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.") + if(is_convertable_to_cult(M.mind)) + ticker.mode.add_cultist(M.mind) + M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." + M << "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." + return 1 + else + M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." + M << "And not a single fuck was given, exterminate the cult at all costs." + return 0 + + return fizzle() + + + +/////////////////////////////////////////FOURTH RUNE + + tearreality() + var/cultist_count = 0 + for(var/mob/M in range(1,src)) + if(iscultist(M) && !M.stat) + M.say("Tok-lyr rqa'nap g[pick("'","`")]lt-ulotf!") + cultist_count += 1 + if(cultist_count >= 9) + new /obj/machinery/singularity/narsie(src.loc) + if(ticker.mode.name == "cult") + ticker.mode:eldergod = 0 + return + else + return fizzle() + +/////////////////////////////////////////FIFTH RUNE + + 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!") + else + usr.whisper("Ta'gh fara[pick("'","`")]qha fel d'amar det!") + playsound(U, 'sound/items/Welder2.ogg', 25, 1) + var/turf/T = get_turf(U) + if(T) + T.hotspot_expose(700,125) + var/rune = src // detaching the proc - in theory + empulse(U, (range_red - 2), range_red) + del(rune) + return + +/////////////////////////////////////////SIXTH RUNE + + drain() + var/drain = 0 + for(var/obj/effect/rune/R in world) + if(R.word1==wordtravel && R.word2==wordblood && R.word3==wordself) + for(var/mob/living/carbon/D in R.loc) + if(D.stat!=2) + var/bdrain = rand(1,25) + D << "\red You feel weakened." + D.take_overall_damage(bdrain, 0) + drain += bdrain + if(!drain) + return fizzle() + usr.say ("Yu[pick("'","`")]gular faras desdae. Havas mithum javara. Umathar uf'kal thenar!") + usr.visible_message("\red Blood flows from the rune into [usr]!", \ + "\red The blood starts flowing from the rune and into your frail mortal body. You feel... empowered.", \ + "\red You hear a liquid flowing.") + var/mob/living/user = usr + if(user.bhunger) + user.bhunger = max(user.bhunger-2*drain,0) + if(drain>=50) + user.visible_message("\red [user]'s eyes give off eerie red glow!", \ + "\red ...but it wasn't nearly enough. You crave, crave for more. The hunger consumes you from within.", \ + "\red You hear a heartbeat.") + user.bhunger += drain + src = user + spawn() + for (,user.bhunger>0,user.bhunger--) + sleep(50) + user.take_overall_damage(3, 0) + return + user.heal_organ_damage(drain%5, 0) + drain-=drain%5 + for (,drain>0,drain-=5) + sleep(2) + user.heal_organ_damage(5, 0) + return + + + + + + +/////////////////////////////////////////SEVENTH RUNE + + seer() + if(usr.loc==src.loc) + usr.say("Rash'tla sektath mal[pick("'","`")]zua. Zasan therium vivira. Itonis al'ra matum!") + if(usr.see_invisible!=0 && usr.see_invisible!=15) + usr << "\red The world beyond flashes your eyes but disappears quickly, as if something is disrupting your vision." + else + usr << "\red The world beyond opens to your eyes." + usr.see_invisible = SEE_INVISIBLE_OBSERVER + usr.seer = 1 + return + return fizzle() + +/////////////////////////////////////////EIGHTH RUNE + + raise() + var/mob/living/carbon/human/corpse_to_raise + var/mob/living/carbon/human/body_to_sacrifice + + var/is_sacrifice_target = 0 + for(var/mob/living/carbon/human/M in src.loc) + if(M.stat == DEAD) + if(ticker.mode.name == "cult" && M.mind == ticker.mode:sacrifice_target) + is_sacrifice_target = 1 + else + corpse_to_raise = M + if(M.key) + M.ghostize(1) //kick them out of their body + break + if(!corpse_to_raise) + if(is_sacrifice_target) + usr << "\red The Geometer of blood wants this mortal for himself." + return fizzle() + + + is_sacrifice_target = 0 + find_sacrifice: + for(var/obj/effect/rune/R in world) + if(R.word1==wordblood && R.word2==wordjoin && R.word3==wordhell) + for(var/mob/living/carbon/human/N in R.loc) + if(ticker.mode.name == "cult" && N.mind && N.mind == ticker.mode:sacrifice_target) + is_sacrifice_target = 1 + else + if(N.stat!= DEAD) + body_to_sacrifice = N + break find_sacrifice + + if(!body_to_sacrifice) + if (is_sacrifice_target) + usr << "\red The Geometer of blood wants that corpse for himself." + else + usr << "\red The sacrifical corpse is not dead. You must free it from this world of illusions before it may be used." + return fizzle() + + var/mob/dead/observer/ghost + for(var/mob/dead/observer/O in loc) + if(!O.client) continue + if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue + ghost = O + break + + if(!ghost) + usr << "\red You require a restless spirit which clings to this world. Beckon their prescence with the sacred chants of Nar-Sie." + return fizzle() + + for(var/datum/organ/external/affecting in corpse_to_raise.organs) + affecting.heal_damage(1000, 1000) + corpse_to_raise.setToxLoss(0) + corpse_to_raise.setOxyLoss(0) + corpse_to_raise.SetParalysis(0) + corpse_to_raise.SetStunned(0) + corpse_to_raise.SetWeakened(0) + corpse_to_raise.radiation = 0 +// corpse_to_raise.buckled = null +// if(corpse_to_raise.handcuffed) +// del(corpse_to_raise.handcuffed) +// corpse_to_raise.update_inv_handcuffed(0) + corpse_to_raise.stat = CONSCIOUS + corpse_to_raise.updatehealth() + corpse_to_raise.UpdateDamageIcon() + + corpse_to_raise.key = ghost.key //the corpse will keep its old mind! but a new player takes ownership of it (they are essentially possessed) + //This means, should that player leave the body, the original may re-enter + usr.say("Pasnar val'keriam usinar. Savrae ines amutan. Yam'toth remium il'tarat!") + corpse_to_raise.visible_message("\red [corpse_to_raise]'s eyes glow with a faint red as he stands up, slowly starting to breathe again.", \ + "\red Life... I'm alive again...", \ + "\red You hear a faint, slightly familiar whisper.") + body_to_sacrifice.visible_message("\red [body_to_sacrifice] is torn apart, a black smoke swiftly dissipating from his remains!", \ + "\red You feel as your blood boils, tearing you apart.", \ + "\red You hear a thousand voices, all crying in pain.") + body_to_sacrifice.gib() + +// if(ticker.mode.name == "cult") +// ticker.mode:add_cultist(corpse_to_raise.mind) +// else +// ticker.mode.cult |= corpse_to_raise.mind + + corpse_to_raise << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." + corpse_to_raise << "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." + return + + + + + +/////////////////////////////////////////NINETH RUNE + + obscure(var/rad) + var/S=0 + for(var/obj/effect/rune/R in orange(rad,src)) + if(R!=src) + R:visibility=0 + S=1 + if(S) + if(istype(src,/obj/effect/rune)) + usr.say("Kla[pick("'","`")]atu barada nikt'o!") + for (var/mob/V in viewers(src)) + V.show_message("\red The rune turns into gray dust, veiling the surrounding runes.", 3) + del(src) + else + usr.whisper("Kla[pick("'","`")]atu barada nikt'o!") + usr << "\red Your talisman turns into gray dust, veiling the surrounding runes." + for (var/mob/V in orange(1,src)) + if(V!=usr) + V.show_message("\red Dust emanates from [usr]'s hands for a moment.", 3) + + return + if(istype(src,/obj/effect/rune)) + return fizzle() + else + call(/obj/effect/rune/proc/fizzle)() + return + +/////////////////////////////////////////TENTH RUNE + + ajourney() //some bits copypastaed from admin tools - Urist + if(usr.loc==src.loc) + var/mob/living/carbon/human/L = usr + usr.say("Fwe[pick("'","`")]sh mah erl nyag r'ya!") + usr.visible_message("\red [usr]'s eyes glow blue as \he freezes in place, absolutely motionless.", \ + "\red The shadow that is your spirit separates itself from your body. You are now in the realm beyond. While this is a great sight, being here strains your mind and body. Hurry...", \ + "\red You hear only complete silence for a moment.") + usr.ghostize(1) + L.ajourn = 1 + while(L) + if(L.key) + L.ajourn=0 + return + else + L.take_organ_damage(10, 0) + sleep(100) + return fizzle() + + + + +/////////////////////////////////////////ELEVENTH RUNE + + manifest() + var/obj/effect/rune/this_rune = src + src = null + if(usr.loc!=this_rune.loc) + return this_rune.fizzle() + var/mob/dead/observer/ghost + for(var/mob/dead/observer/O in this_rune.loc) + if(!O.client) continue + if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue + ghost = O + break + if(!ghost) + return this_rune.fizzle() + + usr.say("Gal'h'rfikk harfrandid mud[pick("'","`")]gib!") + var/mob/living/carbon/human/dummy/D = new(this_rune.loc) + usr.visible_message("\red A shape forms in the center of the rune. A shape of... a man.", \ + "\red A shape forms in the center of the rune. A shape of... a man.", \ + "\red You hear liquid flowing.") + D.real_name = "Unknown" + for(var/obj/item/weapon/paper/P in this_rune.loc) + if(length(P.name)<=24) + D.real_name = P.name + break + D.universal_speak = 1 + D.nodamage = 0 + + D.key = ghost.key + + if(ticker.mode.name == "cult") + ticker.mode:add_cultist(D.mind) + else + ticker.mode.cult+=D.mind + + D << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." + D << "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/mob/living/user = usr + while(this_rune && user && user.stat==CONSCIOUS && user.client && user.loc==this_rune.loc) + user.take_organ_damage(1, 0) + sleep(30) + if(D) + D.visible_message("\red [D] slowly dissipates into dust and bones.", \ + "\red You feel pain, as bonds formed between your soul and this homunculus break.", \ + "\red You hear faint rustle.") + D.dust() + return + + + + + +/////////////////////////////////////////TWELFTH RUNE + + talisman()//only hide, emp, teleport, deafen, blind and tome runes can be imbued atm + var/obj/item/weapon/paper/newtalisman + var/unsuitable_newtalisman = 0 + for(var/obj/item/weapon/paper/P in src.loc) + if(!P.info) + newtalisman = P + break + else + unsuitable_newtalisman = 1 + if (!newtalisman) + if (unsuitable_newtalisman) + usr << "\red The blank is tainted. It is unsuitable." + return fizzle() + + var/obj/effect/rune/imbued_from + var/obj/item/weapon/paper/talisman/T + for(var/obj/effect/rune/R in orange(1,src)) + if(R==src) + continue + if(R.word1==wordtravel && R.word2==wordself) //teleport + T = new(src.loc) + T.imbue = "[R.word3]" + T.info = "[R.word3]" + imbued_from = R + break + if(R.word1==wordsee && R.word2==wordblood && R.word3==wordhell) //tome + T = new(src.loc) + T.imbue = "newtome" + imbued_from = R + break + if(R.word1==worddestr && R.word2==wordsee && R.word3==wordtech) //emp + T = new(src.loc) + T.imbue = "emp" + imbued_from = R + break + if(R.word1==wordblood && R.word2==wordsee && R.word3==worddestr) //conceal + T = new(src.loc) + T.imbue = "conceal" + imbued_from = R + break + if(R.word1==wordhell && R.word2==worddestr && R.word3==wordother) //armor + T = new(src.loc) + T.imbue = "armor" + imbued_from = R + break + if(R.word1==wordblood && R.word2==wordsee && R.word3==wordhide) //reveal + T = new(src.loc) + T.imbue = "revealrunes" + imbued_from = R + break + if(R.word1==wordhide && R.word2==wordother && R.word3==wordsee) //deafen + T = new(src.loc) + T.imbue = "deafen" + imbued_from = R + break + if(R.word1==worddestr && R.word2==wordsee && R.word3==wordother) //blind + T = new(src.loc) + T.imbue = "blind" + imbued_from = R + break + if(R.word1==wordself && R.word2==wordother && R.word3==wordtech) //communicat + T = new(src.loc) + T.imbue = "communicate" + imbued_from = R + break + if(R.word1==wordjoin && R.word2==wordhide && R.word3==wordtech) //communicat + T = new(src.loc) + T.imbue = "runestun" + imbued_from = R + break + if (imbued_from) + for (var/mob/V in viewers(src)) + V.show_message("\red The runes turn into dust, which then forms into an arcane image on the paper.", 3) + usr.say("H'drak v[pick("'","`")]loso, mir'kanas verbot!") + del(imbued_from) + del(newtalisman) + else + return fizzle() + +/////////////////////////////////////////THIRTEENTH RUNE + + mend() + var/mob/living/user = usr + src = null + user.say("Uhrast ka'hfa heldsagen ver[pick("'","`")]lot!") + user.take_overall_damage(200, 0) + runedec+=10 + user.visible_message("\red [user] keels over dead, his blood glowing blue as it escapes his body and dissipates into thin air.", \ + "\red In the last moment of your humble life, you feel an immense pain as fabric of reality mends... with your blood.", \ + "\red You hear faint rustle.") + for(,user.stat==2) + sleep(600) + if (!user) + return + runedec-=10 + return + + +/////////////////////////////////////////FOURTEETH RUNE + + // returns 0 if the rune is not used. returns 1 if the rune is used. + communicate() + . = 1 // Default output is 1. If the rune is deleted it will return 1 + var/input = copytext(sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "") as text|null),1,MAX_MESSAGE_LEN) + if(!input) + if (istype(src)) + fizzle() + return 0 + else + return 0 + if(istype(src,/obj/effect/rune)) + usr.say("O bidai nabora se[pick("'","`")]sma!") + else + usr.whisper("O bidai nabora se[pick("'","`")]sma!") + var/input_s = sanitize(input) + if(istype(src,/obj/effect/rune)) + usr.say("[input]") + else + usr.whisper("[input]") + for(var/datum/mind/H in ticker.mode.cult) + if (H.current) + H.current << "\red \b [input_s]" + del(src) + return 1 + +/////////////////////////////////////////FIFTEENTH RUNE + + sacrifice() + var/list/mob/living/carbon/human/cultsinrange = list() + var/list/mob/living/carbon/human/victims = list() + for(var/mob/living/carbon/human/V in src.loc)//Checks for non-cultist humans to sacrifice + if(ishuman(V)) + if(!(iscultist(V))) + victims += V//Checks for cult status and mob type + for(var/obj/item/I in src.loc)//Checks for MMIs/brains/Intellicards + if(istype(I,/obj/item/brain)) + var/obj/item/brain/B = I + victims += B.brainmob + else if(istype(I,/obj/item/device/mmi)) + var/obj/item/device/mmi/B = I + victims += B.brainmob + else if(istype(I,/obj/item/device/aicard)) + for(var/mob/living/silicon/ai/A in I) + victims += A + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C) && !C.stat) + cultsinrange += C + C.say("Barhah hra zar[pick("'","`")]garis!") + for(var/mob/H in victims) + if (ticker.mode.name == "cult") + if(H.mind == ticker.mode:sacrifice_target) + if(cultsinrange.len >= 3) + sacrificed += H.mind + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete." + else + usr << "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual." + else + if(cultsinrange.len >= 3) + if(H.stat !=2) + if(prob(80)) + usr << "\red The Geometer of Blood accepts this sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, this soul was not enough to gain His favor." + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + else + if(prob(40)) + usr << "\red The Geometer of blood accepts this sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, a mere dead body is not enough to satisfy Him." + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + else + if(H.stat !=2) + usr << "\red The victim is still alive, you will need more cultists chanting for the sacrifice to succeed." + else + if(prob(40)) + usr << "\red The Geometer of blood accepts this sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, a mere dead body is not enough to satisfy Him." + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + else + if(cultsinrange.len >= 3) + if(H.stat !=2) + if(prob(80)) + usr << "\red The Geometer of Blood accepts this sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, this soul was not enough to gain His favor." + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + else + if(prob(40)) + usr << "\red The Geometer of blood accepts this sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, a mere dead body is not enough to satisfy Him." + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + else + if(H.stat !=2) + usr << "\red The victim is still alive, you will need more cultists chanting for the sacrifice to succeed." + else + if(prob(40)) + usr << "\red The Geometer of blood accepts this sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, a mere dead body is not enough to satisfy Him." + if(isrobot(H)) + H.dust()//To prevent the MMI from remaining + else + H.gib() + for(var/mob/living/carbon/monkey/M in src.loc) + if (ticker.mode.name == "cult") + if(M.mind == ticker.mode:sacrifice_target) + if(cultsinrange.len >= 3) + sacrificed += M.mind + usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete." + else + usr << "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual." + continue + else + if(prob(20)) + usr << "\red The Geometer of Blood accepts your meager sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of blood accepts this sacrifice." + usr << "\red However, a mere monkey is not enough to satisfy Him." + else + usr << "\red The Geometer of Blood accepts your meager sacrifice." + if(prob(20)) + ticker.mode.grant_runeword(usr) + M.gib() +/* for(var/mob/living/carbon/alien/A) + for(var/mob/K in cultsinrange) + K.say("Barhah hra zar'garis!") + A.dust() /// A.gib() doesnt work for some reason, and dust() leaves that skull and bones thingy which we dont really need. + if (ticker.mode.name == "cult") + if(prob(75)) + usr << "\red The Geometer of Blood accepts your exotic sacrifice." + ticker.mode:grant_runeword(usr) + else + usr << "\red The Geometer of Blood accepts your exotic sacrifice." + usr << "\red However, this alien is not enough to gain His favor." + else + usr << "\red The Geometer of Blood accepts your exotic sacrifice." + return + return fizzle() */ + +/////////////////////////////////////////SIXTEENTH RUNE + + revealrunes(var/obj/W as obj) + var/go=0 + var/rad + var/S=0 + if(istype(W,/obj/effect/rune)) + rad = 6 + go = 1 + if (istype(W,/obj/item/weapon/paper/talisman)) + rad = 4 + go = 1 + if (istype(W,/obj/item/weapon/nullrod)) + rad = 1 + go = 1 + if(go) + for(var/obj/effect/rune/R in orange(rad,src)) + if(R!=src) + R:visibility=15 + S=1 + if(S) + if(istype(W,/obj/item/weapon/nullrod)) + usr << "\red Arcane markings suddenly glow from underneath a thin layer of dust!" + return + if(istype(W,/obj/effect/rune)) + usr.say("Nikt[pick("'","`")]o barada kla'atu!") + for (var/mob/V in viewers(src)) + V.show_message("\red The rune turns into red dust, reveaing the surrounding runes.", 3) + del(src) + return + if(istype(W,/obj/item/weapon/paper/talisman)) + usr.whisper("Nikt[pick("'","`")]o barada kla'atu!") + usr << "\red Your talisman turns into red dust, revealing the surrounding runes." + for (var/mob/V in orange(1,usr.loc)) + if(V!=usr) + V.show_message("\red Red dust emanates from [usr]'s hands for a moment.", 3) + return + return + if(istype(W,/obj/effect/rune)) + return fizzle() + if(istype(W,/obj/item/weapon/paper/talisman)) + call(/obj/effect/rune/proc/fizzle)() + return + +/////////////////////////////////////////SEVENTEENTH RUNE + + wall() + usr.say("Khari[pick("'","`")]d! Eske'te tannin!") + src.density = !src.density + var/mob/living/user = usr + user.take_organ_damage(2, 0) + if(src.density) + usr << "\red Your blood flows into the rune, and you feel that the very space over the rune thickens." + else + usr << "\red Your blood flows into the rune, and you feel as the rune releases its grasp on space." + return + +/////////////////////////////////////////EIGHTTEENTH RUNE + + freedom() + var/mob/living/user = usr + var/list/mob/living/carbon/cultists = new + for(var/datum/mind/H in ticker.mode.cult) + if (istype(H.current,/mob/living/carbon)) + cultists+=H.current + var/list/mob/living/carbon/users = new + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C) && !C.stat) + users+=C + if(users.len>=3) + var/mob/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users) + if(!cultist) + return fizzle() + if (cultist == user) //just to be sure. + return + if(!(cultist.buckled || \ + cultist.handcuffed || \ + istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle) || \ + (istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) || \ + (istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) || \ + (istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) \ + )) + user << "\red The [cultist] is already free." + return + cultist.buckled = null + if (cultist.handcuffed) + cultist.handcuffed.loc = cultist.loc + cultist.handcuffed = null + cultist.update_inv_handcuffed() + if (cultist.legcuffed) + cultist.legcuffed.loc = cultist.loc + cultist.legcuffed = null + cultist.update_inv_legcuffed() + if (istype(cultist.wear_mask, /obj/item/clothing/mask/muzzle)) + cultist.u_equip(cultist.wear_mask) + if(istype(cultist.loc, /obj/structure/closet)&&cultist.loc:welded) + cultist.loc:welded = 0 + if(istype(cultist.loc, /obj/structure/closet/secure_closet)&&cultist.loc:locked) + cultist.loc:locked = 0 + if(istype(cultist.loc, /obj/machinery/dna_scannernew)&&cultist.loc:locked) + cultist.loc:locked = 0 + for(var/mob/living/carbon/C in users) + user.take_overall_damage(15, 0) + C.say("Khari[pick("'","`")]d! Gual'te nikka!") + del(src) + return fizzle() + +/////////////////////////////////////////NINETEENTH RUNE + + cultsummon() + var/mob/living/user = usr + var/list/mob/living/carbon/cultists = new + for(var/datum/mind/H in ticker.mode.cult) + if (istype(H.current,/mob/living/carbon)) + cultists+=H.current + var/list/mob/living/carbon/users = new + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C) && !C.stat) + users+=C + if(users.len>=3) + var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user) + if(!cultist) + return fizzle() + if (cultist == user) //just to be sure. + return + if(cultist.buckled || cultist.handcuffed || (!isturf(cultist.loc) && !istype(cultist.loc, /obj/structure/closet))) + user << "\red You cannot summon the [cultist], for his shackles of blood are strong" + return fizzle() + cultist.loc = src.loc + cultist.lying = 1 + cultist.regenerate_icons() + for(var/mob/living/carbon/human/C in orange(1,src)) + if(iscultist(C) && !C.stat) + C.say("N'ath reth sh'yro eth d[pick("'","`")]rekkathnor!") + C.take_overall_damage(25, 0) + user.visible_message("\red Rune disappears with a flash of red light, and in its place now a body lies.", \ + "\red You are blinded by the flash of red light! After you're able to see again, you see that now instead of the rune there's a body.", \ + "\red You hear a pop and smell ozone.") + del(src) + return fizzle() + +/////////////////////////////////////////TWENTIETH RUNES + + deafen() + if(istype(src,/obj/effect/rune)) + var/affected = 0 + for(var/mob/living/carbon/C in range(7,src)) + if (iscultist(C)) + continue + var/obj/item/weapon/nullrod/N = locate() in C + if(N) + continue + C.ear_deaf += 50 + C.show_message("\red The world around you suddenly becomes quiet.", 3) + affected++ + if(prob(1)) + C.sdisabilities |= DEAF + if(affected) + usr.say("Sti[pick("'","`")] kaliedir!") + usr << "\red The world becomes quiet as the deafening rune dissipates into fine dust." + del(src) + else + return fizzle() + else + var/affected = 0 + for(var/mob/living/carbon/C in range(7,usr)) + if (iscultist(C)) + continue + var/obj/item/weapon/nullrod/N = locate() in C + if(N) + continue + C.ear_deaf += 30 + //talismans is weaker. + C.show_message("\red The world around you suddenly becomes quiet.", 3) + affected++ + if(affected) + usr.whisper("Sti[pick("'","`")] kaliedir!") + usr << "\red Your talisman turns into gray dust, deafening everyone around." + for (var/mob/V in orange(1,src)) + if(!(iscultist(V))) + V.show_message("\red Dust flows from [usr]'s hands for a moment, and the world suddenly becomes quiet..", 3) + return + + blind() + if(istype(src,/obj/effect/rune)) + var/affected = 0 + for(var/mob/living/carbon/C in viewers(src)) + if (iscultist(C)) + continue + var/obj/item/weapon/nullrod/N = locate() in C + if(N) + continue + C.eye_blurry += 50 + C.eye_blind += 20 + if(prob(5)) + C.disabilities |= NEARSIGHTED + if(prob(10)) + C.sdisabilities |= BLIND + C.show_message("\red Suddenly you see red flash that blinds you.", 3) + affected++ + if(affected) + usr.say("Sti[pick("'","`")] kaliesin!") + usr << "\red The rune flashes, blinding those who not follow the Nar-Sie, and dissipates into fine dust." + del(src) + else + return fizzle() + else + var/affected = 0 + for(var/mob/living/carbon/C in view(2,usr)) + if (iscultist(C)) + continue + var/obj/item/weapon/nullrod/N = locate() in C + if(N) + continue + C.eye_blurry += 30 + C.eye_blind += 10 + //talismans is weaker. + affected++ + C.show_message("\red You feel a sharp pain in your eyes, and the world disappears into darkness..", 3) + if(affected) + usr.whisper("Sti[pick("'","`")] kaliesin!") + usr << "\red Your talisman turns into gray dust, blinding those who not follow the Nar-Sie." + return + + + bloodboil() //cultists need at least one DANGEROUS rune. Even if they're all stealthy. +/* + var/list/mob/living/carbon/cultists = new + for(var/datum/mind/H in ticker.mode.cult) + if (istype(H.current,/mob/living/carbon)) + cultists+=H.current +*/ + var/culcount = 0 //also, wording for it is old wording for obscure rune, which is now hide-see-blood. +// var/list/cultboil = list(cultists-usr) //and for this words are destroy-see-blood. + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C) && !C.stat) + culcount++ + if(culcount>=3) + for(var/mob/living/carbon/M in viewers(usr)) + if(iscultist(M)) + continue + var/obj/item/weapon/nullrod/N = locate() in M + if(N) + continue + M.take_overall_damage(51,51) + M << "\red Your blood boils!" + if(prob(5)) + spawn(5) + M.gib() + for(var/obj/effect/rune/R in view(src)) + if(prob(10)) + explosion(R.loc, -1, 0, 1, 5) + for(var/mob/living/carbon/human/C in orange(1,src)) + if(iscultist(C) && !C.stat) + C.say("Dedo ol[pick("'","`")]btoh!") + C.take_overall_damage(15, 0) + del(src) + else + return fizzle() + return + +// WIP rune, I'll wait for Rastaf0 to add limited blood. + + burningblood() + var/culcount = 0 + for(var/mob/living/carbon/C in orange(1,src)) + if(iscultist(C) && !C.stat) + culcount++ + if(culcount >= 5) + for(var/obj/effect/rune/R in world) + if(R.blood_DNA == src.blood_DNA) + for(var/mob/living/M in orange(2,R)) + M.take_overall_damage(0,15) + if (R.invisibility>M.see_invisible) + M << "\red Aargh it burns!" + else + M << "\red Rune suddenly ignites, burning you!" + var/turf/T = get_turf(R) + T.hotspot_expose(700,125) + for(var/obj/effect/decal/cleanable/blood/B in world) + if(B.blood_DNA == src.blood_DNA) + for(var/mob/living/M in orange(1,B)) + M.take_overall_damage(0,5) + M << "\red Blood suddenly ignites, burning you!" + var/turf/T = get_turf(B) + T.hotspot_expose(700,125) + del(B) + del(src) + +////////// Rune 24 (counting burningblood, which kinda doesnt work yet.) + + runestun(var/mob/living/T as mob) + if(istype(src,/obj/effect/rune)) ///When invoked as rune, flash and stun everyone around. + usr.say("Fuu ma[pick("'","`")]jin!") + for(var/mob/living/L in viewers(src)) + + if(iscarbon(L)) + var/mob/living/carbon/C = L + flick("e_flash", C.flash) + if(C.stuttering < 1 && (!(HULK in C.mutations))) + C.stuttering = 1 + C.Weaken(1) + C.Stun(1) + C.show_message("\red The rune explodes in a bright flash.", 3) + + else if(issilicon(L)) + var/mob/living/silicon/S = L + S.Weaken(5) + S.show_message("\red BZZZT... The rune has exploded in a bright flash.", 3) + del(src) + else ///When invoked as talisman, stun and mute the target mob. + usr.say("Dream sign ''Evil sealing talisman'[pick("'","`")]!") + var/obj/item/weapon/nullrod/N = locate() in T + if(N) + for(var/mob/O in viewers(T, null)) + O.show_message(text("\red [] invokes a talisman at [], but they are unaffected!", usr, T), 1) + else + for(var/mob/O in viewers(T, null)) + O.show_message(text("\red [] invokes a talisman at []", usr, T), 1) + + if(issilicon(T)) + T.Weaken(15) + + else if(iscarbon(T)) + var/mob/living/carbon/C = T + flick("e_flash", C.flash) + if (!(HULK in C.mutations)) + C.silent += 15 + C.Weaken(25) + C.Stun(25) + return + +/////////////////////////////////////////TWENTY-FIFTH RUNE + + armor() + var/mob/living/carbon/human/user = usr + if(istype(src,/obj/effect/rune)) + usr.say("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!") + else + usr.whisper("N'ath reth sh'yro eth d[pick("'","`")]raggathnor!") + usr.visible_message("\red The rune disappears with a flash of red light, and a set of armor appears on [usr]...", \ + "\red You are blinded by the flash of red light! After you're able to see again, you see that you are now wearing a set of armor.") + + user.equip_to_slot_or_del(new /obj/item/clothing/head/culthood/alt(user), slot_head) + user.equip_to_slot_or_del(new /obj/item/clothing/suit/cultrobes/alt(user), slot_wear_suit) + user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(user), slot_shoes) + user.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/cultpack(user), slot_back) + //the above update their overlay icons cache but do not call update_icons() + //the below calls update_icons() at the end, which will update overlay icons by using the (now updated) cache + user.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) //put in hands or on floor + + del(src) + return diff --git a/code/game/magic/cultist/talisman.dm b/code/game/gamemodes/cult/talisman.dm similarity index 100% rename from code/game/magic/cultist/talisman.dm rename to code/game/gamemodes/cult/talisman.dm diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 2b5d3d0bd3..ca07a4c98b 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -23,7 +23,6 @@ icon_state = "motion0" stat |= NOPOWER - /obj/machinery/ai_slipper/proc/setState(var/enabled, var/uses) src.disabled = disabled src.uses = uses diff --git a/code/game/magic/musician.dm b/code/game/objects/structures/musician.dm similarity index 100% rename from code/game/magic/musician.dm rename to code/game/objects/structures/musician.dm diff --git a/code/game/turf.dm b/code/game/turfs/turf.dm similarity index 100% rename from code/game/turf.dm rename to code/game/turfs/turf.dm diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm new file mode 100644 index 0000000000..0f6fd0f119 --- /dev/null +++ b/code/modules/library/lib_items.dm @@ -0,0 +1,236 @@ +/* Library Items + * + * Contains: + * Bookcase + * Book + * Barcode Scanner + */ + + +/* + * Bookcase + */ + +/obj/structure/bookcase + name = "bookcase" + icon = 'icons/obj/library.dmi' + icon_state = "book-0" + anchored = 1 + density = 1 + opacity = 1 + +/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob) + if(istype(O, /obj/item/weapon/book)) + user.drop_item() + O.loc = src + update_icon() + else if(istype(O, /obj/item/weapon/pen)) + var/newname = copytext(sanitize(input("What would you like to title this bookshelf?") as text|null),1,MAX_MESSAGE_LEN) + if(!newname) + return + else + name = ("bookcase ([sanitize(newname)])") + else + ..() + +/obj/structure/bookcase/attack_hand(var/mob/user as mob) + if(contents.len) + var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") in contents as obj|null + if(choice) + if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + return + if(ishuman(user)) + if(!user.get_active_hand()) + user.put_in_hands(choice) + else + choice.loc = get_turf(src) + update_icon() + +/obj/structure/bookcase/ex_act(severity) + switch(severity) + if(1.0) + for(var/obj/item/weapon/book/b in contents) + del(b) + del(src) + return + if(2.0) + for(var/obj/item/weapon/book/b in contents) + if (prob(50)) b.loc = (get_turf(src)) + else del(b) + del(src) + return + if(3.0) + if (prob(50)) + for(var/obj/item/weapon/book/b in contents) + b.loc = (get_turf(src)) + del(src) + return + else + return + +/obj/structure/bookcase/update_icon() + if(contents.len < 5) + icon_state = "book-[contents.len]" + else + icon_state = "book-5" + + +/obj/structure/bookcase/manuals/medical + name = "Medical Manuals bookcase" + + New() + ..() + new /obj/item/weapon/book/manual/medical_cloning(src) + update_icon() + + +/obj/structure/bookcase/manuals/engineering + name = "Engineering Manuals bookcase" + + New() + ..() + new /obj/item/weapon/book/manual/engineering_construction(src) + new /obj/item/weapon/book/manual/engineering_particle_accelerator(src) + new /obj/item/weapon/book/manual/engineering_hacking(src) + new /obj/item/weapon/book/manual/engineering_guide(src) + new /obj/item/weapon/book/manual/engineering_singularity_safety(src) + new /obj/item/weapon/book/manual/robotics_cyborgs(src) + update_icon() + +/obj/structure/bookcase/manuals/research_and_development + name = "R&D Manuals bookcase" + + New() + ..() + new /obj/item/weapon/book/manual/research_and_development(src) + update_icon() + + +/* + * Book + */ +/obj/item/weapon/book + name = "book" + icon = 'icons/obj/library.dmi' + icon_state ="book" + throw_speed = 1 + throw_range = 5 + w_class = 1.0 + flags = FPRINT | TABLEPASS + attack_verb = list("bashed", "whacked", "educated") + var/dat // Actual page content + var/due_date = 0 // Game time in 1/10th seconds + var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned + var/unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + var/title // The real name of the book. + +/obj/item/weapon/book/attack_self(var/mob/user as mob) + if(src.dat) + user << browse("Penned by [author].
" + "[dat]", "window=book") + user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.") + onclose(user, "book") + else + user << "This book is completely blank!" + +/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/pen)) + if(unique) + user << "These pages don't seem to take the ink well. Looks like you can't modify it." + return + var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel") + switch(choice) + if("Title") + var/newtitle = copytext(reject_bad_text(input("Write a new title:") as text|null),1,MAX_MESSAGE_LEN) + if(!newtitle) + usr << "The title is invalid." + return + else + src.name = newtitle + src.title = newtitle + if("Contents") + var/content = strip_html(input("Write your book's contents (HTML NOT allowed):"),8192) as message|null + if(!content) + usr << "The content is invalid." + return + else + src.dat += content + if("Author") + var/newauthor = copytext(sanitize(input("Write the author's name:") as text|null),1,MAX_NAME_LEN) + if(!newauthor) + usr << "The name is invalid." + return + else + src.author = newauthor + else + return + else if(istype(W, /obj/item/weapon/barcodescanner)) + var/obj/item/weapon/barcodescanner/scanner = W + if(!scanner.computer) + user << "[W]'s screen flashes: 'No associated computer found!'" + else + switch(scanner.mode) + if(0) + scanner.book = src + user << "[W]'s screen flashes: 'Book stored in buffer.'" + if(1) + scanner.book = src + scanner.computer.buffer_book = src.name + user << "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'" + if(2) + scanner.book = src + for(var/datum/borrowbook/b in scanner.computer.checkouts) + if(b.bookname == src.name) + scanner.computer.checkouts.Remove(b) + user << "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'" + return + user << "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'" + if(3) + scanner.book = src + for(var/obj/item/weapon/book in scanner.computer.inventory) + if(book == src) + user << "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'" + return + scanner.computer.inventory.Add(src) + user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" + else + ..() + + +/* + * Barcode Scanner + */ +/obj/item/weapon/barcodescanner + name = "barcode scanner" + icon = 'icons/obj/library.dmi' + icon_state ="scanner" + throw_speed = 1 + throw_range = 5 + w_class = 1.0 + flags = FPRINT | TABLEPASS + var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this + var/obj/item/weapon/book/book // Currently scanned book + var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory + + attack_self(mob/user as mob) + mode += 1 + if(mode > 3) + mode = 0 + user << "[src] Status Display:" + var/modedesc + switch(mode) + if(0) + modedesc = "Scan book to local buffer." + if(1) + modedesc = "Scan book to local buffer and set associated computer buffer to match." + if(2) + modedesc = "Scan book to local buffer, attempt to check in scanned book." + if(3) + modedesc = "Scan book to local buffer, attempt to add book to general inventory." + else + modedesc = "ERROR" + user << " - Mode [mode] : [modedesc]" + if(src.computer) + user << "Computer has been associated with this unit." + else + user << "No associated computer found. Only local scans will function properly." + user << "\n" \ No newline at end of file diff --git a/code/game/magic/library.dm b/code/modules/library/lib_machines.dm similarity index 61% rename from code/game/magic/library.dm rename to code/modules/library/lib_machines.dm index 46bf1c0506..6b6901e56a 100644 --- a/code/game/magic/library.dm +++ b/code/modules/library/lib_machines.dm @@ -1,330 +1,25 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -//******************************* -// -// Library SQL Configuration -// -//******************************* - -// Deprecated! See global.dm for new SQL config vars -- TLE -/* -#define SQL_ADDRESS "" -#define SQL_DB "" -#define SQL_PORT "3306" -#define SQL_LOGIN "" -#define SQL_PASS "" -*/ - -//******************************* -// Requires Dantom.DB library ( http://www.byond.com/developer/Dantom/DB ) - +/* Library Machines + * + * Contains: + * Borrowbook datum + * Library Public Computer + * Library Computer + * Library Scanner + * Book Binder + */ /* - The Library - ------------ - A place for the crew to go, relax, and enjoy a good book. - Aspiring authors can even self publish and, if they're lucky - convince the on-staff Librarian to submit it to the Archives - to be chronicled in history forever - some say even persisting - through alternate dimensions. - - - Written by TLE for /tg/station 13 - Feel free to use this as you like. Some credit would be cool. - Check us out at http://nanotrasen.com/ if you're so inclined. -*/ - -// CONTAINS: - -// Objects: -// - bookcase -// - book -// - barcode scanner -// Machinery: -// - library computer -// - visitor's computer -// - book binder -// - book scanner -// Datum: -// - borrowbook - - -// Ideas for the future -// --------------------- -// - Visitor's computer should be able to search the current in-round library inventory (that the Librarian has stocked and checked in) -// -- Give computer other features like an Instant Messenger application, or the ability to edit, save, and print documents. -// - Admin interface directly tied to the Archive DB. Right now there's no way to delete uploaded books in-game. -// -- If this gets implemented, allow Librarians to "tag" or "suggest" books to be deleted. The DB ID of the tagged books gets saved to a text file (or another table in the DB maybe?). -// The admin interface would automatically take these IDs and SELECT them all from the DB to be displayed along with a Delete link to drop the row from the table. -// - When the game sets up and the round begins, have it automatically pick random books from the DB to populate the library with. Even if the Librarian is a useless fuck there are at least a few books around. -// - Allow books to be "hollowed out" like the Chaplain's Bible, allowing you to store one pocket-sized item inside. -// - Make books/book cases burn when exposed to flame. -// - Make book binder hackable. -// - Books shouldn't print straight from the library computer. Make it synch with a machine like the book binder to print instead. This should consume some sort of resource. - - -// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts. -/proc/sanitizeSQL(var/t as text) - var/sanitized_text = dd_replacetext(t, "'", "\\'") - sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"") - return sanitized_text - - - -/obj/structure/bookcase - name = "bookcase" - icon = 'icons/obj/library.dmi' - icon_state = "book-0" - anchored = 1 - density = 1 - opacity = 1 - -/obj/structure/bookcase/attackby(obj/O as obj, mob/user as mob) - if(istype(O, /obj/item/weapon/book)) - user.drop_item() - O.loc = src - update_icon() - else if(istype(O, /obj/item/weapon/pen)) - var/newname = copytext(sanitize(input("What would you like to title this bookshelf?") as text|null),1,MAX_MESSAGE_LEN) - if(!newname) - return - else - name = ("bookcase ([sanitize(newname)])") - else - ..() - -/obj/structure/bookcase/attack_hand(var/mob/user as mob) - if(contents.len) - var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") in contents as obj|null - if(choice) - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) - return - if(ishuman(user)) - if(!user.get_active_hand()) - user.put_in_hands(choice) - else - choice.loc = get_turf(src) - update_icon() - -/obj/structure/bookcase/ex_act(severity) - switch(severity) - if(1.0) - for(var/obj/item/weapon/book/b in contents) - del(b) - del(src) - return - if(2.0) - for(var/obj/item/weapon/book/b in contents) - if (prob(50)) b.loc = (get_turf(src)) - else del(b) - del(src) - return - if(3.0) - if (prob(50)) - for(var/obj/item/weapon/book/b in contents) - b.loc = (get_turf(src)) - del(src) - return - else - return - -/obj/structure/bookcase/update_icon() - if(contents.len < 5) - icon_state = "book-[contents.len]" - else - icon_state = "book-5" - - -/obj/structure/bookcase/manuals/medical - name = "Medical Manuals bookcase" - - New() - ..() - new /obj/item/weapon/book/manual/medical_cloning(src) - update_icon() - - -/obj/structure/bookcase/manuals/engineering - name = "Engineering Manuals bookcase" - - New() - ..() - new /obj/item/weapon/book/manual/engineering_construction(src) - new /obj/item/weapon/book/manual/engineering_particle_accelerator(src) - new /obj/item/weapon/book/manual/engineering_hacking(src) - new /obj/item/weapon/book/manual/engineering_guide(src) - new /obj/item/weapon/book/manual/engineering_singularity_safety(src) - new /obj/item/weapon/book/manual/robotics_cyborgs(src) - update_icon() - -/obj/structure/bookcase/manuals/research_and_development - name = "R&D Manuals bookcase" - - New() - ..() - new /obj/item/weapon/book/manual/research_and_development(src) - update_icon() - - - - - - -/obj/item/weapon/book - name = "book" - icon = 'icons/obj/library.dmi' - icon_state ="book" - throw_speed = 1 - throw_range = 5 - w_class = 1.0 - flags = FPRINT | TABLEPASS - attack_verb = list("bashed", "whacked", "educated") - var/dat // Actual page content - var/due_date = 0 // Game time in 1/10th seconds - var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned - var/unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified - var/title // The real name of the book. - -/obj/item/weapon/book/attack_self(var/mob/user as mob) - if(src.dat) - user << browse("Penned by [author].
" + "[dat]", "window=book") - user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.") - onclose(user, "book") - else - user << "This book is completely blank!" - -/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/pen)) - if(unique) - user << "These pages don't seem to take the ink well. Looks like you can't modify it." - return - var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel") - switch(choice) - if("Title") - var/newtitle = copytext(reject_bad_text(input("Write a new title:") as text|null),1,MAX_MESSAGE_LEN) - if(!newtitle) - usr << "The title is invalid." - return - else - src.name = newtitle - src.title = newtitle - if("Contents") - var/content = strip_html(input("Write your book's contents (HTML NOT allowed):"),8192) as message|null - if(!content) - usr << "The content is invalid." - return - else - src.dat += content - if("Author") - var/newauthor = copytext(sanitize(input("Write the author's name:") as text|null),1,MAX_NAME_LEN) - if(!newauthor) - usr << "The name is invalid." - return - else - src.author = newauthor - else - return - else if(istype(W, /obj/item/weapon/barcodescanner)) - var/obj/item/weapon/barcodescanner/scanner = W - if(!scanner.computer) - user << "[W]'s screen flashes: 'No associated computer found!'" - else - switch(scanner.mode) - if(0) - scanner.book = src - user << "[W]'s screen flashes: 'Book stored in buffer.'" - if(1) - scanner.book = src - scanner.computer.buffer_book = src.name - user << "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'" - if(2) - scanner.book = src - for(var/datum/borrowbook/b in scanner.computer.checkouts) - if(b.bookname == src.name) - scanner.computer.checkouts.Remove(b) - user << "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'" - return - user << "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'" - if(3) - scanner.book = src - for(var/obj/item/weapon/book in scanner.computer.inventory) - if(book == src) - user << "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'" - return - scanner.computer.inventory.Add(src) - user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" - else - ..() - - - - - - - - - - - - -/obj/item/weapon/barcodescanner - name = "barcode scanner" - icon = 'icons/obj/library.dmi' - icon_state ="scanner" - throw_speed = 1 - throw_range = 5 - w_class = 1.0 - flags = FPRINT | TABLEPASS - var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this - var/obj/item/weapon/book/book // Currently scanned book - var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory - - attack_self(mob/user as mob) - mode += 1 - if(mode > 3) - mode = 0 - user << "[src] Status Display:" - var/modedesc - switch(mode) - if(0) - modedesc = "Scan book to local buffer." - if(1) - modedesc = "Scan book to local buffer and set associated computer buffer to match." - if(2) - modedesc = "Scan book to local buffer, attempt to check in scanned book." - if(3) - modedesc = "Scan book to local buffer, attempt to add book to general inventory." - else - modedesc = "ERROR" - user << " - Mode [mode] : [modedesc]" - if(src.computer) - user << "Computer has been associated with this unit." - else - user << "No associated computer found. Only local scans will function properly." - user << "\n" - - - - - - - - - - + * Borrowbook datum + */ datum/borrowbook // Datum used to keep track of who has borrowed what when and for how long. var/bookname var/mobname var/getdate var/duedate - - - - - - - +/* + * Library Public Computer + */ /obj/machinery/librarypubliccomp name = "visitor computer" icon = 'icons/obj/library.dmi' @@ -337,7 +32,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f var/author var/SQLquery - /obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob) usr.machine = src var/dat = "Library Visitor\n" // @@ -374,7 +68,6 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f user << browse(dat, "window=publiclibrary") onclose(user, "publiclibrary") - /obj/machinery/librarypubliccomp/Topic(href, href_list) if(..()) usr << browse(null, "window=publiclibrary") @@ -418,9 +111,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f return - +/* + * Library Computer + */ // TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such - +// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it. /obj/machinery/librarycomp name = "Check-In/Out Computer" icon = 'icons/obj/library.dmi' @@ -699,6 +394,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f src.updateUsrDialog() return +/* + * Library Scanner + */ /obj/machinery/libraryscanner name = "scanner" icon = 'icons/obj/library.dmi' @@ -707,14 +405,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f density = 1 var/obj/item/weapon/book/cache // Last scanned book - - /obj/machinery/libraryscanner/attackby(var/obj/O as obj, var/mob/user as mob) if(istype(O, /obj/item/weapon/book)) user.drop_item() O.loc = src - /obj/machinery/libraryscanner/attack_hand(var/mob/user as mob) usr.machine = src var/dat = "Scanner Control Interface\n" // @@ -750,12 +445,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f return - - - - - - +/* + * Book binder + */ /obj/machinery/bookbinder name = "Book Binder" icon = 'icons/obj/library.dmi' diff --git a/code/modules/library/lib_readme.dm b/code/modules/library/lib_readme.dm new file mode 100644 index 0000000000..4237687dff --- /dev/null +++ b/code/modules/library/lib_readme.dm @@ -0,0 +1,61 @@ +//******************************* +// +// Library SQL Configuration +// +//******************************* + +// Deprecated! See global.dm for new SQL config vars -- TLE +/* +#define SQL_ADDRESS "" +#define SQL_DB "" +#define SQL_PORT "3306" +#define SQL_LOGIN "" +#define SQL_PASS "" +*/ + +//******************************* +// Requires Dantom.DB library ( http://www.byond.com/developer/Dantom/DB ) + + +/* + The Library + ------------ + A place for the crew to go, relax, and enjoy a good book. + Aspiring authors can even self publish and, if they're lucky + convince the on-staff Librarian to submit it to the Archives + to be chronicled in history forever - some say even persisting + through alternate dimensions. + + + Written by TLE for /tg/station 13 + Feel free to use this as you like. Some credit would be cool. + Check us out at http://nanotrasen.com/ if you're so inclined. +*/ + +// CONTAINS: + +// Objects: +// - bookcase +// - book +// - barcode scanner +// Machinery: +// - library computer +// - visitor's computer +// - book binder +// - book scanner +// Datum: +// - borrowbook + + +// Ideas for the future +// --------------------- +// - Visitor's computer should be able to search the current in-round library inventory (that the Librarian has stocked and checked in) +// -- Give computer other features like an Instant Messenger application, or the ability to edit, save, and print documents. +// - Admin interface directly tied to the Archive DB. Right now there's no way to delete uploaded books in-game. +// -- If this gets implemented, allow Librarians to "tag" or "suggest" books to be deleted. The DB ID of the tagged books gets saved to a text file (or another table in the DB maybe?). +// The admin interface would automatically take these IDs and SELECT them all from the DB to be displayed along with a Delete link to drop the row from the table. +// - When the game sets up and the round begins, have it automatically pick random books from the DB to populate the library with. Even if the Librarian is a useless fuck there are at least a few books around. +// - Allow books to be "hollowed out" like the Chaplain's Bible, allowing you to store one pocket-sized item inside. +// - Make books/book cases burn when exposed to flame. +// - Make book binder hackable. +// - Books shouldn't print straight from the library computer. Make it synch with a machine like the book binder to print instead. This should consume some sort of resource. diff --git a/tgstation.dme b/tgstation.dme index 9f44abdbff..54e4c1a55d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -50,8 +50,6 @@ #define FILE_DIR "code/game/machinery/kitchen" #define FILE_DIR "code/game/machinery/pipe" #define FILE_DIR "code/game/machinery/telecomms" -#define FILE_DIR "code/game/magic" -#define FILE_DIR "code/game/magic/cultist" #define FILE_DIR "code/game/mecha" #define FILE_DIR "code/game/mecha/combat" #define FILE_DIR "code/game/mecha/equipment" @@ -73,7 +71,9 @@ #define FILE_DIR "code/game/objects/secstorage" #define FILE_DIR "code/game/objects/stacks" #define FILE_DIR "code/game/objects/storage" +#define FILE_DIR "code/game/objects/structures" #define FILE_DIR "code/game/objects/tanks" +#define FILE_DIR "code/game/turfs" #define FILE_DIR "code/game/vehicles" #define FILE_DIR "code/game/vehicles/airtight" #define FILE_DIR "code/game/verbs" @@ -99,6 +99,7 @@ #define FILE_DIR "code/modules/detectivework" #define FILE_DIR "code/modules/flufftext" #define FILE_DIR "code/modules/food" +#define FILE_DIR "code/modules/library" #define FILE_DIR "code/modules/maps" #define FILE_DIR "code/modules/mining" #define FILE_DIR "code/modules/mob" @@ -361,7 +362,6 @@ #include "code\game\syndicate_specops_shuttle.dm" #include "code\game\throwing.dm" #include "code\game\topic.dm" -#include "code\game\turf.dm" #include "code\game\vote.dm" #include "code\game\area\ai_monitored.dm" #include "code\game\area\areas.dm" @@ -390,6 +390,9 @@ #include "code\game\gamemodes\cult\cult.dm" #include "code\game\gamemodes\cult\cult_items.dm" #include "code\game\gamemodes\cult\cult_structures.dm" +#include "code\game\gamemodes\cult\ritual.dm" +#include "code\game\gamemodes\cult\runes.dm" +#include "code\game\gamemodes\cult\talisman.dm" #include "code\game\gamemodes\events\black_hole.dm" #include "code\game\gamemodes\events\clang.dm" #include "code\game\gamemodes\events\dust.dm" @@ -542,11 +545,6 @@ #include "code\game\machinery\telecomms\telecomunications.dm" #include "code\game\machinery\telecomms\telemonitor.dm" #include "code\game\machinery\telecomms\traffic_control.dm" -#include "code\game\magic\library.dm" -#include "code\game\magic\musician.dm" -#include "code\game\magic\cultist\ritual.dm" -#include "code\game\magic\cultist\runes.dm" -#include "code\game\magic\cultist\talisman.dm" #include "code\game\mecha\mech_bay.dm" #include "code\game\mecha\mech_fabricator.dm" #include "code\game\mecha\mecha.dm" @@ -739,9 +737,11 @@ #include "code\game\objects\storage\storage.dm" #include "code\game\objects\storage\toolbox.dm" #include "code\game\objects\storage\uplink_kits.dm" +#include "code\game\objects\structures\musician.dm" #include "code\game\objects\tanks\emergency.dm" #include "code\game\objects\tanks\jetpack.dm" #include "code\game\objects\tanks\oxygen.dm" +#include "code\game\turfs\turf.dm" #include "code\game\vehicles\vehicle.dm" #include "code\game\vehicles\airtight\airtight.dm" #include "code\game\vehicles\airtight\land.dm" @@ -854,6 +854,9 @@ #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\TextFilters.dm" #include "code\modules\food\recipes_microwave.dm" +#include "code\modules\library\lib_items.dm" +#include "code\modules\library\lib_machines.dm" +#include "code\modules\library\lib_readme.dm" #include "code\modules\maps\dmm_suite.dm" #include "code\modules\maps\randomZlevel.dm" #include "code\modules\maps\reader.dm"