Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TWEAK] Еще немного с пауками #786

Merged
merged 23 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions Content.Server/Spider/SpiderSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,43 @@ private void OnSpawnNet(EntityUid uid, SpiderComponent component, SpiderWebActio
// TODO generic way to get certain coordinates

var result = false;
// Spawn web in center
if (!IsTileBlockedByWeb(coords))
// ADT tweak start
// Spawn small web if there is a small spider
if (component.SmallWeb == true)
// ADT tweak end
{
Spawn(component.WebPrototype, coords);
result = true;
// ADT tweak start
// Spawn web in center
if (!IsTileBlockedByWeb(coords))
{
Spawn(component.WebPrototype, coords);
result = true;
}
// ADT tweak end
}

// Spawn web in other directions
for (var i = 0; i < 4; i++)
else // ADT tweak
{
var direction = (DirectionFlag) (1 << i);
coords = transform.Coordinates.Offset(direction.AsDir().ToVec());

// Spawn web in center ADT tweak
if (!IsTileBlockedByWeb(coords))
{
Spawn(component.WebPrototype, coords);
result = true;
}
}
// ADT tweak start
// Spawn web in other directions
for (var i = 0; i < 4; i++)
{
var direction = (DirectionFlag) (1 << i);
coords = transform.Coordinates.Offset(direction.AsDir().ToVec());

if (!IsTileBlockedByWeb(coords))
{
Spawn(component.WebPrototype, coords);
result = true;
}
}
}
// ADT tweak end
if (result)
{
_popup.PopupEntity(Loc.GetString("spider-web-action-success"), args.Performer, args.Performer);
Expand Down
5 changes: 5 additions & 0 deletions Content.Shared/Spider/SpiderComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public sealed partial class SpiderComponent : Component
[DataField("webAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string WebAction = "ActionSpiderWeb";

// ADT tweak start при true ставит паутину размером с один тайл
[DataField("smallWeb")]
public bool SmallWeb = false;
Filokini marked this conversation as resolved.
Show resolved Hide resolved
// ADT tweak end

[DataField] public EntityUid? Action;
}

Expand Down
29 changes: 21 additions & 8 deletions Resources/Prototypes/ADT/Entities/Mobs/NPCs/spiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
types:
Piercing: 6
- type: MobState
- type: ReplacementAccent
accent: xeno
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-tarantula
Expand Down Expand Up @@ -371,6 +373,8 @@
damage: 85
behaviors:
- !type:GibBehavior { }
- type: Spider
smallWeb: true
- type: CanEscapeInventory
baseResistTime: 2
- type: MultiHandedItem
Expand Down Expand Up @@ -401,6 +405,10 @@
damage:
types:
Piercing: 3.8
- type: Prying
pryPowered: false
force: false
speedModifier: 0.1
- type: SolutionContainerManager
solutions:
melee:
Expand All @@ -426,7 +434,7 @@
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
- map: ["enum.DamageStateVisualLayers.Base"]
state: clown
sprite: Mobs/Animals/clownspider.rsi
- type: Butcherable
Expand Down Expand Up @@ -457,19 +465,24 @@
path: /Audio/Effects/bite.ogg
damage:
types:
Piercing: 8
Piercing: 9
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepClownFast
- type: Speech
speechVerb: Cluwne
- type: Bloodstream
bloodMaxVolume: 150
bloodReagent: Laughter
- type: SolutionContainerManager
solutions:
melee:
reagents:
- ReagentId: Toxin
Quantity: 50
- ReagentId: Laughter
Quantity: 90
- type: MeleeChemicalInjector
transferAmount: 0.75
transferAmount: 1
solution: melee
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepClownFast
- type: NpcFactionMember
factions:
- Xeno
Expand Down
8 changes: 4 additions & 4 deletions Resources/Prototypes/GameRules/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,13 @@
# - id: MobGiantSpiderAngry
# prob: 0.05
- id: ADTMobHunterSpiderAngry
prob: 0.025
prob: 0.02
- id: ADTMobGuardSpiderAngry
prob: 0.0225
prob: 0.02
- id: ADTMobTarantulaSpiderAngry
prob: 0.00125
prob: 0.005
- id: ADTMobViperSpiderAngry
prob: 0.00125
prob: 0.005
# ADT tweak end Разные пауки

- type: entity
Expand Down
Loading