* code
* cant be toggled
* can't unwrench
* no rotating it
* comments
* change from PreventToggle to CanToggle
* commentary
* Update Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
[Access(typeof(ThrusterSystem))]
public sealed partial class ThrusterComponent : Component
{
+ /// <summary>
+ /// If the thruster can be toggled on or off via interaction
+ /// </summary>
+ [DataField]
+ public bool CanToggle = true;
+
/// <summary>
/// Whether the thruster has been force to be enabled / disabled (e.g. VV, interaction, etc.)
/// </summary>
private void OnActivateThruster(EntityUid uid, ThrusterComponent component, ActivateInWorldEvent args)
{
- if (args.Handled || !args.Complex)
+ if (args.Handled || !args.Complex || !component.CanToggle)
return;
component.Enabled ^= true;
parent: Thruster
id: ThrusterXenoborg
components:
+ # temporary solution until thruster rework
+ - type: Thruster
+ canToggle: false # no turning it off by just clicking it
+ - type: Anchorable
+ flags:
+ - Anchorable # no unwrenching it
+ - type: Rotatable
+ rotateWhileAnchored: false # no rotating it backwards so it doesn't face space
- type: Sprite
sprite: Structures/Shuttles/xenoborg_thruster.rsi