TG Updates: Fixed psychic reinforced table deconstruction

Fixed issue 270
- Changelings now have an "isabsorbing" var to prevent spamming absorb for free chems.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2766 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
quartz235@gmail.com
2011-12-22 07:07:57 +00:00
committed by Hawk-v3
parent d9e615604e
commit 754b4c6c7d
3 changed files with 24 additions and 15 deletions

View File

@@ -208,6 +208,7 @@
var/changelingID = "none"
var/mob/living/host = null
var/geneticdamage = 0.0
var/isabsorbing = 0
/datum/changeling/New()
..()

View File

@@ -87,14 +87,19 @@
usr << "\red We must have a tighter grip to absorb this creature."
return
usr.changeling.chem_charges += 5
if (usr.changeling.isabsorbing)
usr << "\red We are already absorbing!"
return
var/mob/living/carbon/human/T = M
usr << "\blue This creature is compatible. We must hold still..."
usr.changeling.isabsorbing = 1
if (!do_mob(usr, T, 150))
usr << "\red Our absorption of [T] has been interrupted!"
usr.changeling.isabsorbing = 0
return
usr << "\blue We extend a proboscis."
@@ -102,6 +107,7 @@
if (!do_mob(usr, T, 150))
usr << "\red Our absorption of [T] has been interrupted!"
usr.changeling.isabsorbing = 0
return
usr << "\blue We stab [T] with the proboscis."
@@ -111,6 +117,7 @@
if (!do_mob(usr, T, 150))
usr << "\red Our absorption of [T] has been interrupted!"
usr.changeling.isabsorbing = 0
return
usr << "\blue We have absorbed [T]!"
@@ -119,7 +126,7 @@
usr.changeling.absorbed_dna[T.real_name] = T.dna
if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400)
usr.changeling.chem_charges += 5
usr.changeling.chem_charges += 10
if(T.changeling)
if(T.changeling.absorbed_dna)
usr.changeling.absorbed_dna |= T.changeling.absorbed_dna //steal all their loot
@@ -127,6 +134,7 @@
T.changeling.absorbed_dna[T.real_name] = T.dna
usr.changeling.chem_charges += T.changeling.chem_charges
T.changeling.chem_charges = 0
usr.changeling.isabsorbing = 0
T.death(0)
T.real_name = "Unknown"

View File

@@ -234,7 +234,7 @@ TABLE AND RACK OBJECT INTERATIONS
W:welding = 2
user << "\blue Now weakening the reinforced table"
playsound(src.loc, 'Welder.ogg', 50, 1)
sleep(50)
if (do_after(user, 50))
user << "\blue Table weakened"
src.status = 1
W:welding = 1
@@ -242,7 +242,7 @@ TABLE AND RACK OBJECT INTERATIONS
W:welding = 2
user << "\blue Now strengthening the reinforced table"
playsound(src.loc, 'Welder.ogg', 50, 1)
sleep(50)
if (do_after(user, 50))
user << "\blue Table strengthened"
src.status = 2
W:welding = 1
@@ -257,7 +257,7 @@ TABLE AND RACK OBJECT INTERATIONS
if(src.status == 1)
user << "\blue Now disassembling the reinforced table"
playsound(src.loc, 'Ratchet.ogg', 50, 1)
sleep(50)
if (do_after(user, 50))
new /obj/item/weapon/table_parts/reinforced( src.loc )
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
del(src)