Patched Actions Rework (#6899)

* Rejig Actions

* fix merge errors

* lambda-b-gon

* fix PAI, add innate actions

* Revert "fix PAI, add innate actions"

This reverts commit 4b501ac083e979e31ebd98d7b98077e0dbdd344b.

* Just fix by making nullable.

if only require: true actually did something somehow.

* Make AddActions() ensure an actions component

and misc comments

* misc cleanup

* Limit range even when not checking for obstructions

* remove old guardian code

* rename function and make EntityUid nullable

* fix magboot bug

* fix action search menu

* make targeting toggle all equivalent actions

* fix combat popups (enabling <-> disabling)

* fix networking

* Allow action locking

* prevent telepathy
This commit is contained in:
Leon Friedrich
2022-02-26 18:24:08 +13:00
committed by GitHub
parent d32f884157
commit ff7d4ed9f6
135 changed files with 3156 additions and 5166 deletions

View File

@@ -1,147 +0,0 @@
- type: action
actionType: CombatMode
icon: Interface/Actions/harmOff.png
iconOn: Interface/Actions/harm.png
name: "[color=red]Combat Mode[/color]"
description: "Enter combat mode."
filters:
- human
behaviorType: Toggle
behavior: !type:CombatMode
- type: action
actionType: Disarm
icon: Interface/Actions/disarmOff.png
iconOn: Interface/Actions/disarm.png
name: "[color=red]Disarm[/color]"
description: "Attempt to [color=red]disarm[/color] someone."
filters:
- human
behaviorType: TargetEntity
repeat: true
behavior: !type:DisarmAction { }
- type: action
actionType: HumanScream
icon: Interface/Actions/scream.png
name: "Scream"
filters:
- human
behaviorType: Instant
behavior: !type:ScreamAction
cooldown: 10
male:
collection: MaleScreams
female:
collection: FemaleScreams
wilhelm:
path: /Audio/Voice/Human/wilhelm_scream.ogg
- type: action
actionType: VoxScream
icon: Interface/Actions/scream.png
name: "Scream"
filters:
- vox
behaviorType: Instant
behavior: !type:ScreamAction
cooldown: 10
male:
path: /Audio/Voice/Vox/shriek1.ogg
female:
path: /Audio/Voice/Vox/shriek1.ogg
wilhelm:
path: /Audio/Voice/Human/wilhelm_scream.ogg
- type: action
actionType: GhostBoo
icon: Interface/Actions/scream.png
name: "Boo"
description: "Scare your crew members because of boredom!"
filters:
- ghost
behaviorType: Instant
behavior: !type:GhostBoo
radius: 3
cooldown: 120
maxTargets: 3
- type: action
actionType: PAIMidi
icon: Interface/Actions/pai-midi.png
name: "Play MIDI"
description: "Open your portable MIDI interface to soothe your owner."
filters:
- pai
- music
behaviorType: Instant
behavior: !type:PAIMidi
- type: action
actionType: DebugInstant
icon: Interface/Alerts/human_health.rsi/health1.png
name: "[color=red]Debug Instant[/color]"
description: "This is a [color=red]debug message[/color]."
requires: "Requires blah blah"
filters:
- debug
behaviorType: Instant
behavior: !type:DebugInstant
message: Instant action was used!
- type: action
actionType: DebugToggle
icon: Interface/Alerts/human_health.rsi/health3.png
name: "[color=red]Debug Toggle[/color]"
description: "This is a [color=red]debug message[/color]."
requires: "Requires blah blah"
filters:
- debug
behaviorType: Toggle
behavior: !type:DebugToggle
messageOn: Toggled on!
messageOff: Toggled off!
- type: action
actionType: DebugTargetPoint
icon: Interface/Alerts/human_health.rsi/health4.png
name: "[color=red]Debug Target Position[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetPoint
behavior: !type:DebugTargetPoint { }
- type: action
actionType: DebugTargetPointRepeat
icon: Interface/Alerts/human_health.rsi/health2.png
name: "[color=red]Repeating Debug Target Position[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetPoint
repeat: true
behavior: !type:DebugTargetPoint { }
- type: action
actionType: DebugTargetEntity
icon: Interface/Alerts/human_health.rsi/health6.png
name: "[color=red]Debug Target Entity[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetEntity
behavior: !type:DebugTargetEntity { }
- type: action
actionType: DebugTargetEntityRepeat
icon: Interface/Alerts/human_health.rsi/health5.png
name: "[color=red]Repeating Debug Target Entity[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetEntity
repeat: true
behavior: !type:DebugTargetEntity { }

View File

@@ -1,12 +0,0 @@
#This is the action the host gets to control the guardian
- type: action
actionType: ManifestGuardian
icon: Interface/Actions/manifest.png
name: "Toggle guardian manifestation"
description: "Either manifests the guardian or recalls it back into your body"
filters:
- guardian
behaviorType: Instant
behavior: !type:ToggleGuardianAction
cooldown: 2

View File

@@ -1,125 +0,0 @@
- type: itemAction
actionType: ToggleInternals
icon: Interface/Actions/internal0.png
iconOn: Interface/Actions/internal1.png
name: "Toggle Internals"
description: "Breathe from the equipped gas tank."
requires: "Requires equipped breath mask and gas tank"
filters:
- common
- atmos
keywords:
- gas
- tank
- breath
behaviorType: Toggle
behavior: !type:ToggleInternalsAction { }
- type: itemAction
actionType: ToggleLight
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
name: "Toggle Light"
description: "Turn the light on."
filters:
- tools
keywords:
- lantern
- lamp
behaviorType: Toggle
behavior: !type:ToggleLightAction { }
- type: itemAction
actionType: DebugInstant
icon: Interface/Alerts/human_health.rsi/health1.png
iconStyle: BigAction
name: "[color=red]Debug Item Instant[/color]"
description: "This is a [color=red]debug message[/color]."
requires: "Requires blah blah"
filters:
- debug
behaviorType: Instant
behavior: !type:DebugInstant
message: Instant action was used!
cooldown: 10
- type: itemAction
actionType: DebugToggle
iconStyle: BigItem
icon: Interface/Alerts/human_health.rsi/health3.png
name: "[color=red]Debug Item Toggle[/color]"
description: "This is a [color=red]debug message[/color]."
requires: "Requires blah blah"
filters:
- debug
behaviorType: Toggle
behavior: !type:DebugToggle
messageOn: Toggled on!
messageOff: Toggled off!
- type: itemAction
actionType: DebugTargetPoint
iconStyle: NoItem
icon: Interface/Alerts/human_health.rsi/health4.png
name: "[color=red]Debug Item Target Position[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetPoint
behavior: !type:DebugTargetPoint { }
- type: itemAction
actionType: DebugTargetPointRepeat
iconStyle: BigAction
icon: Interface/Alerts/human_health.rsi/health2.png
name: "[color=red]Repeating Debug Item Target Position[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetPoint
repeat: true
behavior: !type:DebugTargetPoint { }
- type: itemAction
actionType: DebugTargetEntity
iconStyle: BigAction
icon: Interface/Alerts/human_health.rsi/health6.png
name: "[color=red]Debug Item Target Entity[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetEntity
behavior: !type:DebugTargetEntity { }
- type: itemAction
actionType: DebugTargetEntityRepeat
icon: Interface/Alerts/human_health.rsi/health5.png
name: "[color=red]Repeating Debug Item Target Entity[/color]"
description: "This is a [color=red]debug message[/color]."
filters:
- debug
behaviorType: TargetEntity
repeat: true
behavior: !type:DebugTargetEntity { }
- type: entity
name: item action example
parent: BaseItem
id: ItemActionExample
description: for testing item actions
suffix: DEBUG
components:
- type: Tag
tags:
- Debug
- type: Sprite
sprite: Objects/Fun/bikehorn.rsi
state: icon
- type: ItemActions
actions:
- actionType: DebugInstant
- actionType: DebugToggle
- actionType: DebugTargetPoint
- actionType: DebugTargetPointRepeat
- actionType: DebugTargetEntity
- actionType: DebugTargetEntityRepeat

View File

@@ -1,13 +0,0 @@
- type: itemAction
actionType: ToggleMagboots
icon: Clothing/Shoes/Boots/magboots.rsi/icon.png
iconOn: Clothing/Shoes/Boots/magboots.rsi/icon-on.png
name: "Toggle Magboots"
description: "Turn your magboots on."
filters:
- tools
keywords:
- atmos
- air
behaviorType: Toggle
behavior: !type:ToggleMagbootsAction { }

View File

@@ -1,14 +0,0 @@
- type: action
actionType: SpellPie
icon: Objects/Consumable/Food/Baked/pie.rsi/plain.png
name: "Pie"
filters:
- spells
description: "Give me a pie, I dare you!"
behaviorType: Instant
behavior: !type:GiveItemSpell
spellItem: FoodPieBananaCream
castMessage: I NEED A PIE!
cooldown: 15
castSound:
path: /Audio/Items/bikehorn.ogg

View File

@@ -63,12 +63,13 @@
- type: Appearance
visuals:
- type: FlashLightVisualizer
- type: ItemActions
actions:
- actionType: ToggleLight
# right now there is no power system for hardsuits
# so hardsuit helmet just have small battery inside
- type: HandheldLight
toggleAction:
name: action-name-toggle-light
description: action-description-toggle-light
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
event: !type:ToggleActionEvent
- type: PowerCellSlot
cellSlot:
startingItem: PowerCellHardsuitHelmet # self recharging

View File

@@ -19,9 +19,12 @@
visuals:
- type: FlashLightVisualizer
- type: HandheldLight
- type: ItemActions
actions:
- actionType: ToggleLight
toggleAction:
name: action-name-toggle-light
description: action-description-toggle-light
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
event: !type:ToggleActionEvent
- type: PowerCellSlot
cellSlot:
startingItem: PowerCellSmallHigh

View File

@@ -10,9 +10,13 @@
- type: Clothing
sprite: Clothing/Shoes/Boots/magboots.rsi
- type: Magboots
- type: ItemActions
actions:
- actionType: ToggleMagboots
toggleAction:
icon: Clothing/Shoes/Boots/magboots.rsi/icon.png
iconOn: Clothing/Shoes/Boots/magboots.rsi/icon-on.png
name: action-name-magboot-toggle
description: action-decription-magboot-toggle
itemIconStyle: NoItem
event: !type:ToggleActionEvent
- type: entity
parent: ClothingShoesBootsMag

View File

@@ -643,8 +643,15 @@
tags:
- Trash
- type: Recyclable
- type: Actions # TODO: Remove CombatMode when Prototype Composition is added
innateActions: []
- type: Actions
# TODO: Remove CombatMode when Prototype Composition is added
- type: CombatMode
combatToggleAction:
enabled: false
autoPopulate: false
disarmAction:
enabled: false
autoPopulate: false
- type: entity

View File

@@ -121,8 +121,6 @@
sprite: Mobs/Effects/onfire.rsi
normalState: Generic_mob_burning
- type: Actions
innateActions:
- CombatMode
- type: DoAfter
- type: Climbing
- type: Flashable

View File

@@ -13,9 +13,6 @@
- type: DoAfter
- type: CombatMode
- type: Actions
innateActions:
- CombatMode
- GhostBoo
- type: PlayerInputMover
- type: Physics
bodyType: Kinematic

View File

@@ -13,10 +13,6 @@
- type: PlayerInputMover
- type: Alerts
- type: Actions
innateActions:
- CombatMode
- Disarm
- HumanScream
- type: Eye
- type: CameraRecoil
- type: Examiner

View File

@@ -68,8 +68,6 @@
types:
Blunt: 22
- type: Actions
innateActions:
- CombatMode
- type: Guardian
- type: NameIdentifier
group: Holoparasite

View File

@@ -20,10 +20,6 @@
Asphyxiation: -1.5
- type: Alerts
- type: Actions
innateActions:
- CombatMode
- Disarm
- HumanScream
- type: Eye
- type: CameraRecoil
- type: Examiner

View File

@@ -45,6 +45,3 @@
baseSprintSpeed: 14
baseWalkSpeed: 7
- type: MovementIgnoreGravity
- type: Actions
innateActions:
- GhostBoo

View File

@@ -11,10 +11,6 @@
- type: PlayerInputMover
- type: Alerts
- type: Actions
innateActions:
- CombatMode
- Disarm
- HumanScream
- type: Eye
- type: CameraRecoil
- type: Examiner

View File

@@ -10,12 +10,12 @@
context: "human"
- type: Alerts
- type: Actions
innateActions:
- VoxScream
- Disarm
- type: Eye
- type: CameraRecoil
- type: Examiner
- type: Vocal
maleScream: /Audio/Voice/Vox/shriek1.ogg
femaleScream: /Audio/Voice/Vox/shriek1.ogg
- type: AiFactionTag
factions:
- NanoTrasen

View File

@@ -288,6 +288,7 @@
# - type: Recyclable Turns out turning off recycler safeties without considering the instagib is a bad idea
# safe: false
- type: Speech
- type: Vocal
- type: Emoting
- type: Grammar
attributes:

View File

@@ -22,6 +22,12 @@
- idcard
- Belt
- type: UnpoweredFlashlight
toggleAction:
name: action-name-toggle-light
description: action-description-toggle-light
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
event: !type:ToggleActionEvent
- type: PointLight
enabled: false
radius: 2.5

View File

@@ -25,12 +25,17 @@
- type: Input
context: "human"
- type: PAI
midiAction:
name: action-name-pai-play-midi
checkCanInteract: false
icon: Interface/Actions/pai-midi.png
description: action-description-pai-play-midi
event: !type:OpenUiActionEvent
key: enum.InstrumentUiKey.Key
- type: Examiner
- type: GhostRadio
- type: DoAfter
- type: Actions
innateActions:
- PAIMidi
# This has to be installed because otherwise they're not "alive",
# so they can ghost and come back.
# Note that the personal AI never "dies".

View File

@@ -5,10 +5,13 @@
abstract: true
components:
- type: HandheldLight
toggleAction:
name: action-name-toggle-light
description: action-description-toggle-light
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
event: !type:ToggleActionEvent
- type: PowerCellSlot
- type: ItemActions
actions:
- actionType: ToggleLight
- type: Sprite
sprite: Objects/Misc/Lights/lights.rsi
netsync: false

View File

@@ -8,9 +8,12 @@
tags:
- Flashlight
- type: HandheldLight
- type: ItemActions
actions:
- actionType: ToggleLight
toggleAction:
name: action-name-toggle-light
description: action-description-toggle-light
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
event: !type:ToggleActionEvent
- type: PowerCellSlot
cellSlot:
startingItem: PowerCellSmallHigh

View File

@@ -15,9 +15,12 @@
sprite: Objects/Tanks/generic.rsi
QuickEquip: false
- type: GasTank
- type: ItemActions
actions:
- actionType: ToggleInternals
toggleAction:
name: action-name-internals-toggle
description: action-description-internals-toggle
icon: Interface/Actions/internal0.png
iconOn: Interface/Actions/internal1.png
event: !type:ToggleActionEvent
- type: entity
parent: GasTankBase

View File

@@ -5,9 +5,12 @@
description: The holy light guides the way.
components:
- type: HandheldLight
- type: ItemActions
actions:
- actionType: ToggleLight
toggleAction:
name: action-name-toggle-light
description: action-description-toggle-light
icon: Objects/Tools/flashlight.rsi/flashlight.png
iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
event: !type:ToggleActionEvent
- type: Sprite
sprite: Objects/Tools/lantern.rsi
layers:

View File

@@ -112,9 +112,8 @@
- !type:FlammableReaction
multiplier: 0.3
- !type:Ignite
- !type:DoAction
- !type:Scream
probability: 0.2
action: HumanScream
- !type:PopupMessage
messages: [ "clf3-it-burns", "clf3-get-away" ]
probability: 0.3

View File

@@ -44,9 +44,8 @@
damage:
groups:
Caustic: 0.5
- !type:DoAction
- !type:Scream
probability: 0.3
action: HumanScream
metabolisms:
Poison:
effects:
@@ -78,9 +77,8 @@
damage:
groups:
Caustic: 0.3
- !type:DoAction
- !type:Scream
probability: 0.2
action: HumanScream
metabolisms:
Poison:
effects:
@@ -119,9 +117,8 @@
damage:
groups:
Caustic: 0.1
- !type:DoAction
- !type:Scream
probability: 0.1
action: HumanScream
metabolisms:
Poison:
effects: