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 7 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
37 changes: 27 additions & 10 deletions Content.Server/Spider/SpiderSystem.cs
Bolper marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,41 @@ 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)
{
Spawn(component.WebPrototype, coords);
result = true;
}
// ADT tweak end
// Spawn web in center
if (!IsTileBlockedByWeb(coords))
{
Spawn(component.WebPrototype, coords);
result = true;
}

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

// 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++)
{
var direction = (DirectionFlag) (1 << i);
coords = transform.Coordinates.Offset(direction.AsDir().ToVec());

if (!IsTileBlockedByWeb(coords))
{
Spawn(component.WebPrototype, coords);
result = true;
}
} // ADT tweak
}

if (result)
Expand Down
3 changes: 3 additions & 0 deletions Content.Shared/Spider/SpiderComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public sealed partial class SpiderComponent : Component
[DataField("webAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string WebAction = "ActionSpiderWeb";

[DataField("smallWeb")]
public bool SmallWeb = false;
Filokini marked this conversation as resolved.
Show resolved Hide resolved

[DataField] public EntityUid? Action;
}

Expand Down
2 changes: 2 additions & 0 deletions Resources/Locale/ru-RU/ADT/prototypes/Actions/spider.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ent-ADTActionSpiderWebLong = Паутина
.desc = Создаёт паутину, которая замедляет вашу добычу.
23 changes: 15 additions & 8 deletions Resources/Prototypes/ADT/Entities/Mobs/NPCs/spiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@
damage: 85
behaviors:
- !type:GibBehavior { }
- type: Spider
smallWeb: true
- type: CanEscapeInventory
baseResistTime: 2
- type: MultiHandedItem
Expand Down Expand Up @@ -426,7 +428,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 +459,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