Added "get_terrain_name" script function

Updated documents for the function.
Minor edits to other code.
This commit is contained in:
NovaRain
2022-06-14 21:04:51 +08:00
parent 7015db2414
commit 85e5da660b
15 changed files with 192 additions and 135 deletions
+5
View File
@@ -497,6 +497,11 @@
- name: set_terrain_name
detail: void sfall_func3("set_terrain_name", int x, int y, string name)
doc: Overrides the terrain type name for the sub-tile on the world map by the specified coordinates.
macro: sfall.h
- name: get_terrain_name
detail: string sfall_func2("get_terrain_name", int x, int y)
doc: Returns the terrain type name for the sub-tile on the world map by the specified coordinates, or by the player's current position if called without arguments.
macro: sfall.h
- name: set_town_title
detail: void sfall_func2("set_town_title", int areaID, string title)
doc: |
+2
View File
@@ -319,6 +319,7 @@
#define floor2(value) sfall_func1("floor2", value)
#define get_can_rest_on_map(map, elev) sfall_func2("get_can_rest_on_map", map, elev)
#define get_current_inven_size(obj) sfall_func1("get_current_inven_size", obj)
#define get_current_terrain_name sfall_func0("get_terrain_name")
#define get_cursor_mode sfall_func0("get_cursor_mode")
#define get_flags(obj) sfall_func1("get_flags", obj)
#define get_ini_section(file, sect) sfall_func2("get_ini_section", file, sect)
@@ -340,6 +341,7 @@
#define get_npc_stat_min(stat) sfall_func2("get_stat_min", stat, 1)
#define get_sfall_arg_at(argNum) sfall_func1("get_sfall_arg_at", argNum)
#define get_string_pointer(text) sfall_func1("get_string_pointer", text)
#define get_terrain_name(x, y) sfall_func2("get_terrain_name", x, y)
#define get_text_width(text) sfall_func1("get_text_width", text)
#define has_fake_perk_npc(npc, perk) sfall_func2("has_fake_perk_npc", npc, perk)
#define has_fake_trait_npc(npc, trait) sfall_func2("has_fake_trait_npc", npc, trait)
@@ -936,6 +936,12 @@ sfall_funcX metarule functions
`void sfall_func3("set_terrain_name", int x, int y, string name)`
- Overrides the terrain type name for the sub-tile on the world map by the specified coordinates
----
#### get_terrain_name
`string sfall_func0("get_terrain_name")`\
`string sfall_func2("get_terrain_name", int x, int y)`
- Returns the terrain type name for the sub-tile on the world map by the specified coordinates, or by the player's current position if called without arguments
----
#### get_window_attribute
`int sfall_func1("get_window_attribute", int winType)`\