diff --git a/advtrains_interlocking_mod/init.lua b/advtrains_interlocking_mod/init.lua index 0cf4038..6770c27 100644 --- a/advtrains_interlocking_mod/init.lua +++ b/advtrains_interlocking_mod/init.lua @@ -1,15 +1,15 @@ -- twi_mods/advtrains_interlocking_mod/init.lua -- Modify advtrains_interlocking -- Copyright (C) 2024 1F616EMO -- SPDX-License-Identifier: AGPL-3.0-or-later for _, name in ipairs({ - "advtrains_interlocking:ds_danger", - "advtrains_interlocking:ds_free", - "advtrains_interlocking:ds_slow" + -- "advtrains_interlocking:ds_danger", + -- "advtrains_interlocking:ds_free", + -- "advtrains_interlocking:ds_slow" }) do twi_fx.override_group(name, { not_in_creative_inventory = 1, not_in_craft_guide = 1, }) end diff --git a/advtrains_moreslopes_mod/init.lua b/advtrains_moreslopes_mod/init.lua index b69feba..a7ed71a 100644 --- a/advtrains_moreslopes_mod/init.lua +++ b/advtrains_moreslopes_mod/init.lua @@ -1,35 +1,35 @@ -- twi_mods/advtrains_moreslopes_mod/init.lua -- Modify advtrains_moreslopes -- Copyright (C) 2024 1F616EMO -- SPDX-License-Identifier: AGPL-3.0-or-later -core.register_craft({ - type = "shapeless", - recipe = { "advtrains:dtrack_more_slopeplacer" }, - output = "advtrains:dtrack_slopeplacer", -}) +-- core.register_craft({ +-- type = "shapeless", +-- recipe = { "advtrains:dtrack_more_slopeplacer" }, +-- output = "advtrains:dtrack_slopeplacer", +-- }) -core.register_craft({ - type = "shapeless", - recipe = { "advtrains:dtrack_slopeplacer" }, - output = "advtrains:dtrack_more_slopeplacer", -}) +-- core.register_craft({ +-- type = "shapeless", +-- recipe = { "advtrains:dtrack_slopeplacer" }, +-- output = "advtrains:dtrack_more_slopeplacer", +-- }) -core.override_item("advtrains:dtrack_slopeplacer", { - description = ">= 1:3 " .. core.registered_items["advtrains:dtrack_slopeplacer"].description, -}) +-- core.override_item("advtrains:dtrack_slopeplacer", { +-- description = ">= 1:3 " .. core.registered_items["advtrains:dtrack_slopeplacer"].description, +-- }) -core.override_item("advtrains:dtrack_more_slopeplacer", { - description = "<= 1:4 " .. core.registered_items["advtrains:dtrack_more_slopeplacer"].description, -}) +-- core.override_item("advtrains:dtrack_more_slopeplacer", { +-- description = "<= 1:4 " .. core.registered_items["advtrains:dtrack_more_slopeplacer"].description, +-- }) for i = 4, 8 do for j = 1, i do local name = "advtrains:dtrack_more_vst" .. i .. j core.override_item(name, { walkable = true, collision_box = core.registered_items[name].selection_box, }) end end diff --git a/twi_fx/init.lua b/twi_fx/init.lua index 38076de..4cd0f39 100644 --- a/twi_fx/init.lua +++ b/twi_fx/init.lua @@ -1,53 +1,54 @@ -- twi_mods/twi_fx/init.lua -- Common functions --[[ Copyright © 2024 1F616EMO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] twi_fx = {} function twi_fx.register_all_stairsplus(modname, name) local nodename = modname .. ":" .. name local def = table.copy(core.registered_nodes[nodename]) def.is_ground_content = false def.sunlight_propagates = true stairsplus:register_all(modname, name, nodename, def) end function twi_fx.override_group(name, new_groups) + assert(core.registered_items[name], "Item " .. name .. " does not exist") local groups = table.copy(core.registered_items[name].groups or {}) for k, v in pairs(new_groups) do groups[k] = v == 0 and nil or v end core.override_item(name, { groups = groups, }) end twi_fx.register_on_chat_message = core.global_exists("beerchat") and beerchat.register_on_chat_message or core.register_on_chat_message -- Limit that out hardware can bear twi_fx.ADVTRAINS_MAX_TRAIN_SPEED = 30