mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
+37






![tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)


Alexis
GitHub
tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
ArcaneMusic
MrMelbert
Rhials
rageguy505
LemonInTheDark
John Willard
Aliceee2ch
Time-Green
Tsar-Salat
SmArtKar
Maxipat
SyncIt21
deltanedas
SimplyLogan
loganuk
Leland Kemble
FalloutFalcon
Roxy
Lucy
siliconOpossum
Isratosh
TheRyeGuyWhoWillNowDie
Neocloudy
Alexander V.
ElGitificador
Twaticus
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bloop
Cameron Lennox
Tim
Iamgoofball
Layzu666
Arturlang
_0Steven
mrmanlikesbt
Ben10Omintrix
John F. Kennedy
Cursor
Josh
Josh Powell
Yobrocharlie
Hardly3D
shayoki
LT3
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
112 lines
3.4 KiB
Plaintext
112 lines
3.4 KiB
Plaintext
#define MOTH_WING_FORCE 1 NEWTONS
|
|
|
|
///Moth wings! They can flutter in low-grav and burn off in heat
|
|
/obj/item/organ/wings/moth
|
|
name = "moth wings"
|
|
desc = "Spread your wings and FLOOOOAAAAAT!"
|
|
|
|
//dna_block = /datum/dna_block/feature/accessory/moth_wing // BUBBER EDIT REMOVAL
|
|
|
|
bodypart_overlay = /datum/bodypart_overlay/mutant/wings/moth
|
|
restyle_flags = EXTERNAL_RESTYLE_FLESH
|
|
|
|
///Are we burned?
|
|
var/burnt = FALSE
|
|
///Store our old datum here for if our burned wings are healed
|
|
var/original_sprite_datum
|
|
|
|
var/drift_force = MOTH_WING_FORCE
|
|
|
|
/obj/item/organ/wings/moth/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent( \
|
|
/datum/component/jetpack, \
|
|
TRUE, \
|
|
drift_force, \
|
|
COMSIG_ORGAN_IMPLANTED, \
|
|
COMSIG_ORGAN_REMOVED, \
|
|
null, \
|
|
CALLBACK(src, PROC_REF(allow_flight)), \
|
|
null, \
|
|
)
|
|
|
|
/obj/item/organ/wings/moth/on_mob_insert(mob/living/carbon/receiver)
|
|
. = ..()
|
|
RegisterSignal(receiver, COMSIG_HUMAN_BURNING, PROC_REF(try_burn_wings))
|
|
RegisterSignal(receiver, COMSIG_LIVING_POST_FULLY_HEAL, PROC_REF(heal_wings))
|
|
|
|
/obj/item/organ/wings/moth/on_mob_remove(mob/living/carbon/organ_owner)
|
|
. = ..()
|
|
UnregisterSignal(organ_owner, list(COMSIG_HUMAN_BURNING, COMSIG_LIVING_POST_FULLY_HEAL))
|
|
|
|
/obj/item/organ/wings/moth/make_flap_sound(mob/living/carbon/wing_owner)
|
|
playsound(wing_owner, 'sound/mobs/humanoids/moth/moth_flutter.ogg', 50, TRUE)
|
|
|
|
/obj/item/organ/wings/moth/can_soften_fall()
|
|
return !burnt
|
|
|
|
/obj/item/organ/wings/moth/proc/allow_flight()
|
|
if(!owner || !owner.client)
|
|
return FALSE
|
|
if(owner.has_gravity())
|
|
return FALSE
|
|
if((owner.obscured_slots & HIDEMUTWINGS) || burnt)
|
|
return FALSE
|
|
var/datum/gas_mixture/current = owner.loc.return_air()
|
|
if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85))
|
|
return TRUE
|
|
return FALSE
|
|
|
|
///check if our wings can burn off ;_;
|
|
/obj/item/organ/wings/moth/proc/try_burn_wings(mob/living/carbon/human/human)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!burnt && human.bodytemperature >= 800 && human.fire_stacks > 0) //do not go into the extremely hot light. you will not survive
|
|
to_chat(human, span_danger("Your precious wings burn to a crisp!"))
|
|
human.add_mood_event("burnt_wings", /datum/mood_event/burnt_wings)
|
|
|
|
burn_wings()
|
|
human.update_body_parts()
|
|
|
|
///burn the wings off
|
|
/obj/item/organ/wings/moth/proc/burn_wings()
|
|
var/datum/bodypart_overlay/mutant/wings/moth/wings = bodypart_overlay
|
|
wings.burnt = TRUE
|
|
burnt = TRUE
|
|
|
|
///heal our wings back up!!
|
|
/obj/item/organ/wings/moth/proc/heal_wings(datum/source, heal_flags)
|
|
SIGNAL_HANDLER
|
|
|
|
if(!burnt)
|
|
return
|
|
|
|
if(heal_flags & (HEAL_LIMBS|HEAL_ORGANS))
|
|
var/datum/bodypart_overlay/mutant/wings/moth/wings = bodypart_overlay
|
|
wings.burnt = FALSE
|
|
burnt = FALSE
|
|
|
|
/obj/item/organ/wings/moth/feel_for_damage(self_aware)
|
|
if(burnt)
|
|
return "Your wings are all burnt up!"
|
|
return ..()
|
|
|
|
///Moth wing bodypart overlay, including burn functionality!
|
|
/datum/bodypart_overlay/mutant/wings/moth
|
|
feature_key = FEATURE_WINGS // BUBBER EDIT CHANGE - Customization - ORIGINAL: feature_key = FEATURE_MOTH_WINGS
|
|
layers = EXTERNAL_BEHIND | EXTERNAL_FRONT
|
|
slot_blocker = HIDEMUTWINGS
|
|
///Accessory datum of the burn sprite
|
|
var/datum/sprite_accessory/burn_datum = /datum/sprite_accessory/moth_wings/burnt_off
|
|
///Are we burned? If so we draw differently
|
|
var/burnt
|
|
|
|
/datum/bodypart_overlay/mutant/wings/moth/New()
|
|
. = ..()
|
|
burn_datum = fetch_sprite_datum(burn_datum)
|
|
|
|
/datum/bodypart_overlay/mutant/wings/moth/get_base_icon_state()
|
|
return burnt ? burn_datum.icon_state : sprite_datum.icon_state
|
|
|
|
#undef MOTH_WING_FORCE
|