mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Add joinable legacy code
This commit is contained in:
@@ -15,12 +15,12 @@ local function item_parse(input, _, reject)
|
||||
local lower_input = input:lower():gsub(' ', '-')
|
||||
|
||||
-- Simple Case - internal name is given
|
||||
local item = game.item_prototypes[lower_input]
|
||||
local item = prototypes.item[lower_input]
|
||||
if item then return item end
|
||||
|
||||
-- Second Case - rich text is given
|
||||
local item_name = input:match('%[item=([0-9a-z-]+)%]')
|
||||
item = game.item_prototypes[item_name]
|
||||
item = prototypes.item[item_name]
|
||||
if item then return item end
|
||||
|
||||
-- No item found, we do not attempt to search all prototypes as this will be expensive
|
||||
|
||||
Reference in New Issue
Block a user