Skip to content

Commit

Permalink
fix some little things
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Oct 31, 2021
1 parent 0733785 commit 15ef54b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
10 changes: 5 additions & 5 deletions docs/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,11 +760,11 @@ def print_af(lf, af):
-- It's just a weird example OK!
ids = get_entities_by_mask(MASK.PLAYER) -- This just covers CHARs
for i,id in ipairs(ids) do
e = get_entity(id):as_player() -- cast Entity to Player to access inventory
e.health = 99
e.inventory.bombs = 99
e.inventory.ropes = 99
e.type.jump = 0.36
e = get_entity(id) -- casts Entity to Player automatically
e.health = 99 -- setting Player::health
e.inventory.bombs = 99 -- setting Inventory::bombs
e.inventory.ropes = 99 -- setting Inventory::ropes
e.type.jump = 0.36 -- setting EntityDB::jump
end
```"""
)
Expand Down
3 changes: 2 additions & 1 deletion examples/randomizer2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ meta.name = "Randomizer Two"
meta.description = [[Fair, balanced, beginner friendly... These are not words I would use to describe The Randomizer. Fun though? Abso-hecking-lutely.
Second incarnation of The Randomizer with new API shenannigans. Most familiar things from 1.2 are still there, but better! Progression is changed though, shops are random, level gen is crazy, chain item stuff, multiple endings, secrets... I can't possibly test all of this so fingers crossed it doesn't crash a lot.]]
meta.version = "2.3a"
meta.version = "2.3b"
meta.author = "Dregu"

--[[OPTIONS]]
Expand Down Expand Up @@ -1862,6 +1862,7 @@ end
set_post_entity_spawn(function(ent)
if not options.projectile then return end
ent.animation_frame = pick(projectiles_web_ids)
ent.flags = set_flag(ent.flags, ENT_FLAG.PASSES_THROUGH_EVERYTHING)
local webshot = ent.uid
set_interval(function()
if get_entity(webshot) ~= nil and get_entity(webshot).layer < 2 and get_entity(webshot).overlay == nil and projectiles_web[get_entity(webshot).animation_frame] ~= nil then
Expand Down
10 changes: 8 additions & 2 deletions src/game_api/script/usertypes/flags_lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,17 @@ void register_usertypes(sol::state& lua)
2,
"SWIMMING",
11,
"FALLING",
"HIT_GROUND",
12,
"HIT_WALL",
13,
"FALLING",
14,
"CURSED_EFFECT",
15,
"ELIXIR_BUFF",
16,
"DISABLE_INPUT",
16);
17);
}
}; // namespace NEntityFlags

0 comments on commit 15ef54b

Please sign in to comment.