Made transformations between mobs with organs work better. Destroying a limb removes implants. Implants now go where you select. Fixed some runtimes and retardedness.

This commit is contained in:
SkyMarshal
2012-04-05 21:55:41 -07:00
parent e8f5e13bd2
commit 5b3ad2a925
19 changed files with 151 additions and 89 deletions
+15 -6
View File
@@ -533,6 +533,13 @@
del(animation)
var/mob/living/carbon/monkey/O = new(src)
del(O.organs)
O.organs = H.organs
for(var/name in O.organs)
var/datum/organ/external/organ = O[name]
organ.owner = O
for(var/obj/item/weapon/implant/implant in organ.implant)
implant.imp_in = O
if(M)
if (M.dna)
@@ -567,11 +574,9 @@
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
O.flavor_text = M.flavor_text
O.warn_flavor_changed()
O.update_clothing()
del(M)
return
@@ -606,6 +611,13 @@
O.gender = MALE
O.dna = M.dna
M.dna = null
del(O.organs)
O.organs = M.organs
for(var/name in O.organs)
var/datum/organ/external/organ = O[name]
organ.owner = O
for(var/obj/item/weapon/implant/implant in organ.implant)
implant.imp_in = O
for(var/datum/disease/D in M.viruses)
O.viruses += D
@@ -643,9 +655,6 @@
O.adjustToxLoss(M.getToxLoss())
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
O.flavor_text = M.flavor_text
O.warn_flavor_changed()
O.update_clothing()
+1 -1
View File
@@ -242,7 +242,7 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob
hostile_targets -= current_mind//Remove them from the list.
if(2)//Steal
var/list/datum/objective/theft = GenerateTheft(ninja_mind.assigned_role,ninja_mind)
var/datum/objective/steal/steal_objective = pick(theft)
var/datum/objective/steal/steal_objective = PickObjectiveFromList(theft)
ninja_mind.objectives += steal_objective
objective_list -= 2
+2 -2
View File
@@ -103,7 +103,7 @@
if(46 to 90)
var/list/datum/objective/theft = GenerateTheft(changeling.assigned_role,changeling)
var/list/datum/objective/theft = PickObjectiveFromList(GenerateTheft(changeling.assigned_role,changeling))
var/datum/objective/steal/steal_objective = pick(theft)
steal_objective.owner = changeling
changeling.objectives += steal_objective
@@ -120,7 +120,7 @@
kill_objective.find_target()
changeling.objectives += kill_objective
var/list/datum/objective/theft = GenerateTheft(changeling.assigned_role,changeling)
var/list/datum/objective/theft = PickObjectiveFromList(GenerateTheft(changeling.assigned_role,changeling))
var/datum/objective/steal/steal_objective = pick(theft)
steal_objective.owner = changeling
changeling.objectives += steal_objective
@@ -13,53 +13,43 @@
update()
if (src.imp)
src.icon_state = "implanter1"
if (imp)
icon_state = "implanter1"
else
src.icon_state = "implanter0"
icon_state = "implanter0"
return
attack(mob/M as mob, mob/user as mob)
if (!istype(M, /mob/living/carbon))
return
if (user && src.imp)
for (var/mob/O in viewers(M, null))
if (M != user)
O.show_message(text("\red <B>[] is trying to implant [] with [src.name]!</B>", user, M), 1)
else
O.show_message("\red <B>[user] is trying to inject themselves with [src.name]!</B>", 1)
if (user && imp)
if (M != user)
user.visible_message("\red You try to implant yourself with \the [src]!","\red [user] tries to implant [user.gender == MALE? "himself":"herself"] with \the [src]!")
else
user.visible_message("\red You try to implant [M] with \the [src]!","\red [user] tries to implant [M] with \the [src]!")
if(!do_mob(user, M,60))
return
if(istype(M, /mob/living/carbon/human))
var/picked = 0
var/mob/living/carbon/human/T = M
var/list/datum/organ/external/E = T.GetOrgans()
while(picked == 0 && E.len > 0)
var/datum/organ/external/O = pick(E)
E -= O
if(!E.implant)
O.implant = src.imp
picked = 1
if(picked == 0)
for (var/mob/O in viewers(M, null))
O.show_message(text("[user.name] can't find anywhere to implant [M.name]"), 1)
if(hasorgans(M))
var/datum/organ/external/target = M:get_organ(check_zone(user.zone_sel.selecting))
if(target.destroyed)
user << "What [target.display_name]?"
return
for (var/mob/O in viewers(M, null))
target.implant += imp
imp.loc = target
if (M != user)
O.show_message(text("\red [] implants [] with [src.name]!", user, M), 1)
user.visible_message("\red You implant your [target.display_name] with \the [src]!","\red [user] implants [user.gender == MALE? "his own ":"her own "][target.display_name] with \the [src]!")
else
O.show_message("\red [user] implants themself with [src.name]!", 1)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])</font>")
user.visible_message("\red You implant [M]'s [target.display_name] with \the [src]!","\red [user] implants [M]'s [target.display_name] with \the [src]!")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [src] ([imp]) by [user] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src] ([imp]) to implant [M] ([M.ckey])</font>")
log_admin("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
message_admins("ATTACK: [user] ([user.ckey]) implanted [M] ([M.ckey]) with [src].")
src.imp.loc = M
src.imp.imp_in = M
src.imp.implanted = 1
src.imp.implanted(M)
src.imp = null
src.icon_state = "implanter0"
imp.imp_in = M
imp.implanted = 1
imp.implanted(M)
imp = null
icon_state = "implanter0"
return
@@ -68,7 +58,7 @@
name = "implanter-loyalty"
New()
src.imp = new /obj/item/weapon/implant/loyalty( src )
imp = new /obj/item/weapon/implant/loyalty( src )
..()
update()
return
@@ -79,7 +69,7 @@
name = "implanter-explosive"
New()
src.imp = new /obj/item/weapon/implant/explosive( src )
imp = new /obj/item/weapon/implant/explosive( src )
..()
update()
return
@@ -89,24 +79,24 @@
icon_state = "cimplanter0"
New()
src.imp = new /obj/item/weapon/implant/compressed( src )
imp = new /obj/item/weapon/implant/compressed( src )
..()
update()
return
update()
if (src.imp)
var/obj/item/weapon/implant/compressed/c = src.imp
if (imp)
var/obj/item/weapon/implant/compressed/c = imp
if(!c.scanned)
src.icon_state = "cimplanter0"
icon_state = "cimplanter0"
else
src.icon_state = "cimplanter1"
icon_state = "cimplanter1"
else
src.icon_state = "cimplanter2"
icon_state = "cimplanter2"
return
attack(mob/M as mob, mob/user as mob)
var/obj/item/weapon/implant/compressed/c = src.imp
var/obj/item/weapon/implant/compressed/c = imp
if (c.scanned == null)
user << "Please scan an object with the implanter first."
return
@@ -114,7 +104,7 @@
afterattack(atom/A, mob/user as mob)
if(istype(A,/obj/item))
var/obj/item/weapon/implant/compressed/c = src.imp
var/obj/item/weapon/implant/compressed/c = imp
c.scanned = A
A.loc.contents.Remove(A)
src.update()
update()
@@ -8,7 +8,7 @@
New()
src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
src.uses = rand(1, 5)
..()
return