Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ GLOBAL_LIST_EMPTY(features_by_species)
/// Do we try to prevent reset_perspective() from working? Useful for Dullahans to stop perspective changes when they're looking through their head.
var/prevent_perspective_change = FALSE

/// List of the type path of every ability innate to this species
var/list/species_abilities = list()
/// List of the created abilities, stored for the purpose of removal later, please do not touch this if you don't need to
var/list/datum/action/instantiated_abilities = list()

///////////
// PROCS //
///////////
Expand Down Expand Up @@ -502,6 +507,11 @@ GLOBAL_LIST_EMPTY(features_by_species)
fly = new
fly.Grant(C)

for(var/ability_path in species_abilities)
var/datum/action/ability = new ability_path(C)
ability.Grant(C)
instantiated_abilities += ability

C.add_movespeed_modifier(MOVESPEED_ID_SPECIES, TRUE, 100, override=TRUE, multiplicative_slowdown=speedmod, movetypes=(~FLYING))
C.regenerate_icons()
SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
Expand Down Expand Up @@ -547,6 +557,11 @@ GLOBAL_LIST_EMPTY(features_by_species)
C.dna.features["wingsdetail"] = "None"
C.update_body()

for(var/datum/action/ability as anything in instantiated_abilities)
ability.Remove(C)
instantiated_abilities -= ability
qdel(ability)

C.remove_movespeed_modifier(MOVESPEED_ID_SPECIES)

SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
Expand Down
7 changes: 1 addition & 6 deletions code/modules/mob/living/carbon/human/species_types/IPC.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// Hats need to be 1 up
offset_features = list(OFFSET_HEAD = list(0,1))

var/datum/action/innate/change_screen/change_screen
species_abilities = list(/datum/action/innate/change_screen)

smells_like = "industrial lubricant"

Expand All @@ -66,9 +66,6 @@
if(A)
A.Remove(C)
QDEL_NULL(A)
if(ishuman(C) && !change_screen)
change_screen = new
change_screen.Grant(C)
for(var/obj/item/bodypart/O in C.bodyparts)
O.render_like_organic = TRUE // Makes limbs render like organic limbs instead of augmented limbs, check bodyparts.dm
var/chassis = C.dna.features["ipc_chassis"]
Expand All @@ -82,8 +79,6 @@
/datum/species/ipc/on_species_loss(mob/living/carbon/C)
. = ..()
QDEL_NULL(C.particles)
if(change_screen)
change_screen.Remove(C)

/datum/species/ipc/proc/handle_speech(datum/source, list/speech_args)
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
Expand Down
Loading