2024-06-01 17:06:27 +03:00
|
|
|
local ctx = dofile_once("mods/quant.ew/files/src/ctx.lua")
|
|
|
|
local util = dofile_once("mods/quant.ew/files/src/util.lua")
|
|
|
|
|
|
|
|
local module = {}
|
|
|
|
|
|
|
|
function module.on_local_player_spawn(my_player)
|
2024-06-21 15:45:55 +03:00
|
|
|
|
|
|
|
local player_entity = my_player.entity
|
|
|
|
-- ~Portal to lab
|
|
|
|
-- EntitySetTransform(player_entity, 0, 12600)
|
|
|
|
-- The vault
|
|
|
|
-- EntitySetTransform(player_entity, 0, 8600-20)
|
|
|
|
|
|
|
|
-- EntitySetTransform(player_entity, -1990, 2171)
|
|
|
|
|
|
|
|
-- EntitySetTransform(player_entity, 512*3+10, 512*3+10)
|
|
|
|
|
2024-07-17 12:35:50 +03:00
|
|
|
-- Kolmi room
|
2024-07-17 12:06:25 +03:00
|
|
|
-- EntitySetTransform(player_entity, 3400, 13040)
|
2024-07-17 12:35:50 +03:00
|
|
|
|
|
|
|
-- The work
|
|
|
|
-- EntitySetTransform(player_entity, 6300, 15155)
|
2024-07-14 14:57:00 +03:00
|
|
|
|
2024-07-18 15:03:07 +03:00
|
|
|
-- EntitySetTransform(player_entity, 1333, 770)
|
2024-07-17 17:40:47 +03:00
|
|
|
|
2024-07-23 15:30:42 +03:00
|
|
|
-- Kivi
|
|
|
|
-- EntitySetTransform(player_entity, 7427, -4960)
|
|
|
|
|
|
|
|
-- Meat biome
|
2024-07-25 22:35:33 +03:00
|
|
|
-- EntitySetTransform(player_entity, 7328, 9263)
|
2024-07-23 14:27:35 +03:00
|
|
|
|
2024-06-21 15:45:55 +03:00
|
|
|
-- util.load_ephemerial("mods/quant.ew/files/entities/client.xml", 512*3+20, 512*3+10)
|
|
|
|
-- EntityLoad("mods/quant.ew/files/entities/client.xml", 512*3+20, 512*3+10)
|
|
|
|
|
2024-07-14 14:57:00 +03:00
|
|
|
ctx.cap.health.set_max_health(1000)
|
|
|
|
ctx.cap.health.set_health(1000)
|
|
|
|
-- util.set_ent_health(player_entity, {1000, 1000})
|
2024-06-21 15:45:55 +03:00
|
|
|
local wallet = EntityGetFirstComponentIncludingDisabled(player_entity, "WalletComponent")
|
|
|
|
ComponentSetValue2(wallet, "money", 100000)
|
|
|
|
-- GameSetCameraFree(true)
|
|
|
|
|
2024-07-14 14:57:00 +03:00
|
|
|
-- dofile_once("data/scripts/perks/perk.lua")
|
|
|
|
-- local x, y = EntityGetFirstHitboxCenter(player_entity)
|
|
|
|
-- perk_spawn(x, y, "LASER_AIM", true)
|
|
|
|
-- perk_spawn(x-50, y, "GLASS_CANNON", true)
|
|
|
|
-- perk_spawn(x-25, y, "EDIT_WANDS_EVERYWHERE", true)
|
|
|
|
-- EntityLoad("data/entities/items/pickup/heart.xml", x-75, y-20)
|
2024-06-21 15:45:55 +03:00
|
|
|
|
2024-06-01 17:06:27 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
function module.on_world_update_host()
|
2024-07-18 13:15:21 +03:00
|
|
|
local hp, max_hp = util.get_ent_health(ctx.my_player.entity)
|
|
|
|
if hp < max_hp / 2 then
|
|
|
|
-- util.set_ent_health(ctx.my_player.entity, {max_hp, max_hp})
|
2024-06-01 17:06:27 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2024-07-23 14:43:56 +03:00
|
|
|
return module
|