diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index b06458fbb..2300fd9db 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -1084,7 +1084,7 @@ function set_setting(setting, value) end function printf() end ---Spawn a Shopkeeper in the coordinates and make the room their shop. Returns the Shopkeeper uid. Also see [spawn_roomowner](https://spelunky-fyi.github.io/overlunky/#spawn_roomowner). ---@param x number ----@param y number, +---@param y number ---@param layer LAYER ---@param room_template ROOM_TEMPLATE ---@return integer @@ -1092,7 +1092,7 @@ function spawn_shopkeeper(x, y, layer, room_template) end ---Spawn a RoomOwner (or a few other like [CavemanShopkeeper](https://spelunky-fyi.github.io/overlunky/#CavemanShopkeeper)) in the coordinates and make them own the room, optionally changing the room template. Returns the RoomOwner uid. ---@param owner_type ENT_TYPE ---@param x number ----@param y number, +---@param y number ---@param layer LAYER ---@param room_template ROOM_TEMPLATE ---@return integer diff --git a/docs/index.html b/docs/index.html index f19337a6a..3f1b06b4d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -761,6 +761,9 @@
  • import
  • +
  • + intersection +
  • is_character_female
  • @@ -839,6 +842,9 @@
  • toggle_journal
  • +
  • + two_lines_angle +
  • update_liquid_collision_at
  • @@ -4549,6 +4555,12 @@

    tab
  • false if the script was not found but optional is set to true
  • an error if the script was not found and the optional argument was not set
  • +

    intersection

    +
    +

    Search script examples for intersection

    +
    +

    Vec2 intersection(const Vec2 A, const Vec2 B, const Vec2 C, const Vec2 D)

    +

    Find intersection point of two lines [A, B] and [C, D], returns INFINITY if the lines don't intersect each other [parallel]

    is_character_female

    Search script examples for is_character_female

    @@ -4772,6 +4784,14 @@

    toggle_journal

    nil toggle_journal()

    Open or close the journal as if pressing the journal button. Will respect visible journal popups and force_journal.

    +

    two_lines_angle

    +
    +

    Search script examples for two_lines_angle

    +
    +

    float two_lines_angle(Vec2 A, Vec2 common, Vec2 B)

    +

    Mesures angle between two lines with one common point

    +

    float two_lines_angle(Vec2 line1_A, Vec2 line1_B, Vec2 line2_A, Vec2 line2_B)

    +

    Gets line1_A, intersection point and line2_B and calls the 3 parameter version of this function

    update_liquid_collision_at

    Search script examples for update_liquid_collision_at

    @@ -5270,7 +5290,7 @@

    spawn_roomowner

    spawn_roomowner

    -

    int spawn_roomowner(ENT_TYPE owner_type, float x, float, y, LAYER layer, ROOM_TEMPLATE room_template = -1)

    +

    int spawn_roomowner(ENT_TYPE owner_type, float x, float y, LAYER layer, ROOM_TEMPLATE room_template = -1)

    Spawn a RoomOwner (or a few other like CavemanShopkeeper) in the coordinates and make them own the room, optionally changing the room template. Returns the RoomOwner uid.

    Shop functions

    add_item_to_shop

    @@ -5323,7 +5343,7 @@

    spawn_shopkeeper

     

    Search script examples for spawn_shopkeeper

    -

    int spawn_shopkeeper(float x, float, y, LAYER layer, ROOM_TEMPLATE room_template = ROOM_TEMPLATE.SHOP)

    +

    int spawn_shopkeeper(float x, float y, LAYER layer, ROOM_TEMPLATE room_template = ROOM_TEMPLATE.SHOP)

    Spawn a Shopkeeper in the coordinates and make the room their shop. Returns the Shopkeeper uid. Also see spawn_roomowner.

    Sound functions

    create_sound

    @@ -8823,6 +8843,16 @@

    Quad

    +bool +is_point_inside(Vec2 p, optional epsilon) +Check if point lies inside of triangle
    Because of the imprecise nature of floating point values, the epsilon value is needed to compare the floats, the default value is 0.00001 + + +bool +is_point_inside(float x, float y, optional epsilon) + + + tuple<Vec2, Vec2, Vec2, Vec2> split() Returns the corners in order: bottom_left, bottom_right, top_right, top_left @@ -9024,9 +9054,24 @@

    Triangle

    +float +area() + + + +bool +is_point_inside(Vec2 p, optional epsilon) +Check if point lies inside of triangle
    Because of the imprecise nature of floating point values, the epsilon value is needed to compare the floats, the default value is 0.0001 + + +bool +is_point_inside(float x, float y, optional epsilon) + + + tuple<Vec2, Vec2, Vec2> split() -Returns the corners +Returns the corner points

    Vec2

    @@ -12698,6 +12743,11 @@

    ScreenCredits

    Description + +SoundMeta +bg_music_info + +

    ScreenDeath

    Derived from Screen

    @@ -12725,6 +12775,21 @@

    ScreenIntro

    unknown4 + +float +darkness + + + +bool +active +ends the intro immediately if set to false + + +bool +skip_prologue +skips prologue and goes straight to the title screen after the intro +

    ScreenLeaderboards

    Derived from Screen

    diff --git a/docs/light.html b/docs/light.html index 9258af7af..4a64df2de 100644 --- a/docs/light.html +++ b/docs/light.html @@ -761,6 +761,9 @@
  • import
  • +
  • + intersection +
  • is_character_female
  • @@ -839,6 +842,9 @@
  • toggle_journal
  • +
  • + two_lines_angle +
  • update_liquid_collision_at
  • @@ -4549,6 +4555,12 @@

    tab
  • false if the script was not found but optional is set to true
  • an error if the script was not found and the optional argument was not set
  • +

    intersection

    +
    +

    Search script examples for intersection

    +
    +

    Vec2 intersection(const Vec2 A, const Vec2 B, const Vec2 C, const Vec2 D)

    +

    Find intersection point of two lines [A, B] and [C, D], returns INFINITY if the lines don't intersect each other [parallel]

    is_character_female

    Search script examples for is_character_female

    @@ -4772,6 +4784,14 @@

    toggle_journal

    nil toggle_journal()

    Open or close the journal as if pressing the journal button. Will respect visible journal popups and force_journal.

    +

    two_lines_angle

    +
    +

    Search script examples for two_lines_angle

    +
    +

    float two_lines_angle(Vec2 A, Vec2 common, Vec2 B)

    +

    Mesures angle between two lines with one common point

    +

    float two_lines_angle(Vec2 line1_A, Vec2 line1_B, Vec2 line2_A, Vec2 line2_B)

    +

    Gets line1_A, intersection point and line2_B and calls the 3 parameter version of this function

    update_liquid_collision_at

    Search script examples for update_liquid_collision_at

    @@ -5270,7 +5290,7 @@

    spawn_roomowner

    spawn_roomowner

    -

    int spawn_roomowner(ENT_TYPE owner_type, float x, float, y, LAYER layer, ROOM_TEMPLATE room_template = -1)

    +

    int spawn_roomowner(ENT_TYPE owner_type, float x, float y, LAYER layer, ROOM_TEMPLATE room_template = -1)

    Spawn a RoomOwner (or a few other like CavemanShopkeeper) in the coordinates and make them own the room, optionally changing the room template. Returns the RoomOwner uid.

    Shop functions

    add_item_to_shop

    @@ -5323,7 +5343,7 @@

    spawn_shopkeeper

     

    Search script examples for spawn_shopkeeper

    -

    int spawn_shopkeeper(float x, float, y, LAYER layer, ROOM_TEMPLATE room_template = ROOM_TEMPLATE.SHOP)

    +

    int spawn_shopkeeper(float x, float y, LAYER layer, ROOM_TEMPLATE room_template = ROOM_TEMPLATE.SHOP)

    Spawn a Shopkeeper in the coordinates and make the room their shop. Returns the Shopkeeper uid. Also see spawn_roomowner.

    Sound functions

    create_sound

    @@ -8823,6 +8843,16 @@

    Quad

    +bool +is_point_inside(Vec2 p, optional epsilon) +Check if point lies inside of triangle
    Because of the imprecise nature of floating point values, the epsilon value is needed to compare the floats, the default value is 0.00001 + + +bool +is_point_inside(float x, float y, optional epsilon) + + + tuple<Vec2, Vec2, Vec2, Vec2> split() Returns the corners in order: bottom_left, bottom_right, top_right, top_left @@ -9024,9 +9054,24 @@

    Triangle

    +float +area() + + + +bool +is_point_inside(Vec2 p, optional epsilon) +Check if point lies inside of triangle
    Because of the imprecise nature of floating point values, the epsilon value is needed to compare the floats, the default value is 0.0001 + + +bool +is_point_inside(float x, float y, optional epsilon) + + + tuple<Vec2, Vec2, Vec2> split() -Returns the corners +Returns the corner points

    Vec2

    @@ -12698,6 +12743,11 @@

    ScreenCredits

    Description + +SoundMeta +bg_music_info + +

    ScreenDeath

    Derived from Screen

    @@ -12725,6 +12775,21 @@

    ScreenIntro

    unknown4 + +float +darkness + + + +bool +active +ends the intro immediately if set to false + + +bool +skip_prologue +skips prologue and goes straight to the title screen after the intro +

    ScreenLeaderboards

    Derived from Screen

    diff --git a/docs/src/includes/_globals.md b/docs/src/includes/_globals.md index 639a1b49f..6a32219e7 100644 --- a/docs/src/includes/_globals.md +++ b/docs/src/includes/_globals.md @@ -2437,7 +2437,7 @@ end, "pet_shop_boys") > Search script examples for [spawn_roomowner](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spawn_roomowner) -#### int spawn_roomowner([ENT_TYPE](#ENT_TYPE) owner_type, float x, float, y, [LAYER](#LAYER) layer, [ROOM_TEMPLATE](#ROOM_TEMPLATE) room_template = -1) +#### int spawn_roomowner([ENT_TYPE](#ENT_TYPE) owner_type, float x, float y, [LAYER](#LAYER) layer, [ROOM_TEMPLATE](#ROOM_TEMPLATE) room_template = -1) Spawn a [RoomOwner](#RoomOwner) (or a few other like [CavemanShopkeeper](#CavemanShopkeeper)) in the coordinates and make them own the room, optionally changing the room template. Returns the [RoomOwner](#RoomOwner) uid. @@ -2512,7 +2512,7 @@ ctx:set_room_template(rx, ry, l, ROOM_TEMPLATE.SHOP) > Search script examples for [spawn_shopkeeper](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spawn_shopkeeper) -#### int spawn_shopkeeper(float x, float, y, [LAYER](#LAYER) layer, [ROOM_TEMPLATE](#ROOM_TEMPLATE) room_template = [ROOM_TEMPLATE](#ROOM_TEMPLATE).SHOP) +#### int spawn_shopkeeper(float x, float y, [LAYER](#LAYER) layer, [ROOM_TEMPLATE](#ROOM_TEMPLATE) room_template = [ROOM_TEMPLATE](#ROOM_TEMPLATE).SHOP) Spawn a [Shopkeeper](#Shopkeeper) in the coordinates and make the room their shop. Returns the [Shopkeeper](#Shopkeeper) uid. Also see [spawn_roomowner](#spawn_roomowner).