Port honkbots from nyano (#9698)
This commit is contained in:
18
Content.Server/Sound/Components/SpamEmitSoundComponent.cs
Normal file
18
Content.Server/Sound/Components/SpamEmitSoundComponent.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace Content.Server.Sound.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Rolls to play a sound every few seconds.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SpamEmitSoundComponent : BaseEmitSoundComponent
|
||||
{
|
||||
[DataField("accumulator")]
|
||||
public float Accumulator = 0f;
|
||||
|
||||
[DataField("rollInterval")]
|
||||
public float RollInterval = 2f;
|
||||
|
||||
[DataField("playChance")]
|
||||
public float PlayChance = 0.5f;
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,25 @@ namespace Content.Server.Sound
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
foreach (var soundSpammer in EntityQuery<SpamEmitSoundComponent>())
|
||||
{
|
||||
soundSpammer.Accumulator += frameTime;
|
||||
if (soundSpammer.Accumulator < soundSpammer.RollInterval)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
soundSpammer.Accumulator -= soundSpammer.RollInterval;
|
||||
|
||||
if (_random.Prob(soundSpammer.PlayChance))
|
||||
{
|
||||
TryEmitSound(soundSpammer);
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
@@ -45550,7 +45550,7 @@ entities:
|
||||
- canCollide: False
|
||||
type: Physics
|
||||
- uid: 3411
|
||||
type: RightHandDrone
|
||||
type: RightArmBorg
|
||||
components:
|
||||
- pos: -10.454098,-16.275398
|
||||
parent: 100
|
||||
@@ -45562,7 +45562,7 @@ entities:
|
||||
ents: []
|
||||
type: ContainerContainer
|
||||
- uid: 3412
|
||||
type: LeftHandDrone
|
||||
type: LeftArmBorg
|
||||
components:
|
||||
- pos: -10.563473,-16.494148
|
||||
parent: 100
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
damageContainer: Inorganic
|
||||
|
||||
- type: entity
|
||||
id: LeftHandDrone
|
||||
name: "left drone hand"
|
||||
id: LeftArmBorg
|
||||
name: "left borg arm"
|
||||
parent: PartSilicon
|
||||
components:
|
||||
- type: Sprite
|
||||
@@ -27,11 +27,12 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Trash
|
||||
- BorgArm
|
||||
- type: Recyclable
|
||||
|
||||
- type: entity
|
||||
id: RightHandDrone
|
||||
name: "right drone hand"
|
||||
id: RightArmBorg
|
||||
name: "right borg arm"
|
||||
parent: PartSilicon
|
||||
components:
|
||||
- type: Sprite
|
||||
@@ -49,4 +50,5 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- Trash
|
||||
- BorgArm
|
||||
- type: Recyclable
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
name: "drone"
|
||||
id: DronePreset
|
||||
partIDs:
|
||||
hand 1: LeftHandDrone
|
||||
hand 2: LeftHandDrone
|
||||
hand 3: LeftHandDrone
|
||||
hand 4: LeftHandDrone
|
||||
hand 5: RightHandDrone
|
||||
hand 6: RightHandDrone
|
||||
hand 1: LeftArmBorg
|
||||
hand 2: LeftArmBorg
|
||||
hand 3: LeftArmBorg
|
||||
hand 4: LeftArmBorg
|
||||
hand 5: RightArmBorg
|
||||
hand 6: RightArmBorg
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
requiredPoints: 10000
|
||||
requiredTechnologies:
|
||||
- IndustrialEngineering
|
||||
- RoboticsTechnology
|
||||
unlockedRecipes:
|
||||
- ShuttleConsoleCircuitboard
|
||||
- Drone
|
||||
@@ -403,6 +404,21 @@
|
||||
- MicroManipulatorStockPart
|
||||
- ScanningModuleStockPart
|
||||
|
||||
- type: technology
|
||||
name: "robotics technology"
|
||||
id: RoboticsTechnology
|
||||
description: Robot parts.
|
||||
icon:
|
||||
sprite: Mobs/Silicon/Bots/honkbot.rsi
|
||||
state: honkbot
|
||||
requiredPoints: 10000
|
||||
requiredTechnologies:
|
||||
- CompactPowerTechnology
|
||||
unlockedRecipes:
|
||||
- ProximitySensor
|
||||
- LeftArmBorg
|
||||
- RightArmBorg
|
||||
|
||||
# Bluespace Theory Technology Tree
|
||||
|
||||
# - type: technology
|
||||
|
||||
130
Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
Normal file
130
Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
Normal file
@@ -0,0 +1,130 @@
|
||||
- type: entity
|
||||
save: false
|
||||
abstract: true
|
||||
id: MobSiliconBase
|
||||
components:
|
||||
- type: Reactive
|
||||
groups:
|
||||
Acidic: [Touch]
|
||||
- type: Clickable
|
||||
- type: Damageable
|
||||
damageContainer: Inorganic
|
||||
- type: Bloodstream
|
||||
bloodReagent: Oil
|
||||
bloodlossDamage:
|
||||
types:
|
||||
Bloodloss:
|
||||
1
|
||||
bloodlossHealDamage:
|
||||
types:
|
||||
Bloodloss:
|
||||
-0.25
|
||||
- type: InteractionOutline
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
- shape:
|
||||
!type:PhysShapeCircle
|
||||
radius: 0.35
|
||||
mass: 20
|
||||
mask:
|
||||
- MobMask
|
||||
layer:
|
||||
- MobLayer
|
||||
- type: MovementSpeedModifier
|
||||
baseWalkSpeed : 3
|
||||
baseSprintSpeed : 4
|
||||
- type: Sprite
|
||||
noRot: true
|
||||
drawdepth: Mobs
|
||||
netsync: false
|
||||
- type: Recyclable
|
||||
safe: false
|
||||
- type: UtilityAI
|
||||
behaviorSets:
|
||||
- Idle
|
||||
- type: AiFactionTag
|
||||
factions:
|
||||
- SimpleNeutral
|
||||
- type: HealthExaminable
|
||||
examinableTypes:
|
||||
- Blunt
|
||||
- Slash
|
||||
- Piercing
|
||||
- Heat
|
||||
- Shock
|
||||
- type: MovedByPressure
|
||||
- type: Physics
|
||||
bodyType: KinematicController # Same for all inheritors
|
||||
- type: DrawableSolution
|
||||
solution: bloodstream
|
||||
- type: StatusEffects
|
||||
allowed:
|
||||
- Stun
|
||||
- KnockedDown
|
||||
- SlowedDown
|
||||
- Stutter
|
||||
- Electrocution
|
||||
- type: NameIdentifier
|
||||
group: GenericNumber
|
||||
- type: Repairable
|
||||
fuelcost: 15
|
||||
doAfterDelay: 8
|
||||
- type: Pullable
|
||||
- type: Tag
|
||||
tags:
|
||||
- DoorBumpOpener
|
||||
- type: MobState
|
||||
thresholds:
|
||||
0: Alive
|
||||
120: Dead
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 120
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- type: Input
|
||||
context: "human"
|
||||
- type: PlayerInputMover
|
||||
- type: PlayerMobMover
|
||||
|
||||
- type: entity
|
||||
parent: MobSiliconBase
|
||||
id: MobHonkBot
|
||||
name: honkbot
|
||||
description: Horrifying.
|
||||
components:
|
||||
- type: SpamEmitSound
|
||||
sound:
|
||||
collection: BikeHorn
|
||||
- type: UtilityAI
|
||||
behaviorSets:
|
||||
- Idle
|
||||
- type: Sprite
|
||||
drawdepth: Mobs
|
||||
sprite: Mobs/Silicon/Bots/honkbot.rsi
|
||||
state: honkbot
|
||||
- type: Slippery
|
||||
launchForwardsMultiplier: 6.0
|
||||
- type: StepTrigger
|
||||
intersectRatio: 0.2
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
- shape:
|
||||
!type:PhysShapeCircle
|
||||
radius: 0.35
|
||||
mass: 8
|
||||
mask:
|
||||
- MobMask
|
||||
layer:
|
||||
- MobLayer
|
||||
- SlipLayer
|
||||
- type: Construction
|
||||
graph: HonkBot
|
||||
node: bot
|
||||
- type: GhostTakeoverAvailable
|
||||
makeSentient: true
|
||||
name: honkbot
|
||||
description: An artificial being of pure evil.
|
||||
12
Resources/Prototypes/Entities/Objects/Misc/botparts.yml
Normal file
12
Resources/Prototypes/Entities/Objects/Misc/botparts.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- type: entity
|
||||
parent: BaseItem
|
||||
id: ProximitySensor
|
||||
name: proximity sensor
|
||||
description: Senses things in close proximity.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/proximity_sensor.rsi
|
||||
state: icon
|
||||
- type: Tag
|
||||
tags:
|
||||
- ProximitySensor
|
||||
@@ -196,6 +196,9 @@
|
||||
- PowerCellSmall
|
||||
- PowerCellMedium
|
||||
- PowerCellHigh
|
||||
- ProximitySensor
|
||||
- LeftArmBorg
|
||||
- RightArmBorg
|
||||
- type: ActivatableUI
|
||||
key: enum.LatheUiKey.Key #Yes only having 1 of them here doesn't break anything
|
||||
- type: ActivatableUIRequiresPower
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
steps:
|
||||
- material: Cable
|
||||
doAfter: 0.5
|
||||
- prototype: ProximitySensor
|
||||
icon:
|
||||
sprite: Objects/Misc/proximity_sensor.rsi
|
||||
state: icon
|
||||
name: proximity sensor
|
||||
|
||||
- node: wiredCase
|
||||
entity: LandMineModular
|
||||
@@ -32,6 +37,8 @@
|
||||
completed:
|
||||
- !type:SpawnPrototype
|
||||
prototype: CableApcStack1
|
||||
- !type:SpawnPrototype
|
||||
prototype: ProximitySensor
|
||||
- to: mine
|
||||
steps:
|
||||
- tag: Payload
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
- type: constructionGraph
|
||||
id: HonkBot
|
||||
start: start
|
||||
graph:
|
||||
- node: start
|
||||
edges:
|
||||
- to: bot
|
||||
steps:
|
||||
- prototype: BoxHug
|
||||
icon:
|
||||
sprite: Objects/Storage/boxes.rsi
|
||||
state: box_hug
|
||||
name: box of hugs
|
||||
- prototype: RubberStampClown
|
||||
icon:
|
||||
sprite: Objects/Misc/bureaucracy.rsi
|
||||
state: stamp-clown
|
||||
name: clown's rubber stamp
|
||||
doAfter: 2
|
||||
- prototype: BikeHorn
|
||||
icon:
|
||||
sprite: Objects/Fun/bikehorn.rsi
|
||||
state: icon
|
||||
name: bike horn
|
||||
doAfter: 2
|
||||
- tag: ProximitySensor
|
||||
icon:
|
||||
sprite: Objects/Misc/proximity_sensor.rsi
|
||||
state: icon
|
||||
name: proximity sensor
|
||||
- tag: BorgArm
|
||||
icon:
|
||||
sprite: Mobs/Silicon/drone.rsi
|
||||
state: l_hand
|
||||
name: borg arm
|
||||
doAfter: 2
|
||||
- node: bot
|
||||
entity: MobHonkBot
|
||||
12
Resources/Prototypes/Recipes/Crafting/bots.yml
Normal file
12
Resources/Prototypes/Recipes/Crafting/bots.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- type: construction
|
||||
name: honkbot
|
||||
id: honkbot
|
||||
graph: HonkBot
|
||||
startNode: start
|
||||
targetNode: bot
|
||||
category: Utilities
|
||||
objectType: Item
|
||||
description: This bot honks and slips people.
|
||||
icon:
|
||||
sprite: Mobs/Silicon/Bots/honkbot.rsi
|
||||
state: honkbot
|
||||
32
Resources/Prototypes/Recipes/Lathes/robotics.yml
Normal file
32
Resources/Prototypes/Recipes/Lathes/robotics.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
- type: latheRecipe
|
||||
id: ProximitySensor
|
||||
icon:
|
||||
sprite: Objects/Misc/proximity_sensor.rsi
|
||||
state: icon
|
||||
result: ProximitySensor
|
||||
completetime: 2
|
||||
materials:
|
||||
Steel: 200
|
||||
Glass: 300
|
||||
|
||||
- type: latheRecipe
|
||||
id: LeftArmBorg
|
||||
icon:
|
||||
sprite: Mobs/Silicon/drone.rsi
|
||||
state: "l_hand"
|
||||
result: LeftArmBorg
|
||||
completetime: 2
|
||||
materials:
|
||||
Steel: 70
|
||||
Glass: 25
|
||||
|
||||
- type: latheRecipe
|
||||
id: RightArmBorg
|
||||
icon:
|
||||
sprite: Mobs/Silicon/drone.rsi
|
||||
state: "r_hand"
|
||||
result: RightArmBorg
|
||||
completetime: 2
|
||||
materials:
|
||||
Steel: 70
|
||||
Glass: 25
|
||||
@@ -21,6 +21,9 @@
|
||||
- type: Tag
|
||||
id: BodyBag
|
||||
|
||||
- type: Tag
|
||||
id: BorgArm
|
||||
|
||||
- type: Tag
|
||||
id: BotanyHatchet
|
||||
|
||||
@@ -359,6 +362,9 @@
|
||||
- type: Tag
|
||||
id: Powerdrill
|
||||
|
||||
- type: Tag
|
||||
id: ProximitySensor
|
||||
|
||||
- type: Tag
|
||||
id: PussyWagonKeys
|
||||
|
||||
|
||||
BIN
Resources/Textures/Mobs/Silicon/Bots/honkbot.rsi/honkbot.png
Normal file
BIN
Resources/Textures/Mobs/Silicon/Bots/honkbot.rsi/honkbot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 628 B |
15
Resources/Textures/Mobs/Silicon/Bots/honkbot.rsi/meta.json
Normal file
15
Resources/Textures/Mobs/Silicon/Bots/honkbot.rsi/meta.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"copyright" : "Taken from https://github.com/tgstation/tgstation at https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a",
|
||||
"license" : "CC-BY-SA-3.0",
|
||||
"size" : {
|
||||
"x" : 32,
|
||||
"y" : 32
|
||||
},
|
||||
"states" : [
|
||||
{
|
||||
"directions" : 1,
|
||||
"name" : "honkbot"
|
||||
}
|
||||
],
|
||||
"version" : 1
|
||||
}
|
||||
BIN
Resources/Textures/Objects/Misc/proximity_sensor.rsi/icon.png
Normal file
BIN
Resources/Textures/Objects/Misc/proximity_sensor.rsi/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 B |
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"copyright" : "Taken from https://github.com/tgstation/tgstation at at https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a",
|
||||
"license" : "CC-BY-SA-3.0",
|
||||
"size" : {
|
||||
"x" : 32,
|
||||
"y" : 32
|
||||
},
|
||||
"states" : [
|
||||
{
|
||||
"directions" : 1,
|
||||
"name" : "icon"
|
||||
}
|
||||
],
|
||||
"version" : 1
|
||||
}
|
||||
Reference in New Issue
Block a user