Skip to content

Commit

Permalink
some post merge changes, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Sep 12, 2024
1 parent 4477162 commit 38f0d5b
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 110 deletions.
124 changes: 62 additions & 62 deletions docs/game_data/spel2.lua

Large diffs are not rendered by default.

82 changes: 41 additions & 41 deletions docs/src/includes/_types.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/game_api/entities_items.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ class PrizeDispenser : public Movable
class Bow : public Purchasable
{
public:
/// When lain on the ground
/// When lying on the ground
virtual float get_arrow_special_offset() = 0;
};

Expand Down
6 changes: 3 additions & 3 deletions src/game_api/entities_monsters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Monster : public PowerupCapable
virtual bool update_target(Entity* ent, float&) = 0; // 100, float from the function above, also works as an output?
};

// RoomOwner and NPC may have common subclass for the first two virtuals, but they later dirvarge, wepon type is the same spot, but they probably just made one first then copied over the virtuals
// RoomOwner and NPC may have common subclass for the first two virtuals, but they later diverge, weapon type is the same spot, but they probably just made one first then copied over the virtuals
class RoomOwner : public Monster
{
public:
Expand Down Expand Up @@ -89,7 +89,7 @@ class NPC : public Monster
virtual ENT_TYPE weapon_type() = 0;
/// For weapons, checks if the entity should hit the trigger or not
virtual bool should_attack(std::tuple<Entity*, float, float, float> target) = 0;
virtual void on_criminal_act_committed2(void*) = 0; // calls the on_criminal_act_committed except for bodyguard which calls the should_attack_on_sight and turns off any speechbubble
virtual void on_criminal_act_committed2(void*) = 0; // calls the on_criminal_act_committed except for bodyguard which calls the should_attack_on_sight and turns off any speech-bubble
};

class WalkingMonster : public Monster
Expand Down Expand Up @@ -378,7 +378,7 @@ class Lavamander : public Monster
uint16_t jump_pause_timer; // jump pause when cool; runs continuously when hot
uint8_t lava_detection_timer;
bool is_hot;
/// 0 - didnt_saw_player, 1 - saw_player, 2 - spited_lava; probably used so he won't spit imminently after seeing the player
/// 0 - didn't saw player, 1 - saw player, 2 - spited lava; probably used so he won't spit imminently after seeing the player
uint8_t player_detect_state;
uint8_t padding2;
};
Expand Down
4 changes: 2 additions & 2 deletions src/game_api/entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class Entity
/// Returns true if entity is in water/lava
virtual bool is_in_liquid() = 0; // 12, drill always returns false
virtual bool check_type_properties_flags_19() = 0; // 13, checks (properties_flags >> 0x12) & 1; for hermitcrab checks if he's invisible; can't get it to trigger
virtual uint8_t get_type_field_60() = 0; // 14, the value is compared to entity state and used in some bahavior function
virtual uint8_t get_type_field_60() = 0; // 14, the value is compared to entity state and used in some behavior function
virtual void set_invisible(bool value) = 0; // 15
virtual void flip(bool left) = 0; // 16
virtual void set_draw_depth(uint8_t draw_depth, uint8_t b3f) = 0; // 17
Expand All @@ -293,7 +293,7 @@ class Entity
virtual void remove_item(Entity* entity, bool autokill_check) = 0; // 21, if autokill_check is true, it will check if the entity has the "kill if overlay lost" flag and kill it if it's set
virtual Entity* get_held_entity() = 0; // 22
virtual void v23(Entity* logical_trigger, Entity* who_triggered_it) = 0; // 23, spawns LASERTRAP_SHOT from LASERTRAP, also some trigger entities use this, seam to be called right after "on_collision2", triggers use self as the first parameter. Called when there is entity overlapping trigger entity, even if they don't move
/// Triggers weapons and other held items like teleportter, mattock etc. You can check the [virtual-availability.md](https://github.com/spelunky-fyi/overlunky/blob/main/docs/virtual-availability.md), if entity has `open` in the `on_open` you can use this function, otherwise it does nothing. Returns false if action could not be performed (cooldown is not 0, no arrow loaded in etc. the animation could still be played thou)
/// Triggers weapons and other held items like teleporter, mattock etc. You can check the [virtual-availability.md](https://github.com/spelunky-fyi/overlunky/blob/main/docs/virtual-availability.md), if entity has `open` in the `on_open` you can use this function, otherwise it does nothing. Returns false if action could not be performed (cooldown is not 0, no arrow loaded in etc. the animation could still be played thou)
virtual bool trigger_action(Entity* user) = 0; // 24, also used for throwables, disabling this for bomb make it always spawn an the ground, but you can still pick it up and throw it
/// Activates a button prompt (with the Use door/Buy button), e.g. buy shop item, activate drill, read sign, interact in camp, ... `get_entity(<udjat socket uid>):activate(players[1])` (make sure player 1 has the udjat eye though)
virtual void activate(Entity* activator) = 0; // 25
Expand Down
2 changes: 1 addition & 1 deletion src/game_api/movable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class Movable : public Entity
virtual void initialize() = 0; // 75, e.g. cobra: set random spit_timer; bat: set random stand_counter; emerald: set price
virtual void check_is_falling() = 0; // 76, sets more_flags.falling by comparing velocityy to 0, sets i120a to FF, clears owner_uid, can call remove_rider on mounts, for player updates the extra y_pos, for bosses clears lock input timer
virtual void v77() = 0; // 77
virtual void process_input() = 0; // 78, more like: handle_movment
virtual void process_input() = 0; // 78, more like: handle_movement
virtual void post_collision_damage_related() = 0; // 79, used for enemies attacks as well? 3 versions for: eggplant minister, players and the rest
virtual void on_picked_up() = 0; // 80, plays pickup sound depending on the entity mask/type etc. set stun for pets and mounts etc.
virtual void on_release() = 0; // 81, only for hired hands and lava pots
Expand Down

0 comments on commit 38f0d5b

Please sign in to comment.