Add science/repair on critters patch
This commit is contained in:
parent
a55feb9301
commit
13b76287f8
|
@ -25,6 +25,7 @@
|
|||
#include "proto_types.h"
|
||||
#include "random.h"
|
||||
#include "scripts.h"
|
||||
#include "sfall_config.h"
|
||||
#include "skill.h"
|
||||
#include "stat.h"
|
||||
#include "text_object.h"
|
||||
|
@ -36,6 +37,12 @@
|
|||
|
||||
#define MAX_KNOCKDOWN_DISTANCE 20
|
||||
|
||||
typedef enum ScienceRepairTargetType {
|
||||
SCIENCE_REPAIR_TARGET_TYPE_DEFAULT,
|
||||
SCIENCE_REPAIR_TARGET_TYPE_DUDE,
|
||||
SCIENCE_REPAIR_TARGET_TYPE_ANYONE,
|
||||
} ScienceRepairTargetType;
|
||||
|
||||
// 0x5106D0
|
||||
static int _action_in_explode = 0;
|
||||
|
||||
|
@ -1382,6 +1389,19 @@ int actionUseSkill(Object* a1, Object* a2, int skill)
|
|||
break;
|
||||
}
|
||||
|
||||
// SFALL: Science on critters patch.
|
||||
if (1) {
|
||||
int targetType = SCIENCE_REPAIR_TARGET_TYPE_DEFAULT;
|
||||
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SCIENCE_REPAIR_TARGET_TYPE_KEY, &targetType);
|
||||
if (targetType == SCIENCE_REPAIR_TARGET_TYPE_DUDE) {
|
||||
if (a2 == gDude) {
|
||||
break;
|
||||
}
|
||||
} else if (targetType == SCIENCE_REPAIR_TARGET_TYPE_ANYONE) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
case SKILL_SNEAK:
|
||||
dudeToggleState(0);
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#define SFALL_CONFIG_USE_DOCTOR_FRM_KEY "Doctor"
|
||||
#define SFALL_CONFIG_USE_SCIENCE_FRM_KEY "Science"
|
||||
#define SFALL_CONFIG_USE_REPAIR_FRM_KEY "Repair"
|
||||
#define SFALL_CONFIG_SCIENCE_REPAIR_TARGET_TYPE_KEY "ScienceOnCritters"
|
||||
|
||||
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_MULTIPLIER 1
|
||||
#define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_DIVISOR 3
|
||||
|
|
Loading…
Reference in New Issue