mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 18:51:53 +00:00
Cleaned up the files themselves. Everything in code/game/objects should now be in proper files or places with the exception of the files in the /weapons/ sub-folder. There's two instances of me not following the exact file structure. - /obj/item/brain has been moved to a file in mob/living/carbon/brain - /obj/item/clothing/mask/facehugger has been moved into mob/living/carbon/alien/special Both of these may not make sense according to the object structure, but they do make sense logically. If it's a problem just move them. Next up: Finish the files in the weapon folder, then start moving defines down. My god I hope I havent broken everything. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4547 316c924e-a436-60f5-8080-3fe189b3f50e
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
/obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob)
|
|
user.machine = src
|
|
var/dat = "<B>Teleportation Scroll:</B><BR>"
|
|
dat += "Number of uses: [src.uses]<BR>"
|
|
dat += "<HR>"
|
|
dat += "<B>Four uses use them wisely:</B><BR>"
|
|
dat += "<A href='byond://?src=\ref[src];spell_teleport=1'>Teleport</A><BR>"
|
|
dat += "Kind regards,<br>Wizards Federation<br><br>P.S. Don't forget to bring your gear, you'll need it to cast most spells.<HR>"
|
|
user << browse(dat, "window=scroll")
|
|
onclose(user, "scroll")
|
|
return
|
|
|
|
/obj/item/weapon/teleportation_scroll/Topic(href, href_list)
|
|
..()
|
|
if (usr.stat || usr.restrained())
|
|
return
|
|
var/mob/living/carbon/human/H = usr
|
|
if (!( istype(H, /mob/living/carbon/human)))
|
|
return 1
|
|
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
|
usr.machine = src
|
|
if (href_list["spell_teleport"])
|
|
if (src.uses >= 1)
|
|
src.uses -= 1
|
|
usr.teleportscroll()
|
|
if (istype(src.loc, /mob))
|
|
attack_self(src.loc)
|
|
else
|
|
for(var/mob/M in viewers(1, src))
|
|
if (M.client)
|
|
src.attack_self(M)
|
|
return |