Skip to content

Commit

Permalink
[TWEAK] Еще немного с пауками (#786)
Browse files Browse the repository at this point in the history
Увеличен кулдаун спавна паутины у маленьких паучков и хонко паукам
вернул старую кровь и добавил ввод "Смеха" при укусе
Также в компонент Spider добавлен переключатель уменьшенной вариации
паутины. SmallWeb
:cl:
- tweak: Увеличена перезарядка спавна паутины у маленьких паучков
- tweak: Попробовал увеличить частоту спавна редких пауков, они
получились настолько редкими, что их вообще не было видно.
- fix: Хонко-пауки снова имеют в качестве крови "Смех" и вводят его при
укусе.
  • Loading branch information
Filokini authored Nov 22, 2024
1 parent 96c575e commit c09f1ff
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 23 deletions.
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;
// 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

0 comments on commit c09f1ff

Please sign in to comment.