Made arcane tomes a subtype of books, fixes #5838

This commit is contained in:
Whitellama
2014-08-10 02:23:36 -07:00
parent cfa1ff3440
commit 49c8c6f2cb
7 changed files with 73 additions and 69 deletions

View File

@@ -668,7 +668,7 @@ datum/mind
if("tome")
var/mob/living/carbon/human/H = current
if (istype(H))
var/obj/item/weapon/tome/T = new(H)
var/obj/item/weapon/book/tome/T = new(H)
var/list/slots = list (
"backpack" = slot_in_backpack,
@@ -1136,7 +1136,7 @@ datum/mind
var/mob/living/carbon/human/H = current
if (istype(H))
var/obj/item/weapon/tome/T = new(H)
var/obj/item/weapon/book/tome/T = new(H)
var/list/slots = list (
"backpack" = slot_in_backpack,

View File

@@ -56,7 +56,7 @@
item_state = "cultrobes"
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
flags_inv = HIDEJUMPSUIT
siemens_coefficient = 0
@@ -78,12 +78,11 @@
item_state = "magusred"
flags = FPRINT | TABLEPASS
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade)
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade)
armor = list(melee = 50, bullet = 30, laser = 50,energy = 20, bomb = 25, bio = 10, rad = 0)
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
siemens_coefficient = 0
/obj/item/clothing/head/helmet/space/cult
name = "cult helmet"
desc = "A space worthy helmet used by the followers of Nar-Sie"
@@ -98,7 +97,7 @@
item_state = "cult_armour"
desc = "A bulky suit of armour, bristling with spikes. It looks space proof."
w_class = 3
allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit)
allowed = list(/obj/item/weapon/book/tome,/obj/item/weapon/melee/cultblade,/obj/item/weapon/tank/emergency_oxygen,/obj/item/device/suit_cooling_unit)
slowdown = 1
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
siemens_coefficient = 0

View File

@@ -91,7 +91,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/tome) && iscultist(user))
if(istype(I, /obj/item/weapon/book/tome) && iscultist(user))
user << "You retrace your steps, carefully undoing the lines of the rune."
del(src)
return
@@ -178,13 +178,15 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
check_icon()
icon = get_uristrune_cult(word1, word2, word3)
/obj/item/weapon/tome
/obj/item/weapon/book/tome
name = "arcane tome"
icon = 'icons/obj/weapons.dmi'
icon_state ="tome"
throw_speed = 1
throw_range = 5
w_class = 2.0
flags = FPRINT | TABLEPASS
unique = 1
var/notedat = ""
var/tomedat = ""
var/list/words = list("ire" = "ire", "ego" = "ego", "nahlizet" = "nahlizet", "certum" = "certum", "veri" = "veri", "jatkaa" = "jatkaa", "balaq" = "balaq", "mgar" = "mgar", "karazet" = "karazet", "geeri" = "geeri")
@@ -313,7 +315,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
[words[10]] is <a href='byond://?src=\ref[src];number=10;action=change'>[words[words[10]]]</A> <A href='byond://?src=\ref[src];number=10;action=clear'>Clear</A><BR>
"}
usr << browse("[notedat]", "window=notes")
// call(/obj/item/weapon/tome/proc/edit_notes)()
// call(/obj/item/weapon/book/tome/proc/edit_notes)()
else
usr << browse(null, "window=notes")
return
@@ -408,7 +410,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
[words[9]] is <a href='byond://?src=\ref[src];number=9;action=change'>[words[words[9]]]</A> <A href='byond://?src=\ref[src];number=9;action=clear'>Clear</A><BR>
[words[10]] is <a href='byond://?src=\ref[src];number=10;action=change'>[words[words[10]]]</A> <A href='byond://?src=\ref[src];number=10;action=clear'>Clear</A><BR>
"}
// call(/obj/item/weapon/tome/proc/edit_notes)()
// call(/obj/item/weapon/book/tome/proc/edit_notes)()
user << browse("[notedat]", "window=notes")
return
if(usr.get_active_hand() != src)
@@ -493,8 +495,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
user << "The book seems full of illegible scribbles. Is this a joke?"
return
attackby(obj/item/weapon/tome/T as obj, mob/living/user as mob)
if(istype(T, /obj/item/weapon/tome)) // sanity check to prevent a runtime error
attackby(obj/item/weapon/book/tome/T as obj, mob/living/user as mob)
if(istype(T, /obj/item/weapon/book/tome)) // sanity check to prevent a runtime error
switch(alert("Copy the runes from your tome?",,"Copy", "Cancel"))
if("cancel")
return
@@ -515,7 +517,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
else
usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
/obj/item/weapon/tome/imbued //admin tome, spawns working runes without waiting
/obj/item/weapon/book/tome/imbued //admin tome, spawns working runes without waiting
w_class = 2.0
var/cultistsonly = 1
attack_self(mob/user as mob)

View File

@@ -87,9 +87,9 @@ var/list/sacrificed = list()
"\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)
new /obj/item/weapon/book/tome(src.loc)
else
new /obj/item/weapon/tome(usr.loc)
new /obj/item/weapon/book/tome(usr.loc)
del(src)
return

View File

@@ -310,7 +310,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
else
if(alert("Spawn that person a tome?",,"Yes","No")=="Yes")
M << "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie. A tome, a message from your new master, appears on the ground."
new /obj/item/weapon/tome(M.loc)
new /obj/item/weapon/book/tome(M.loc)
else
M << "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie."
var/glimpse=pick("1","2","3","4","5","6","7","8")

View File

@@ -147,7 +147,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
if(src.emagged)
dat += "<A href='?src=\ref[src];switchscreen=7'>7. Access the Forbidden Lore Vault</A><BR>"
if(src.arcanecheckout)
new /obj/item/weapon/tome(src.loc)
new /obj/item/weapon/book/tome(src.loc)
user << "<span class='warning'>Your sanity barely endures the seconds spent in the vault's browsing window. The only thing to remind you of this when you stop browsing is a dusty old tome sitting on the desk. You don't really remember printing it.</span>"
user.visible_message("[user] stares at the blank screen for a few moments, his expression frozen in fear. When he finally awakens from it, he looks a lot older.", 2)
src.arcanecheckout = 0
@@ -329,6 +329,9 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
if(scanner.cache)
var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
if(choice == "Confirm")
if(scanner.cache.unique)
alert("This book has been rejected from the database. Aborting!")
else
establish_old_db_connection()
if(!dbcon_old.IsConnected())
alert("Connection to Archive has been severed. Aborting.")

View File

@@ -79,7 +79,7 @@
/mob/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/tome))
if(istype(W,/obj/item/weapon/book/tome))
var/mob/dead/M = src
if(src.invisibility != 0)
M.invisibility = 0