From a6fc5e6aceecdfb9f86ab4028c5f1181f2e14513 Mon Sep 17 00:00:00 2001 From: Nim <128169402+Nimfar11@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:01:13 +0300 Subject: [PATCH] Rabbit (#486) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rabbit * meat * гладить * тоже гладить --- .../interaction-popup-component.ftl | 7 ++ .../interaction-popup-component.ftl | 9 +++ .../_CP14/Entities/Markers/Spawners/mobs.yml | 15 ++++ .../_CP14/Entities/Mobs/NPC/animals.yml | 76 ++++++++++++++++++ Resources/Prototypes/_CP14/tags.yml | 3 + .../_CP14/Mobs/Animals/rabbit.rsi/meta.json | 21 +++++ .../_CP14/Mobs/Animals/rabbit.rsi/rabbit.png | Bin 0 -> 1170 bytes .../Mobs/Animals/rabbit.rsi/rabbit_dead.png | Bin 0 -> 461 bytes 8 files changed, 131 insertions(+) create mode 100644 Resources/Locale/en-US/_CP14/interaction/interaction-popup-component.ftl create mode 100644 Resources/Locale/ru-RU/_CP14/interaction/interaction-popup-component.ftl create mode 100644 Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml create mode 100644 Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/meta.json create mode 100644 Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/rabbit.png create mode 100644 Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/rabbit_dead.png diff --git a/Resources/Locale/en-US/_CP14/interaction/interaction-popup-component.ftl b/Resources/Locale/en-US/_CP14/interaction/interaction-popup-component.ftl new file mode 100644 index 0000000000..767a35b747 --- /dev/null +++ b/Resources/Locale/en-US/_CP14/interaction/interaction-popup-component.ftl @@ -0,0 +1,7 @@ +### Interaction Popup component + +## Petting animals + +cp14-petting-success-rabbit = You pet {THE($target)} on {POSS-ADJ($target)} fluffy little head. + +cp14-petting-failure-rabbit = You reach out to pet {THE($target)}, but {SUBJECT($target)} {CONJUGATE-BASIC($target, "attempt", "attempts")} to bite your finger and only your quick reflexes save you from an almost fatal injury. diff --git a/Resources/Locale/ru-RU/_CP14/interaction/interaction-popup-component.ftl b/Resources/Locale/ru-RU/_CP14/interaction/interaction-popup-component.ftl new file mode 100644 index 0000000000..61a488f973 --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/interaction/interaction-popup-component.ftl @@ -0,0 +1,9 @@ +### Interaction Popup component + + +## Petting animals + + +cp14-petting-success-rabbit = Вы гладите { $target } по { POSS-ADJ($target) } маленькой пушистой голове. + +cp14-petting-failure-rabbit = Вы тянетесь погладить { $target }, но { $target } пытается укусить вас за палец, и только ваши молниеносные рефлексы спасают вас от почти смертельной травмы. diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml index 65eb09f35a..a5c3230da1 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml @@ -12,3 +12,18 @@ - type: ConditionalSpawner prototypes: - CP14MobUndeadZombie + +- type: entity + name: rabbit spawner + id: CP14SpawnMobRabbit + parent: MarkerBase + components: + - type: Sprite + layers: + - sprite: Markers/cross.rsi + state: green + - sprite: _CP14/Mobs/Animals/rabbit.rsi + state: rabbit + - type: ConditionalSpawner + prototypes: + - CP14MobRabbit diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml new file mode 100644 index 0000000000..e9da64890c --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/animals.yml @@ -0,0 +1,76 @@ +- type: entity + id: CP14MobRabbit + parent: SimpleMobBase + name: rabbit + description: A little fluffy rabbit. I could eat it. + components: + - type: HTN + rootTask: + task: RuminantCompound + - type: NpcFactionMember + factions: + - CP14PeacefulAnimals + - type: Sprite + drawdepth: Mobs + layers: + - map: ["enum.DamageStateVisualLayers.Base"] + sprite: _CP14/Mobs/Animals/rabbit.rsi + state: rabbit + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.35 + density: 8 + mask: + - MobMask + layer: + - MobLayer + - type: Tag + tags: + - CP14Rabbit + - type: Reproductive + partnerWhitelist: + tags: + - CP14Rabbit + offspring: + - id: CP14MobRabbit + maxAmount: 2 + - type: ReproductivePartner + - type: Speech + speechVerb: SmallMob + - type: Appearance + - type: MobThresholds + thresholds: + 0: Alive + 30: Dead + - type: CombatMode + - type: MeleeWeapon + angle: 0 + animation: WeaponArcBite + damage: + types: + Piercing: 1 + - type: MovementSpeedModifier + baseWalkSpeed : 4 + baseSprintSpeed : 5 + - type: DamageStateVisuals + states: + Alive: + Base: rabbit + Dead: + Base: rabbit_dead + - type: Butcherable + spawned: + - id: CP14FoodMeatLamb # to replace the rabbit meat + amount: 1 + - type: Bloodstream + bloodMaxVolume: 50 + - type: InteractionPopup + successChance: 0.5 + interactSuccessString: cp14-petting-success-rabbit + interactFailureString: cp14-petting-failure-rabbit + interactSuccessSpawn: EffectHearts + interactSuccessSound: + path: /Audio/Animals/fox_squeak.ogg diff --git a/Resources/Prototypes/_CP14/tags.yml b/Resources/Prototypes/_CP14/tags.yml index 442a162530..4f6cf5c106 100644 --- a/Resources/Prototypes/_CP14/tags.yml +++ b/Resources/Prototypes/_CP14/tags.yml @@ -48,3 +48,6 @@ - type: Tag id: CP14RecipeMeltingFurnace + +- type: Tag + id: CP14Rabbit diff --git a/Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/meta.json b/Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/meta.json new file mode 100644 index 0000000000..79c61c86c9 --- /dev/null +++ b/Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/meta.json @@ -0,0 +1,21 @@ +{ + "version": 1, + "size": + { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Created by Pelemonk (Github) for CrystallPunk 14", + "states": + [ + { + "name": "rabbit", + "directions": 4 + }, + { + "name": "rabbit_dead", + "directions": 1 + } + ] +} diff --git a/Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/rabbit.png b/Resources/Textures/_CP14/Mobs/Animals/rabbit.rsi/rabbit.png new file mode 100644 index 0000000000000000000000000000000000000000..8991e8f10c1489b13b83d279fdfb87fd7eabeee6 GIT binary patch literal 1170 zcmV;D1a13?P)Px(Oi4sRRCt{2nn7qAM-+yCg&d4dMg)?o?mFnu;JU4SX=p=}_T;m1A!=;mlZ!6` z*D0iem>vv;RA9LRUqWaPDM_k8Ov$PEP+S~KMLkriDv9(Uv=e6&fmzhc;zQ~5puEwp zB-=adT~p|MAdq%P^WOaPb{F>jfI^{AC=?2XLZMJ76bgmnU>@GR&1H`N*K;@_`-e)o zBm({QqRuIBrCgGo$}{#H2(LLv3s9>YsFX`sPA2$o_m;4nOz=v%gj(H@4t^BuA{=D{ zLb89@Oi%M$zwBWo78S>8bp!M74&cLU_oV0Z%4T}Hr`)~7m#Tox^fYgpmRS74r`G@g zBe5u&rqws8AfP-7#j5ytjqh493i{;lApo7l13>2MGyve-$sL@IgafSv%0p+3o^!+6 zS?Tz$D}aLTcdggz26Way)3n@9Da~ejniq;y$KvNx>*Bl48YmR2QkCFZ0G%}uyEFp; z$bR#!;~f2tU7G2;Gk(!DEtK?@_&uLmhh-WL5lVVXY7?YNwXl)puMNG5aHM??c=G$N zIQRBD007H0@O0-H&QHVxEB~1f&hoM0K>(e_6X8e{x2{hCXp3<7=Z331TvtG9cANvi zb}kRgG+>zq7-Qo5b}sK27c?X|06g7!<`6>$S1P4u$9YL_f$i>LWiD7#kkM^*hBtDuDzp=`AeW_(~kleEB)3I%HzI8hCN^31I&(Vt)K-3$?m|`w!MbS1wQSk(j>kSii7WApi`G zUH|}*0|2l}?&atfQnTaSjR?}oE+-S59)F(19?Gp$ho~yUQ`_bJeJPwnDJ%%5?gdMp5YV-Xge|5{s4a$d>D2??mt)$*Px$he`#6wDBoc{4B9Z)e z9L*fc>}-kqyDZDA8;;acTnq&?0A^zgP0hC~5DkaKfZuCA=kyW-elJ4-t!0UZ!_ja^ zq>~Ap?r(whwX{V7puhbYkJ|~rWMcPMLJbeUK3t00aDeHlae8~YNhH&Zbm#!6iVu(5 zX-a&Qb2iHaG@= zq9~T&!|hD~G}T46P(f2&79mY_p(;KiD@V3DwhbfP*!00Z)$C