mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added get_combat_free_move metarule
Updated documents and headers. Added PartyOrderToAttack to ddraw.ini.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#ifndef COMMAND_EXTRA_H
|
||||
#define COMMAND_EXTRA_H
|
||||
|
||||
#include "define_lite.h"
|
||||
#include "define_extra.h"
|
||||
|
||||
|
||||
#define ammo_caliber(ammoPid) get_proto_data(ammoPid, PROTO_AM_CALIBER)
|
||||
#define obj_name_safe(obj) (obj_name(obj) if obj else "(null)")
|
||||
#define get_active_weapon(critter) critter_inven_obj(critter, (2 - active_hand) if critter == dude_obj else INVEN_TYPE_RIGHT_HAND)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#ifndef LIB_STRINGS_H
|
||||
#define LIB_STRINGS_H
|
||||
|
||||
#include "sfall.h"
|
||||
|
||||
#define is_in_string(str, sub) (string_pos(str, sub) != -1)
|
||||
#define string_starts_with(str, sub) (substr(str, 0, strlen(sub)) == sub)
|
||||
|
||||
@@ -166,14 +168,22 @@ end
|
||||
* Useful in cunjunction with is_in_array()
|
||||
*/
|
||||
procedure string_split_ints(variable str, variable split) begin
|
||||
variable i := 0;
|
||||
variable list;
|
||||
variable n := 0;
|
||||
variable list, result, val;
|
||||
|
||||
if (str == "" or typeof(str) != VALTYPE_STR) then
|
||||
return temp_array_list(0);
|
||||
|
||||
list := string_split(str, split);
|
||||
while (i < len_array(list)) do begin
|
||||
list[i] := atoi(list[i]);
|
||||
i++;
|
||||
result := temp_array_list(0);
|
||||
foreach (val in list) begin
|
||||
if (val != "") then begin
|
||||
resize_array(result, n + 1);
|
||||
result[n] := atoi(val);
|
||||
n++;
|
||||
end
|
||||
end
|
||||
return list;
|
||||
return result;
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -298,6 +298,7 @@
|
||||
#define exec_map_update_scripts sfall_func0("exec_map_update_scripts")
|
||||
#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_combat_free_move sfall_func0("get_combat_free_move")
|
||||
#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")
|
||||
|
||||
Reference in New Issue
Block a user