Add pAI movement freedom when emagged (#77325)

## About The Pull Request

New emagged pAIs improvements:
- Disables the range restriction
- Renamed the `Malicious Software Detected` button to `Reset Software`
since it resets the software to default state
- Added a new law notification and flavor texts

## Why It's Good For The Game

More unique emag effects are good. Plus this adds some polish to the
current emag effects so the UI is smoother.

## Changelog
🆑
add: Add pAI movement freedom when emagged.
qol: The "Malicious Software Detected" button has been appropriately
renamed to "Reset Software" for when pAIs are emagged
qol: Add a new law notification popup and flavor texts when pAI is
emagged
/🆑
This commit is contained in:
Tim
2023-08-06 00:44:10 +01:00
committed by GitHub
parent a4435e5d71
commit 1d40ed488c
3 changed files with 32 additions and 20 deletions
+1 -1
View File
@@ -117,7 +117,7 @@
name = pai.name,
transmit = pai.can_transmit,
receive = pai.can_receive,
range = pai.leash.distance,
range = pai.leash?.distance,
)
return data
+9 -1
View File
@@ -162,6 +162,7 @@
QDEL_NULL(internal_gps)
QDEL_NULL(newscaster)
QDEL_NULL(signaler)
QDEL_NULL(leash)
card = null
GLOB.pai_list.Remove(src)
return ..()
@@ -334,7 +335,10 @@
master_name = "The Syndicate"
master_dna = "Untraceable Signature"
// Sets supplemental directive to this
laws.supplied[1] = "Do not interfere with the operations of the Syndicate."
add_supplied_law(0, "Do not interfere with the operations of the Syndicate.")
QDEL_NULL(leash) // Freedom!!!
to_chat(src, span_danger("ALERT: Foreign software detected."))
to_chat(src, span_danger("WARN: Holochasis range restrictions disabled."))
return TRUE
/**
@@ -350,6 +354,7 @@
master_name = null
master_dna = null
add_supplied_law(0, "None.")
leash = AddComponent(/datum/component/leash, card, HOLOFORM_DEFAULT_RANGE, force_teleport_out_effect = /obj/effect/temp_visual/guardian/phase/out)
balloon_alert(src, "software rebooted")
return TRUE
@@ -449,6 +454,9 @@
/// Updates the distance we can be from our pai card
/mob/living/silicon/pai/proc/increment_range(increment_amount)
if(emagged)
return
var/new_distance = leash.distance + increment_amount
if (new_distance < HOLOFORM_MIN_RANGE || new_distance > HOLOFORM_MAX_RANGE)
return
+22 -18
View File
@@ -186,23 +186,27 @@ const PaiOptions = (props, context) => {
</Button>
</LabeledList.Item>
<LabeledList.Item label="Holoform Range">
<Stack>
<Stack.Item>
<Button
icon="fa-circle-minus"
onClick={() => act('decrease_range')}
disabled={range === range_min}
/>
</Stack.Item>
<Stack.Item mt={0.5}>{range}</Stack.Item>
<Stack.Item>
<Button
icon="fa-circle-plus"
onClick={() => act('increase_range')}
disabled={range === range_max}
/>
</Stack.Item>
</Stack>
{emagged ? (
'∞'
) : (
<Stack>
<Stack.Item>
<Button
icon="fa-circle-minus"
onClick={() => act('decrease_range')}
disabled={range === range_min}
/>
</Stack.Item>
<Stack.Item mt={0.5}>{range}</Stack.Item>
<Stack.Item>
<Button
icon="fa-circle-plus"
onClick={() => act('increase_range')}
disabled={range === range_max}
/>
</Stack.Item>
</Stack>
)}
</LabeledList.Item>
<LabeledList.Item label="Transmit">
<Button
@@ -240,7 +244,7 @@ const PaiOptions = (props, context) => {
icon="bug"
mt={1}
onClick={() => act('reset_software')}>
Malicious Software Detected
Reset Software
</Button>
)}
</Section>