Fix wands being free on host.

Just need to fix spells being free on host now.
This commit is contained in:
IQuant 2024-09-16 15:59:46 +03:00
parent 6f6abd6550
commit 96595a4c68
3 changed files with 17 additions and 1 deletions

View file

@ -43,6 +43,8 @@ local function run_spawn_fn(fn_name, x, y, ...)
if fn_info.kind == "item" then
local eid = ret
ctx.cap.item_sync.globalize(eid, true, ctx.rpc_peer_id)
local x, y = EntityGetTransform(eid)
EntityLoad("mods/quant.ew/files/system/gen_sync/tmp_shop_area.xml", x, y)
end
end

View file

@ -0,0 +1,15 @@
<Entity
tags="shop" >
<HitboxComponent
aabb_min_x="-5"
aabb_min_y="-5"
aabb_max_x="5"
aabb_max_y="5"
damage_multiplier="1"
is_enemy="1"
is_item="0"
is_player="0"
offset.x="0"
offset.y="0" />
</Entity>

View file

@ -47,7 +47,6 @@ end
function item_sync.get_global_item_id(item)
local gid = EntityGetFirstComponentIncludingDisabled(item, "VariableStorageComponent", "ew_global_item_id")
if gid == nil then
GamePrint("Item has no gid")
return "unknown"
end
local ret = ComponentGetValue2(gid, "value_string")