Merge pull request #5941 from Whitellama/master

Fixes #5577, Dionaea crashing on death. Fixes #5838, tomes not being able to be stored on bookshelves."
This commit is contained in:
Ccomp5950
2014-08-10 18:53:11 -05:00
10 changed files with 91 additions and 75 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,26 +329,29 @@ 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")
establish_old_db_connection()
if(!dbcon_old.IsConnected())
alert("Connection to Archive has been severed. Aborting.")
if(scanner.cache.unique)
alert("This book has been rejected from the database. Aborting!")
else
/*
var/sqltitle = dbcon.Quote(scanner.cache.name)
var/sqlauthor = dbcon.Quote(scanner.cache.author)
var/sqlcontent = dbcon.Quote(scanner.cache.dat)
var/sqlcategory = dbcon.Quote(upload_category)
*/
var/sqltitle = sanitizeSQL(scanner.cache.name)
var/sqlauthor = sanitizeSQL(scanner.cache.author)
var/sqlcontent = sanitizeSQL(scanner.cache.dat)
var/sqlcategory = sanitizeSQL(upload_category)
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
if(!query.Execute())
usr << query.ErrorMsg()
establish_old_db_connection()
if(!dbcon_old.IsConnected())
alert("Connection to Archive has been severed. Aborting.")
else
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete.")
/*
var/sqltitle = dbcon.Quote(scanner.cache.name)
var/sqlauthor = dbcon.Quote(scanner.cache.author)
var/sqlcontent = dbcon.Quote(scanner.cache.dat)
var/sqlcategory = dbcon.Quote(upload_category)
*/
var/sqltitle = sanitizeSQL(scanner.cache.name)
var/sqlauthor = sanitizeSQL(scanner.cache.author)
var/sqlcontent = sanitizeSQL(scanner.cache.dat)
var/sqlcategory = sanitizeSQL(upload_category)
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO library (author, title, content, category) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]')")
if(!query.Execute())
usr << query.ErrorMsg()
else
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete.")
if(href_list["targetid"])
var/sqlid = sanitizeSQL(href_list["targetid"])

View File

@@ -69,17 +69,17 @@
..()
/mob/dead/observer/Topic(href, href_list)
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
if(target)
ManualFollow(target)
/mob/dead/observer/Topic(href, href_list)
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
if(target)
ManualFollow(target)
/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
@@ -111,7 +111,7 @@ Works together with spawning an observer, noted above.
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
client.images.Remove(hud)
if(antagHUD)
var/list/target_list = list()
for(var/mob/living/target in oview(src, 14))
@@ -123,19 +123,19 @@ Works together with spawning an observer, noted above.
process_medHUD(src)
/mob/dead/proc/process_medHUD(var/mob/M)
var/client/C = M.client
for(var/mob/living/carbon/human/patient in oview(M, 14))
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD_OOC]
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
/*
/mob/dead/proc/process_medHUD(var/mob/M)
var/client/C = M.client
for(var/mob/living/carbon/human/patient in oview(M, 14))
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD_OOC]
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/client/C = U.client
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
/*
else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
var/mob/living/silicon/silicon_target = target
if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))||silicon_target.mind.special_role=="traitor")
@@ -143,9 +143,9 @@ Works together with spawning an observer, noted above.
U.client.images += image(tempHud,silicon_target,"hudmalborg")
else
U.client.images += image(tempHud,silicon_target,"hudmalai")
*/
return 1
*/
return 1
/mob/proc/ghostize(var/can_reenter_corpse = 1)
if(key)
var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc.
@@ -256,10 +256,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!client)
return
var/mentor = is_mentor(usr.client)
if(!client)
return
var/mentor = is_mentor(usr.client)
if(!config.antag_hud_allowed && (!client.holder || mentor))
src << "\red Admins have disabled this for this round."
return
@@ -387,9 +387,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"
if(!istype(usr, /mob/dead/observer)) return
// Shamelessly copied from the Gas Analyzers
if (!( istype(usr.loc, /turf) ))
return
@@ -572,4 +572,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
W.update_icon()
W.message = message
W.add_hiddenprint(src)
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")

View File

@@ -291,7 +291,6 @@
if(H.mind)
H.mind.transfer_to(S)
S.key = H
for(var/mob/living/carbon/monkey/diona/D in H.contents)
if(D.client)

View File

@@ -842,18 +842,18 @@ datum
description = "Sterilizes wounds in preparation for surgery."
reagent_state = LIQUID
color = "#C8A5DC" // rgb: 200, 165, 220
//makes you squeaky clean
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if (method == TOUCH)
M.germ_level -= min(volume*20, M.germ_level)
reaction_obj(var/obj/O, var/volume)
O.germ_level -= min(volume*20, O.germ_level)
reaction_turf(var/turf/T, var/volume)
T.germ_level -= min(volume*20, T.germ_level)
/* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
src = null
if (method==TOUCH)
@@ -1332,7 +1332,7 @@ datum
if(!M) M = holder.my_atom
if(ishuman(M))
var/mob/living/carbon/human/H = M
//Peridaxon is hard enough to get, it's probably fair to make this all internal organs
for(var/datum/organ/internal/I in H.internal_organs)
if(I.damage > 0)
@@ -3073,6 +3073,9 @@ datum
paperaffected.clearpaper()
usr << "The solution dissolves the ink on the paper."
if(istype(O,/obj/item/weapon/book))
if(istype(O,/obj/item/weapon/book/tome))
usr << "The solution does nothing. Whatever this is, it isn't normal ink."
return
if(volume >= 5)
var/obj/item/weapon/book/affectedbook = O
affectedbook.dat = null

View File

@@ -113,6 +113,16 @@ should be listed in the changelog upon commit though. Thanks. -->
<!-- DO NOT REMOVE, MOVE, OR COPY THIS COMMENT! THIS MUST BE THE LAST NON-EMPTY LINE BEFORE THE LOGS #ADDTOCHANGELOGMARKER# -->
<div class='commit sansserif'>
<h2 class='date'>2 August 2014</h2>
<h3 class='author'>Whitellama updated:</h3>
<ul class='changes bgimages16'>
<li class='bugfix'>Arcane tomes can now be stored on bookshelves.</li>
<li class='bugfix'>Dionaea players no longer crash on death, and now properly nymphs properly.</li>
</ul>
</div>
<div class='commit sansserif'>
<h2 class='date'>1 July 2014</h2>
<h3 class='author'>Mloc updated:</h3>