mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 04:41:51 +09:00
soldering wire
This commit is contained in:
@@ -35,6 +35,13 @@
|
||||
]
|
||||
},
|
||||
|
||||
"item@basegame:50": { /* soldering wire */
|
||||
"workbench": "wirerollingmill",
|
||||
"ingredients": [
|
||||
[10, 1, "item@basegame:181"] /* 1 solder bar */
|
||||
]
|
||||
},
|
||||
|
||||
"item@basegame:35": { /* copper bulb */
|
||||
"workbench": "basiccrafting",
|
||||
"ingredients": [
|
||||
|
||||
@@ -48,6 +48,7 @@ id;classname;tags
|
||||
47;net.torvald.terrarum.modulebasegame.gameitems.ItemWrench;TOOL,WRENCH
|
||||
48;net.torvald.terrarum.modulebasegame.gameitems.ItemAlloyingFurnace;FIXTURE,STATION
|
||||
49;net.torvald.terrarum.modulebasegame.gameitems.ItemLogicSignalAdder;FIXTURE,SIGNAL
|
||||
50;net.torvald.terrarum.modulebasegame.gameitems.ItemSolderingWire;
|
||||
|
||||
# ingots
|
||||
112;net.torvald.terrarum.modulebasegame.gameitems.IngotCopper;INGOT
|
||||
|
||||
|
Binary file not shown.
@@ -44,6 +44,7 @@
|
||||
"TOOLTIP_item@basegame:36": "Creates wires from metal ingots",
|
||||
"TOOLTIP_item@basegame:47": "Reorients gadgets",
|
||||
"TOOLTIP_item@basegame:48": "Melts two metal ingots to make a bar of alloy",
|
||||
"TOOLTIP_item@basegame:50": "Put it on the Electronics Workbench",
|
||||
|
||||
"TOOLTIP_item@basegame:114": "A precious fuel for the steel production",
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
"ITEM_SLEDGEHAMMER_COPPER": "Copper Sledgehammer",
|
||||
"ITEM_SLEDGEHAMMER_IRON": "Iron Sledgehammer",
|
||||
"ITEM_SLEDGEHAMMER_STEEL": "Steel Sledgehammer",
|
||||
"ITEM_SOLDERING_WIRE": "Soldering Wire",
|
||||
"ITEM_SMELTER_SMALL": "Small Smelter",
|
||||
"ITEM_STORAGE_CHEST": "Storage Chest",
|
||||
"ITEM_TABLE_OAK": "Oak Table",
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
"TOOLTIP_item@basegame:36": "금속 주괴를 사용해 철사를 뽑아냅니다",
|
||||
"TOOLTIP_item@basegame:47": "기기의 방향을 바꿉니다",
|
||||
"TOOLTIP_item@basegame:48": "두 금속 괴를 녹여 합금을 만듭니다",
|
||||
"TOOLTIP_item@basegame:50": "전자 작업대에 갖다놓으세요",
|
||||
|
||||
"TOOLTIP_item@basegame:114": "강철 생산의 소중한 연료입니다",
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"ITEM_INGOT_ROSEGOLD": "분홍금괴",
|
||||
"ITEM_INGOT_SILVER": "은괴",
|
||||
"ITEM_INGOT_SILVER_BILLON": "은동괴",
|
||||
"ITEM_INGOT_SOLDER": "땜납",
|
||||
"ITEM_INGOT_SOLDER": "막대납",
|
||||
"ITEM_INGOT_STEEL": "강철괴",
|
||||
"ITEM_INGOT_TIN": "주석괴",
|
||||
"ITEM_INGOT_ZINC": "아연괴",
|
||||
@@ -70,6 +70,7 @@
|
||||
"ITEM_SLEDGEHAMMER_COPPER": "구리 해머",
|
||||
"ITEM_SLEDGEHAMMER_IRON": "철 해머",
|
||||
"ITEM_SLEDGEHAMMER_STEEL": "강철 해머",
|
||||
"ITEM_SOLDERING_WIRE": "실납",
|
||||
"ITEM_SMELTER_SMALL": "소형 고로",
|
||||
"ITEM_STORAGE_CHEST": "보관상자",
|
||||
"ITEM_TABLE_OAK": "나무 탁자",
|
||||
|
||||
@@ -716,63 +716,50 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
// #1. Consume an consumables
|
||||
// don't want to open the UI and use the item at the same time, would ya?
|
||||
if (itemOnGrip?.isConsumable == true) {
|
||||
// click filtering (latch stuff) is handled by IngameController (see inventoryCategoryAllowClickAndDrag)
|
||||
// To disable click dragging for tool/block/etc., put `override val disallowToolDragging = true` to the item's code
|
||||
val consumptionSuccessful = itemOnGrip.startPrimaryUse(actor, delta)
|
||||
if (consumptionSuccessful > -1)
|
||||
(actor as Pocketed).inventory.consumeItem(itemOnGrip, consumptionSuccessful)
|
||||
mouseInInteractableRange(actor) { mwx, mwy, mtx, mty ->
|
||||
// #1. interact with the fixture if NOT FixtureInteractionBlocked
|
||||
// scan for the one with non-null UI.
|
||||
// what if there's multiple of such fixtures? whatever, you are supposed to DISALLOW such situation.
|
||||
if (fixtureUnderMouse != null && itemOnGrip !is FixtureInteractionBlocked) {
|
||||
if (!worldPrimaryClickLatch) {
|
||||
worldPrimaryClickLatch = true
|
||||
fixtureUnderMouse.let { fixture ->
|
||||
fixture.mainUI?.let { ui ->
|
||||
uiOpened = true
|
||||
|
||||
worldPrimaryClickLatch = true
|
||||
}
|
||||
else { // held item is not consumable or holding no items
|
||||
mouseInInteractableRange(actor) { mwx, mwy, mtx, mty ->
|
||||
// #2. interact with the fixture
|
||||
// scan for the one with non-null UI.
|
||||
// what if there's multiple of such fixtures? whatever, you are supposed to DISALLOW such situation.
|
||||
if (fixtureUnderMouse != null && itemOnGrip !is FixtureInteractionBlocked) {
|
||||
if (!worldPrimaryClickLatch) {
|
||||
worldPrimaryClickLatch = true
|
||||
fixtureUnderMouse.let { fixture ->
|
||||
fixture.mainUI?.let { ui ->
|
||||
uiOpened = true
|
||||
// property 'uiFixture' is a dedicated property that the TerrarumIngame recognises.
|
||||
// when it's not null, the UI will be updated and rendered
|
||||
// when the UI is closed, it'll be replaced with a null value
|
||||
uiFixture = ui
|
||||
ui.setPosition(
|
||||
(Toolkit.drawWidth - ui.width) / 4,
|
||||
(App.scr.height - ui.height) / 4 // what the fuck?
|
||||
)
|
||||
ui.setAsOpen()
|
||||
}
|
||||
|
||||
// property 'uiFixture' is a dedicated property that the TerrarumIngame recognises.
|
||||
// when it's not null, the UI will be updated and rendered
|
||||
// when the UI is closed, it'll be replaced with a null value
|
||||
uiFixture = ui
|
||||
ui.setPosition(
|
||||
(Toolkit.drawWidth - ui.width) / 4,
|
||||
(App.scr.height - ui.height) / 4 // what the fuck?
|
||||
)
|
||||
ui.setAsOpen()
|
||||
}
|
||||
|
||||
if (!uiOpened) {
|
||||
fireFixtureInteractEvent(fixture, mwx, mwy)
|
||||
}
|
||||
if (!uiOpened) {
|
||||
fireFixtureInteractEvent(fixture, mwx, mwy)
|
||||
}
|
||||
}
|
||||
}
|
||||
// #3. If no fixture under mouse or FixtureInteractionBlocked, use the item
|
||||
else if (itemOnGrip != null) {
|
||||
// click filtering (latch stuff) is handled by IngameController (see inventoryCategoryAllowClickAndDrag)
|
||||
// To disable click dragging for tool/block/etc., put `override val disallowToolDragging = true` to the item's code
|
||||
val consumptionSuccessful = itemOnGrip.startPrimaryUse(actor, delta)
|
||||
if (consumptionSuccessful > -1)
|
||||
(actor as Pocketed).inventory.consumeItem(itemOnGrip, consumptionSuccessful)
|
||||
|
||||
worldPrimaryClickLatch = true
|
||||
}
|
||||
// #4. If not holding any item and can do barehandaction (size big enough that barehandactionminheight check passes), do it
|
||||
else {
|
||||
performBarehandAction(actor, delta, mwx, mwy, mtx, mty)
|
||||
}
|
||||
|
||||
0L
|
||||
}
|
||||
// #2. If no fixture under mouse or FixtureInteractionBlocked, use the item
|
||||
else if (itemOnGrip != null) {
|
||||
// click filtering (latch stuff) is handled by IngameController (see inventoryCategoryAllowClickAndDrag)
|
||||
// To disable click dragging for tool/block/etc., put `override val disallowToolDragging = true` to the item's code
|
||||
val consumptionSuccessful = itemOnGrip.startPrimaryUse(actor, delta)
|
||||
if (consumptionSuccessful > -1)
|
||||
(actor as Pocketed).inventory.consumeItem(itemOnGrip, consumptionSuccessful)
|
||||
|
||||
worldPrimaryClickLatch = true
|
||||
}
|
||||
// #3. If not holding any item and can do barehandaction (size big enough that barehandactionminheight check passes), do it
|
||||
else {
|
||||
performBarehandAction(actor, delta, mwx, mwy, mtx, mty)
|
||||
}
|
||||
|
||||
0L
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,4 +88,13 @@ class ItemTorch(originalID: ItemID) : LightIngredientBase(originalID) {
|
||||
override fun effectWhileEquipped(actor: ActorWithBody, delta: Float) {
|
||||
BlockBase.blockEffectWhenEquipped(actor, delta)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2024-03-11.
|
||||
*/
|
||||
class ItemSolderingWire(originalID: ItemID) : LightIngredientBase(originalID) {
|
||||
override var originalName = "ITEM_SOLDERING_WIRE"
|
||||
override val itemImage: TextureRegion
|
||||
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(6,2)
|
||||
}
|
||||
Binary file not shown.
BIN
work_files/graphics/wires/four_signal_wires.kra
LFS
Normal file
BIN
work_files/graphics/wires/four_signal_wires.kra
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user