From 196782774b0c45351f92d6bdcbd81a71eb526255 Mon Sep 17 00:00:00 2001 From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Mon, 16 Dec 2024 04:33:34 -0800 Subject: [PATCH] Add generator scrap (Plasma / uranium scrap) (#32198) * First commit * Forgot the shading! * tweaked values * sprite update * Radiation --- .../Spawners/Random/Salvage/tables_loot.yml | 18 +++ .../Entities/Objects/Materials/scrap.yml | 153 ++++++++++++++++++ .../Scrap/generator.rsi/generator_frame.png | Bin 0 -> 393 bytes .../Materials/Scrap/generator.rsi/meta.json | 57 +++++++ .../Materials/Scrap/generator.rsi/nothing.png | Bin 0 -> 102 bytes .../generator.rsi/old_generator_plasma.png | Bin 0 -> 876 bytes .../old_generator_plasma_fuel_leak.png | Bin 0 -> 471 bytes .../Scrap/generator.rsi/rad_dripping.png | Bin 0 -> 433 bytes .../Scrap/generator.rsi/rad_outline.png | Bin 0 -> 323 bytes .../Materials/Scrap/generator.rsi/red_x.png | Bin 0 -> 171 bytes .../Scrap/generator.rsi/uranium_generator.png | Bin 0 -> 729 bytes .../uranium_generator_fuel_tank.png | Bin 0 -> 318 bytes 12 files changed, 228 insertions(+) create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma_fuel_leak.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator.png create mode 100644 Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml index b74a80c39d4a09..943b906560301f 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/Salvage/tables_loot.yml @@ -49,6 +49,8 @@ - id: SheetSteel10 - id: SheetGlass10 - id: SheetPlastic10 + - id: ScrapGeneratorFuelTank + weight: 0.5 - id: PartRodMetal10 weight: 0.33 - id: MaterialWoodPlank10 @@ -64,6 +66,9 @@ id: SalvageScrapLarge table: !type:GroupSelector children: + - !type:NestedSelector + tableId: RandomGeneratorTable + weight: 2 - id: ScrapAirlock1 - id: ScrapCloset - id: ScrapFirelock1 @@ -250,3 +255,16 @@ children: - id: JetpackBlueFilled - id: JetpackBlackFilled + +- type: entityTable + id: RandomGeneratorTable + table: !type:GroupSelector + children: + - id: ScrapGeneratorPlasmaLeaking + - id: ScrapGeneratorUraniumLeaking + - id: ScrapGeneratorPlasma + weight: 0.5 + - id: ScrapGeneratorUranium + weight: 0.5 + - id: ScrapGeneratorFrame + weight: 0.25 diff --git a/Resources/Prototypes/Entities/Objects/Materials/scrap.yml b/Resources/Prototypes/Entities/Objects/Materials/scrap.yml index 6530e3b17013d7..734111af6dc889 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/scrap.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/scrap.yml @@ -26,6 +26,46 @@ tags: - Recyclable +- type: entity + parent: BaseStructure + id: BaseScrapLarge + abstract: true + name: scrap + description: Worthless junk. You could probably get some materials out of it though. + suffix: Scrap + components: + - type: InteractionOutline + - type: Damageable + damageContainer: Inorganic + damageModifierSet: FlimsyMetallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 150 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Tag + tags: + - Recyclable + - type: Transform + anchored: False + noRot: true + - type: Physics + bodyType: Dynamic + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.40,-0.40,0.40,0.40" + density: 200 + mask: + - MachineMask + layer: + - MachineLayer + - type: entity parent: BaseScrap id: ScrapSteel @@ -404,5 +444,118 @@ Glass: 500 # 5 sheets Plastic: 100 # 1 sheet +- type: entity + parent: BaseScrapLarge + id: ScrapGeneratorPlasmaLeaking + name: leaking P.A.C.M.A.N. generator + description: An old looking P.A.C.M.A.N. generator whos plasma tanks started leaking. + components: + - type: Sprite + sprite: Objects/Materials/Scrap/generator.rsi + snapCardinals: true + layers: + - state: old_generator_plasma + - state: old_generator_plasma_fuel_leak + - type: PhysicalComposition + materialComposition: + Steel: 4000 # 40 sheets + Plasma: 2500 # 25 sheets + Plastic: 500 # 5 sheets + +- type: entity + parent: BaseScrapLarge + id: ScrapGeneratorPlasma + name: old P.A.C.M.A.N. generator + description: An old looking P.A.C.M.A.N. generator. It's in very poor condition and non functional. + components: + - type: Sprite + sprite: Objects/Materials/Scrap/generator.rsi + layers: + - state: old_generator_plasma + - type: PhysicalComposition + materialComposition: + Steel: 4000 # 40 sheets + Plasma: 1000 # 10 sheets + Plastic: 500 # 5 sheets + +- type: entity + parent: BaseScrapLarge + id: ScrapGeneratorUraniumLeaking + name: leaking S.U.P.E.R.P.A.C.M.A.N. generator + description: A S.U.P.E.R.P.A.C.M.A.N. generator that appears to have had some kind of catastrophic failure. Its leaking uranium. + components: + - type: Sprite + sprite: Objects/Materials/Scrap/generator.rsi + layers: + - state: uranium_generator + - map: [ "extra" ] + - state: rad_dripping + shader: unshaded + - state: rad_outline + shader: unshaded + - type: RandomSprite + available: + - extra: + red_x: "" + nothing: "" + - type: MultiHandedItem + - type: PhysicalComposition + materialComposition: + Steel: 4000 # 40 sheets + Uranium: 2500 # 25 sheets + Plastic: 500 # 5 sheets + - type: RadiationSource + intensity: 1.0 + +- type: entity + parent: BaseScrapLarge + id: ScrapGeneratorUranium + name: destroyed S.U.P.E.R.P.A.C.M.A.N. generator + description: A S.U.P.E.R.P.A.C.M.A.N. generator that appears to have had some kind of catastrophic failure. + components: + - type: Sprite + sprite: Objects/Materials/Scrap/generator.rsi + layers: + - state: uranium_generator + - map: [ "extra" ] + - type: RandomSprite + available: + - extra: + red_x: "" + nothing: "" + - type: PhysicalComposition + materialComposition: + Steel: 4000 # 40 sheets + Uranium: 1000 # 10 sheets + Plastic: 500 # 5 sheets + - type: RadiationSource + intensity: 0.5 +- type: entity + parent: BaseScrapLarge + id: ScrapGeneratorFrame + name: generator frame + description: A frame of a P.A.C.M.A.N. or S.U.P.E.R.P.A.C.M.A.N. type generator. Where is the rest of it? + components: + - type: Sprite + sprite: Objects/Materials/Scrap/generator.rsi + layers: + - state: generator_frame + - type: PhysicalComposition + materialComposition: + Steel: 1500 # 15 sheets +- type: entity + parent: BaseScrap + id: ScrapGeneratorFuelTank + name: fuel tank + description: A fuel tank from a S.U.P.E.R.P.A.C.M.A.N. type generator. The gauge indicates its got a little fuel left. + components: + - type: Sprite + sprite: Objects/Materials/Scrap/generator.rsi + layers: + - state: uranium_generator_fuel_tank + - type: PhysicalComposition + materialComposition: + Steel: 200 # 2 sheets + Uranium: 500 # 5 sheets diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/generator_frame.png new file mode 100644 index 0000000000000000000000000000000000000000..0914769086d51f18b04057d4c1c9a2cd80cd58f6 GIT binary patch literal 393 zcmV;40e1e0P)ylhsK#JGq7sutPC4ItkJ_@{N3tqxM{Sj|7^x zTyhEbKJWW}Bopb`CO!L?5uj5bNs^YS$n#u96_*bKkfy0*StgnQ^nqaMrx$=Yj-@Dy z4&wL#Ab(kwN2~w}eb_aiIhyS@WGi-EaI?5;AMS7E@##gdY8cPPdKsL`y7`jV<@0YF z4hjHt8it6e@~FVD70~PgM($JqUnmrdw(SMLCPpL;FdUg&4*^49P6c={=0UwGWjZ}E zzP8(M3Fp^)eSbFZX8$a>FxReqzVJr@KDe4kEgbF|fZkS>mtQpm$@9%5+y#iD$S_n@ z)hXf=z^OoRK5OB;t~UlC3}*s}=3}F;fDM3DAaV_We-(gJyAF8oTLI)BG8*qM3&JjPFL^y=K8yfA3IKmFD@=MT00000NkvXXu0mjfFVvwZ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json new file mode 100644 index 00000000000000..79f35b3cb27325 --- /dev/null +++ b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/meta.json @@ -0,0 +1,57 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Beck Thompson using assets from https://github.com/Baystation12/Baystation12/blob/caa635edb97c58301ccdc64757eba323b6673cf3/icons/obj/structures/portgen.dmi", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "old_generator_plasma" + }, + { + "name": "old_generator_plasma_fuel_leak" + }, + { + "name": "generator_frame" + }, + { + "name": "uranium_generator" + }, + { + "name": "uranium_generator_fuel_tank" + }, + { + "name": "red_x" + }, + { + "name": "nothing" + }, + { + "name": "rad_outline", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + }, + { + "name": "rad_dripping", + "delays": [ + [ + 2.0, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05 + ] + ] + } + ] + } diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/nothing.png new file mode 100644 index 0000000000000000000000000000000000000000..54c77a6a0e9e7b81d4eaf1cf97c1c48970e50f3a GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzT~8OskO=p;7aRqFJVwV~)5Q*_ si&|_xTWS0KF#{tL3x|M$Lj#myAZ5>>_~KpQU!YP3Pgg&ebxsLQ0CQUy@&Et; literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/old_generator_plasma.png new file mode 100644 index 0000000000000000000000000000000000000000..0a40e6d2c0480017beb8543e99feba2d3aff3754 GIT binary patch literal 876 zcmV-y1C#uTP)GqG*$=+64wd;KF4@1#Kb*q&B*Z z)TE7BR2b=K+BBqzqlT8ILSU~s*Usb3oA<_d)o|0@-1l+r{r}F_eJ=xBJTkUeAO8VF z1cJe!!l~%!==dj5G1E{18XFtY-rkOr@hP<|GM!FzF0b-LhWb;=CHi?J3HD%_TXlqt zy&j*sw)#jVSc4w2qbUG&S=sQ|2F1d`s2z8wzQO6-r;6t~c41-ur?{V(m=q!mm(ETL z;PrYDi9`fM3P8Y?iNjeVfU62aF$H&Cy%7LfF*8xJ(GOlL2jJcTj16GM7s8XC*Z46% zB>;G{3QxHjg*?X|!w3)vz2mj=0ErDgj{L&ycke-h!$YHn0D6!0DUyzWS_6p`FaU3& zowY&)p}ps8iWQCH}rLA4^C0&2sHHxfmd7~zKjkpl9(xVRvt zz^pu&o}Lr+qi;iQMbQPvjt7);r%vGM^Io_Y=is;JV0&2^dOr-HYjOgP+*I)c`%5tX z^$Td`LH9;ueqj!-Lsei6*WP@L#lPe2%bwLXGy^C&>ch3xRso>RzZK8fhP;;o@RuZ7 zCo(M7pAOXFdRrSR6S*AJoP@FQ^Kjo96*f7;D_E+qiJ1mncRpJZ*B4wnq4dwl0W{TA zW8qU2zh`HWSK~JXcvSDi<#LA*A+a-ObCLkGVA+r3*j<#56`S2!3J9R9=S5Nk%u;ZF zc@bB#?P)V2odPbxZH0v>3e>ALkWPgQl5DsrwFN0%1GEv<0oMSFmzI_$al~RVQ!cXA zzNaqW>No8I`a)5ASRJ;NMb(sYY;_m{&_nu6@*o)gZ1QYXz{rjqGmU_LL2YfV(%09g z{%p`Wu@Q0o+LQ>a1wilVmx{c&+H?t_P)Pc>EgTLj^v9)5v3e590MK#T($XRg(A?at zaE+}Q0W#K$a0E63fE_lB0Eu^ZccY=9A<0v&gUtX~R|JTfKUy120qsTJ(=3%s0?@as z)$ZW@voNod0^lfE71i76#ib*#Ug31>q$9A|5PtyW=9fQFmKtjS0000teK7vluxU%!4yTyu9dR=IX3X~z9U#{_odXdaeX%h$#c=Fc{_EV_-K z>s3PGEXxCD&-OmN@MR{?vO6(6%lFqMZ#eCfe&UDtu>%)=w=H~DDc`)|VCse+|EB9p z>a5jSAAzopr0EObu-~a#s literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_dripping.png new file mode 100644 index 0000000000000000000000000000000000000000..3b8f9eb2cd30557d371021ed14f0a070f063a22f GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0vp^4}e&KgAGV>A1w)GU|_89ba4!+hJ zPpr6v;mU5`jgPL(ep~bI9%F&s{-cKFNe#zW?0gn|fUzJ-lIMeoeRwZE59Qo!L**zT54Po$~SZ zj-14*@V!R6BxV2n{mmEh^N;?@`g*$wwalL^8JX;XuIGih{sFheyxWQf&gYH;qk_TH L)z4*}Q$iB}^3SiU literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/rad_outline.png new file mode 100644 index 0000000000000000000000000000000000000000..09a4c0826ac078b4e2167d80aa3125ce2d2c2193 GIT binary patch literal 323 zcmeAS@N?(olHy`uVBq!ia0vp^4M42G!3HF6DHW(PFfej?x;TbZ#J!#B&2`9tfmM3X z1U=gh@xr(4_SyQ69AjR!E}7)IfJHMmQ}bod>mwHLdCv#@bW|6(@a0fA7sGT1MiGX2 z3^Mmw0~jip3Tnh17$0yR_!!H;+Mv#GyqpZlhDN44_m{_hewA2U%lBthi z%3p7|Wj34p>-VYVmPh6Fr7bqmbo*vC)S}xS+qW8{`a$o^5>sc7FX~xJevRG zxY?Bb8jMOQ^BsQA%fJ07q%N-J_FRplGlaf8eOa_mgE8&z=9m|cxi(x#+MT57aD9nb b)jRh4GCqp6iKm|d1Bb!W)z4*}Q$iB}kz0I& literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/red_x.png new file mode 100644 index 0000000000000000000000000000000000000000..3ec4fd6268312a59c469a49a6116a06c555d3cc1 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJ0#6smkO=p;lN`Ai6nU86mjC%5 z{in~H)p6S0ApV8ZKR!`Zc`1;6^nBN6X;y^^N(R;Q&D^}ItzY>E^Oq>|+y3AFOtQ9O zs#T4w5P)Nkl0-c1WQ;@n-*+PV_AKsdDmq>fGvx?bS}fr%=Y8K9rs$B{)FJEB5rA+YnM|r2 zibA0<5m)RqG=NkpMfrT5YRYzBTKs6YXtVL9Z)|6)H579GjHE^uLbUVqxOn$sR3_HI zGjG%qAhCQ+yi|PkmfGLDG<)hdRjQk`^;H=vjQ3{e{ld}nkuc2!qV%~|?E{F%<5Vh@ z1jI-HCwrZdTwq~{hvc*L%j2VS;f3)5@R4?Nox0twaHi4xHqZ^&k97!vD-Q537zE)! zvkM6TgEd&7I#yN4!<1rnid%d1WKFQhk# z*KaJFgxTPKScBpI9R-&585oXlD4J^kqnh(s<}YPXdAO9{;{g|y#x-B~P5Dd!Va8a6#$vdD2Kq#>DNdOFV z0HXRl;AgiTK>T5|W-E4&0euB<92m$g2z{cu64zmwKWP34;1541bU%Q;(HsB(002ov LPDHLkV1fVuU+q(& literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png b/Resources/Textures/Objects/Materials/Scrap/generator.rsi/uranium_generator_fuel_tank.png new file mode 100644 index 0000000000000000000000000000000000000000..59cf3663bf307063f8486dd99b60f9c320ec2eb9 GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=hEVFfx0(IEF;HC#Ogx9I!a>&A7)Z z!Gy)l8A4>VHWb%Au8+98u{_E4&c_``I#;H5@HPIs8vWn?_Li9kmngPA^f@fUrfDC) z<7a-{{-g`V*IT>A+p2_f^)7O~zrX)~eN?P^^W7yCZO)b4lAC6oddN3p^IwK$*ClK* zF@b>-Gm1OIENXv!`TzUd{Im~QClYU5GiY@@dvKa#+eh{rg6Z)!NgMdeS-Z