From 53e914be5265d51e49aad45a40ac7b5b73293a18 Mon Sep 17 00:00:00 2001 From: younggam Date: Sun, 16 Aug 2020 12:13:57 +0900 Subject: [PATCH] bugfix --- bundles/bundle.properties | 72 +++++ bundles/bundle_ko.properties | 26 +- content/blocks/power/nuclear-reactor.json | 1 + .../blocks/production/advanced-furnace.json | 2 +- .../production/advanced-steam-generator.json | 2 +- content/blocks/production/blast-furnace.json | 2 +- content/blocks/production/bullet-mill.json | 2 +- content/blocks/production/crystallizer.json | 3 - content/blocks/production/metal-smelter.json | 2 +- .../blocks/production/missile-factory.json | 2 +- .../production/semiconductor-plant.json | 2 +- .../blocks/production/thermal-centrifuge.json | 2 +- .../blocks/walls/dense-alloy-wall-large.json | 5 +- content/blocks/walls/dense-alloy-wall.json | 5 +- content/blocks/walls/iron-wall-large.json | 3 - content/blocks/walls/iron-wall.json | 3 - content/blocks/walls/steel-wall-large.json | 5 +- content/blocks/walls/steel-wall.json | 5 +- content/blocks/walls/uranium-wall-large.json | 8 + content/blocks/walls/uranium-wall.json | 8 + .../items/bullets/armor-piercing-shell.json | 5 - content/items/bullets/bullet.json | 5 - content/items/bullets/cluster-bullet.json | 5 - content/items/bullets/doom.json | 7 - content/items/bullets/high-explosive.json | 6 - content/items/bullets/missile.json | 6 - content/items/circuit.json | 8 - content/items/computer.json | 7 - content/items/copper-ore.json | 5 - content/items/dense-alloy.json | 6 - content/items/depleted-uranium.json | 6 - content/items/glass.json | 5 - content/items/iron-ore.json | 5 - content/items/iron.json | 5 - content/items/lead-ore.json | 5 - content/items/semiconductor.json | 7 - content/items/steel.json | 5 - content/items/stone.json | 6 - content/items/thorium-ore.json | 6 - content/items/titanium-ore.json | 5 - content/items/uranium.json | 7 - .../blocks/liquid/liquid-heat-exchanger.js | 2 +- scripts/blocks/power/nuclear-reactor.js | 17 +- .../blocks/production/matter-disintegrator.js | 269 ++++++++++++++++++ scripts/blocks/production/metal-smelter.js | 2 +- .../blocks/production/thermal-centrifuge.js | 1 + scripts/blocks/turrets/penetrate.js | 2 +- scripts/blocks/turrets/ravage.js | 6 +- scripts/blocks/walls.js | 77 +++++ scripts/initializer.js | 69 +++++ scripts/main.js | 10 +- scripts/units/younggam.js | 6 +- sprites/blocks/walls/uranium-wall-large.png | Bin 0 -> 961 bytes sprites/blocks/walls/uranium-wall.png | Bin 0 -> 374 bytes sprites/items/quantum-mass.png | Bin 0 -> 530 bytes 55 files changed, 566 insertions(+), 177 deletions(-) create mode 100644 content/blocks/walls/uranium-wall-large.json create mode 100644 content/blocks/walls/uranium-wall.json delete mode 100644 content/items/bullets/armor-piercing-shell.json delete mode 100644 content/items/bullets/bullet.json delete mode 100644 content/items/bullets/cluster-bullet.json delete mode 100644 content/items/bullets/doom.json delete mode 100644 content/items/bullets/high-explosive.json delete mode 100644 content/items/bullets/missile.json delete mode 100644 content/items/circuit.json delete mode 100644 content/items/computer.json delete mode 100644 content/items/copper-ore.json delete mode 100644 content/items/dense-alloy.json delete mode 100644 content/items/depleted-uranium.json delete mode 100644 content/items/glass.json delete mode 100644 content/items/iron-ore.json delete mode 100644 content/items/iron.json delete mode 100644 content/items/lead-ore.json delete mode 100644 content/items/semiconductor.json delete mode 100644 content/items/steel.json delete mode 100644 content/items/stone.json delete mode 100644 content/items/thorium-ore.json delete mode 100644 content/items/titanium-ore.json delete mode 100644 content/items/uranium.json create mode 100644 scripts/blocks/production/matter-disintegrator.js create mode 100644 scripts/blocks/walls.js create mode 100644 sprites/blocks/walls/uranium-wall-large.png create mode 100644 sprites/blocks/walls/uranium-wall.png create mode 100644 sprites/items/quantum-mass.png diff --git a/bundles/bundle.properties b/bundles/bundle.properties index 8218ca5..0550559 100644 --- a/bundles/bundle.properties +++ b/bundles/bundle.properties @@ -1,4 +1,13 @@ steam-power-heat-per-sec=heat/sec +steam-power-matter-disintegrator-dialog-0=Current State +steam-power-matter-disintegrator-dialog-1=Values +steam-power-matter-disintegrator-title-0=Container Requirement +steam-power-matter-disintegrator-title-1=Progress +steam-power-matter-disintegrator-title-2=Queue +steam-power-matter-disintegrator-display-0=Information +steam-power-matter-disintegrator-display-1=Can consume all items/liquids except item that used to make container. Differ degree of task progress depends on item/liquid kind consumed. If heat is high enough, task is faster. +steam-power-matter-disintegrator-display-2=Boost +steam-power-matter-disintegrator-display-3=Consuming block.steam-power-electric-conveyor.name=Electric Conveyor block.steam-power-electric-conveyor.description=A moderate speed conveyor that requires power. @@ -16,6 +25,8 @@ block.steam-power-nuclear-reactor.name=Nuclear Reactor block.steam-power-nuclear-reactor.description=Uses fission to generate power.\n\n[red]Heat Block. Explodes when heat goes over 1000.\nHeat decreases by 5% per sec of current heat.\nThe lower limit is 25. block.steam-power-turbine.name=Turbine block.steam-power-turbine.description=Uses steam to turn turbines, generating power. +block.steam-power-crystallizer.name=Crystallizer +block.steam-power-crystallizer.description=Produces minerals by crystallizing them. block.steam-power-advanced-furnace.name=Advanced Furnace block.steam-power-advanced-furnace.description=Advanced furnace. block.steam-power-advanced-steam-generator.name=Advanced Steam Generator @@ -52,6 +63,22 @@ block.steam-power-ray.name=Ray block.steam-power-ray.description=Charges itself while firing, damage increasing up to 2.5 times over 4 seconds. Targets a single closest enemy. block.steam-power-tesla.name=Tesla block.steam-power-tesla.description=Tesla. +block.steam-power-iron-wall.name=Iron Wall +block.steam-power-iron-wall.description=Iron Wall. +block.steam-power-iron-wall-large.name=Iron Wall Large +block.steam-power-iron-wall-large.description=Iron Wall. +block.steam-power-uranium-wall.name=Uranium Wall +block.steam-power-uranium-wall.description=Uranium Wall. Damages 6 per second and reduces speed by 20% to enemies within 15 tiles for a second when was attacked. Cooltime is a second. +block.steam-power-uranium-wall-large.name=Unranium Wall Large +block.steam-power-uranium-wall-large.description=Uranium Wall Large. Damages 6 per second and reduces speed by 20% to enemies within 15 tiles for a second when was attacked. Cooltime is a second. +block.steam-power-steel-wall.name=Steel Wall +block.steam-power-steel-wall.description=Steel Wall. Reduces damage 3 from enemies' attack unconditonally. +block.steam-power-steel-wall-large.name=Steel Wall Large +block.steam-power-steel-wall-large.description=Steel Wall. Reduces damage 3 from enemies' attack unconditonally. +block.steam-power-dense-alloy-wall-large.name=Dense Alloy Wall Large +block.steam-power-dense-alloy-wall-large.description=Dense Alloy Wall. Strong against fire and splash damage. +block.steam-power-dense-alloy-wall.name=Dense Alloy Wall +block.steam-power-dense-alloy-wall.description=Dense Alloy Wall. Strong against fire and splash damage. block.steam-power-heat-bridge.name=Heat Bridge block.steam-power-heat-bridge.description=Use to transport heat over long distances.\n\n[red]Heat Block. Explodes when heat goes over 500.\nHeat decreases by 1% per sec of current heat.\nThe lower limit is 25. block.steam-power-heat-phase-bridge.name=Heat Phase Bridge @@ -59,6 +86,51 @@ block.steam-power-heat-phase-bridge.description=Use to transport heat over very block.steam-power-teleporter.name=Teleporter block.steam-power-teleporter.description=Advanced item transport block. Teleporters input items to other teleporters of the same color. Does nothing if no teleporters of the same color exist. If multiple teleporters exist of the same color, a random one is selected. Uses power. Tap to change color. +item.steam-power-armor-piercing-shell.name=AP +item.steam-power-armor-piercing-shell.description=Armor Piercing Shell. +item.steam-power-bullet.name=Bullet +item.steam-power-bullet.description=Bullet. +item.steam-power-cluster-bullet.name=Cluster Bullet +item.steam-power-cluster-bullet.description=Cluster Bullet. +item.steam-power-doom.name=Doom +item.steam-power-doom.description=Doom. +item.steam-power-high-explosive.name=HE +item.steam-power-high-explosive.description=High Explosive. +item.steam-power-missile.name=Missile +item.steam-power-missile.description=Missile. +item.steam-power-circuit.name=Circuit +item.steam-power-circuit.description=Circuit. +item.steam-power-computer.name=Computer +item.steam-power-computer.description=Computer. +item.steam-power-copper-ore.name=Copper Ore +item.steam-power-copper-ore.description=Copper Ore. +item.steam-power-dense-alloy.name=Dense Alloy +item.steam-power-dense-alloy.description=Dense Alloy. +item.steam-power-depleted-uranium.name=Depleted Uranium +item.steam-power-depleted-uranium.description=Depleted Uranium. +item.steam-power-glass.name=Glass +item.steam-power-glass.description=Normal Glass. +item.steam-power-iron-ore.name=Iron Ore +item.steam-power-iron-ore.description=Iron Ore. +item.steam-power-iron.name=Iron +item.steam-power-iron.description=Iron. +item.steam-power-lead-ore.name=Lead Ore +item.steam-power-lead-ore.description=Lead Ore. +item.steam-power-semiconductor.name=Semiconductor +item.steam-power-semiconductor.description=Semiconductor. +item.steam-power-steel.name=Steel +item.steam-power-steel.description=Steel. +item.steam-power-stone.name=Stone +item.steam-power-stone.description=Stone. +item.steam-power-thorium-ore.name=Thorium Ore +item.steam-power-thorium-ore.description=Thorium Ore. +item.steam-power-titanium-ore.name=Titanium Ore +item.steam-power-titanium-ore.description=Titanium Ore. +item.steam-power-uranium.name=Uranium +item.steam-power-uranium.description=Enriched Uranium. +item.steam-power-quantum-mass.name=Quantum Mass +item.steam-power-quantum-mass.description=Quantum Mass. Set of quantums that state is quark and lepton. Holded in solid container that maintains the state. + unit.steam-power-draug-a.name = Draug-A Miner Drone unit.steam-power-draug-a.description = Smarter then the vanilla miner drone. Delivers mined resources to the cloeset furnace. unit.steam-power-younggam.name=Younggam diff --git a/bundles/bundle_ko.properties b/bundles/bundle_ko.properties index 0814f94..4189a87 100644 --- a/bundles/bundle_ko.properties +++ b/bundles/bundle_ko.properties @@ -1,4 +1,13 @@ steam-power-heat-per-sec=열/초 +steam-power-matter-disintegrator-dialog-0=현황 +steam-power-matter-disintegrator-dialog-1=값들 +steam-power-matter-disintegrator-title-0=용기 요구량 +steam-power-matter-disintegrator-title-1=진척도 +steam-power-matter-disintegrator-title-2=대기열 +steam-power-matter-disintegrator-display-0=정보 +steam-power-matter-disintegrator-display-1=용기에 사용되는 아이템을 제외한 모든 아이템을 소모할 수 있습니다. 소모한 아이템의 종류에 따라 작업이 진행되는 정도가 달라집니다. 열이 높으면 작업이 빨라집니다. +steam-power-matter-disintegrator-display-2=가속 +steam-power-matter-disintegrator-display-3=소모중 block.steam-power-electric-conveyor.name=전기 컨베이어 block.steam-power-electric-conveyor.description=전력을 사용하는 컨베이어 입니다. @@ -57,17 +66,21 @@ block.steam-power-well.description=수맥을 찾아 물을 퍼 올립니다. block.steam-power-crystallizer.name=결정기 block.steam-power-crystallizer.description=광물을 결정화 시켜서 생산합니다. block.steam-power-dense-alloy-wall-large.name=대형 고밀도 합금 벽 -block.steam-power-dense-alloy-wall-large.description=고밀도 합금 벽. +block.steam-power-dense-alloy-wall-large.description=고밀도 합금 벽. 화염 피해 및 폭발 피해에 강합니다. block.steam-power-dense-alloy-wall.name=고밀도 합금 벽 -block.steam-power-dense-alloy-wall.description=고밀도 합금 벽. +block.steam-power-dense-alloy-wall.description=고밀도 합금 벽. 화염 피해 및 폭발 피해에 강합니다. block.steam-power-iron-wall-large.name=대형 철 벽 block.steam-power-iron-wall-large.description=철 벽. block.steam-power-iron-wall.name=철 벽 block.steam-power-iron-wall.description=철 벽. +block.steam-power-uranium-wall.name=우라늄 벽 +block.steam-power-uranium-wall.description=우라늄 벽. 피격시 1초동안 주변 15칸 이내 적에게 초당 6의 피해를 주고 이동속도를 20% 감소시킵니다. 재사용 대기시간은 1초입니다. +block.steam-power-uranium-wall-large.name=대형 우라늄 벽 +block.steam-power-uranium-wall-large.description=대형 우라늄 벽. 피격시 1초동안 주변 15칸 이내 적에게 초당 6의 피해를 주고 이동속도를 20% 감소시킵니다. 재사용 대기시간은 1초입니다. block.steam-power-steel-wall-large.name=대형 강철 벽 -block.steam-power-steel-wall-large.description=강철 벽. +block.steam-power-steel-wall-large.description=강철 벽. 적의 공격에 의한 피해를 무조건 3만큼 감소시킵니다. block.steam-power-steel-wall.name=강철 벽 -block.steam-power-steel-wall.description=강철 벽. +block.steam-power-steel-wall.description=강철 벽. 적의 공격에 의한 피해를 무조건 3만큼 감소시킵니다. block.steam-power-stone-container.name=돌 컨테이너 block.steam-power-stone-container.description=돌. block.steam-power-blast-water-extractor.name=발파 물 추출기 @@ -124,8 +137,9 @@ item.steam-power-thorium-ore.description=토륨 광석. item.steam-power-titanium-ore.name=티타늄 광석 item.steam-power-titanium-ore.description=티타늄 광석. item.steam-power-uranium.name=우라늄 -item.steam-power-uranium.description=우라늄. - +item.steam-power-uranium.description=농축된 우라늄. +item.steam-power-quantum-mass.name=양자 덩어리 +item.steam-power-quantum-mass.description=양자 덩어리. 쿼크와 랩톤 상태의 양자 집합체입니다. 해당 상태를 유지시켜주는 단단한 용기속에 보관되어 있습니다. liquid.steam-power-high-pressure-steam.name=고압 증기 liquid.steam-power-high-pressure-steam.description=고압 증기. liquid.steam-power-hot-cryofluid.name=뜨거운 냉각수 diff --git a/content/blocks/power/nuclear-reactor.json b/content/blocks/power/nuclear-reactor.json index 6a08814..ae4ff48 100644 --- a/content/blocks/power/nuclear-reactor.json +++ b/content/blocks/power/nuclear-reactor.json @@ -10,6 +10,7 @@ consumes:{ items:{ items:[ thorium/1 + uranium/1 ] } liquid:{ diff --git a/content/blocks/production/advanced-furnace.json b/content/blocks/production/advanced-furnace.json index 71262fd..5347057 100644 --- a/content/blocks/production/advanced-furnace.json +++ b/content/blocks/production/advanced-furnace.json @@ -8,7 +8,7 @@ requirements:[ itemCapacity: 30 liquidCapacity: 30 size: 3 -health: 200 +health:-1 craftEffect: none updateEffect: none research:blast-furnace diff --git a/content/blocks/production/advanced-steam-generator.json b/content/blocks/production/advanced-steam-generator.json index 7994f8c..5281e8a 100644 --- a/content/blocks/production/advanced-steam-generator.json +++ b/content/blocks/production/advanced-steam-generator.json @@ -20,4 +20,4 @@ hasItems: false liquidCapacity: 24 craftTime:1 size:2 -health:120 +health:-1 diff --git a/content/blocks/production/blast-furnace.json b/content/blocks/production/blast-furnace.json index 236f243..c4130f4 100644 --- a/content/blocks/production/blast-furnace.json +++ b/content/blocks/production/blast-furnace.json @@ -5,7 +5,7 @@ requirements:[ itemCapacity: 30 liquidCapacity: 30 size: 3 -health: 100 +health: 240 craftEffect: none updateEffect: none alwaysUnlocked: true diff --git a/content/blocks/production/bullet-mill.json b/content/blocks/production/bullet-mill.json index 8b9da85..52b6226 100644 --- a/content/blocks/production/bullet-mill.json +++ b/content/blocks/production/bullet-mill.json @@ -6,7 +6,7 @@ requirements:[ ] itemCapacity: 15 size: 3 -health: 100 +health:-1 craftEffect: none updateEffect: none research: pyratite-mixer diff --git a/content/blocks/production/crystallizer.json b/content/blocks/production/crystallizer.json index 0284853..11aab2a 100644 --- a/content/blocks/production/crystallizer.json +++ b/content/blocks/production/crystallizer.json @@ -1,6 +1,3 @@ -name: Crystallizer -description: Produces minerals by crystallizing them. -type:Separator craftTime:40 alwaysUnlocked:true category: crafting diff --git a/content/blocks/production/metal-smelter.json b/content/blocks/production/metal-smelter.json index e3042c9..f0f84d2 100644 --- a/content/blocks/production/metal-smelter.json +++ b/content/blocks/production/metal-smelter.json @@ -8,7 +8,7 @@ requirements:[ ] itemCapacity: 20 size: 4 -health: 200 +health:-1 craftEffect: none updateEffect: none research: advanced-furnace diff --git a/content/blocks/production/missile-factory.json b/content/blocks/production/missile-factory.json index 5b36cfc..a79265d 100644 --- a/content/blocks/production/missile-factory.json +++ b/content/blocks/production/missile-factory.json @@ -7,7 +7,7 @@ requirements:[ ] itemCapacity:16 size:3 -health:150 +health:-1 craftEffect: none updateEffect: none research:bullet-mill diff --git a/content/blocks/production/semiconductor-plant.json b/content/blocks/production/semiconductor-plant.json index 52c3b27..b7090d0 100644 --- a/content/blocks/production/semiconductor-plant.json +++ b/content/blocks/production/semiconductor-plant.json @@ -7,7 +7,7 @@ requirements:[ ] itemCapacity: 20 size: 3 -health: 200 +health:-1 craftEffect: none updateEffect: none research:silicon-smelter diff --git a/content/blocks/production/thermal-centrifuge.json b/content/blocks/production/thermal-centrifuge.json index 326d65f..d89d687 100644 --- a/content/blocks/production/thermal-centrifuge.json +++ b/content/blocks/production/thermal-centrifuge.json @@ -26,6 +26,6 @@ idleSoundVolume: 0.5 results:[ thorium/5 uranium/1 - stone/2 + depleted-uranium/2 ] health: 120 diff --git a/content/blocks/walls/dense-alloy-wall-large.json b/content/blocks/walls/dense-alloy-wall-large.json index 62ac873..5d3e3d9 100644 --- a/content/blocks/walls/dense-alloy-wall-large.json +++ b/content/blocks/walls/dense-alloy-wall-large.json @@ -1,7 +1,4 @@ -name:Dense Alloy Wall Large -description:Dense Alloy Wall. -type:Wall -health:4800 +health:4400 size:2 requirements:[ dense-alloy/24 diff --git a/content/blocks/walls/dense-alloy-wall.json b/content/blocks/walls/dense-alloy-wall.json index fd557d2..655f2a3 100644 --- a/content/blocks/walls/dense-alloy-wall.json +++ b/content/blocks/walls/dense-alloy-wall.json @@ -1,7 +1,4 @@ -name:Dense Alloy Wall -description: Dense Alloy Wall. -type: Wall -health:1200 +health:1100 size:1 requirements:[ dense-alloy/6 diff --git a/content/blocks/walls/iron-wall-large.json b/content/blocks/walls/iron-wall-large.json index f8d8306..51c3fee 100644 --- a/content/blocks/walls/iron-wall-large.json +++ b/content/blocks/walls/iron-wall-large.json @@ -1,6 +1,3 @@ -name: Iron Wall Large -description: Iron Wall. -type:Wall health: 1600 size:2 requirements:[ diff --git a/content/blocks/walls/iron-wall.json b/content/blocks/walls/iron-wall.json index c5303be..199114b 100644 --- a/content/blocks/walls/iron-wall.json +++ b/content/blocks/walls/iron-wall.json @@ -1,6 +1,3 @@ -name: Iron Wall -description: Iron Wall. -type:Wall health:400 size:1 requirements:[ diff --git a/content/blocks/walls/steel-wall-large.json b/content/blocks/walls/steel-wall-large.json index df345eb..5de1848 100644 --- a/content/blocks/walls/steel-wall-large.json +++ b/content/blocks/walls/steel-wall-large.json @@ -1,7 +1,4 @@ -name: Steel Wall Large -description: Steel wall. -type: Wall -health: 3600 +health: 3000 size:2 requirements:[ steel/24 diff --git a/content/blocks/walls/steel-wall.json b/content/blocks/walls/steel-wall.json index 1f94b3d..647902a 100644 --- a/content/blocks/walls/steel-wall.json +++ b/content/blocks/walls/steel-wall.json @@ -1,7 +1,4 @@ -name: Steel Wall -description: Steel Wall. -type: Wall -health: 900 +health: 750 size: 1 requirements:[ steel/6 diff --git a/content/blocks/walls/uranium-wall-large.json b/content/blocks/walls/uranium-wall-large.json new file mode 100644 index 0000000..918d1c6 --- /dev/null +++ b/content/blocks/walls/uranium-wall-large.json @@ -0,0 +1,8 @@ +health: 3040 +size:2 +requirements:[ + depleted-uranium/16 + uranium/8 +] +category:defense +research:uranium-wall diff --git a/content/blocks/walls/uranium-wall.json b/content/blocks/walls/uranium-wall.json new file mode 100644 index 0000000..97f4383 --- /dev/null +++ b/content/blocks/walls/uranium-wall.json @@ -0,0 +1,8 @@ +health: 760 +size:1 +requirements:[ + depleted-uranium/4 + uranium/2 +] +category:defense +research:iron-wall-large diff --git a/content/items/bullets/armor-piercing-shell.json b/content/items/bullets/armor-piercing-shell.json deleted file mode 100644 index 51341b3..0000000 --- a/content/items/bullets/armor-piercing-shell.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: AP -description: Armor Piercing Shell -color:"ffff00" -explosiveness: 0.1 diff --git a/content/items/bullets/bullet.json b/content/items/bullets/bullet.json deleted file mode 100644 index b6fb5be..0000000 --- a/content/items/bullets/bullet.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: Bullet -description: Bullet. -color:"c88c50" -explosiveness: 0.1 diff --git a/content/items/bullets/cluster-bullet.json b/content/items/bullets/cluster-bullet.json deleted file mode 100644 index 4f944c3..0000000 --- a/content/items/bullets/cluster-bullet.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: Cluster Bullet -description: Cluster Bullet. -color:"ff8080" -explosiveness: 0.3 diff --git a/content/items/bullets/doom.json b/content/items/bullets/doom.json deleted file mode 100644 index 0fd11a2..0000000 --- a/content/items/bullets/doom.json +++ /dev/null @@ -1,7 +0,0 @@ -type: resource -name: Doom -description:Doom. -color:"96c80e" -explosiveness: 1 -flammability: 0.19 -radioactivity: 0.6 diff --git a/content/items/bullets/high-explosive.json b/content/items/bullets/high-explosive.json deleted file mode 100644 index e433172..0000000 --- a/content/items/bullets/high-explosive.json +++ /dev/null @@ -1,6 +0,0 @@ -type: resource -name: HE -description: High Explosive. -color:"ec1c24" -explosiveness: 0.8 -flammability: 0.19 diff --git a/content/items/bullets/missile.json b/content/items/bullets/missile.json deleted file mode 100644 index 61c1280..0000000 --- a/content/items/bullets/missile.json +++ /dev/null @@ -1,6 +0,0 @@ -type: resource -name: Missile -description: Missile. -color:"88001b" -explosiveness: 1 -flammability: 0.19 diff --git a/content/items/circuit.json b/content/items/circuit.json deleted file mode 100644 index f9e0d3a..0000000 --- a/content/items/circuit.json +++ /dev/null @@ -1,8 +0,0 @@ -type: material -name: Circuit -description:Circuit. -color:"4cb482" - -flammability: 0.19 - -cost:3 diff --git a/content/items/computer.json b/content/items/computer.json deleted file mode 100644 index 0231374..0000000 --- a/content/items/computer.json +++ /dev/null @@ -1,7 +0,0 @@ -type: material -name: Computer -description: Computer. -color:"6e7080" -explosiveness: 0.19 -flammability: 0.2 -cost: 5 diff --git a/content/items/copper-ore.json b/content/items/copper-ore.json deleted file mode 100644 index c547955..0000000 --- a/content/items/copper-ore.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: Copper Ore -description: Copper Ore. -color:"b8705c" -hardness:1 diff --git a/content/items/dense-alloy.json b/content/items/dense-alloy.json deleted file mode 100644 index 2a2e032..0000000 --- a/content/items/dense-alloy.json +++ /dev/null @@ -1,6 +0,0 @@ -type: material -name: Dense Alloy -description: Dense Alloy. -color:"8c8c78" -radioactivity: 0.1 -cost: 2 diff --git a/content/items/depleted-uranium.json b/content/items/depleted-uranium.json deleted file mode 100644 index 0d2c4bb..0000000 --- a/content/items/depleted-uranium.json +++ /dev/null @@ -1,6 +0,0 @@ -type: resource -name: Depleted Uranium -description: Depleted Uranium. -color: "89a015" -explosiveness: 0.1 -radioactivity: 0.4 diff --git a/content/items/glass.json b/content/items/glass.json deleted file mode 100644 index d92c402..0000000 --- a/content/items/glass.json +++ /dev/null @@ -1,5 +0,0 @@ -type:material -name:glass -description: Normal Glass. -color:"ffffff" -cost:0.8 diff --git a/content/items/iron-ore.json b/content/items/iron-ore.json deleted file mode 100644 index 883cb6a..0000000 --- a/content/items/iron-ore.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: Iron Ore -description: Iron Ore. -color:"966e5a" -hardness: 3 diff --git a/content/items/iron.json b/content/items/iron.json deleted file mode 100644 index 4379c3f..0000000 --- a/content/items/iron.json +++ /dev/null @@ -1,5 +0,0 @@ -type: material -name: Iron -description: Iron. -color:"b0bac0" -cost: 1 diff --git a/content/items/lead-ore.json b/content/items/lead-ore.json deleted file mode 100644 index beed031..0000000 --- a/content/items/lead-ore.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: Lead Ore -description: Lead Ore. -color: "6f687e" -hardness: 1 diff --git a/content/items/semiconductor.json b/content/items/semiconductor.json deleted file mode 100644 index 5ad9584..0000000 --- a/content/items/semiconductor.json +++ /dev/null @@ -1,7 +0,0 @@ -type: material -name: Semiconductor -description: Semiconductor. -color: "b4b428" -explosiveness: 0.1 -flammability: 0.19 -cost: 4 diff --git a/content/items/steel.json b/content/items/steel.json deleted file mode 100644 index 40fc182..0000000 --- a/content/items/steel.json +++ /dev/null @@ -1,5 +0,0 @@ -type: material -name: Steel -description: Steel. -color:"767a84" -cost: 1.6 diff --git a/content/items/stone.json b/content/items/stone.json deleted file mode 100644 index 2882383..0000000 --- a/content/items/stone.json +++ /dev/null @@ -1,6 +0,0 @@ -type: material -name: Stone -description: Stone. -color:"989aa4" -hardness: 0 -cost: 0.7 diff --git a/content/items/thorium-ore.json b/content/items/thorium-ore.json deleted file mode 100644 index a170825..0000000 --- a/content/items/thorium-ore.json +++ /dev/null @@ -1,6 +0,0 @@ -type: resource -name: Thorium Ore -description: Thorium Ore. -color: "cb8ebf" -radioactivity: 0.3 -hardness: 4 diff --git a/content/items/titanium-ore.json b/content/items/titanium-ore.json deleted file mode 100644 index eaa9904..0000000 --- a/content/items/titanium-ore.json +++ /dev/null @@ -1,5 +0,0 @@ -type: resource -name: Titanium Ore -description: Titanium Ore. -color:"7575c8" -hardness:3 diff --git a/content/items/uranium.json b/content/items/uranium.json deleted file mode 100644 index 929a22e..0000000 --- a/content/items/uranium.json +++ /dev/null @@ -1,7 +0,0 @@ -type: material -name: Uranium -description: Uranium. -color:"cce745" -explosiveness: 0.2 -radioactivity:1.3 -cost: 1.6 diff --git a/scripts/blocks/liquid/liquid-heat-exchanger.js b/scripts/blocks/liquid/liquid-heat-exchanger.js index 44a359a..2337f5c 100644 --- a/scripts/blocks/liquid/liquid-heat-exchanger.js +++ b/scripts/blocks/liquid/liquid-heat-exchanger.js @@ -14,7 +14,7 @@ const liquidHeatExchanger=heatL.heatGiver(GenericCrafter,GenericCrafter.GenericC setBars(){ this.super$setBars(); this.bars.add("heat",func(entity=> - new Bar(prov(()=>Core.bundle.format("bar.heat")+": "+(typeof(entity["getHeat"])!=="function"?0.0:entity.getHeat()).toFixed(1)),prov(()=>Pal.lightFlame),floatp(()=>typeof(entity["getHeat"])!=="function"?0:entity.tile.entity.getHeat()/this.heatCapacity)) + new Bar(prov(()=>Core.bundle.format("bar.heat")+": "+(typeof(entity["getHeat"])!=="function"?0.0:entity.getHeat()).toFixed(1)),prov(()=>Pal.lightFlame),floatp(()=>typeof(entity["getHeat"])!=="function"?0:entity.getHeat()/this.heatCapacity)) )); this.bars.add("liquid2",func(entity=> new Bar(prov(()=>entity.liquids.get(this.outputLiquid.liquid)<=0.001?Core.bundle.get("bar.liquid"):this.outputLiquid.liquid.localizedName),prov(()=>this.outputLiquid.liquid.barColor()),floatp(()=>entity.liquids.get(this.outputLiquid.liquid)/this.liquidCapacity)) diff --git a/scripts/blocks/power/nuclear-reactor.js b/scripts/blocks/power/nuclear-reactor.js index 7ace04c..4ea94ab 100644 --- a/scripts/blocks/power/nuclear-reactor.js +++ b/scripts/blocks/power/nuclear-reactor.js @@ -6,7 +6,14 @@ const nuclearReactor=heatL.heatRecator(LiquidConverter,GenericCrafter.GenericCra explosionDamage:1350, explosionRadius:40, tr: new Vec2(), - + acceptItem(item,tile,source){ + if(tile.entity.items.total()>=this.itemCapacity) return false; + return this.consumes.itemFilters.get(item.id); + }, + acceptStack(item,amount,tile,source){ + if(!this.consumes.itemFilters.get(item.id)&&source!=null&&source.getTeam()!=tile.getTeam()) return 0; + return this.itemCapacity-tile.entity.items.total(); + }, setStats(){ this.super$setStats(); this.stats.remove(BlockStat.output); @@ -26,8 +33,8 @@ const nuclearReactor=heatL.heatRecator(LiquidConverter,GenericCrafter.GenericCra }, update(tile){ const entity=tile.ent(); - c1=this.consumes.get(ConsumeType.liquid); - c2=this.consumes.get(ConsumeType.item); + var c1=this.consumes.get(ConsumeType.liquid); + var c2=this.consumes.get(ConsumeType.item); entity.coolDownHeat(); if(entity.getHeat()>60&&entity.liquids.get(c1.liquid)>=c1.amount&&entity.liquids.get(this.outputLiquid.liquid)=1){ - entity.items.remove(c2.items[0]); + var thor=entity.items.get(c2.items[0].item); + var uran=entity.items.get(c2.items[1].item); + entity.items.remove(c2.items[thor>=uran?0:1]); entity.progress=0; } } diff --git a/scripts/blocks/production/matter-disintegrator.js b/scripts/blocks/production/matter-disintegrator.js new file mode 100644 index 0000000..df50f04 --- /dev/null +++ b/scripts/blocks/production/matter-disintegrator.js @@ -0,0 +1,269 @@ +function getItem(name){ + return Vars.content.getByName(ContentType.item,name); +}; +const matterDisintegrator=extendContent(GenericCrafter,"matter-disintegrator",{ + itemValues:[], + tmpImage:null, + pauseImg:null, + playImg:null, + cancelImg:null, + invFrag:extend(BlockInventoryFragment,{ + visible:false, + isShown(){ return this.visible}, + showFor(t){ + this.visible=true; + this.super$showFor(t); + }, + hide(){ + this.visible=false; + this.super$hide(); + } + }), + _containerItems:[], + _containerItemMap:new IntMap(4,1), + getContainerItems(){return this._containerItems}, + init(){ + this.super$init(); + this._containerItems=[new ItemStack(getItem("steam-power-semiconductor"),1),new ItemStack(getItem("metaglass"),2),new ItemStack(getItem("steam-power-dense-alloy"),2)]; + this._containerItems.forEach(item=>this._containerItemMap.put(item.item.id,item)); + var regExpA=/-ore|-dense/i; + var regExpB=/-alloy|-alloy/i; + Vars.content.items().each(cons(item=>{ + var value=0; + value+=Math.pow(Math.max(item.hardness+2,2),0.75); + value+=Math.pow(Math.max(item.cost,0),0.5); + value+=regExpA.test(item.name)?0.8:0; + value+=regExpB.test(item.name)?1.6:0; + value-=(item.explosiveness+item.flammability+item.radioactivity)*0.25 + this.itemValues[item.id]=Math.max(value,0.1) + })); + }, + acceptItem(item,tile,source){ + if(item==this.outputItem.item) return false; + const items=tile.ent().items; + var cap=this.getMaximumAccepted(tile,item); + if(cap<=10) return items.get(item)exclude+=items.get(item.item)); + return items.total()-exclude-items.get(this.outputItem.item)exclude+=items.get(item.item)); + return Math.min(cap+exclude-items.total()+items.get(this.outputItem.item),amount); + }, + getMaximumAccepted(tile,item){ + var containerItem=this._containerItemMap.get(item.id); + return containerItem!=null?5*containerItem.amount:20; + }, + handleStack(item,amount,tile,source){ + const entity=tile.ent(); + const que=entity.getItemQueue(); + entity.items.add(item,amount); + if(this._containerItemMap.get(item.id)!=null||item==this.outputItem.item) return; + for(;amount>0;amount--) que.addLast(item); + }, + handleItem(item,tile,source){ + const entity=tile.ent(); + const que=entity.getItemQueue(); + entity.items.add(item,1); + if(this._containerItemMap.get(item.id)!=null||item==this.outputItem.item) return; + que.addLast(item); + }, + removeStack(tile,item,amount){ + const entity=tile.ent(); + if(entity==null||entity.items==null) return 0; + amount=Math.min(amount,entity.items.get(item)); + if(this._containerItemMap.get(item.id)==null&&item!=this.outputItem.item){ + const que=entity.getItemQueue().iterator(); + var tmp,i=amount; + while(que.hasNext()&&i>0){ + tmp=que.next(); + if(tmp==item){ + que.remove(); + i--; + } + } + } + entity.items.remove(item,amount); + return amount; + }, + update(tile){ + const entity=tile.ent(); + if(entity.isFragShown()&&!this.invFrag.isShown()&&entity.items.total()>0){ this.invFrag.showFor(tile);} + if(entity.isPaused()||entity.power.status<=0) return; + if(entity.progress==0){ + const que=entity.getItemQueue(); + if(!que.isEmpty()){ + var tmp=que.removeFirst(); + entity.items.remove(tmp,1); + entity.setCurrentItem(tmp); + entity.progress+=this.getProgressIncrease(entity,this.craftTime); + } + }else if(entity.progress>=1){ + this.offloadNear(tile,this.outputItem.item); + entity.progress=0; + entity.setCurrentItem(null); + }else entity.progress+=this.getProgressIncrease(entity,this.craftTime); + }, + buildCommon(entity){ + var cb=Core.bundle + var display2=cb.get(this.name+"-display-2"); + var display3=cb.get(this.name+"-display-3"); + if(this.dialog0==null){ + this.dialog0=new FloatingDialog(cb.get(this.name+"-dialog-0")); + this.dialog0.addCloseButton(); + this.dialog0.marginTop(10); + this.pauseImg=new Image(Icon.pause); + this.playImg=new Image(Icon.play); + this.cancelImg=new Image(Icon.cancel,Pal.remove); + } + if(this.dialog1==null){ + this.dialog1=new FloatingDialog(""); + this.dialog1.addCloseButton(); + var valueTable=this.dialog1.cont; + valueTable.clear(); + valueTable.add(cb.get(this.name+"-dialog-1")).row(); + valueTable.addImage().height(4).pad(6).color(Pal.gray).growX().width(300).row(); + valueTable.table(cons(t=>{ + var a=0; + for(var i=0;i{ + if(this.dialog0.getUserObject().isDead()){ + this.dialog0.hide(); + this.dialog1.hide(); + } + })) + var cont=this.dialog0.cont; + cont.clear(); + cont.table(cons(t=>{ + t.add(cb.get(this.name+"-title-0")); + t.addImage(Icon.warning).color(Pal.remove).visible(boolp(()=>entity.isContainerValid())).padLeft(8); + })).row() + cont.addImage().height(4).pad(6).color(Pal.gray).growX().width(300).row(); + cont.table(cons(t=>{ + var items=entity.items; + for(var i=0;i<3;i++){ + var itemStack=this._containerItems[i]; + t.addImage(itemStack.item.icon(Cicon.medium)).size(48).padBottom(8).padTop(8); + (function(i,item,amount){ + t.add(items.get(item)+"/").padLeft(8).update(cons(e=>e.setText(items.get(item)+"/"))); + t.add(String(amount)).padLeft(4).padRight(16).update(cons(e=>{if(items.get(item){ + t.add(cb.get(this.name+"-title-1")).padTop(16);; + t.addButton(cons(b=>{ + this.tmpImage=b.add(this.pauseImg); + }),run(()=>{ + entity.pause() + this.tmpImage.setElement(entity.isPaused()?this.playImg:this.pauseImg); + })).size(48).padLeft(8); + t.addImageButton(Icon.info,run(()=>{ + Vars.ui.showOkText(cb.get(this.name+"-display-0"),cb.get(this.name+"-display-1"),run(()=>{})) + })).size(48).padLeft(8); + t.addImageButton(Icon.book,run(()=>{ + this.dialog1.show(); + })).size(48).padLeft(8); + })).width(300).row(); + cont.addImage().height(4).pad(6).color(Pal.gray).growX().width(300).row(); + cont.add(func(e=>new Bar(prov(()=>(e.progress*100).toFixed(1)+"/100 %"),prov(()=>Color.valueOf("000040")),floatp(()=>e.progress))).get(entity)).width(300).height(72).row(); + cont.add(cb.get(this.name+"-title-2")).padTop(16).row(); + cont.addImage().height(4).pad(6).color(Pal.gray).growX().width(300).row(); + cont.table(cons(tt=>{ + tt.add(new Label("")).update(cons(e=>e.setText(display2+" x"+(entity.power.status*entity.timeScale).toFixed(2)))).padRight(8); + tt.table(Tex.inventory).update(cons(t=>{ + t.clear(); + var cur=entity.getCurrentItem(),status=entity.power.status; + t.addImage(Icon.power).color(status<=0?Pal.remove:status>0.99?Pal.accent:Pal.lightOrange).padRight(4) + if(cur!=null) { + t.addImage(cur.icon(Cicon.medium)); + var dots="",time=Time.time()%60/15; + for(var i=1;i{ + t.clear(); + var que=entity.getItemQueue().iterator(),i=0,tmp,tmpAmount=0,last; + while(que.hasNext()) { + var tmp=que.next(); + if(last!=tmp){ + if(i!=0) { + t.add(String(tmpAmount)); + if(i%4==0) t.row(); + else t.addImage(Icon.left).padRight(8).padLeft(8); + } + t.addImage(tmp.icon(Cicon.medium)); + last=tmp; + tmpAmount=1; + i++; + }else tmpAmount++; + } + if(i!=0)t.add(String(tmpAmount)); + })) + this.dialog0.show(); + }, + buildConfiguration(tile,table){ + const entity=tile.ent(); + this.invFrag.build(table.getParent()); + if(entity.isFragShown()){ + this.invFrag.hide(); + Vars.control.input.frag.config.hideConfig(); + }else{ + table.addImageButton(Icon.info,run(()=>{ + this.buildCommon(entity); + this.invFrag.hide(); + Vars.control.input.frag.config.hideConfig(); + entity.switchFrag(); + })) + } + entity.switchFrag(); + }, + onConfigureTileTapped(tile,other){ + if(tile!=other) { + tile.entity.switchFrag(); + this.invFrag.hide(); + } + return true + } +}); +matterDisintegrator.entityType=prov(()=>extend(GenericCrafter.GenericCrafterEntity,{ + _pause:false, + isPaused(){ return this._pause}, + pause(){ this._pause=!this._pause}, + isContainerValid(){ return !this.items.has(this.block.getContainerItems())}, + _isFragShown:false, + isFragShown(){ return this._isFragShown}, + switchFrag(){ this._isFragShown=!this._isFragShown}, + _itemQueue:new Queue(20), + getItemQueue(){ return this._itemQueue}, + _currentItem:null, + getCurrentItem(){ return this._currentItem}, + setCurrentItem(a){ this._currentItem=a}, + _heat:25, + delta(){ + return Time.delta()*(this.timeScale+Math.max(0,this._heat/1000-2)) + }, +})); +matterDisintegrator.configurable=true; +matterDisintegrator.consumes.powerCond(60,boolf(e=>{ + if(typeof e["getCurrentItem"]==="function") return e.getCurrentItem()!=null&&!e.isPaused() + return false; +}));; diff --git a/scripts/blocks/production/metal-smelter.js b/scripts/blocks/production/metal-smelter.js index 1937950..2cb7fb6 100644 --- a/scripts/blocks/production/metal-smelter.js +++ b/scripts/blocks/production/metal-smelter.js @@ -11,7 +11,7 @@ const metalSmelter=multiLib.extend(GenericSmelter,GenericCrafter.GenericCrafterE _input:[ [[["copper",3],["lead",4],["titanium",2],["steam-power-iron",3]] ,null ,5], [[["steam-power-iron",2] ,["graphite",1] ] ,null ,8], - [[["steam-power-steel",2] ,["surge-alloy",1],["plastanium",1]] ,null ,11], + [[["steam-power-steel",2] ,["steam-power-depleted-uranium",1],["plastanium",1]] ,null ,11], ], craftTimes:[75,90,90,90], output:[], diff --git a/scripts/blocks/production/thermal-centrifuge.js b/scripts/blocks/production/thermal-centrifuge.js index f4abeca..1adbef6 100644 --- a/scripts/blocks/production/thermal-centrifuge.js +++ b/scripts/blocks/production/thermal-centrifuge.js @@ -4,6 +4,7 @@ thermalCentrifuge=extendContent(Separator,"thermal-centrifuge",{ for(var l=0;lentity.tile.entity!=null?entity.tile.entity.target!=null:false)); + this.consumes.powerCond(this.powerUse,boolf(entity=>entity!=null?entity.target!=null:false)); this.ammo(Vars.content.getByName(ContentType.item,"steam-power-bullet"),bullet2,Vars.content.getByName(ContentType.item,"steam-power-armor-piercing-shell"),bullet1); this.super$init(); }, diff --git a/scripts/blocks/turrets/ravage.js b/scripts/blocks/turrets/ravage.js index c216767..f2aa050 100644 --- a/scripts/blocks/turrets/ravage.js +++ b/scripts/blocks/turrets/ravage.js @@ -1,6 +1,4 @@ -if (typeof(floatc2)== "undefined"){ - const floatc2 = method => new Floatc2(){get : method}; -} +const floatc2=this.global.funcs.floatc2; const plasmaBoom1=newEffect(48,e=>{ Draw.color(Color.white); Lines.stroke(e.fout()*2) @@ -131,7 +129,7 @@ const ravage=extendContent(ItemTurret,"ravage",{ soundTimer:0, init(){ this.hasPower=true; - this.consumes.powerCond(this.powerUse,boolf(entity=>entity.tile.entity!=null?entity.tile.entity.target!=null:false)); + this.consumes.powerCond(this.powerUse,boolf(entity=>entity!=null?entity.target!=null:false)); this.ammo(Items.graphite,plasma1,Items.phasefabric,plasma2); this.super$init(); this.soundTimer=this.timers++; diff --git a/scripts/blocks/walls.js b/scripts/blocks/walls.js new file mode 100644 index 0000000..20ed3db --- /dev/null +++ b/scripts/blocks/walls.js @@ -0,0 +1,77 @@ +ironWall=new Wall("iron-wall"); +ironWallLarge=new Wall("iron-wall-large"); +radiationExposure=new StatusEffect("radiation-exposure"); +radiationExposure.speedMultiplier=0.8; +radiationExposure.damage=0.1; +uraniumWall=extendContent(Wall,"uranium-wall",{}); +uraniumWall.entityType=prov(()=>extend(TileEntity,{ + damage(damage){ + this.super$damage(damage); + if(this.timer.get(60)) { + Units.nearbyEnemies(this.getTeam(),this.x-120,this.y-120,240,240,cons(u=>{ + if(this.dst2(u)<120*120) u.applyEffect(radiationExposure,60); + })); + } + }, +})); +uraniumWallLarge=extendContent(Wall,"uranium-wall-large",{}); +uraniumWallLarge.entityType=prov(()=>extend(TileEntity,{ + damage(damage){ + this.super$damage(damage); + if(this.timer.get(60)) { + Units.nearbyEnemies(this.getTeam(),this.x-120,this.y-120,240,240,cons(u=>{ + if(this.dst2(u)<120*120) u.applyEffect(radiationExposure,60); + })); + } + }, +})); +steelWall=extendContent(Wall,"steel-wall",{ + handleDamage(tile,amount){ + return Math.max(0,amount-3/Vars.state.rules.blockHealthMultiplier); + } +}); +steelWallLarge=extendContent(Wall,"steel-wall-large",{ + handleDamage(tile,amount){ + return Math.max(0,amount-3/Vars.state.rules.blockHealthMultiplier); + } +}); +denseAlloyWall=extendContent(Wall,"dense-alloy-wall",{ + handleDamage(tile,amount){ + return tile.entity.isBulletHit()?amount:Math.max(amount*0.75-1000/Vars.state.rules.blockHealthMultiplier,0) + }, + handleBulletHit(entity,bullet){ + entity.onBulletHit() + entity.damage(bullet.damage()); + } +}); +denseAlloyWall.entityType=prov(()=>extend(TileEntity,{ + _bulletHit:false, + isBulletHit(){ + var ret=this._bulletHit; + this._bulletHit=false; + return ret; + }, + onBulletHit(){ + this._bulletHit=true; + } +})); +denseAlloyWallLarge=extendContent(Wall,"dense-alloy-wall-large",{ + handleDamage(tile,amount){ + return tile.entity.isBulletHit()?amount:Math.max(amount*0.75-1000/Vars.state.rules.blockHealthMultiplier,0) + }, + handleBulletHit(entity,bullet){ + entity.onBulletHit() + entity.damage(bullet.damage()); + } +}); +denseAlloyWallLarge.entityType=prov(()=>extend(TileEntity,{ + _bulletHit:false, + isBulletHit(){ + var ret=this._bulletHit; + this._bulletHit=false; + return ret; + }, + onBulletHit(){ + this._bulletHit=true; + } +})); diff --git a/scripts/initializer.js b/scripts/initializer.js index c1aa403..83f053c 100644 --- a/scripts/initializer.js +++ b/scripts/initializer.js @@ -38,6 +38,7 @@ const initializer=extendContent(Block,"initializer",{ initializer.update=true; initializer.sync=true; initializer.solid=true;*/ +new Separator("crystallizer"); Bullets.standardDense.damage=22; Bullets.standardIncendiary.damage=13; Bullets.standardHoming.damage=11; @@ -59,3 +60,71 @@ Bullets.flakSurge.splashDamage=39; Bullets.standardDenseBig.damage=50; Bullets.standardIncendiaryBig.damage=46; Bullets.standardThoriumBig.damage=78; +const stone=new Item("stone",Color.valueOf("989aa4")); +stone.type=ItemType.material; +stone.cost=0.7; +const copperOre=new Item("copper-ore",Color.valueOf("b8705c")); +copperOre.hardness=1; +const leadOre=new Item("lead-ore",Color.valueOf("6f687e")); +leadOre.hardness=1; +const ironOre=new Item("iron-ore",Color.valueOf("966e5a")); +ironOre.hardness=3; +const titaniumOre=new Item("titanium-ore",Color.valueOf("7575c8")); +titaniumOre.hardness=3; +const thoriumOre=new Item("thorium-ore",Color.valueOf("cb8ebf")); +thoriumOre.radioactivity=0.3; +thoriumOre.hardness=4; +const glass=new Item("glass",Color.valueOf("ffffff")); +glass.type=ItemType.material; +glass.cost=0.8; +const iron=new Item("iron",Color.valueOf("b0bac0")); +iron.type=ItemType.material; +const uranium=new Item("uranium",Color.valueOf("cce745")); +uranium.type=ItemType.material; +uranium.explosiveness=0.2; +uranium.radioactivity=1.3; +uranium.cost=1.6; +const depletedUranium=new Item("depleted-uranium",Color.valueOf("89a015")); +depletedUranium.type=ItemType.material; +depletedUranium.explosiveness=0.1; +depletedUranium.radioactivity=0.4; +const circuit=new Item("circuit",Color.valueOf("4cb482")); +circuit.type=ItemType.material; +circuit.flammability=0.19; +circuit.cost=3; +const semiconductor=new Item("semiconductor",Color.valueOf("b4b428")); +semiconductor.type=ItemType.material; +semiconductor.explosiveness=0.1; +semiconductor.flammability=0.19; +semiconductor.cost=4; +const computer=new Item("computer",Color.valueOf("6e7080")); +computer.type=ItemType.material; +computer.explosiveness=0.19; +computer.flammability=0.2; +computer.cost=5; +const steel=new Item("steel",Color.valueOf("767a84")); +steel.type=ItemType.material; +steel.cost=1.6; +const denseAlloy=new Item("dense-alloy",Color.valueOf("8c8c78")); +denseAlloy.type=ItemType.material; +denseAlloy.radioactivity=0.1; +denseAlloy.cost=2; +/*const quantumMass=new Item("quantum-mass",Color.valueOf("000080")); +quantumMass.type=ItemType.material;*/ +//TODO 새 값 추가하기 +const bullet=new Item("bullet",Color.valueOf("c88c50")); +bullet.explosiveness=0.1; +const ap=new Item("armor-piercing-shell",Color.valueOf("ffff00")); +ap.explosiveness=0.1; +const clusterBullet=new Item("cluster-bullet",Color.valueOf("ff8080")); +clusterBullet.explosiveness=0.3; +const he=new Item("high-explosive",Color.valueOf("ec1c24")); +he.explosiveness=0.8; +he.flammability=0.19; +const missile=new Item("missile",Color.valueOf("88001b")); +missile.explosiveness=1; +missile.flammability=0.19; +const doom=new Item("doom",Color.valueOf("96c80e")); +doom.explosiveness=1; +doom.flammability=0.19; +doom.radioactivity=0.6; diff --git a/scripts/main.js b/scripts/main.js index 9e73a88..010dea1 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -1,3 +1,6 @@ +importPackage(Packages.arc.graphics.gl); +importPackage(Packages.arc.audio); +importPackage(Packages.arc.mock); if(this.global.furnaces===undefined) { this.global.furnaces={ reset(){ @@ -67,6 +70,8 @@ if(this.global.teleporters===undefined){ for(var i=0;i<8;i++) this.global.teleporters[i]={}; } if(this.global.sounds===undefined) this.global.sounds={}; +if(this.global.funcs===undefined) this.global.funcs={}; +this.global.funcs.floatc2=method => new Floatc2(){get : method}; require("override"); require("initializer"); require("blocks/distribution/electric-conveyor"); @@ -87,8 +92,9 @@ require("steam-power/blocks/production/bullet-mill"); require("steam-power/blocks/production/missile-factory"); require("steam-power/blocks/production/thermal-centrifuge"); require("blocks/production/metal-smelter"); +//require("steam-power/blocks/production/matter-disintegrator"); // -require("steam-power/blocks/power/geothermal-system"); +require("blocks/power/geothermal-system"); require("blocks/power/turbine"); require("blocks/power/nuclear-reactor"); require("blocks/power/nuclear-fusion-reactor"); @@ -103,5 +109,7 @@ require("blocks/turrets/ravage"); require("blocks/turrets/launchpad"); require("blocks/turrets/breakthrough"); // +require("blocks/walls"); +// require("units/draug-a"); require("units/younggam"); diff --git a/scripts/units/younggam.js b/scripts/units/younggam.js index 418ae6a..5b94807 100644 --- a/scripts/units/younggam.js +++ b/scripts/units/younggam.js @@ -1,12 +1,10 @@ -importPackage(Packages.arc.audio); -importPackage(Packages.arc.mock); var sounds=this.global.sounds; function loadsound(name){ - var path="sounds/"+name+".ogg"; if(Vars.headless) { sounds[name]=new MockSound(); return; } + var path="sounds/"+name+".ogg"; if(Core.assets.contains(path,Sound)) sounds[name]=Core.assets.get(path,Sound); else Core.assets.load(path,Sound).loaded=cons(a=>sounds[name]=a); } @@ -16,7 +14,7 @@ loadsound("laser-0"); loadsound("laser-1"); loadsound("laser-2"); if (typeof(floatc)==="undefined") const floatc = method => new Floatc(){get : method}; -if (typeof(floatc2)==="undefined") const floatc2 = method => new Floatc2(){get : method}; +const floatc2 = this.global.funcs.floatc2; var yamatoHit=newEffect(14,e=>{ Draw.color(Color.white,Pal.lightOrange,e.fin()); e.scaled(7,cons(s=>{ diff --git a/sprites/blocks/walls/uranium-wall-large.png b/sprites/blocks/walls/uranium-wall-large.png new file mode 100644 index 0000000000000000000000000000000000000000..f2ebeb5221bd2f44da619bab39d8f6cd48a91623 GIT binary patch literal 961 zcmV;y13vtTP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D16D~yK~#8N<(e^W z6)_NoUtWQf6GTW6H5K9p6cikQHZ478;2N}PIRFI}7l^2+C}=oBBnlG!%lgIfj>j{e z@%TOXq=e05*E92Z?6s7fef{z3?)?18E{ZRoZ`LcC*Kb~~S265AU4P%*-u_;H91mAu zbn#%1Z^s~EM)6<~0A@;9?>9arU)dRnN{&jWr?#1$Nji|(> z`GAxY)h(M2;EF#MH2LHcLQPI{q%zp`$8YP^mWbK+&Zlc?sh|;6zzPjOYZF08JOq365?V;>;*}} ze&%c-_RRQ@po%`~EkTLs?E>v{?)oi~S{*TBX@~`A3bS@f5|J0IDIWJq?|1KjgvWA8 z5;VnY5eeum#zTSyi9A*S3a}Poc|Jm5Re)!3?O3?qGd|Y|;O&i06$ZMM?uA=KBJ_l-vV5rGbC8^*$D7ld#8Z716rrFXuR?fjc`nb1J8V# zBbCAa`M(j$1Jq2P>fZ=an_~4GAVsrjN?Vs3vo!{u)x3>l85u#+(&B;k{v14~=|+=) z*6dpfslmnEuc0&&y0eoMZ>1)XijB`ME+0OZO6bb6ReS`!lvI6;>1s;*b3=DjSL74G){)!Z!25wIm$B+p3w^I-D9x~uzxcsg`Kt3&jU2e@` zo7~g}5N&2Nx@^)J9l?CY zR<}hf8`}0aL@fCF-)XDVc4-UO$hpju^soJKU$weetT$s@``0!XC$8w3$_oWWpYkvT zw6{4eD4l)PVe!`~C!&i@Crx!RWUp$x%5jEeGw*RDu9*hH3Hm>Vw5 Sa>*MQRt%o5elF{r5}E)q){>F{ literal 0 HcmV?d00001 diff --git a/sprites/items/quantum-mass.png b/sprites/items/quantum-mass.png new file mode 100644 index 0000000000000000000000000000000000000000..52bf10a61446545c25bff7a4a55743503f8d70df GIT binary patch literal 530 zcmV+t0`2{YP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0jEhsK~z{r?UgZ3 z#4r#=9ZIM`OU)Iy0yPpxfQXJh1q~Gq#rAY)p`%5jrlsTx)I?B08}c0wOvdBbanh`` zPs-ZfNcn$$CbrqIwtRekH@Ms~n=Lm6kwS94THQ`EF=#*v@ilmUda&aZ6F~!9jD%>M z6V-qwF5&-|9$s{_` z#Wj)*fUt=cmV8KDJG4d_06`Njh}6o7;wQdnZ@q5 zos&3+&JIHBfoub@ZJYQ%z^a0vTHz U7ofB;A^-pY07*qoM6N<$f|