Files
+37 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
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>
2026-05-16 00:56:00 +02:00

117 lines
4.5 KiB
Plaintext

/obj/item/organ/wings/moth
name = "moth wings"
desc = "A pair of fuzzy moth wings."
flight_for_species = list(SPECIES_MOTH)
///Our associated shadow jaunt spell, for all nightmares
var/datum/action/cooldown/spell/touch/moth_climb/our_climb
///Our associated terrorize spell, for antagonist nightmares
var/datum/action/cooldown/spell/moth_and_dash/our_dash
/obj/item/organ/wings/moth/on_mob_insert(mob/living/carbon/organ_owner, special, movement_flags)
. = ..()
if(ismoth(organ_owner))
our_climb = new(organ_owner)
our_climb.Grant(organ_owner)
our_dash = new(organ_owner)
our_dash.Grant(organ_owner)
/obj/item/organ/wings/moth/on_mob_remove(mob/living/carbon/organ_owner)
. = ..()
QDEL_NULL(our_climb)
QDEL_NULL(our_dash)
/datum/action/cooldown/spell/moth_and_dash
name = "Flap Wings"
desc = "Forces your wings to propel you forwards, though exhausting."
button_icon = 'icons/mob/human/species/moth/moth_wings.dmi'
button_icon_state = "m_moth_wings_gothic_BEHIND"
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_HANDS_BLOCKED|AB_CHECK_INCAPACITATED
invocation_type = INVOCATION_NONE
spell_requirements = NONE
antimagic_flags = NONE
var/jumpdistance = 5 //-1 from to see the actual distance, e.g 4 goes over 3 tiles
var/jumpspeed = 3
var/datum/weakref/dash_action_ref
COOLDOWN_DECLARE(dash_cooldown)
/datum/action/cooldown/spell/moth_and_dash/Trigger(trigger_flags, action, atom/target)
if(!..())
return FALSE
if (!isliving(owner))
return
var/turf/our_turf = get_turf(owner)
var/datum/gas_mixture/environment = our_turf.return_air()
if(environment.return_pressure() < (HAZARD_LOW_PRESSURE))
to_chat(owner, span_warning("There's far too little air for your wings to work against!"))
return
if(owner.incapacitated)
return
if(!COOLDOWN_FINISHED(src, dash_cooldown))
to_chat(owner, span_warning("Your wings are extraordinarily tired, give them some rest!"))
return
var/atom/dash_target = get_edge_target_turf(owner, owner.dir) //gets the user's direction
ADD_TRAIT(owner, TRAIT_MOVE_FLOATING, LEAPING_TRAIT)
if (owner.throw_at(dash_target, jumpdistance, jumpspeed, spin = FALSE, diagonals_first = TRUE, callback = TRAIT_CALLBACK_REMOVE(owner, TRAIT_MOVE_FLOATING, LEAPING_TRAIT)))
playsound(owner, 'sound/mobs/humanoids/moth/moth_flutter.ogg', 50, TRUE, TRUE)
owner.visible_message(span_warning("[usr] propels themselves forwards with a heavy wingbeat!"))
COOLDOWN_START(src, dash_cooldown, 6 SECONDS)
var/mob/living/dash_user = owner
if(istype(dash_user))
dash_user.adjust_stamina_loss(40) //Given the risk of flying into things and crashing quite violently, you get four of these. Every one slows you down anyway.
else
to_chat(owner, span_warning("Something prevents you from dashing forward!"))
/datum/emote/living/mothic_dash
key = "mdash"
key_third_person = "mothdash"
cooldown = 6 SECONDS
/datum/emote/living/mothic_dash/run_emote(mob/living/user, params, type_override, intentional)
if (ishuman(user) && intentional)
var/datum/action/cooldown/spell/moth_and_dash/dash_action = locate() in user.actions
if(dash_action)
dash_action.Trigger()
return ..()
/datum/action/cooldown/spell/touch/moth_climb
name = "Lift Wings"
desc = "Spreads your wings out to facilitate climbing, though this will be extremely tiring."
button_icon = 'icons/mob/human/species/moth/moth_wings.dmi'
button_icon_state = "m_moth_wings_monarch_BEHIND"
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_HANDS_BLOCKED|AB_CHECK_INCAPACITATED
invocation_type = INVOCATION_NONE
spell_requirements = NONE
antimagic_flags = NONE
hand_path = /obj/item/climbing_hook/climbing_moth_wings
draw_message = span_notice("You outstretch your wings, ready to climb upwards.")
drop_message = span_notice("Your wings tuck back behind you.")
/obj/item/climbing_hook/climbing_moth_wings
name = "outstretched wings"
desc = "Useful for climbing up onto high places, though tiresome."
icon = 'icons/mob/human/species/moth/moth_wings.dmi'
icon_state = "m_moth_wings_monarch_BEHIND"
climb_time = 2.5 SECONDS
force = 0
throwforce = 0
climbsound = 'sound/mobs/humanoids/moth/moth_flutter.ogg'
/obj/item/climbing_hook/climbing_moth_wings/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
var/turf/check_turf = get_turf(user)
var/datum/gas_mixture/environment = check_turf.return_air()
if(environment.return_pressure() < (HAZARD_LOW_PRESSURE))
to_chat(user, span_warning("There's far too little air for your wings to work against!"))
return ITEM_INTERACT_BLOCKING
. = ..()
qdel(src)