1
Fork 0
mirror of https://github.com/Steffo99/noita-starting-perk.git synced 2024-11-27 16:14:18 +00:00
noita-starting-perk/init.lua

24 lines
641 B
Lua
Raw Normal View History

2021-09-10 20:53:48 +00:00
dofile("data/scripts/perks/perk.lua")
dofile("data/scripts/lib/utilities.lua")
dofile("data/scripts/lib/mod_settings.lua")
2021-08-12 02:49:54 +00:00
function OnPlayerSpawned( player_entity )
-- Run this only once per game
2023-03-24 21:52:20 +00:00
local init_check_flag = "veggies_init_done"
2021-08-12 02:49:54 +00:00
if GameHasFlagRun( init_check_flag ) then
return
end
GameAddFlagRun( init_check_flag )
2021-09-10 20:53:48 +00:00
-- Print mod settings to the player
2023-03-24 21:52:20 +00:00
GamePrint("Starting with the Eat Your Vegetables perk")
2021-09-10 20:53:48 +00:00
2023-03-24 21:52:20 +00:00
-- Spawn the actual perk
local perk_entity = perk_spawn( 771, -96, "FOOD_CLOCK" )
2021-09-10 21:41:49 +00:00
2023-03-24 21:52:20 +00:00
-- Give the perk to the player
perk_pickup( perk_entity, player_entity, EntityGetName( perk_entity ), false, false )
2021-08-12 02:49:54 +00:00
end