From ca488ae67b5cd0235ffdcc092482e8e68025e8d5 Mon Sep 17 00:00:00 2001 From: mogeoko Date: Sat, 1 Feb 2025 17:57:39 +0100 Subject: [PATCH] Conflict fixes --- .../deadspace/code/corruption/action.dm | 6 - .../deadspace/code/marker/abilities/absorb.dm | 16 +- .../code/marker/abilities/false_sound.dm | 6 +- .../code/marker/abilities/psy_ability.dm | 6 +- .../code/marker/abilities/whisper.dm | 6 +- .../tgui/interfaces/NecromorphMarker.jsx | 191 +++++++++++------- 6 files changed, 130 insertions(+), 101 deletions(-) diff --git a/tff_modular/modules/deadspace/code/corruption/action.dm b/tff_modular/modules/deadspace/code/corruption/action.dm index 11471873b7f..2affe9d5972 100644 --- a/tff_modular/modules/deadspace/code/corruption/action.dm +++ b/tff_modular/modules/deadspace/code/corruption/action.dm @@ -35,12 +35,6 @@ unset_click_ability(clicker, refund_cooldown = TRUE) clicker.next_click = world.time + click_cd_override return FALSE - if(LAZYACCESS(modifiers, MIDDLE_CLICK)) - if(template.dir == 8) - template.dir = 1 - else - template.dir *= 2 - clicker.balloon_alert(clicker, "new direction - [dir2text(template.dir)]") if(!IsAvailable(feedback = TRUE)) return FALSE if(!target) diff --git a/tff_modular/modules/deadspace/code/marker/abilities/absorb.dm b/tff_modular/modules/deadspace/code/marker/abilities/absorb.dm index 509ef967100..5b3282bb6e9 100644 --- a/tff_modular/modules/deadspace/code/marker/abilities/absorb.dm +++ b/tff_modular/modules/deadspace/code/marker/abilities/absorb.dm @@ -6,22 +6,22 @@ cost = 10 /datum/action/cooldown/necro/psy/absorb/PreActivate(turf/target) - var/mob/camera/marker_signal/caller = owner + var/mob/camera/marker_signal/signal = owner target = get_turf(target) if(!target) return FALSE if(target.necro_corrupted) return ..() - if(IN_GIVEN_RANGE(target, caller.marker, 5) && can_see(target, caller.marker, 5)) + if(IN_GIVEN_RANGE(target, signal.marker, 5) && can_see(target, signal.marker, 5)) return ..() for(var/turf/neraby as anything in RANGE_TURFS(2, target)) if(neraby.necro_corrupted) return ..() - to_chat(caller, span_warning("Biomass may only be claimed when the target is near the marker, or corruption")) + to_chat(signal, span_warning("Biomass may only be claimed when the target is near the marker, or corruption")) return FALSE /datum/action/cooldown/necro/psy/absorb/Activate(turf/target) - var/mob/camera/marker_signal/caller = owner + var/mob/camera/marker_signal/signal = owner target = get_turf(target) var/absorbed_biomass = 0 var/list/absorbed_atoms = list() @@ -43,15 +43,15 @@ FOR_DVIEW_END if(!absorbed_biomass) - to_chat(caller, span_warning("No things containing asborbable biomass found.")) + to_chat(signal, span_warning("No things containing asborbable biomass found.")) return TRUE ..() for(var/obj/item/item as anything in absorbed_atoms) new /obj/effect/temp_visual/decoy/absorb(get_turf(item), item, target) qdel(item) - caller.marker.change_marker_biomass(absorbed_biomass * 0.4) - caller.marker.change_signal_biomass(absorbed_biomass * 0.6) - to_chat(caller, span_notice("Gained total of [absorbed_biomass] biomass from absorbing [length(absorbed_atoms)] thing\s!")) + signal.marker.change_marker_biomass(absorbed_biomass * 0.4) + signal.marker.change_signal_biomass(absorbed_biomass * 0.6) + to_chat(signal, span_notice("Gained total of [absorbed_biomass] biomass from absorbing [length(absorbed_atoms)] thing\s!")) return TRUE /obj/effect/temp_visual/decoy/absorb diff --git a/tff_modular/modules/deadspace/code/marker/abilities/false_sound.dm b/tff_modular/modules/deadspace/code/marker/abilities/false_sound.dm index ab7c23d3136..623c20fbdb2 100644 --- a/tff_modular/modules/deadspace/code/marker/abilities/false_sound.dm +++ b/tff_modular/modules/deadspace/code/marker/abilities/false_sound.dm @@ -7,7 +7,7 @@ marker_flags = SIGNAL_ABILITY_PRE_ACTIVATION /datum/action/cooldown/necro/psy/false_sound/Activate(turf/target) - var/mob/camera/marker_signal/caller = owner + var/mob/camera/marker_signal/signal = owner target = get_turf(target) if(!target) return @@ -15,11 +15,11 @@ //Add more necromorphs here, perhaps we should make it a define to make sure it's updated var/list/category = tgui_input_list(owner, "Pick a necromorph type", "False Sound", GLOB.necromorph_sounds) if(!category) - caller.change_psy_energy(cost) //Refund the cost if nothing is picked + signal.change_psy_energy(cost) //Refund the cost if nothing is picked return TRUE var/list/picked_sound = tgui_input_list(owner, "Pick sound type to play", "False Sound", GLOB.necromorph_sounds[category]) if(!picked_sound) - caller.change_psy_energy(cost) //Refund the cost if nothing is picked + signal.change_psy_energy(cost) //Refund the cost if nothing is picked return TRUE var/volume = VOLUME_MID if (picked_sound == SOUND_SHOUT || picked_sound == SOUND_SHOUT_LONG || picked_sound == SOUND_DEATH) diff --git a/tff_modular/modules/deadspace/code/marker/abilities/psy_ability.dm b/tff_modular/modules/deadspace/code/marker/abilities/psy_ability.dm index 6d1daa64fe6..b3ee3bae7d6 100644 --- a/tff_modular/modules/deadspace/code/marker/abilities/psy_ability.dm +++ b/tff_modular/modules/deadspace/code/marker/abilities/psy_ability.dm @@ -31,7 +31,7 @@ if(istype(target, /atom/movable/screen/plane_master/marker_static)) if(!click_through_static) return FALSE - var/new_target = parse_caught_click_modifiers(modifiers, get_turf(caller), caller.client) + var/new_target = parse_caught_click_modifiers(modifiers, get_turf(signal), signal.client) params = list2params(modifiers) if(!new_target) return FALSE @@ -49,6 +49,6 @@ return TRUE /datum/action/cooldown/necro/psy/Activate(atom/target) - var/mob/camera/marker_signal/caller = owner - caller.change_psy_energy(-cost) + var/mob/camera/marker_signal/signal = owner + signal.change_psy_energy(-cost) ..() diff --git a/tff_modular/modules/deadspace/code/marker/abilities/whisper.dm b/tff_modular/modules/deadspace/code/marker/abilities/whisper.dm index 1f465a45a9e..5686e9d4ea9 100644 --- a/tff_modular/modules/deadspace/code/marker/abilities/whisper.dm +++ b/tff_modular/modules/deadspace/code/marker/abilities/whisper.dm @@ -13,10 +13,10 @@ return ..() /datum/action/cooldown/necro/psy/whisper/Activate(mob/living/target) - var/mob/camera/marker_signal/caller = owner - var/message = tgui_input_text(caller, "Write a message to send to [target.name]", "Whisper") + var/mob/camera/marker_signal/signal = owner + var/message = tgui_input_text(signal, "Write a message to send to [target.name]", "Whisper") if(!message) return TRUE .=..() to_chat(target, "[message]") - caller.marker.hive_mind_message(caller, "[caller] -> [target] [message]") + signal.marker.hive_mind_message(signal, "[signal] -> [target] [message]") diff --git a/tgui/packages/tgui/interfaces/NecromorphMarker.jsx b/tgui/packages/tgui/interfaces/NecromorphMarker.jsx index 024430aadc0..b8c0fc32929 100644 --- a/tgui/packages/tgui/interfaces/NecromorphMarker.jsx +++ b/tgui/packages/tgui/interfaces/NecromorphMarker.jsx @@ -1,22 +1,29 @@ import { useBackend, useLocalState } from '../backend'; -import { AnimatedNumber, Box, Button, ProgressBar, Section, Slider, Stack } from '../components'; +import { + AnimatedNumber, + Box, + Button, + ProgressBar, + Section, + Slider, + Stack, +} from 'tgui-core/components'; import { Window } from '../layouts'; export const NecromorphMarker = (props, context) => { const { act, data } = useBackend(context); - const { - necromorphs, - use_necroqueue, - biomass_invested, - biomass, - } = data; + const { necromorphs, use_necroqueue, biomass_invested, biomass } = data; - const [chosenNecromorph, setChosenNecromorph] = useLocalState(context, 'picked_necromorph', necromorphs.sort((a, b) => { return a.cost - b.cost; })[0]); + const [chosenNecromorph, setChosenNecromorph] = useLocalState( + context, + 'picked_necromorph', + necromorphs.sort((a, b) => { + return a.cost - b.cost; + })[0], + ); return ( - + @@ -31,8 +38,7 @@ export const NecromorphMarker = (props, context) => { - { - /* + {/* @@ -43,8 +49,7 @@ export const NecromorphMarker = (props, context) => { - */ - } + */} @@ -52,17 +57,21 @@ export const NecromorphMarker = (props, context) => {
- {necromorphs.sort( - (a, b) => { return a.cost - b.cost; } - ).map((necromorph, i) => ( - - ))} + {necromorphs + .sort((a, b) => { + return a.cost - b.cost; + }) + .map((necromorph, i) => ( + + ))}
@@ -71,7 +80,8 @@ export const NecromorphMarker = (props, context) => { fluid textAlign="center" checked={use_necroqueue} - onClick={() => act('switch_necroqueue')}> + onClick={() => act('switch_necroqueue')} + > Use necroqueue @@ -99,30 +112,26 @@ export const NecromorphMarker = (props, context) => { export const NecromorphDisplay = (props, context) => { const { act, data } = useBackend(context); - const { - sprites, - biomass_invested, - } = data; - const { - chosenNecromorph, - } = props; + const { sprites, biomass_invested } = data; + const { chosenNecromorph } = props; return ( - - + - {chosenNecromorph.name} | Cost: {chosenNecromorph.cost} | { - ((chosenNecromorph.biomass_required > 0) - && (biomass_invested < chosenNecromorph.biomass_required)) ? ( - "To unlock: "+biomass_invested+"/"+chosenNecromorph.biomass_required - ) : ( - - Unlocked - - ) - } + {chosenNecromorph.name} | Cost: {chosenNecromorph.cost} |{' '} + {chosenNecromorph.biomass_required > 0 && + biomass_invested < chosenNecromorph.biomass_required ? ( + 'To unlock: ' + + biomass_invested + + '/' + + chosenNecromorph.biomass_required + ) : ( + + Unlocked + + )} {chosenNecromorph.desc} @@ -132,66 +141,92 @@ export const NecromorphDisplay = (props, context) => { export const BiomassDisplay = (props, context) => { const { act, data } = useBackend(context); - const { - biomass, - biomass_income, - signal_biomass, - signal_biomass_percent, - } = data; + const { biomass, biomass_income, signal_biomass, signal_biomass_percent } = + data; return ( "Percent of biomass income for signals | " + value.toFixed(1)} + format={(value) => + 'Percent of biomass income for signals | ' + value.toFixed(1) + } unit="%" - onChange={(e, value) => act("set_signal_biomass_percent", { percentage: value*0.01 })} + onChange={(e, value) => + act('set_signal_biomass_percent', { percentage: value * 0.01 }) + } /> - + - Marker Biomass | { - - } | { + Marker Biomass | {} |{' '} + { - } bio/s + }{' '} + bio/s - - - + + + - + - Signal Biomass | { - - } | { + Signal Biomass |{' '} + {} |{' '} + { - } bio/s + }{' '} + bio/s - - - + + + ); }; -