From 05a2494638d0a483b0a13642b58aef3b7d034b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ki=C3=ABd=20Llaentenn?= Date: Wed, 31 May 2023 11:32:45 -0400 Subject: [PATCH] feat: add basic textures for railguns (#19) --- cannon.lua | 40 +++++++++++++++++------- textures/helical_railgun_front.png | Bin 0 -> 617 bytes textures/helical_railgun_top_bottom.png | Bin 0 -> 552 bytes textures/railgun_blank.png | Bin 0 -> 429 bytes textures/railgun_front.png | Bin 0 -> 605 bytes textures/railgun_top_bottom.png | Bin 0 -> 568 bytes 6 files changed, 29 insertions(+), 11 deletions(-) create mode 100755 textures/helical_railgun_front.png create mode 100755 textures/helical_railgun_top_bottom.png create mode 100755 textures/railgun_blank.png create mode 100755 textures/railgun_front.png create mode 100755 textures/railgun_top_bottom.png diff --git a/cannon.lua b/cannon.lua index 034bd13..df9fa7b 100644 --- a/cannon.lua +++ b/cannon.lua @@ -98,20 +98,22 @@ local register_spacecannon = function(def) end }) - + -- top, bottom + local textures = { + "cannon_blank.png" .. cable_entry, + "cannon_front_" .. def.color .. ".png", + "cannon_blank.png" .. cable_entry, + "cannon_blank.png" .. cable_entry, + "cannon_blank.png" .. cable_entry, + "cannon_blank.png" .. cable_entry + } + if def.textures then + textures = def.textures + end minetest.register_node("spacecannon:cannon_" .. def.color, { description = def.name .. " (" .. def.desc .. ")", - - -- top, bottom - tiles = { - "cannon_blank.png" .. cable_entry, - "cannon_front_" .. def.color .. ".png", - "cannon_blank.png" .. cable_entry, - "cannon_blank.png" .. cable_entry, - "cannon_blank.png" .. cable_entry, - "cannon_blank.png" .. cable_entry - }, + tiles = textures, groups = {cracky=3,oddly_breakable_by_hand=3,technic_machine = 1, technic_hv = 1}, drop = "spacecannon:cannon_" .. def.color, @@ -286,6 +288,14 @@ register_spacecannon({ color = "blue", name = "Railgun cannon", desc = "fast, 2x penetrating damage", + textures = { + "railgun_blank.png" .. cable_entry, + "railgun_front.png", + "railgun_blank.png" .. cable_entry, + "railgun_blank.png" .. cable_entry, + "railgun_top_bottom.png", + "railgun_top_bottom.png", + }, is_th = false, range = 0, storage_require_mod = 1, @@ -302,6 +312,14 @@ register_spacecannon({ color = "purple", name = "Helical railgun cannon", desc = "fast, 4x penetrating damage", + textures = { + "railgun_blank.png" .. cable_entry, + "helical_railgun_front.png", + "railgun_blank.png" .. cable_entry, + "railgun_blank.png" .. cable_entry, + "helical_railgun_top_bottom.png", + "helical_railgun_top_bottom.png", + }, is_th = false, range = 0, storage_require_mod = 1.5, diff --git a/textures/helical_railgun_front.png b/textures/helical_railgun_front.png new file mode 100755 index 0000000000000000000000000000000000000000..ed1df7b66ae46d1e18a9a69a8077396615697bfb GIT binary patch literal 617 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|&II^`xB_Vo z4h~5P2?qxUe}DgsjEvUS*2Rk#@7S^9{Q2|Go;~~j|Gyy@hd&3Gzl2B`hrm=3nYC*2 z`=#{GIs~qDm7f@7vntGSN~YJk44>1@N!Mpo+}pn7$BRebUv2&WeA)kpnV(MkeqJAV za#`eq1+E)#Z5NOfl%D5ax~po*_2nm@Pbiw78(1A;lVKvRD$5}~JyL#SuGWD{{nLGc zOJ$kPg8W(%BrkDouX zCrBnuT{2xWc;*Z9|5;OfdM}k_Z#{7%Yj;ok>8$zJdpCH_xLw+8Aofj(=X^`yDaF-i z5|`cajFR+R&73(u1@N!Mpo+}pn7$BRebUv2&WeA)kpnV(MkeqJAV za#`eq1+E)#Z5NOfl%D5ax~po*_2nm@Pbiw78(1A;lVKvRD$5}~JyL#SuGWD{{nLGc zOJ$kPg8W(%FPq?PrbcEl%v8sl5yf2MXD@dUWNwT-CR`SOFqk2hIXTSQOIDvncB z5LLJmxV!b>)j6`?So?1=-*TS!^3MGotsNmv?=H-9OujD1)O)z;(G;n||5vS8=gE4! iF+I2GYuMS{9p)Xf0bZw;1_}dx!QkoY=d#Wzp$P!m`vxfh literal 0 HcmV?d00001 diff --git a/textures/railgun_blank.png b/textures/railgun_blank.png new file mode 100755 index 0000000000000000000000000000000000000000..a85a2229a31ef64b602f0ead9b5e704c53f0a2e0 GIT binary patch literal 429 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|&II^`xB_Vo z4h~5P2?qxUe}DgsjEvUS*2Rk#@7S^9{Q2|Go;~~j|Gyy@hd&3Gzl2B`hrm=3nYC*2 z`=#{GIs~qDm7f@7vntGSN~YJk44>1@N!Mpo+}pn7$BRebUv2&WeA)kpnV(MkeqJAV za#`eq1+E)#Z5NOfl%D5ax~po*_2nm@Pbiw78(1A;lVKvRD$5}~JyL#SuGWD{{nLGc zOJ$kPg8W(%1@N!Mpo+}pn7$BRebUv2&WeA)kpnV(MkeqJAV za#`eq1+E)#Z5NOfl%D5ax~po*_2nm@Pbiw78(1A;lVKvRD$5}~JyL#SuGWD{{nLGc zOJ$kPg8W(%v1;ul`1 zSihTelG(zsvSN<31CtWL-gkJf>`Ph`9eD+2TJJ%bt z8a)miKCr%*(S;%H_}l}Z7@z#Vvqj0`w!@tU$(%K|P1zey@oN030w~<|PX(L=1!GUea0k@x@fVhEGa&es;a)PuP7VZ?f`Q zYv0aQe_~eTT-7k0b~a9<#Hlk*H%1@N!Mpo+}pn7$BRebUv2&WeA)kpnV(MkeqJAV za#`eq1+E)#Z5NOfl%D5ax~po*_2nm@Pbiw78(1A;lVKvRD$5}~JyL#SuGWD{{nLGc zOJ$kPg8W(%v;Ly^-&Cg71G@SAm`% z9W@5+Yfc|}D6IFb<-|7ctuCxDo*&Cv#&}Mxq02*aW%Yf-E;bI1XNM#>8?r?NtWDTD zixfR28D8BGXYJ^%AxU-J6DC&k-nINj;l!uS;ED+W(jKbLh*2~7Ynk_QU_ literal 0 HcmV?d00001