Files
Polaris/code/game/gamemodes/cult/talisman.dm
johnsonmt88@gmail.com 19135de9eb 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
2012-08-22 15:50:09 +00:00

123 lines
4.7 KiB
Plaintext

/obj/item/weapon/paper/talisman
icon_state = "paper_talisman"
var/imbue = null
var/uses = 0
examine()
set src in view(2)
..()
return
attack_self(mob/living/user as mob)
if(iscultist(user))
var/delete = 1
switch(imbue)
if("newtome")
call(/obj/effect/rune/proc/tomesummon)()
if("armor")
call(/obj/effect/rune/proc/armor)()
if("emp")
call(/obj/effect/rune/proc/emp)(usr.loc,3)
if("conceal")
call(/obj/effect/rune/proc/obscure)(2)
if("revealrunes")
call(/obj/effect/rune/proc/revealrunes)(src)
if("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
call(/obj/effect/rune/proc/teleport)(imbue)
if("communicate")
//If the user cancels the talisman this var will be set to 0
delete = call(/obj/effect/rune/proc/communicate)()
if("deafen")
call(/obj/effect/rune/proc/deafen)()
if("blind")
call(/obj/effect/rune/proc/blind)()
if("runestun")
user << "\red To use this talisman, attack your target directly."
return
if("supply")
supply()
user.take_organ_damage(5, 0)
if(src && src.imbue!="supply" && src.imbue!="runestun")
if(delete)
del(src)
return
else
user << "You see strange symbols on the paper. Are they supposed to mean something?"
return
attack(mob/living/carbon/T as mob, mob/living/user as mob)
if(iscultist(user))
if(imbue == "runestun")
user.take_organ_damage(5, 0)
call(/obj/effect/rune/proc/runestun)(T)
del(src)
else
..() ///If its some other talisman, use the generic attack code, is this supposed to work this way?
else
..()
proc/supply(var/key)
if (!src.uses)
del(src)
return
var/dat = "<B>There are [src.uses] bloody runes on the parchment.</B><BR>"
dat += "Please choose the chant to be imbued into the fabric of reality.<BR>"
dat += "<HR>"
dat += "<A href='?src=\ref[src];rune=newtome'>N'ath reth sh'yro eth d'raggathnor!</A> - Allows you to summon a new arcane tome.<BR>"
dat += "<A href='?src=\ref[src];rune=teleport'>Sas'so c'arta forbici!</A> - Allows you to move to a rune with the same last word.<BR>"
dat += "<A href='?src=\ref[src];rune=emp'>Ta'gh fara'qha fel d'amar det!</A> - Allows you to destroy technology in a short range.<BR>"
dat += "<A href='?src=\ref[src];rune=conceal'>Kla'atu barada nikt'o!</A> - Allows you to conceal the runes you placed on the floor.<BR>"
dat += "<A href='?src=\ref[src];rune=communicate'>O bidai nabora se'sma!</A> - Allows you to coordinate with others of your cult.<BR>"
dat += "<A href='?src=\ref[src];rune=runestun'>Fuu ma'jin</A> - Allows you to stun a person by attacking them with the talisman.<BR>"
dat += "<A href='?src=\ref[src];rune=armor'>Sa tatha najin</A> - Allows you to summon armoured robes and an unholy blade<BR>"
dat += "<A href='?src=\ref[src];rune=soulstone'>Kal om neth</A> - Summons a soul stone<BR>"
dat += "<A href='?src=\ref[src];rune=construct'>Da A'ig Osk</A> - Summons a construct shell for use with captured souls. It is too large to carry on your person.<BR>"
usr << browse(dat, "window=id_com;size=350x200")
return
Topic(href, href_list)
if(!src) return
if (usr.stat || usr.restrained() || !in_range(src, usr)) return
if (href_list["rune"])
switch(href_list["rune"])
if("newtome")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "newtome"
if("teleport")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "[pick("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri", "orkan", "allaq")]"
T.info = "[T.imbue]"
if("emp")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "emp"
if("conceal")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "conceal"
if("communicate")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "communicate"
if("runestun")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "runestun"
if("armor")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "armor"
if("soulstone")
new /obj/item/device/soulstone(get_turf(usr))
if("construct")
new /obj/structure/constructshell(get_turf(usr))
src.uses--
supply()
return
/obj/item/weapon/paper/talisman/supply
imbue = "supply"
uses = 5