content
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
if(!mind)
|
||||
mind = new /datum/mind(key)
|
||||
mind.active = 1
|
||||
mind.current = src
|
||||
mind.set_current(src)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -695,7 +695,7 @@
|
||||
mind.late_joiner = TRUE
|
||||
mind.active = 0 //we wish to transfer the key manually
|
||||
mind.transfer_to(H) //won't transfer key since the mind is not active
|
||||
mind.original_character = H
|
||||
mind.set_original_character(H)
|
||||
|
||||
H.name = real_name
|
||||
client.init_verbs()
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
/mob/living/carbon/get_blood_data()
|
||||
var/blood_data = list()
|
||||
//set the blood data
|
||||
blood_data["donor"] = src
|
||||
blood_data["donor"] = WEAKREF(src)
|
||||
blood_data["viruses"] = list()
|
||||
|
||||
for(var/thing in diseases)
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
if(stat!=DEAD) //If not dead.
|
||||
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
|
||||
if(mind) //You aren't allowed to return to brains that don't exist
|
||||
mind.current = null
|
||||
mind.set_current(null)
|
||||
mind.active = FALSE //No one's using it anymore.
|
||||
ghostize() //Ghostize checks for key so nothing else is necessary.
|
||||
container = null
|
||||
QDEL_NULL(stored_dna)
|
||||
return ..()
|
||||
|
||||
/mob/living/brain/update_mobility()
|
||||
|
||||
@@ -282,6 +282,8 @@
|
||||
if(brainmob)
|
||||
QDEL_NULL(brainmob)
|
||||
QDEL_LIST(traumas)
|
||||
if(owner?.mind)
|
||||
owner.mind.set_current(null)
|
||||
return ..()
|
||||
|
||||
//other types of brains
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
QDEL_LIST(internal_organs)
|
||||
QDEL_LIST(stomach_contents)
|
||||
QDEL_LIST(bodyparts)
|
||||
QDEL_LIST(implants)
|
||||
hand_bodyparts = null //Just references out bodyparts, don't need to delete twice.
|
||||
remove_from_all_data_huds()
|
||||
QDEL_NULL(dna)
|
||||
|
||||
@@ -553,7 +553,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
/datum/species/proc/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
|
||||
if(C.dna.species.exotic_bloodtype)
|
||||
if(!new_species.exotic_bloodtype)
|
||||
if(!new_species?.exotic_bloodtype)
|
||||
C.dna.blood_type = random_blood_type()
|
||||
else
|
||||
C.dna.blood_type = new_species.exotic_bloodtype
|
||||
@@ -573,7 +573,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
C.type_of_meat = initial(meat)
|
||||
|
||||
//If their inert mutation is not the same, swap it out
|
||||
if((inert_mutation != new_species.inert_mutation) && LAZYLEN(C.dna.mutation_index) && (inert_mutation in C.dna.mutation_index))
|
||||
if(new_species && (inert_mutation != new_species.inert_mutation) && LAZYLEN(C.dna.mutation_index) && (inert_mutation in C.dna.mutation_index))
|
||||
C.dna.remove_mutation(inert_mutation)
|
||||
//keep it at the right spot, so we can't have people taking shortcuts
|
||||
var/location = C.dna.mutation_index.Find(inert_mutation)
|
||||
@@ -582,7 +582,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
C.dna.mutation_index[new_species.inert_mutation] = create_sequence(new_species.inert_mutation)
|
||||
C.dna.default_mutation_genes[new_species.inert_mutation] = C.dna.mutation_index[new_species.inert_mutation]
|
||||
|
||||
if(!new_species.has_field_of_vision && has_field_of_vision && ishuman(C) && CONFIG_GET(flag/use_field_of_vision))
|
||||
if(new_species && !new_species.has_field_of_vision && has_field_of_vision && ishuman(C) && CONFIG_GET(flag/use_field_of_vision))
|
||||
var/datum/component/field_of_vision/F = C.GetComponent(/datum/component/field_of_vision)
|
||||
if(F)
|
||||
qdel(F)
|
||||
|
||||
@@ -320,17 +320,17 @@
|
||||
L["name"] = body.name
|
||||
L["ref"] = "[REF(body)]"
|
||||
L["occupied"] = occupied
|
||||
var/button
|
||||
var/button_state
|
||||
if(occupied == "owner")
|
||||
button = "selected"
|
||||
button_state = "selected"
|
||||
else if(occupied == "stranger")
|
||||
button = "danger"
|
||||
button_state = "danger"
|
||||
else if(can_swap(body))
|
||||
button = null
|
||||
button_state = null
|
||||
else
|
||||
button = "disabled"
|
||||
button_state = "disabled"
|
||||
|
||||
L["swap_button_state"] = button
|
||||
L["swap_button_state"] = button_state
|
||||
L["swappable"] = (occupied == "available") && can_swap(body)
|
||||
|
||||
data["bodies"] += list(L)
|
||||
@@ -745,9 +745,9 @@
|
||||
background_icon_state = "bg_alien"
|
||||
var/datum/species/jelly/stargazer/species
|
||||
|
||||
/datum/action/innate/link_minds/New(_species)
|
||||
/datum/action/innate/link_minds/New(species)
|
||||
..()
|
||||
species = _species
|
||||
src.species = species
|
||||
|
||||
/datum/action/innate/link_minds/Activate()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
@@ -771,3 +771,7 @@
|
||||
else
|
||||
to_chat(H, "<span class='warning'>You can't seem to link [target]'s mind...</span>")
|
||||
to_chat(target, "<span class='warning'>The foreign presence leaves your mind.</span>")
|
||||
|
||||
/datum/action/innate/link_minds/Destroy()
|
||||
species = null
|
||||
return ..()
|
||||
|
||||
@@ -35,8 +35,10 @@
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
QDEL_LIST_ASSOC_VAL(ability_actions)
|
||||
|
||||
QDEL_LIST(abilities)
|
||||
QDEL_LIST(implants)
|
||||
remove_from_all_data_huds()
|
||||
cleanse_trait_datums()
|
||||
GLOB.mob_living_list -= src
|
||||
QDEL_LIST(diseases)
|
||||
return ..()
|
||||
@@ -909,7 +911,7 @@
|
||||
else
|
||||
throw_alert("gravity", /atom/movable/screen/alert/weightless)
|
||||
if(!override && !is_flying())
|
||||
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom/movable, float), !has_gravity)
|
||||
float(!has_gravity)
|
||||
|
||||
/mob/living/float(on)
|
||||
if(throwing)
|
||||
|
||||
@@ -100,7 +100,9 @@
|
||||
var/display_icon_override
|
||||
var/emote_display = "Neutral" //text string of the current emote we set for the status displays, to prevent logins resetting it.
|
||||
|
||||
// TODO: Currently unused, needs port from TG.
|
||||
var/datum/robot_control/robot_control
|
||||
// TODO: Currently unused, needs port from TG.
|
||||
/// Station alert datum for showing alerts UI
|
||||
var/datum/station_alert/alert_control
|
||||
///remember AI's last location
|
||||
@@ -119,7 +121,7 @@
|
||||
new/obj/structure/ai_core/deactivated(loc) //New empty terminal.
|
||||
return INITIALIZE_HINT_QDEL //Delete AI.
|
||||
|
||||
ADD_TRAIT(src, TRAIT_NO_TELEPORT, src)
|
||||
ADD_TRAIT(src, TRAIT_NO_TELEPORT, INNATE_TRAIT)
|
||||
if(L && istype(L, /datum/ai_laws))
|
||||
laws = L
|
||||
laws.associate(src)
|
||||
@@ -189,20 +191,34 @@
|
||||
GLOB.ai_list -= src
|
||||
GLOB.shuttle_caller_list -= src
|
||||
SSshuttle.autoEvac()
|
||||
stop_controlling_display()
|
||||
QDEL_NULL(eyeobj) // No AI, no Eye
|
||||
QDEL_NULL(spark_system)
|
||||
QDEL_NULL(deploy_action)
|
||||
QDEL_NULL(redeploy_action)
|
||||
QDEL_NULL(custom_holoform)
|
||||
QDEL_NULL(master_multicam)
|
||||
deployed_shell = null
|
||||
parent = null
|
||||
QDEL_NULL(spark_system)
|
||||
QDEL_NULL(malf_picker)
|
||||
QDEL_NULL(doomsday_device)
|
||||
// TODO: Why these no work?
|
||||
// TODO: Port implementation of these from TG or remove the unused code.
|
||||
// QDEL_NULL(robot_control)
|
||||
QDEL_NULL(aiMulti)
|
||||
// QDEL_NULL(alert_control)
|
||||
QDEL_NULL(aiMulti)
|
||||
QDEL_NULL(aiPDA)
|
||||
malfhack = null
|
||||
current = null
|
||||
Bot = null
|
||||
controlled_equipment = null
|
||||
linked_core = null
|
||||
apc_override = null
|
||||
for(var/mob/living/silicon/robot/linked_robot as anything in connected_robots)
|
||||
if(QDELETED(linked_robot))
|
||||
continue
|
||||
linked_robot.set_connected_ai(null)
|
||||
connected_robots.Cut()
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/IgniteMob()
|
||||
@@ -357,12 +373,12 @@
|
||||
is_anchored = !is_anchored
|
||||
move_resist = MOVE_FORCE_NORMAL
|
||||
status_flags |= CANPUSH
|
||||
REMOVE_TRAIT(src, TRAIT_NO_TELEPORT, src)
|
||||
REMOVE_TRAIT(src, TRAIT_NO_TELEPORT, INNATE_TRAIT)
|
||||
else
|
||||
is_anchored = !is_anchored
|
||||
move_resist = MOVE_FORCE_OVERPOWERING
|
||||
status_flags &= ~CANPUSH
|
||||
ADD_TRAIT(src, TRAIT_NO_TELEPORT, src)
|
||||
ADD_TRAIT(src, TRAIT_NO_TELEPORT, INNATE_TRAIT)
|
||||
|
||||
/mob/living/silicon/ai/proc/ai_mob_to_structure()
|
||||
disconnect_shell()
|
||||
@@ -1097,6 +1113,10 @@
|
||||
else
|
||||
Remove(owner) //If the last shell is blown, destroy it.
|
||||
|
||||
/datum/action/innate/deploy_last_shell/Destroy()
|
||||
last_used_shell = null
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/proc/disconnect_shell()
|
||||
if(deployed_shell) //Forcibly call back AI in event of things such as damage, EMP or power loss.
|
||||
to_chat(src, "<span class='danger'>Your remote connection has been reset!</span>")
|
||||
@@ -1107,9 +1127,7 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/ai/spawned/Initialize(mapload, datum/ai_laws/L, mob/target_ai)
|
||||
. = ..()
|
||||
if(!target_ai)
|
||||
target_ai = src //cheat! just give... ourselves as the spawned AI, because that's technically correct
|
||||
. = ..(mapload, L, src) //cheat! just give... ourselves as the spawned AI, because that's technically correct
|
||||
|
||||
/mob/living/silicon/ai/proc/camera_visibility(mob/camera/aiEye/moved_eye)
|
||||
GLOB.cameranet.visibility(moved_eye, client, all_eyes, USE_STATIC_OPAQUE)
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
var/encryptmod = FALSE
|
||||
var/holoform = FALSE
|
||||
var/canholo = TRUE
|
||||
var/obj/item/card/id/access_card = null
|
||||
var/chassis = "repairbot"
|
||||
var/dynamic_chassis
|
||||
var/dynamic_chassis_sit = FALSE //whether we're sitting instead of resting spritewise
|
||||
@@ -85,13 +84,21 @@
|
||||
var/icon/custom_holoform_icon
|
||||
|
||||
/mob/living/silicon/pai/Destroy()
|
||||
QDEL_NULL(signaler)
|
||||
QDEL_NULL(pda)
|
||||
QDEL_NULL(internal_instrument)
|
||||
if(cable)
|
||||
QDEL_NULL(cable)
|
||||
hackdoor = null
|
||||
if (loc != card)
|
||||
card.forceMove(drop_location())
|
||||
card.pai = null
|
||||
card.cut_overlays()
|
||||
card.add_overlay("pai-off")
|
||||
card = null
|
||||
current = null
|
||||
GLOB.pai_list -= src
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/pai/Initialize(mapload)
|
||||
|
||||
@@ -401,22 +401,16 @@
|
||||
buttontooltipstyle = "cult"
|
||||
button_icon_state = "cult_mark"
|
||||
var/tracking = FALSE
|
||||
var/mob/living/simple_animal/hostile/construct/the_construct
|
||||
|
||||
|
||||
/datum/action/innate/seek_master/Grant(var/mob/living/C)
|
||||
the_construct = C
|
||||
..()
|
||||
|
||||
/datum/action/innate/seek_master/Activate()
|
||||
var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult)
|
||||
if(!C)
|
||||
return
|
||||
if(!C.cult_team)
|
||||
to_chat(the_construct, "<span class='cult italic'>You are alone, and have no team.</span>")
|
||||
to_chat(owner, "<span class='cult italic'>You are alone, and have no team.</span>")
|
||||
return
|
||||
var/datum/objective/eldergod/summon_objective = locate() in C.cult_team.objectives
|
||||
|
||||
var/mob/living/simple_animal/hostile/construct/the_construct = owner
|
||||
if(summon_objective.check_completion())
|
||||
the_construct.master = C.cult_team.blood_target
|
||||
|
||||
@@ -442,15 +436,11 @@
|
||||
background_icon_state = "bg_demon"
|
||||
buttontooltipstyle = "cult"
|
||||
button_icon_state = "cult_mark"
|
||||
var/mob/living/simple_animal/hostile/construct/harvester/the_construct
|
||||
|
||||
/datum/action/innate/seek_prey/Grant(var/mob/living/C)
|
||||
the_construct = C
|
||||
..()
|
||||
|
||||
/datum/action/innate/seek_prey/Activate()
|
||||
if(GLOB.cult_narsie == null)
|
||||
return
|
||||
var/mob/living/simple_animal/hostile/construct/the_construct = owner
|
||||
if(the_construct.seeking)
|
||||
desc = "None can hide from Nar'Sie, activate to track a survivor attempting to flee the red harvest!"
|
||||
button_icon_state = "cult_mark"
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
var/datum/action/innate/elite_attack/attack_action = new action_type()
|
||||
attack_action.Grant(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/Destroy(force, ...)
|
||||
owner = null
|
||||
return ..()
|
||||
|
||||
//Prevents elites from attacking members of their faction (can't hurt themselves either) and lets them mine rock with an attack despite not being able to smash walls.
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/AttackingTarget()
|
||||
if(istype(target, /mob/living/simple_animal/hostile))
|
||||
|
||||
+20
-9
@@ -20,27 +20,38 @@
|
||||
hook_vr("mob_new",list(src))
|
||||
|
||||
/mob/Destroy()//This makes sure that mobs with clients/keys are not just deleted from the game.
|
||||
// if(client)
|
||||
// stack_trace("Mob with client has been deleted.")
|
||||
// else if(ckey)
|
||||
// stack_trace("Mob without client but with associated ckey, [ckey], has been deleted.")
|
||||
unset_machine()
|
||||
remove_from_mob_list()
|
||||
remove_from_dead_mob_list()
|
||||
remove_from_alive_mob_list()
|
||||
QDEL_LIST(mob_spell_list)
|
||||
QDEL_LIST(actions)
|
||||
GLOB.all_clockwork_mobs -= src
|
||||
// remove_from_mob_suicide_list()
|
||||
focus = null
|
||||
LAssailant = null
|
||||
movespeed_modification = null
|
||||
if(length(progressbars))
|
||||
stack_trace("[src] destroyed with elements in its progressbars list.")
|
||||
progressbars = null
|
||||
for (var/alert in alerts)
|
||||
clear_alert(alert, TRUE)
|
||||
if(observers && observers.len)
|
||||
for(var/M in observers)
|
||||
var/mob/dead/observe = M
|
||||
if(observers?.len)
|
||||
for(var/mob/dead/observe as anything in observers)
|
||||
observe.reset_perspective(null)
|
||||
dispose_rendering()
|
||||
qdel(hud_used)
|
||||
for(var/cc in client_colours)
|
||||
qdel(cc)
|
||||
client_colours = null
|
||||
ghostize()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL
|
||||
QDEL_LIST(client_colours)
|
||||
ghostize(can_reenter_corpse = FALSE) //False, since we're deleting it currently
|
||||
if(mind?.current == src) //Let's just be safe yeah? This will occasionally be cleared, but not always. Can't do it with ghostize without changing behavior
|
||||
mind.set_current(null)
|
||||
// if(mock_client)
|
||||
// mock_client.mob = null
|
||||
return ..()
|
||||
|
||||
/mob/GenerateTag()
|
||||
tag = "mob_[next_mob_id++]"
|
||||
|
||||
Reference in New Issue
Block a user