mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
initial port of species shit (#8115)
* initial port of species shit * dumb Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
@@ -35,14 +35,11 @@
|
||||
display_results(user, target, span_notice("You succeed in reconstructing [target]'s wings."),
|
||||
span_notice("[user] successfully reconstructs [target]'s wings!"),
|
||||
span_notice("[user] completes the surgery on [target]'s wings."))
|
||||
if(human_target.dna.features["original_moth_wings"] != null)
|
||||
human_target.dna.features["moth_wings"] = human_target.dna.features["original_moth_wings"]
|
||||
else
|
||||
human_target.dna.features["moth_wings"] = "Plain"
|
||||
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION
|
||||
/*
|
||||
human_target.dna.update_uf_block(DNA_MOTH_WINGS_BLOCK)
|
||||
*/
|
||||
//SKYRAT EDIT REMOVAL END
|
||||
human_target.update_mutant_bodyparts()
|
||||
var/obj/item/organ/external/wings/moth/wings = target.getorganslot(ORGAN_SLOT_EXTERNAL_WINGS)
|
||||
wings?.heal_wings()
|
||||
|
||||
var/obj/item/organ/external/antennae/antennae = target.getorganslot(ORGAN_SLOT_EXTERNAL_ANTENNAE) //i mean we might aswell heal their antennae too
|
||||
antennae?.heal_antennae()
|
||||
|
||||
human_target.update_body_parts()
|
||||
return ..()
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
var/rendered_bp_icon //SKYRAT EDIT ADDITION - CUSTOMIZATION
|
||||
var/organic_render = TRUE //SKYRAT EDIT ADDITION - CUSTOMIZATION
|
||||
|
||||
///A list of all the external organs we've got stored to draw horns, wings and stuff with (special because we are actually in the limbs unlike normal organs :/ )
|
||||
var/list/obj/item/organ/external/external_organs = list()
|
||||
|
||||
|
||||
/obj/item/bodypart/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
+24
-21
@@ -34,9 +34,15 @@
|
||||
*/
|
||||
/obj/item/organ/external/Initialize(mapload, mob_sprite)
|
||||
. = ..()
|
||||
|
||||
if(mob_sprite)
|
||||
set_sprite(mob_sprite)
|
||||
|
||||
cache_key = generate_icon_cache()
|
||||
// SKYRAT EDIT: we have like 145+ fucking dna blocks lmao
|
||||
dna_block = GLOB.dna_mutant_bodypart_blocks[preference]
|
||||
|
||||
|
||||
/obj/item/organ/external/Insert(mob/living/carbon/reciever, special, drop_if_replaced)
|
||||
var/obj/item/bodypart/limb = reciever.get_bodypart(zone)
|
||||
|
||||
@@ -72,8 +78,7 @@
|
||||
/obj/item/organ/external/proc/get_overlays(list/overlay_list, image_dir, image_layer, body_type, image_color)
|
||||
if(!sprite_datum)
|
||||
return
|
||||
if(owner && HAS_TRAIT(owner, TRAIT_INVISIBLE_MAN))
|
||||
return
|
||||
|
||||
var/gender = (body_type == FEMALE) ? "f" : "m"
|
||||
var/finished_icon_state = (sprite_datum.gender_specific ? gender : "m") + "_" + preference + "_" + sprite_datum.icon_state + mutant_bodyparts_layertext(image_layer)
|
||||
var/mutable_appearance/appearance = mutable_appearance(sprite_datum.icon, finished_icon_state, layer = -image_layer)
|
||||
@@ -100,22 +105,22 @@
|
||||
*/
|
||||
/obj/item/organ/external/proc/mutant_bodyparts_layertext(layer)
|
||||
switch(layer)
|
||||
if(BODY_BEHIND_LAYER)
|
||||
if(EXTERNAL_BEHIND_LAYER)
|
||||
return "_BEHIND"
|
||||
if(BODY_ADJ_LAYER)
|
||||
if(EXTERNAL_ADJACENT_LAYER)
|
||||
return "_ADJ"
|
||||
if(BODY_FRONT_LAYER)
|
||||
if(EXTERNAL_FRONT_LAYER)
|
||||
return "_FRONT"
|
||||
|
||||
///Converts a bitflag to the right layer. I'd love to make this a static index list, but byond made an attempt on my life when i did
|
||||
/obj/item/organ/external/proc/bitflag_to_layer(layer)
|
||||
switch(layer)
|
||||
if(EXTERNAL_BEHIND)
|
||||
return BODY_BEHIND_LAYER
|
||||
return EXTERNAL_BEHIND_LAYER
|
||||
if(EXTERNAL_ADJACENT)
|
||||
return BODY_ADJ_LAYER
|
||||
return EXTERNAL_ADJACENT_LAYER
|
||||
if(EXTERNAL_FRONT)
|
||||
return BODY_FRONT_LAYER
|
||||
return EXTERNAL_FRONT_LAYER
|
||||
|
||||
///Because all the preferences have names like "Beautiful Sharp Snout" we need to get the sprite datum with the actual important info
|
||||
/obj/item/organ/external/proc/get_sprite_datum(sprite)
|
||||
@@ -141,32 +146,30 @@
|
||||
|
||||
///The horns of a lizard!
|
||||
/obj/item/organ/external/horns
|
||||
name = "horns"
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_EXTERNAL_HORNS
|
||||
layers = EXTERNAL_ADJACENT
|
||||
|
||||
preference = "horns"
|
||||
|
||||
dna_block = DNA_HORNS_BLOCK
|
||||
|
||||
/obj/item/organ/external/horns/can_draw_on_bodypart(mob/living/carbon/human/human)
|
||||
if(!(human.head?.flags_inv & HIDEHAIR) || (human.wear_mask?.flags_inv & HIDEHAIR))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/organ/external/horns/get_global_feature_list()
|
||||
return GLOB.horns_list
|
||||
return GLOB.sprite_accessories["horns"]
|
||||
|
||||
///The frills of a lizard (like weird fin ears)
|
||||
/obj/item/organ/external/frills
|
||||
name = "frills"
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_EXTERNAL_FRILLS
|
||||
layers = EXTERNAL_ADJACENT
|
||||
|
||||
preference = "frills"
|
||||
|
||||
dna_block = DNA_FRILLS_BLOCK
|
||||
|
||||
/obj/item/organ/external/frills/can_draw_on_bodypart(mob/living/carbon/human/human)
|
||||
if(!(human.head?.flags_inv & HIDEEARS))
|
||||
return TRUE
|
||||
@@ -174,36 +177,34 @@
|
||||
|
||||
|
||||
/obj/item/organ/external/frills/get_global_feature_list()
|
||||
return GLOB.frills_list
|
||||
return GLOB.sprite_accessories["frills"]
|
||||
|
||||
///Guess what part of the lizard this is?
|
||||
/obj/item/organ/external/snout
|
||||
name = "snout"
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_EXTERNAL_SNOUT
|
||||
layers = EXTERNAL_ADJACENT
|
||||
|
||||
preference = "snout"
|
||||
|
||||
dna_block = DNA_SNOUT_BLOCK
|
||||
|
||||
/obj/item/organ/external/snout/can_draw_on_bodypart(mob/living/carbon/human/human)
|
||||
if(!(human.wear_mask?.flags_inv & HIDESNOUT) && !(human.head?.flags_inv & HIDESNOUT))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/organ/external/snout/get_global_feature_list()
|
||||
return GLOB.snouts_list
|
||||
return GLOB.sprite_accessories["snouts"]
|
||||
|
||||
///A moth's antennae
|
||||
/obj/item/organ/external/antennae
|
||||
name = "antennae"
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_EXTERNAL_ANTENNAE
|
||||
layers = EXTERNAL_FRONT | EXTERNAL_BEHIND
|
||||
|
||||
preference = "moth_antennae"
|
||||
|
||||
dna_block = DNA_MOTH_ANTENNAE_BLOCK
|
||||
|
||||
///Are we burned?
|
||||
var/burnt = FALSE
|
||||
///Store our old sprite here for if our antennae wings are healed
|
||||
@@ -221,10 +222,12 @@
|
||||
UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL))
|
||||
|
||||
/obj/item/organ/external/antennae/get_global_feature_list()
|
||||
return GLOB.moth_antennae_list
|
||||
return GLOB.sprite_accessories["moth_antennae"]
|
||||
|
||||
/obj/item/organ/external/antennae/can_draw_on_bodypart(mob/living/carbon/human/human)
|
||||
return TRUE
|
||||
if(!(human.head?.flags_inv & HIDEHAIR) || (human.wear_mask?.flags_inv & HIDEHAIR))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
///For moth antennae and wings we make an exception. If their features are burnt, we only update our original sprite
|
||||
/obj/item/organ/external/antennae/set_sprite(sprite)
|
||||
|
||||
+5
-14
@@ -15,7 +15,7 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
///The true wings that you can use to fly and shit (you cant actually shit with them, but it does wing stuff)
|
||||
///The true wings that you can use to fly and shit (you cant actually shit with them)
|
||||
/obj/item/organ/external/wings/functional
|
||||
///The flight action object
|
||||
var/datum/action/innate/flight/fly
|
||||
@@ -29,10 +29,8 @@
|
||||
var/wings_open = FALSE
|
||||
|
||||
/obj/item/organ/external/wings/functional/get_global_feature_list()
|
||||
if(wings_open)
|
||||
return GLOB.wings_open_list
|
||||
else
|
||||
return GLOB.wings_list
|
||||
// SKYRAT EDIT TODO: Add support for wings_open
|
||||
return GLOB.sprite_accessories["wings"]
|
||||
|
||||
/obj/item/organ/external/wings/functional/Insert(mob/living/carbon/reciever, special, drop_if_replaced)
|
||||
. = ..()
|
||||
@@ -160,7 +158,7 @@
|
||||
preference = "moth_wings"
|
||||
layers = EXTERNAL_BEHIND | EXTERNAL_FRONT
|
||||
|
||||
dna_block = DNA_MOTH_WINGS_BLOCK
|
||||
//dna_block = DNA_MOTH_WINGS_BLOCK SKYRAT EDIT REMOVAL
|
||||
|
||||
///Are we burned?
|
||||
var/burnt = FALSE
|
||||
@@ -168,7 +166,7 @@
|
||||
var/original_sprite = ""
|
||||
|
||||
/obj/item/organ/external/wings/moth/get_global_feature_list()
|
||||
return GLOB.moth_wings_list
|
||||
return GLOB.sprite_accessories["wings"] //SKYRAT EDIT CHANGE
|
||||
|
||||
/obj/item/organ/external/wings/moth/can_draw_on_bodypart(mob/living/carbon/human/human)
|
||||
return TRUE
|
||||
@@ -186,13 +184,6 @@
|
||||
UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL, COMSIG_MOVABLE_PRE_MOVE))
|
||||
REMOVE_TRAIT(organ_owner, TRAIT_FREE_FLOAT_MOVEMENT, src)
|
||||
|
||||
///For moth antennae and wings we make an exception. If their features are burnt, we only update our original sprite
|
||||
/obj/item/organ/external/wings/moth/set_sprite(sprite)
|
||||
if(!burnt)
|
||||
return ..() //no one listens to the return value, I just need to call the parent proc and end the code
|
||||
|
||||
original_sprite = sprite
|
||||
|
||||
///Check if we can flutter around
|
||||
/obj/item/organ/external/wings/moth/proc/update_float_move()
|
||||
SIGNAL_HANDLER
|
||||
Reference in New Issue
Block a user