--- /dev/null
+using Content.Shared.Explosion.Components.OnTrigger;
+using Content.Shared.Explosion.EntitySystems;
+using Content.Shared.RepulseAttract;
+using Content.Shared.Timing;
+
+namespace Content.Server.Explosion.EntitySystems;
+
+public sealed class RepulseAttractOnTriggerSystem : SharedRepulseAttractOnTriggerSystem
+{
+ [Dependency] private readonly RepulseAttractSystem _repulse = default!;
+ [Dependency] private readonly SharedTransformSystem _transform = default!;
+ [Dependency] private readonly UseDelaySystem _delay = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ SubscribeLocalEvent<SharedRepulseAttractOnTriggerComponent, TriggerEvent>(OnTrigger);
+ }
+
+ private void OnTrigger(Entity<SharedRepulseAttractOnTriggerComponent> ent, ref TriggerEvent args)
+ {
+ if (_delay.IsDelayed(ent.Owner))
+ return;
+
+ var position = _transform.GetMapCoordinates(ent);
+ _repulse.TryRepulseAttract(position, args.User, ent.Comp.Speed, ent.Comp.Range, ent.Comp.Whitelist, ent.Comp.CollisionMask);
+ }
+}
--- /dev/null
+using Content.Shared.Physics;
+using Content.Shared.Whitelist;
+
+namespace Content.Shared.Explosion.Components.OnTrigger;
+
+/// <summary>
+/// Generates a gravity pulse/repulse using the RepulseAttractComponent when the entity is triggered
+/// </summary>
+[RegisterComponent]
+public sealed partial class SharedRepulseAttractOnTriggerComponent : Component
+{
+ /// <summary>
+ /// How fast should the Repulsion/Attraction be?
+ /// A positive value will repulse objects, a negative value will attract
+ /// </summary>
+ [DataField]
+ public float Speed;
+
+ /// <summary>
+ /// How close do the entities need to be?
+ /// </summary>
+ [DataField]
+ public float Range;
+
+ /// <summary>
+ /// What kind of entities should this effect apply to?
+ /// </summary>
+ [DataField]
+ public EntityWhitelist? Whitelist;
+
+ /// <summary>
+ /// What collision layers should be excluded?
+ /// The default excludes ghost mobs, revenants, the AI camera etc.
+ /// </summary>
+ [DataField]
+ public CollisionGroup CollisionMask = CollisionGroup.GhostImpassable;
+}
--- /dev/null
+namespace Content.Shared.Explosion.EntitySystems;
+
+public abstract class SharedRepulseAttractOnTriggerSystem : EntitySystem;
copyright: "Created by xprospero for ss14"
source: "https://github.com/space-wizards/space-station-14/blob/master/Resources/Audio/Items/Toys/rubber_chicken_3.ogg"
+- files: ["pushHornHonk.ogg"]
+ license: "CC0-1.0"
+ copyright: "Created by Matislav, modified by Thinbug"
+ source: "https://freesound.org/s/564697/"
+
+- files: ["pushHornFloor.ogg"]
+ license: "CC0-1.0"
+ copyright: "Created by Dedshot_Dyzek"
+ source: "https://freesound.org/people/Dedshot_Dyzek/sounds/769792/"
+
- files: ["arf.ogg"]
license: "CC0-1.0"
copyright: "Created by Orsoniks, from the game Casualties Unknown"
research-technology-honk-mech = H.O.N.K. Mech
research-technology-advanced-spray = Advanced Spray
research-technology-bluespace-cargo-transport = Bluespace Cargo Transport
+research-technology-clowning-utilities = Clowning Utilities
research-technology-quantum-fiber-weaving = Quantum Fiber Weaving
research-technology-bluespace-chemistry = Bluespace Chemistry
--- /dev/null
+- type: entity
+ id: EffectGravityPulse
+ categories: [ HideSpawnMenu ]
+ components:
+ - type: TimedDespawn
+ lifetime: 0.32
+ - type: Sprite
+ drawdepth: Effects
+ noRot: true
+ layers:
+ - shader: unshaded
+ map: ["enum.EffectLayers.Unshaded"]
+ sprite: Effects/gravityPulse.rsi
+ state: gravityPulse
+ - type: EffectVisuals
+ - type: Tag
+ tags:
+ - HideContextMenu
+ - type: AnimationPlayer
- type: Construction
graph: BananiumHorn
node: bananiumHorn
+
+- type: entity
+ parent: BaseItem
+ id: PushHorn
+ name: push horn
+ description: This powerful bikehorn is sure to blast frowns away.
+ components:
+ - type: Sprite
+ sprite: Objects/Fun/push_horn.rsi
+ state: icon
+ - type: Item
+ sprite: Objects/Fun/push_horn.rsi
+ size: Tiny
+ - type: Clothing
+ sprite: Objects/Fun/push_horn.rsi
+ slots: [Belt]
+ quickEquip: false
+ - type: EmitSoundOnUse
+ handle: false
+ sound: "/Audio/Items/Toys/pushHornHonk.ogg"
+ - type: EmitSoundOnLand
+ sound: "/Audio/Items/Toys/pushHornFloor.ogg"
+ - type: UseDelay
+ delay: 6
+ - type: TriggerOnUse
+ - type: RepulseAttractOnTrigger
+ speed: 50
+ range: 2
+ whitelist:
+ components:
+ - MobMover
+ - Item
+ - type: SpawnOnTrigger
+ proto: EffectGravityPulse
id: Instruments
recipes:
- SynthesizerInstrument
+ - PushHorn
- type: latheRecipePack
id: ServiceBoards
Plastic: 300
Glass: 100
+- type: latheRecipe
+ id: PushHorn
+ result: PushHorn
+ completetime: 5
+ materials:
+ Steel: 500
+ Plastic: 500
+ Plasma: 200
+
- type: latheRecipe
parent: BaseToolRecipe
id: NodeScanner
recipeUnlocks:
- CargoTelepadMachineCircuitboard
+- type: technology
+ id: PushHorn
+ name: research-technology-clowning-utilities
+ icon:
+ sprite: Objects/Fun/push_horn.rsi
+ state: icon
+ discipline: CivilianServices
+ tier: 2
+ cost: 4000
+ recipeUnlocks:
+ - PushHorn
+
# Tier 3
- type: technology
--- /dev/null
+{
+ "version": 1,
+ "license": "CC0-1.0",
+ "copyright": "Made by Thinbug for ss14",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "gravityPulse",
+ "delays": [
+ [
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02,
+ 0.02
+ ]
+ ]
+ }
+ ]
+}
--- /dev/null
+{
+ "version": 1,
+ "license": "CC0-1.0",
+ "copyright": "Made by Thinbug for ss14 :33",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon"
+ },
+ {
+ "name": "equipped-BELT",
+ "directions": 4
+ },
+ {
+ "name": "inhand-left",
+ "directions": 4
+ },
+ {
+ "name": "inhand-right",
+ "directions": 4
+ }
+ ]
+}