Fixed evidence bags so the items inside are now visible even when the bag is inhand (the problem was that overlays += obj uses the object's layer variable rather than the default FLOAT_LAYER. So the hud was appearing over the overlays. Fixed it by using image(obj) to take a snapshot). Changed the overlays to underlays to make them look better. Fixed issue 637 where putting objects in bags which were currently in your inventory did not remove the item from your inventory.

Replaced the obj variable var/see_face. It was used to determine whether something (namely masks/hats) hid your identity. Replaced with the HIDEFACE bitflag for var/flags_inv variable. Moved the var/flags_inv variable from atom/ to obj/item/ as only /obj/item/ can be in your inventory in the first place.

Fixed get_visible_name() so it takes into account any item on the var/head when deciding if your face is obscured. (While I'm at it, just dump a comment here if there's anything that should hide your face which doesn't and I'll add the flag.)

Removed the var/alien_egg_flag variable from mob/living/carbon/ and replaced it with the XENO_HOST bitflag for var/status_flags variable. You can now suicide whilst impregnated with a xeno (since you will chestburst even after death, that restriction is no longer necessary).

Any mob/living descendent can ghost even when not dead. However, ghosting whilst not dead results in the ghost eing unable to return to it's body for the remainder of the round. (It has a warning popup)

The suicide verb can only be used by humans when they can move and are not cuffed. These verbs will be totally replaced very soon with the 'fun' IC suicides I'm working on. Suicide is largely redundant given that anybody can ghost now, just didn't want to jump the gun in removing it.

Known Issues:
We've got var/flags_inv, var/slot_flags which could possibly be merged as they both deal with obj/items, although I'm not sure if we can fit oth into the 16-bit limit. Just something to look into.
There are bitflags GLASSESCOVERSEYES, MASKCOVERSEYES, HEADCOVERSEYES, MASKCOVERSMOUTH, HEADCOVERSMOUTH in the var/flags variable which should really be merged with or moved alongside the very similar flags in var/flags_inv. Comments next to the defines suggest as much.
You can borg dead/clientless brains but can't remove the brain fromt he borg once you realise it's a dud. >.<

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4072 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-07-14 21:43:54 +00:00
parent 1212efe4f1
commit 65ff691098
51 changed files with 367 additions and 620 deletions
+38 -48
View File
@@ -7,21 +7,18 @@
stat = DEAD
if(body)
var/turf/location = get_turf(body)//Where is the mob located?
if(location)//Found turf.
loc = location
else//Safety, in case a turf cannot be found.
loc = pick(latejoin)
if(!istype(body,/mob)) return//This needs to be recoded sometime so it has loc as its first arg
real_name = body.name
original_name = body.original_name //Original name is only used in ghost chat! It is not to be edited by anything!
name = body.original_name
if(!name)
var/turf/T = get_turf(body) //Where is the body located?
if(!T) T = pick(latejoin) //Safety in case we cannot find the body's position
loc = T
if(ismob(body))
real_name = body.real_name
original_name = body.original_name //Original name is only used in ghost chat! It is not to be edited by anything!
name = body.original_name
if(!safety)
corpse = body
if(!name) //To prevent nameless ghosts
name = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names)))
real_name = name
if(!safety)
corpse = body
verbs += /mob/dead/observer/proc/reenter_corpse
return
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
@@ -33,46 +30,38 @@ Works together with spawning an observer, noted above.
/mob/proc/ghostize(var/transfer_mind = 0)
if(key)
var/mob/dead/observer/ghost = new(src,transfer_mind) //Transfer safety to observer spawning proc.
if(client)
client.screen.len = null//Clear the hud, just to be sure.
var/mob/dead/observer/ghost = new(src,transfer_mind)//Transfer safety to observer spawning proc.
if(transfer_mind)//When a body is destroyed.
if(mind)
mind.transfer_to(ghost)
else//They may not have a mind and be gibbed/destroyed.
ghost.key = key
else//Else just modify their key and connect them.
client.images.len = null //remove the images such as AIs being unable to see runes
client.screen.len = null //remove hud items just in case
ghost.attack_log = attack_log //preserve our attack logs by copying them to our ghost
if(transfer_mind && mind) //When a body is destroyed attempt to transfer their mind
mind.transfer_to(ghost)
else //Else just modify their key and connect them.
ghost.key = key
verbs -= /mob/proc/ghost
if (ghost.client)
ghost.client.eye = ghost
else if(transfer_mind)//Body getting destroyed but the person is not present inside.
else if(transfer_mind) //Body getting destroyed but the person is not present inside.
for(var/mob/dead/observer/O in world)
if(O.corpse == src&&O.key)//If they have the same corpse and are keyed.
if(O.corpse == src && O.key) //If they have the same corpse and are keyed.
if(mind)
O.mind = mind//Transfer their mind if they have one.
O.mind = mind //Transfer their mind if they have one.
break
return
/*
This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues.
*/
/mob/proc/ghost()
set category = "Ghost"
/mob/living/verb/ghost()
set category = "OOC"
set name = "Ghost"
set desc = "You cannot be revived as a ghost."
set desc = "Relinquish your life and enter the land of the dead."
/*if(stat != 2) //this check causes nothing but troubles. Commented out for Nar-Sie's sake. --rastaf0
src << "Only dead people and admins get to ghost, and admins don't use this verb to ghost while alive."
return*/
if(key)
var/mob/dead/observer/ghost = new(src)
ghost.key = key
verbs -= /mob/proc/ghost
if (ghost.client)
ghost.client.eye = ghost
if(stat == DEAD)
ghostize(0)
else
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you may not play again this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost") return //didn't want to ghost after-all
ghostize(1) //safety is on so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
return
/mob/proc/adminghostize()
@@ -124,18 +113,20 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if (timeleft)
stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]")
/mob/dead/observer/proc/reenter_corpse()
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
set name = "Re-enter Corpse"
if(!client) return
if(!corpse)
alert("You don't have a corpse!")
src << "<span class='warning'>Sorry, you don't have a corpse to re-enter.</span>"
return
if(client && client.holder && client.holder.state == 2)
if(client.holder && client.holder.state == 2)
var/rank = client.holder.rank
client.clear_admin_verbs()
client.holder.state = 1
client.update_admins(rank)
if(iscultist(corpse) && corpse.ajourn==1 && corpse.stat!=2) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work
if(iscultist(corpse) && corpse.ajourn==1 && corpse.stat != DEAD) //checks if it's an astral-journeying cultistm if it is and he's not on an astral journey rune, re-entering won't work
var/S=0
for(var/obj/effect/rune/R in world)
if(corpse.loc==R.loc && R.word1 == wordhell && R.word2 == wordtravel && R.word3 == wordself)
@@ -146,23 +137,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(corpse.ajourn)
corpse.ajourn=0
client.mob = corpse
if (corpse.stat==2)
verbs += /mob/proc/ghost
del(src)
/mob/dead/observer/proc/dead_tele()
set category = "Ghost"
set name = "Teleport"
set desc= "Teleport to a location"
if((usr.stat != 2) || !istype(usr, /mob/dead/observer))
if(!istype(usr, /mob/dead/observer))
usr << "Not when you're not dead!"
return
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(30)
usr.verbs += /mob/dead/observer/proc/dead_tele
var/A
A = input("Area to jump to", "BOOYEA", A) in ghostteleportlocs
A = input("Area to jump to", "BOOYEA", A) as null|anything in ghostteleportlocs
var/area/thearea = ghostteleportlocs[A]
if(!thearea) return
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))