HAMTR mech (hamster mech) (needs review) (#16393)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
brainfood1183
2023-06-08 07:33:35 +01:00
committed by GitHub
parent 9dbb74b0bb
commit cd7d4be188
56 changed files with 628 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
using Content.Server.Popups;
using Content.Server.Popups;
using Content.Shared.DoAfter;
using Content.Shared.Interaction;
using Content.Shared.Mech.Components;
@@ -40,7 +40,7 @@ public sealed class MechEquipmentSystem : EntitySystem
if (mechComp.EquipmentContainer.ContainedEntities.Count >= mechComp.MaxEquipmentAmount)
return;
if (mechComp.EquipmentWhitelist != null && !mechComp.EquipmentWhitelist.IsValid(uid))
if (mechComp.EquipmentWhitelist != null && !mechComp.EquipmentWhitelist.IsValid(args.Used))
return;
_popup.PopupEntity(Loc.GetString("mech-equipment-begin-install", ("item", uid)), mech);

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Mech.Components;
using Content.Server.Power.Components;
@@ -11,6 +11,7 @@ using Content.Shared.Mech;
using Content.Shared.Mech.Components;
using Content.Shared.Mech.EntitySystems;
using Content.Shared.Movement.Events;
using Content.Shared.Popups;
using Content.Shared.Tools.Components;
using Content.Shared.Verbs;
using Content.Shared.Wires;
@@ -31,6 +32,7 @@ public sealed class MechSystem : SharedMechSystem
[Dependency] private readonly IMapManager _map = default!;
[Dependency] private readonly UserInterfaceSystem _ui = default!;
[Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
private ISawmill _sawmill = default!;
@@ -218,6 +220,12 @@ public sealed class MechSystem : SharedMechSystem
if (args.Cancelled || args.Handled)
return;
if (component.PilotWhitelist != null && !component.PilotWhitelist.IsValid(args.User))
{
_popup.PopupEntity(Loc.GetString("mech-no-enter", ("item", uid)), args.User);
return;
}
TryInsert(uid, args.Args.User, component);
_actionBlocker.UpdateCanMove(uid);

View File

@@ -1,4 +1,4 @@
using Content.Shared.Actions.ActionTypes;
using Content.Shared.Actions.ActionTypes;
using Content.Shared.FixedPoint;
using Content.Shared.Whitelist;
using Robust.Shared.Containers;
@@ -93,6 +93,9 @@ public sealed class MechComponent : Component
[DataField("equipmentWhitelist")]
public EntityWhitelist? EquipmentWhitelist;
[DataField("pilotWhitelist")]
public EntityWhitelist? PilotWhitelist;
/// <summary>
/// A container for storing the equipment entities.
/// </summary>

View File

@@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.ActionBlocker;
@@ -270,7 +270,7 @@ public abstract class SharedMechSystem : EntitySystem
if (component.EquipmentContainer.ContainedEntities.Count >= component.MaxEquipmentAmount)
return;
if (component.EquipmentWhitelist != null && !component.EquipmentWhitelist.IsValid(uid))
if (component.EquipmentWhitelist != null && !component.EquipmentWhitelist.IsValid(toInsert))
return;
equipmentComponent.EquipmentOwner = uid;
@@ -386,7 +386,7 @@ public abstract class SharedMechSystem : EntitySystem
if (!Resolve(uid, ref component))
return false;
return IsEmpty(component) && _actionBlocker.CanMove(toInsert) && HasComp<HandsComponent>(toInsert);
return IsEmpty(component) && _actionBlocker.CanMove(toInsert);
}
/// <summary>

View File

@@ -14,3 +14,5 @@ mech-menu-title = mech control panel
mech-integrity-display = Integrity: {$amount}%
mech-energy-display = Energy: {$amount}%
mech-slot-display = Open Slots: {$amount}
mech-no-enter = You cannot pilot this.

View File

@@ -38,6 +38,7 @@ research-technology-grappling = Grappling
research-technology-abnormal-artifact-manipulation = Abnormal Artifact Manipulation
research-technology-gravity-manipulation = Gravity Manipulation
research-technology-mobile-anomaly-tech = Mobile Anomaly Tech
research-technology-hamtr = HAMTR Mech
research-technology-rped = Rapid Part Exchange
research-technology-super-parts = Super Parts

View File

@@ -2125,6 +2125,7 @@
tags:
- Trash
- CannotSuicide
- Hamster
- type: Respirator
damage:
types:

View File

@@ -485,6 +485,8 @@
- type: Tag
tags:
- CannotSuicide
- Trash
- Hamster
- type: entity
name: Shiva

View File

@@ -81,3 +81,37 @@
- type: GuideHelp
guides:
- Robotics
# HAMTR
- type: entity
id: HamtrCentralElectronics
parent: BaseElectronics
name: HAMTR central control module
description: The electrical control center for the HAMTR mech.
components:
- type: Sprite
sprite: Objects/Misc/module.rsi
state: mainboard
- type: Tag
tags:
- HamtrCentralControlModule
- type: GuideHelp
guides:
- Robotics
- type: entity
id: HamtrPeripheralsElectronics
parent: BaseElectronics
name: HAMTR peripherals control module
description: The electrical peripherals control for the HAMTR mech.
components:
- type: Sprite
sprite: Objects/Misc/module.rsi
state: id_mod
- type: Tag
tags:
- HamtrPeripheralsControlModule
- type: GuideHelp
guides:
- Robotics

View File

@@ -283,3 +283,132 @@
graph: Honker
node: start
defaultTarget: honker
# H.A.M.T.R.
- type: entity
id: BaseHamtrPart
parent: BaseMechPart
abstract: true
components:
- type: Sprite
drawdepth: Items
noRot: false
netsync: false
sprite: Objects/Specific/Mech/hamtr_construction.rsi
- type: entity
id: BaseHamtrPartItem
parent: BaseHamtrPart
abstract: true
components:
- type: Item
size: 50
- type: entity
parent: BaseHamtrPart
id: HamtrHarness
name: HAMTR harness
description: The core of the HAMTR.
components:
- type: Appearance
- type: ItemMapper
mapLayers:
hamtr_l_arm+o:
whitelist:
tags:
- HamtrLArm
hamtr_r_arm+o:
whitelist:
tags:
- HamtrRArm
hamtr_l_leg+o:
whitelist:
tags:
- HamtrLLeg
hamtr_r_leg+o:
whitelist:
tags:
- HamtrRLeg
sprite: Objects/Specific/Mech/hamtr_construction.rsi
- type: ContainerContainer
containers:
mech-assembly-container: !type:Container
- type: MechAssembly
finishedPrototype: HamtrChassis
requiredParts:
HamtrLArm: false
HamtrRArm: false
HamtrLLeg: false
HamtrRLeg: false
- type: Sprite
state: hamtr_harness+o
noRot: true
- type: entity
parent: BaseHamtrPartItem
id: HamtrLArm
name: HAMTR left arm
description: The left arm of the HAMTR. It belongs on the chassis of the mech.
components:
- type: Sprite
state: hamtr_l_arm
- type: Tag
tags:
- HamtrLArm
- type: entity
parent: BaseHamtrPartItem
id: HamtrLLeg
name: HAMTR left leg
description: The left leg of the HAMTR. It belongs on the chassis of the mech.
components:
- type: Sprite
state: hamtr_l_leg
- type: Tag
tags:
- HamtrLLeg
- type: entity
parent: BaseHamtrPartItem
id: HamtrRLeg
name: HAMTR right leg
description: The right leg of the HAMTR. It belongs on the chassis of the mech.
components:
- type: Sprite
state: hamtr_r_leg
- type: Tag
tags:
- HamtrRLeg
- type: entity
parent: BaseHamtrPartItem
id: HamtrRArm
name: HAMTR right arm
description: The right arm of the HAMTR. It belongs on the chassis of the mech.
components:
- type: Sprite
state: hamtr_r_arm
- type: Tag
tags:
- HamtrRArm
- type: entity
id: HamtrChassis
parent: BaseHamtrPart
name: HAMTR chassis
description: An in-progress construction of the HAMTR mech.
components:
- type: Appearance
- type: ContainerContainer
containers:
battery-container: !type:Container
- type: MechAssemblyVisuals
statePrefix: hamtr
- type: Sprite
noRot: true
state: hamtr0
- type: Construction
graph: Hamtr
node: start
defaultTarget: hamtr

View File

@@ -28,6 +28,27 @@
containers:
item-container: !type:Container
- type: entity
id: MechEquipmentGrabberSmall
parent: BaseMechEquipment
name: small hydraulic clamp
description: Gives the mech the ability to grab things and drag them around.
components:
- type: Sprite
state: mecha_clamp_small
- type: MechGrabber
maxContents: 4
grabDelay: 3
grabEnergyDelta: 20
- type: Tag
tags:
- SmallMech
- type: UIFragment
ui: !type:MechGrabberUi
- type: ContainerContainer
containers:
item-container: !type:Container
- type: entity
id: MechEquipmentHorn
parent: BaseMechEquipment

View File

@@ -89,6 +89,9 @@
openState: ripley-open
brokenState: ripley-broken
mechToPilotDamageMultiplier: 0.75
pilotWhitelist:
components:
- HumanoidAppearance
- type: MeleeWeapon
hidden: true
attackRate: 1
@@ -132,6 +135,9 @@
openState: honker-open
brokenState: honker-broken
mechToPilotDamageMultiplier: 0.5
pilotWhitelist:
components:
- HumanoidAppearance
- type: entity
id: MechHonkerBattery
@@ -142,3 +148,54 @@
containers:
mech-battery-slot:
- PowerCellHigh
- type: entity
id: MechHamtr
parent: BaseMech
name: HAMTR
description: "An experimental mech which uses a neuralink to interface directly to a hamsters brain."
components:
- type: Sprite
netsync: false
drawdepth: Mobs
noRot: true
sprite: Objects/Specific/Mech/mecha.rsi
layers:
- map: [ "enum.MechVisualLayers.Base" ]
state: hamtr
- type: FootstepModifier
footstepSoundCollection:
path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
- type: Mech
baseState: hamtr
openState: hamtr-open
brokenState: hamtr-broken
mechToPilotDamageMultiplier: 0.2
maxEquipmentAmount: 2
airtight: true
equipmentWhitelist:
tags:
- SmallMech
pilotWhitelist:
tags:
- Hamster
- type: MeleeWeapon
hidden: true
attackRate: 0.8
damage:
types:
Blunt: 10 #thwack
Structural: 2
- type: MovementSpeedModifier
baseWalkSpeed: 2.4
baseSprintSpeed: 3.7
- type: entity
id: MechHamtrBattery
parent: MechHamtr
suffix: Battery
components:
- type: ContainerFill
containers:
mech-battery-slot:
- PowerCellHigh

View File

@@ -320,6 +320,8 @@
- HonkerCentralElectronics
- HonkerPeripheralsElectronics
- HonkerTargetingElectronics
- HamtrCentralElectronics
- HamtrPeripheralsElectronics
- GeneratorPlasmaMachineCircuitboard
- GeneratorUraniumMachineCircuitboard
- WallmountGeneratorElectronics
@@ -386,6 +388,12 @@
- HonkerLLeg
- HonkerRLeg
- MechEquipmentHorn
- MechEquipmentGrabberSmall
- HamtrHarness
- HamtrLArm
- HamtrRArm
- HamtrLLeg
- HamtrRLeg
- type: MaterialStorage
whitelist:
tags:

View File

@@ -0,0 +1,125 @@
- type: constructionGraph
id: Hamtr
start: start
graph:
- node: start
edges:
- to: hamtr
steps:
- tool: Anchoring
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 1
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 2
- material: Cable
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 3
- tool: Cutting
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 4
- tag: HamtrCentralControlModule
name: HAMTR central control module
icon:
sprite: "Objects/Misc/module.rsi"
state: "mainboard"
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 5
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 6
- tag: HamtrPeripheralsControlModule
name: HAMTR peripherals control module
icon:
sprite: "Objects/Misc/module.rsi"
state: id_mod
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 7
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 12
#i omitted the steps involving inserting machine parts because
#currently mechs don't support upgrading. add them back in once that's squared away.
- component: PowerCell
name: power cell
store: battery-container
icon:
sprite: Objects/Power/power_cells.rsi
state: small
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 13
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 14
- material: Steel
amount: 5
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 15
- tool: Anchoring
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 16
- tool: Welding
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 17
- material: MetalRod
amount: 10
completed:
- !type:VisualizerDataInt
key: "enum.MechAssemblyVisuals.State"
data: 18
- tool: Welding
doAfter: 1
- node: hamtr
actions:
- !type:BuildMech
mechPrototype: MechHamtr

View File

@@ -378,6 +378,24 @@
Glass: 900
Bananium: 100
- type: latheRecipe
id: HamtrCentralElectronics
result: HamtrCentralElectronics
completetime: 4
materials:
Steel: 100
Glass: 900
Gold: 100
- type: latheRecipe
id: HamtrPeripheralsElectronics
result: HamtrPeripheralsElectronics
completetime: 4
materials:
Steel: 100
Glass: 900
Gold: 100
# Power
- type: latheRecipe
id: APCElectronics

View File

@@ -100,3 +100,52 @@
materials:
Steel: 500
Bananium: 200
# HAMTR
- type: latheRecipe
id: HamtrHarness
result: HamtrHarness
completetime: 10
materials:
Steel: 1200
Glass: 1000
- type: latheRecipe
id: HamtrLArm
result: HamtrLArm
completetime: 10
materials:
Steel: 800
Glass: 600
- type: latheRecipe
id: HamtrLLeg
result: HamtrLLeg
completetime: 10
materials:
Steel: 800
Glass: 600
- type: latheRecipe
id: HamtrRLeg
result: HamtrRLeg
completetime: 10
materials:
Steel: 800
Glass: 600
- type: latheRecipe
id: HamtrRArm
result: HamtrRArm
completetime: 10
materials:
Steel: 800
Glass: 600
- type: latheRecipe
id: MechEquipmentGrabberSmall
result: MechEquipmentGrabberSmall
completetime: 10
materials:
Steel: 400
Plastic: 100

View File

@@ -145,6 +145,26 @@
recipeUnlocks:
- RPED
- type: technology
id: HamtrMechTech
name: research-technology-hamtr
icon:
sprite: Objects/Specific/Mech/mecha.rsi
state: hamtr
discipline: Experimental
tier: 2
cost: 8000
recipeUnlocks:
- HamtrHarness
- HamtrLArm
- HamtrRArm
- HamtrLLeg
- HamtrRLeg
- HamtrCentralElectronics
- HamtrPeripheralsElectronics
- MechEquipmentGrabberSmall
# Tier 3
- type: technology

View File

@@ -323,6 +323,28 @@
- type: Tag
id: GuideEmbeded
- type: Tag
id: Hamster
- type: Tag
id: HamtrCentralControlModule
- type: Tag
id: HamtrPeripheralsControlModule
- type: Tag
id: HamtrLArm
- type: Tag
id: HamtrLLeg
- type: Tag
id: HamtrRLeg
- type: Tag
id: HamtrRArm
- type: Tag
id: Handcuffs
@@ -640,6 +662,9 @@
- type: Tag
id: SkeletonMotorcycleKeys
- type: Tag
id: SmallMech
- type: Tag
id: Smokable

View File

@@ -34,6 +34,7 @@
<Box>
<GuideEntityEmbed Entity="MechRipley" Caption="Ripley APLU"/>
<GuideEntityEmbed Entity="MechHonker" Caption="H.O.N.K."/>
<GuideEntityEmbed Entity="MechHamtr" Caption="HAMTR"/>
</Box>
[color=#a4885c]Mechs[/color] are giant behemoths of metal designed to carry out a variety of functions respective to their model. They are piloted by players and require power cells to function.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,101 @@
{
"copyright" : "Made by brainfood1183 (github) for ss14",
"license" : "CC-BY-SA-3.0",
"version": 1,
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "hamtr_chassis"
},
{
"name": "hamtr_harness"
},
{
"name": "hamtr_harness+o"
},
{
"name": "hamtr_r_arm"
},
{
"name": "hamtr_r_arm+o"
},
{
"name": "hamtr_l_arm"
},
{
"name": "hamtr_l_arm+o"
},
{
"name": "hamtr_r_leg"
},
{
"name": "hamtr_r_leg+o"
},
{
"name": "hamtr_l_leg"
},
{
"name": "hamtr_l_leg+o"
},
{
"name": "hamtr0"
},
{
"name": "hamtr1"
},
{
"name": "hamtr2"
},
{
"name": "hamtr3"
},
{
"name": "hamtr4"
},
{
"name": "hamtr5"
},
{
"name": "hamtr6"
},
{
"name": "hamtr7"
},
{
"name": "hamtr8"
},
{
"name": "hamtr9"
},
{
"name": "hamtr10"
},
{
"name": "hamtr11"
},
{
"name": "hamtr12"
},
{
"name": "hamtr13"
},
{
"name": "hamtr14"
},
{
"name": "hamtr15"
},
{
"name": "hamtr16"
},
{
"name": "hamtr17"
},
{
"name": "hamtr18"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -1,5 +1,5 @@
{
"copyright" : "Taken from https://github.com/tgstation/tgstation at at https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a",
"copyright" : "Taken from https://github.com/tgstation/tgstation at at https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a, hamtr made by brainfood1183 (github)",
"license" : "CC-BY-SA-3.0",
"version": 1,
"size": {
@@ -249,6 +249,16 @@
{
"name": "odysseus-broken"
},
{
"name": "hamtr",
"directions": 4
},
{
"name": "hamtr-open"
},
{
"name": "hamtr-broken"
},
{
"name": "firefighter",
"directions": 4

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -64,6 +64,9 @@
{
"name": "mecha_clamp"
},
{
"name": "mecha_clamp_small"
},
{
"name": "mecha_wire"
},