mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
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:
@@ -479,7 +479,7 @@
|
||||
// usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]."
|
||||
// continue
|
||||
|
||||
msg += print_flavor_text()
|
||||
msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "\blue *---------*"
|
||||
usr << msg
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/name in organs)
|
||||
del(organs[name])
|
||||
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
|
||||
animation.icon_state = "blank"
|
||||
@@ -20,6 +18,13 @@
|
||||
//animation = null
|
||||
var/mob/living/carbon/human/tajaran/O = new /mob/living/carbon/human/tajaran( loc )
|
||||
del(animation)
|
||||
del(O.organs)
|
||||
O.organs = 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
|
||||
|
||||
O.real_name = real_name
|
||||
O.name = name
|
||||
@@ -37,7 +42,9 @@
|
||||
client.mob = O
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
|
||||
O.update_body()
|
||||
O.update_face()
|
||||
O.update_clothing()
|
||||
O << "<B>You are now a Tajara.</B>"
|
||||
spawn(0)//To prevent the proc from returning null.
|
||||
del(src)
|
||||
|
||||
+8
-2
@@ -312,7 +312,7 @@ datum/mind
|
||||
if(!def_value)//If it's a custom objective, it will be an empty string.
|
||||
def_value = "custom"
|
||||
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate","decapitate", "debrain", "protect", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate","decapitate", "debrain", "protection", "hijack", "escape", "survive", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
||||
if (!new_obj_type) return
|
||||
|
||||
var/datum/objective/new_objective = null
|
||||
@@ -367,7 +367,13 @@ datum/mind
|
||||
new_objective.owner = src
|
||||
|
||||
if ("steal")
|
||||
new_objective = pick(GenerateTheft(assigned_role,src))
|
||||
var/list/possibilities = typesof(/datum/objective/steal) - /datum/objective/steal
|
||||
var/list/choices = list()
|
||||
for(var/datum/objective/steal/name in possibilities)
|
||||
choices[name.explanation_text] = name
|
||||
var/new_target = input("Select target:", "Objective target") as null|anything in choices
|
||||
if (!new_target) return
|
||||
new_objective = new choices[new_target]
|
||||
new_objective.owner = src
|
||||
|
||||
if("download","capture","absorb")
|
||||
|
||||
@@ -782,10 +782,31 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
return ais[select]
|
||||
|
||||
/proc/get_sorted_mobs()
|
||||
var/new_list = list()
|
||||
var/old_list = getmobs()
|
||||
var/list/old_list = getmobs()
|
||||
var/list/AI_list = list()
|
||||
var/list/Dead_list = list()
|
||||
var/list/keyclient_list = list()
|
||||
var/list/key_list = list()
|
||||
var/list/logged_list = list()
|
||||
for(var/named in old_list)
|
||||
new_list += old_list[named]
|
||||
var/mob/M = old_list[named]
|
||||
if(issilicon(M))
|
||||
AI_list |= M
|
||||
else if(isobserver(M) || M.stat == 2)
|
||||
Dead_list |= M
|
||||
else if(M.key && M.client)
|
||||
keyclient_list |= M
|
||||
else if(M.key)
|
||||
key_list |= M
|
||||
else
|
||||
logged_list |= M
|
||||
old_list.Remove(named)
|
||||
var/list/new_list = list()
|
||||
new_list += AI_list
|
||||
new_list += keyclient_list
|
||||
new_list += key_list
|
||||
new_list += logged_list
|
||||
new_list += Dead_list
|
||||
return new_list
|
||||
|
||||
|
||||
@@ -796,6 +817,9 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/list/creatures = list()
|
||||
var/list/namecounts = list()
|
||||
for(var/mob/M in mobs)
|
||||
if(!M.name || !M.real_name)
|
||||
var/turf/T = get_turf(M)
|
||||
message_admins("Alert! The mob with the key [M.key ? M.key : "NO KEY"] at ([T.x], [T.y], [T.z]) has no name!")
|
||||
var/name = M.name
|
||||
if (name in names)
|
||||
namecounts[name]++
|
||||
@@ -804,7 +828,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
if (M.real_name && M.real_name != M.name)
|
||||
name += " \[[M.real_name]\]"
|
||||
name += " \[[M.original_name? M.original_name : M.real_name]\]"
|
||||
if (M.stat == 2)
|
||||
if(istype(M, /mob/dead/observer/))
|
||||
name += " \[ghost\]"
|
||||
@@ -812,7 +836,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
name += " \[dead\]"
|
||||
creatures[name] = M
|
||||
|
||||
return sortList(creatures)
|
||||
return creatures
|
||||
|
||||
/proc/sortmobs()
|
||||
|
||||
|
||||
+15
-6
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -898,8 +898,23 @@
|
||||
|
||||
/client/proc/CarbonCopy(atom/movable/O as mob|obj in world)
|
||||
set category = "Admin"
|
||||
var/mob/NewObj = new O.type(usr.loc)
|
||||
var/atom/movable/NewObj = new O.type(usr.loc)
|
||||
for(var/V in O.vars)
|
||||
if (issaved(O.vars[V]))
|
||||
NewObj.vars[V] = O.vars[V]
|
||||
if(V == "contents")
|
||||
for(var/atom/movable/C in O.contents)
|
||||
C.CarbonCopy2(NewObj)
|
||||
else
|
||||
NewObj.vars[V] = O.vars[V]
|
||||
return NewObj
|
||||
|
||||
/atom/proc/CarbonCopy2(atom/movable/O as mob|obj in world)
|
||||
var/atom/movable/NewObj = new type(O)
|
||||
for(var/V in vars)
|
||||
if (issaved(vars[V]))
|
||||
if(V == "contents")
|
||||
for(var/atom/movable/C in contents)
|
||||
C.CarbonCopy2(NewObj)
|
||||
else
|
||||
NewObj.vars[V] = vars[V]
|
||||
return NewObj
|
||||
@@ -13,6 +13,8 @@
|
||||
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
|
||||
if(!body.original_name)
|
||||
body.original_name = real_name
|
||||
original_name = body.original_name
|
||||
name = body.original_name
|
||||
if(!safety)
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
// usr << "\red [src.name] is bleeding from a [sizetext] on [t_his] [temp.display_name]."
|
||||
// continue
|
||||
|
||||
msg += print_flavor_text()
|
||||
msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "\blue *---------*"
|
||||
usr << msg
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
if(10)
|
||||
usr << text("\blue <B>[] seems to have extreme electrical activity inside it!</B>", src.name)
|
||||
|
||||
usr << print_flavor_text()
|
||||
usr << "[print_flavor_text()]\n"
|
||||
|
||||
return
|
||||
@@ -239,7 +239,7 @@
|
||||
msg += wound_flavor_text["right foot"]
|
||||
|
||||
|
||||
msg += print_flavor_text()
|
||||
msg += "[print_flavor_text()]\n"
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
|
||||
@@ -46,17 +46,17 @@
|
||||
bandaged = 0
|
||||
max_damage = 0
|
||||
max_size = 0
|
||||
obj/item/weapon/implant/implant = null
|
||||
tmp/list/obj/item/weapon/implant/implant = list()
|
||||
|
||||
display_name
|
||||
list/wounds = list()
|
||||
bleeding = 0
|
||||
perma_injury = 0
|
||||
perma_dmg = 0
|
||||
broken = 0
|
||||
destroyed = 0
|
||||
destspawn = 0 //Has it spawned the broken limb?
|
||||
gauzed = 0 //Has the missing limb been patched?
|
||||
tmp/list/wounds = list()
|
||||
tmp/bleeding = 0
|
||||
tmp/perma_injury = 0
|
||||
tmp/perma_dmg = 0
|
||||
tmp/broken = 0
|
||||
tmp/destroyed = 0
|
||||
tmp/destspawn = 0 //Has it spawned the broken limb?
|
||||
tmp/gauzed = 0 //Has the missing limb been patched?
|
||||
min_broken_damage = 30
|
||||
datum/organ/external/parent
|
||||
damage_msg = "\red You feel a intense pain"
|
||||
@@ -281,6 +281,9 @@
|
||||
if(override)
|
||||
destroyed = 1
|
||||
if(destroyed)
|
||||
if(implant)
|
||||
for(var/implants in implant)
|
||||
del(implants)
|
||||
//owner.unlock_medal("Lost something?", 0, "Lose a limb.", "easy")
|
||||
|
||||
var/obj/item/weapon/organ/H
|
||||
@@ -301,7 +304,9 @@
|
||||
H:transfer_identity(owner)
|
||||
H.pixel_x = -10
|
||||
H.pixel_y = 6
|
||||
H.name = "[owner.name]'s head"
|
||||
if(!owner.original_name)
|
||||
owner.original_name = owner.real_name
|
||||
H.name = "[owner.original_name]'s head"
|
||||
|
||||
owner.update_face()
|
||||
owner.update_body()
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
canmove = 0
|
||||
icon = null
|
||||
invisibility = 101
|
||||
for(var/name in organs)
|
||||
del(organs[name])
|
||||
var/atom/movable/overlay/animation = new /atom/movable/overlay( loc )
|
||||
animation.icon_state = "blank"
|
||||
animation.icon = 'mob.dmi'
|
||||
@@ -21,6 +19,13 @@
|
||||
//animation = null
|
||||
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( loc )
|
||||
del(animation)
|
||||
del(O.organs)
|
||||
O.organs = 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
|
||||
|
||||
O.name = "monkey"
|
||||
O.dna = dna
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
|
||||
var
|
||||
fire_sound = 'Gunshot.ogg'
|
||||
obj/item/projectile/in_chamber = null
|
||||
tmp/obj/item/projectile/in_chamber = null
|
||||
caliber = ""
|
||||
silenced = 0
|
||||
recoil = 0
|
||||
tmp/list/mob/living/target //List of who yer targeting.
|
||||
tmp/lock_time = -100
|
||||
mouthshoot = 0 ///To stop people from suiciding twice... >.>
|
||||
tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
|
||||
automatic = 0 //Used to determine if you can target multiple people.
|
||||
mob/living/last_moved_mob //Used to fire faster at more than one person.
|
||||
told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
|
||||
tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
|
||||
proc/load_into_chamber()
|
||||
return 0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "large parcel"
|
||||
icon = 'storage.dmi'
|
||||
icon_state = "deliverycrate"
|
||||
var/obj/wrapped = null
|
||||
var/tmp/obj/wrapped = null
|
||||
density = 1
|
||||
var/sortTag = null
|
||||
flags = FPRINT
|
||||
@@ -99,7 +99,7 @@
|
||||
name = "small parcel"
|
||||
icon = 'storage.dmi'
|
||||
icon_state = "deliverycrateSmall"
|
||||
var/obj/item/wrapped = null
|
||||
var/tmp/obj/item/wrapped = null
|
||||
var/sortTag = null
|
||||
flags = FPRINT
|
||||
var/examtext = null
|
||||
|
||||
Reference in New Issue
Block a user