Skip to content

Commit

Permalink
Merge branch '2.4_Lite' into bgforge-rpu-24
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaRain committed Jan 13, 2025
2 parents 414d9e0 + 43edeca commit ef36e7a
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions scripts_src/epa/epai17.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#define LVAR_Herebefore (4)
#define LVAR_Problem (5)
#define LVAR_Personal_Enemy (6)
/**
* Minimal Repair skill level to fix the terminal
*/
#define MIN_REPAIR_LEVEL 41

procedure start;
procedure use_skill_on_p_proc;
Expand All @@ -34,31 +38,45 @@ procedure start
begin
end

procedure use_skill_on_p_proc
begin
if (action_being_used == SKILL_REPAIR) then
begin
if (has_skill(source_obj, SKILL_REPAIR) > 40) then
begin
if (local_var(LVAR_Problem) == 1) then
begin
script_overrides;
/**
* Fixes the terminal if `skill_level >= MIN_REPAIR_LEVEL`
*/
procedure repair_self(variable skill_level) begin
if (skill_level >= MIN_REPAIR_LEVEL) then begin
if (local_var(LVAR_Problem) == 1) then begin
set_global_var(GVAR_MAGNETIC_FIELD, 1);
set_local_var(LVAR_Problem, 2);
float_msg(source_obj, mstr(108), FLOAT_MSG_YELLOW);
display_msg(mstr(109));
give_xp(100);
end else if (local_var(LVAR_Problem) == 2) then begin
script_overrides;
display_msg(message_str(SCRIPT_EPAI2, 115));
end
end else begin
script_overrides;
display_msg(message_str(SCRIPT_EPAI2, 108));
end
end
end


procedure use_skill_on_p_proc begin
if (action_being_used == SKILL_REPAIR) then begin
call repair_self(has_skill(source_obj, SKILL_REPAIR));
end
end

procedure use_obj_on_p_proc begin
variable tool = obj_pid(obj_being_used_with);
if (tool == PID_MULTI_TOOL) or (tool == PID_SUPER_TOOL_KIT) then begin
variable skill = has_skill(source_obj, SKILL_REPAIR);
variable bonus = 0;
if (tool == PID_MULTI_TOOL) then bonus = 20;
if (tool == PID_SUPER_TOOL_KIT) then bonus = 40;
script_overrides;
call repair_self(skill + bonus);
end
end


procedure look_at_p_proc
begin
script_overrides;
Expand Down
Binary file added translations/french/art/intrface/hr_iface_800.frm
Binary file not shown.
Binary file modified translations/french/art/intrface/iface.frm
Binary file not shown.
Binary file added translations/french/art/intrface/invbutdn.frm
Binary file not shown.
Binary file added translations/french/art/intrface/invbutup.frm
Binary file not shown.
Binary file added translations/french/art/intrface/optidn.frm
Binary file not shown.
Binary file added translations/french/art/intrface/optiup.frm
Binary file not shown.
Binary file added translations/german/art/intrface/chadn.frm
Binary file not shown.
Binary file added translations/german/art/intrface/chaup.frm
Binary file not shown.
Binary file added translations/german/art/intrface/mapdn.frm
Binary file not shown.
Binary file added translations/german/art/intrface/mapup.frm
Binary file not shown.

0 comments on commit ef36e7a

Please sign in to comment.