mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
Gender Enum Refactor
This commit is contained in:
@@ -552,7 +552,7 @@ public class harass extends script.base_script
|
||||
if (hasSkill(thisMember, "class_smuggler_phase1_novice") && thisMember != (target)) {
|
||||
if (ai_lib.checkForSmuggler(thisMember)) {
|
||||
chat.publicChat(self, target, new string_id(STF, "clean_target_" + getFactionName(self)));
|
||||
if (getGender(self) == GENDER_MALE) {
|
||||
if (getGender(self) == Gender.MALE) {
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
removeTriggerVolume(VOL_DETAIN);
|
||||
@@ -566,7 +566,7 @@ public class harass extends script.base_script
|
||||
if (ai_lib.checkForSmuggler(target))
|
||||
{
|
||||
chat.publicChat(self, target, new string_id(STF, "clean_target_" + getFactionName(self)));
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -599,7 +599,7 @@ public class harass extends script.base_script
|
||||
else
|
||||
{
|
||||
chat.publicChat(self, target, new string_id(STF, "clean_target_" + getFactionName(self)));
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -776,7 +776,7 @@ public class harass extends script.base_script
|
||||
money.requestPayment(target, self, FINE, "fine", null);
|
||||
CustomerServiceLog("CONTRABAND_SCANNING: ", "(" + target + ")" + getFirstName(target) + " was fined " + FINE + " credits");
|
||||
utils.moneyOutMetric(self, money.ACCT_FINES, FINE);
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -788,7 +788,7 @@ public class harass extends script.base_script
|
||||
chat.publicChat(self, target, new string_id(STF, "failure_to_pay_" + getFactionName(self)));
|
||||
penaltyAction(self, target, rating * 2);
|
||||
CustomerServiceLog("CONTRABAND_SCANNING: ", "(" + target + ")" + getFirstName(target) + " was fined " + rating * 2 + " Imperial Faction Points");
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -899,7 +899,7 @@ public class harass extends script.base_script
|
||||
money.requestPayment(target, self, FINE, "fine", null);
|
||||
CustomerServiceLog("CONTRABAND_SCANNING: ", "(" + target + ")" + getFirstName(target) + " was fined " + FINE + " credits");
|
||||
utils.moneyOutMetric(self, money.ACCT_FINES, FINE);
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -914,7 +914,7 @@ public class harass extends script.base_script
|
||||
chat.publicChat(self, target, new string_id(STF, "punish_" + getFactionName(self)));
|
||||
penaltyAction(self, target, rating * 2);
|
||||
CustomerServiceLog("CONTRABAND_SCANNING: ", "(" + target + ")" + getFirstName(target) + " was fined " + rating * 2 + " Imperial Faction Points");
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -929,7 +929,7 @@ public class harass extends script.base_script
|
||||
chat.publicChat(self, target, new string_id(STF, "punish_+" + getFactionName(self)));
|
||||
penaltyAction(self, target, rating * 2);
|
||||
CustomerServiceLog("CONTRABAND_SCANNING: ", "(" + target + ")" + getFirstName(target) + " was fined " + rating * 2 + " Imperial Faction Points");
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 0.0f);
|
||||
}
|
||||
@@ -945,7 +945,7 @@ public class harass extends script.base_script
|
||||
obj_id target = params.getObjId("target");
|
||||
doAnimationAction(self, anims.PLAYER_WAVE_ON_DIRECTING);
|
||||
chat.publicChat(self, target, new string_id(STF, "dont_search"));
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 2.0f);
|
||||
}
|
||||
@@ -958,7 +958,7 @@ public class harass extends script.base_script
|
||||
obj_id target = params.getObjId("target");
|
||||
doAnimationAction(self, anims.PLAYER_STANDING_PLACATE);
|
||||
chat.publicChat(self, target, new string_id(STF, "dont_search_dark"));
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 2.0f);
|
||||
}
|
||||
@@ -970,7 +970,7 @@ public class harass extends script.base_script
|
||||
{
|
||||
obj_id target = params.getObjId("target");
|
||||
chat.publicChat(self, target, new string_id(STF, "dont_search_novice"));
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
playClientEffectLoc(target, "clienteffect/stormtrp_movealng.cef", getLocation(self), 2.0f);
|
||||
}
|
||||
|
||||
@@ -180,8 +180,8 @@ public class townperson extends script.base_script
|
||||
faceTo(self, listener);
|
||||
faceTo(listener, self);
|
||||
ai_lib.greet(self, listener);
|
||||
ai_lib.doAction(self, "conversation_" + getGender(self));
|
||||
ai_lib.doAction(listener, "conversation_" + getGender(listener));
|
||||
ai_lib.doAction(self, "conversation_" + getGender(self).ordinal());
|
||||
ai_lib.doAction(listener, "conversation_" + getGender(listener).ordinal());
|
||||
}
|
||||
messageTo(self, "handleEndSocializing", null, CONVO_LENGTH, isObjectPersisted(self));
|
||||
return SCRIPT_CONTINUE;
|
||||
|
||||
@@ -480,20 +480,38 @@ public class base_class
|
||||
/** attrib_mod decay value indicating that we want to clear any attrib mods for an attribute
|
||||
* @see #addAttribModifier(obj_id, int, int, float, float, float) */
|
||||
public static final float MOD_ANTIDOTE = -3.0f;
|
||||
/**
|
||||
* @}
|
||||
* @defgroup genderConstants Gender constants from CreatureObjectTemplate.h
|
||||
* @{
|
||||
*/
|
||||
/** id for male gender
|
||||
* @see #getGender(obj_id) */
|
||||
public static final int GENDER_MALE = 0;
|
||||
/** id for female gender
|
||||
* @see #getGender(obj_id) */
|
||||
public static final int GENDER_FEMALE = 1;
|
||||
/** id for other gender
|
||||
* @see #getGender(obj_id) */
|
||||
public static final int GENDER_OTHER = 2;
|
||||
|
||||
/**
|
||||
* ************************************************************
|
||||
* Methods relating to the Gender of a CreatureObject
|
||||
* Must match to SRC SharedCreatureObjectTemplate.h
|
||||
* ************************************************************
|
||||
*/
|
||||
public enum Gender
|
||||
{
|
||||
MALE,
|
||||
FEMALE,
|
||||
OTHER
|
||||
}
|
||||
/**
|
||||
* @return Gender of given Object
|
||||
* Note: For CreatureObjects/PlayerObjects only, otherwise this will throw an error
|
||||
*/
|
||||
public static Gender getGender(obj_id target)
|
||||
{
|
||||
return Gender.values()[_getGender(getLongWithNull(target))];
|
||||
}
|
||||
/**
|
||||
* @return if target1 and target2 are the same gender
|
||||
* Note: For CreatureObjects/PlayerObjects only, otherwise this will throw an error
|
||||
*/
|
||||
public static boolean isSameGender(obj_id target1, obj_id target2)
|
||||
{
|
||||
return getGender(target1) == getGender(target2);
|
||||
}
|
||||
private static native int _getGender(long target);
|
||||
private static native boolean _isSameGender(long target1, long target2); //todo to be deprecated
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @defgroup nicheConstants Niche constants from CreatureObjectTemplate.h
|
||||
@@ -9578,35 +9596,7 @@ public class base_class
|
||||
* @return true if the name is reserved, false if it is OK
|
||||
*/
|
||||
public static native boolean isNameReserved(String name, String[] ignoreRules);
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* @defgroup objectInfoMethods Generic Object information methods
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
// object generic info methods
|
||||
/**
|
||||
* Returns the gender of an object.
|
||||
* @param target the object
|
||||
* @return the gender, or -1 on fail
|
||||
*/
|
||||
private static native int _getGender(long target);
|
||||
public static int getGender(obj_id target)
|
||||
{
|
||||
return _getGender(getLongWithNull(target));
|
||||
}
|
||||
/**
|
||||
* Tests to see if two objects have the same gender.
|
||||
* @param target1 the first object
|
||||
* @param target2 the second object
|
||||
* @return true if the objects are the same gender, false if not
|
||||
*/
|
||||
private static native boolean _isSameGender(long target1, long target2);
|
||||
public static boolean isSameGender(obj_id target1, obj_id target2)
|
||||
{
|
||||
return _isSameGender(getLongWithNull(target1), getLongWithNull(target2));
|
||||
}
|
||||
/**
|
||||
* Tests to see if an object is a given niche.
|
||||
* @param target the object
|
||||
@@ -19221,8 +19211,13 @@ public class base_class
|
||||
private static native boolean _queueCommand(long actor, int commandHash, long target, String params, int priority);
|
||||
public static boolean queueCommand(obj_id actor, int commandHash, obj_id target, String params, int priority)
|
||||
{
|
||||
//todo to be deprecated in place of queueCommand that takes string command name param so we can stop hard coding crcs that are hard to read
|
||||
return _queueCommand(getLongWithNull(actor), commandHash, getLongWithNull(target), params, priority);
|
||||
}
|
||||
public static boolean queueCommand(obj_id actor, String commandName, obj_id target, String params, int priority)
|
||||
{
|
||||
return queueCommand(actor, getStringCrc(commandName), target, params, priority);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear a creature's command queue (only the clearable commands).
|
||||
|
||||
@@ -73,7 +73,7 @@ public class barn_ranchhand extends script.conversation.base.conversation_base
|
||||
private String barn_ranchhand_tokenTO_barnOwnerName(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
String name = "Sir";
|
||||
if (getGender(player) == GENDER_FEMALE)
|
||||
if (getGender(player) == Gender.FEMALE)
|
||||
{
|
||||
name = "Ma'am";
|
||||
}
|
||||
|
||||
@@ -20,29 +20,29 @@ public class c_prof_ent_espacontact extends script.base_script
|
||||
{
|
||||
int questId1 = questGetQuestId("quest/c_prof_entertainer");
|
||||
int espaContact = groundquests.getTaskId(questId1, "espaContact");
|
||||
int gender = getGender(player);
|
||||
return (questIsTaskActive(questId1, espaContact, player) && (gender == GENDER_MALE));
|
||||
Gender gender = getGender(player);
|
||||
return (questIsTaskActive(questId1, espaContact, player) && (gender == Gender.MALE));
|
||||
}
|
||||
public boolean c_prof_ent_espacontact_condition_onQuestTaskFemale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
int questId1 = questGetQuestId("quest/c_prof_entertainer");
|
||||
int espaContact = groundquests.getTaskId(questId1, "espaContact");
|
||||
int gender = getGender(player);
|
||||
return (questIsTaskActive(questId1, espaContact, player) && (gender == GENDER_FEMALE));
|
||||
Gender gender = getGender(player);
|
||||
return (questIsTaskActive(questId1, espaContact, player) && (gender == Gender.FEMALE));
|
||||
}
|
||||
public boolean c_prof_ent_espacontact_condition_taskDoneFemale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
int questId1 = questGetQuestId("quest/c_prof_entertainer");
|
||||
int espaContact = groundquests.getTaskId(questId1, "espaContact");
|
||||
int gender = getGender(player);
|
||||
return (questIsTaskComplete(questId1, espaContact, player) && (gender == GENDER_FEMALE));
|
||||
Gender gender = getGender(player);
|
||||
return (questIsTaskComplete(questId1, espaContact, player) && (gender == Gender.FEMALE));
|
||||
}
|
||||
public boolean c_prof_ent_espacontact_condition_taskDoneMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
int questId1 = questGetQuestId("quest/c_prof_entertainer");
|
||||
int espaContact = groundquests.getTaskId(questId1, "espaContact");
|
||||
int gender = getGender(player);
|
||||
return (questIsTaskComplete(questId1, espaContact, player) && (gender == GENDER_MALE));
|
||||
Gender gender = getGender(player);
|
||||
return (questIsTaskComplete(questId1, espaContact, player) && (gender == Gender.MALE));
|
||||
}
|
||||
public void c_prof_ent_espacontact_action_forwardquest(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -212,7 +212,7 @@ public class corellia_imperial_trainer_2 extends script.base_script
|
||||
}
|
||||
public boolean corellia_imperial_trainer_2_condition_hasNegativeFactionMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return ((factions.getFactionStanding(player, factions.FACTION_IMPERIAL) < 0.0f) && getGender(player) == GENDER_MALE);
|
||||
return ((factions.getFactionStanding(player, factions.FACTION_IMPERIAL) < 0.0f) && getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean corellia_imperial_trainer_2_condition_hasFailedOpening(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class corellia_privateer_retired_corsec_beggar extends script.base_script
|
||||
}
|
||||
public boolean corellia_privateer_retired_corsec_beggar_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean corellia_privateer_retired_corsec_beggar_condition_hasCompletedQuestOne(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class corellia_privateer_trainer_2 extends script.base_script
|
||||
}
|
||||
public boolean corellia_privateer_trainer_2_condition_isMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean corellia_privateer_trainer_2_condition_isOnQuest(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ public class corellia_rebel_trainer_1 extends script.base_script
|
||||
}
|
||||
public boolean corellia_rebel_trainer_1_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean corellia_rebel_trainer_1_condition_hasCompletedQuestOne(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -125,7 +125,7 @@ public class dath_bh_wanted_list_01 extends script.base_script
|
||||
}
|
||||
public boolean dath_bh_wanted_list_01_condition_hasSkill_BOUNTY_HUNTER_isMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
if (!hasSkill(player, "class_bountyhunter_phase1_novice") && (getGender(player) == GENDER_MALE))
|
||||
if (!hasSkill(player, "class_bountyhunter_phase1_novice") && (getGender(player) == Gender.MALE))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ public class dath_bh_wanted_list_01 extends script.base_script
|
||||
}
|
||||
public boolean dath_bh_wanted_list_01_condition_isGender_MALE(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public void dath_bh_wanted_list_01_action_rememberPlayer(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class ep3_etyyy_pilot_etyyy_to_bocctyyy extends script.base_script
|
||||
}
|
||||
public boolean ep3_etyyy_pilot_etyyy_to_bocctyyy_condition_isFemaleCharacter(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return getGender(player) == GENDER_FEMALE;
|
||||
return getGender(player) == Gender.FEMALE;
|
||||
}
|
||||
public boolean ep3_etyyy_pilot_etyyy_to_bocctyyy_condition_tooManyInGroup(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -27,11 +27,11 @@ public class ep3_forest_dahlia extends script.base_script
|
||||
}
|
||||
public boolean ep3_forest_dahlia_condition_isFemale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_FEMALE);
|
||||
return (getGender(player) == Gender.FEMALE);
|
||||
}
|
||||
public boolean ep3_forest_dahlia_condition_isMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean ep3_forest_dahlia_condition_isTaskActiveOne(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ep3_kymayrr extends script.base_script
|
||||
{
|
||||
badge.grantBadge(player, "bdg_kash_wookiee_rage");
|
||||
}
|
||||
if (getGender(player) == GENDER_MALE)
|
||||
if (getGender(player) == Gender.MALE)
|
||||
{
|
||||
if (getSpecies(player) == SPECIES_ITHORIAN)
|
||||
{
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class ep3_trandoshan_hssissk_zssik_06 extends script.base_script
|
||||
public void ep3_trandoshan_hssissk_zssik_06_action_doSignal02(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
groundquests.sendSignal(player, "rewardHssissk");
|
||||
if (getGender(player) == GENDER_MALE)
|
||||
if (getGender(player) == Gender.MALE)
|
||||
{
|
||||
if (getSpecies(player) == SPECIES_ITHORIAN)
|
||||
{
|
||||
|
||||
@@ -27,11 +27,11 @@ public class imperial_broker extends script.base_script
|
||||
}
|
||||
public boolean imperial_broker_condition_isMaleImperialFaction(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (imperial_broker_condition_isImperialFaction(player, npc) && (getGender(player) == GENDER_MALE));
|
||||
return (imperial_broker_condition_isImperialFaction(player, npc) && (getGender(player) == Gender.MALE));
|
||||
}
|
||||
public boolean imperial_broker_condition_isMalePlayer(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean imperial_broker_condition_justSpokeToPlayer(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public class loveday_disillusion_mr_hate extends script.base_script
|
||||
public String loveday_disillusion_mr_hate_tokenTO_misterOrMiss(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
String title = "Mister";
|
||||
if (getGender(player) == GENDER_FEMALE)
|
||||
if (getGender(player) == Gender.FEMALE)
|
||||
{
|
||||
title = "Miss";
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class naboo_privateer_trainer_2 extends script.base_script
|
||||
}
|
||||
public boolean naboo_privateer_trainer_2_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean naboo_privateer_trainer_2_condition_canFlyNonTrackDuty(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -189,7 +189,7 @@ public class naboo_privateer_trainer_3 extends script.base_script
|
||||
}
|
||||
public boolean naboo_privateer_trainer_3_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean naboo_privateer_trainer_3_condition_has_goBackToKyatt(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ public class naboo_rebel_trainer_1 extends script.base_script
|
||||
}
|
||||
public boolean naboo_rebel_trainer_1_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean naboo_rebel_trainer_1_condition_hasCompletedQuestOne(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -255,7 +255,7 @@ public class rebel_master_trainer extends script.base_script
|
||||
faceTo(npc, player);
|
||||
space_quest.giveReward(player, "destroy", "master_rebel_2", 50000, "object/tangible/wearables/helmet/helmet_fighter_rebel_ace.iff");
|
||||
factions.addFactionStanding(player, factions.FACTION_REBEL, 400.0f);
|
||||
if (getGender(player) == GENDER_MALE)
|
||||
if (getGender(player) == Gender.MALE)
|
||||
{
|
||||
if (getSpecies(player) == SPECIES_ITHORIAN)
|
||||
{
|
||||
@@ -318,7 +318,7 @@ public class rebel_master_trainer extends script.base_script
|
||||
faceTo(npc, player);
|
||||
space_quest.giveReward(player, "destroy", "master_rebel_2", 50000, "object/tangible/wearables/helmet/helmet_fighter_privateer_ace.iff");
|
||||
factions.addFactionStanding(player, factions.FACTION_REBEL, 400.0f);
|
||||
if (getGender(player) == GENDER_MALE)
|
||||
if (getGender(player) == Gender.MALE)
|
||||
{
|
||||
if (getSpecies(player) == SPECIES_ITHORIAN)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ public class rodian_master_hunter extends script.base_script
|
||||
}
|
||||
public boolean rodian_master_hunter_condition_isGenderMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean rodian_master_hunter_condition_isSpeciesRodian(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -30,17 +30,7 @@ public class talus_nashal_droid_head extends script.base_script
|
||||
}
|
||||
public String talus_nashal_droid_head_tokenTO_tokenGenderTitle(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
int gender = getGender(player);
|
||||
String title;
|
||||
if (gender == GENDER_MALE)
|
||||
{
|
||||
title = "sir";
|
||||
}
|
||||
else
|
||||
{
|
||||
title = "madam";
|
||||
}
|
||||
return title;
|
||||
return getGender(player) == Gender.MALE ? "sir" : "madam";
|
||||
}
|
||||
public int talus_nashal_droid_head_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException
|
||||
{
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class tatooine_privateer_trainer_shamdon extends script.base_script
|
||||
}
|
||||
public boolean tatooine_privateer_trainer_shamdon_condition_isMale(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean tatooine_privateer_trainer_shamdon_condition_isOnQuest(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -27,11 +27,11 @@ public class tutorial_imperial_broker extends script.base_script
|
||||
}
|
||||
public boolean tutorial_imperial_broker_condition_isMaleImperialFaction(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (tutorial_imperial_broker_condition_isImperialFaction(player, npc) && (getGender(player) == GENDER_MALE));
|
||||
return (tutorial_imperial_broker_condition_isImperialFaction(player, npc) && (getGender(player) == Gender.MALE));
|
||||
}
|
||||
public boolean tutorial_imperial_broker_condition_isMalePlayer(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
return (getGender(player) == GENDER_MALE);
|
||||
return (getGender(player) == Gender.MALE);
|
||||
}
|
||||
public boolean tutorial_imperial_broker_condition_justSpokeToPlayer(obj_id player, obj_id npc) throws InterruptedException
|
||||
{
|
||||
|
||||
@@ -140,12 +140,12 @@ public class ice_cream_fail extends script.base_script
|
||||
default:
|
||||
snd += "human_";
|
||||
}
|
||||
switch (getGender(player))
|
||||
if(getGender(player) == Gender.FEMALE)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
snd += "female_eat.cef";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
snd += "male_eat.cef";
|
||||
}
|
||||
playClientEffectLoc(player, snd, getLocation(player), getScale(player));
|
||||
|
||||
@@ -140,12 +140,12 @@ public class ice_cream_nobuff extends script.base_script
|
||||
default:
|
||||
snd += "human_";
|
||||
}
|
||||
switch (getGender(player))
|
||||
if(getGender(player) == Gender.FEMALE)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
snd += "female_eat.cef";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
snd += "male_eat.cef";
|
||||
}
|
||||
playClientEffectLoc(player, snd, getLocation(player), getScale(player));
|
||||
|
||||
@@ -145,12 +145,12 @@ public class spice extends script.base_script
|
||||
default:
|
||||
snd += "human_";
|
||||
}
|
||||
switch (getGender(player))
|
||||
if(getGender(player) == Gender.FEMALE)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
snd += "female_eat.cef";
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
snd += "male_eat.cef";
|
||||
}
|
||||
playClientEffectLoc(player, snd, getLocation(player), getScale(player));
|
||||
|
||||
@@ -36,7 +36,6 @@ public class senator_crate extends script.base_script
|
||||
obj_id pInv = utils.getInventoryContainer(player);
|
||||
int pSpecies = getSpecies(player);
|
||||
String playerTemplate = getSkillTemplate(player);
|
||||
int pGender = getGender(player);
|
||||
HashSet theSet = new HashSet();
|
||||
if (pSpecies == SPECIES_WOOKIEE)
|
||||
{
|
||||
|
||||
@@ -465,21 +465,15 @@ public class consumable extends script.base_script
|
||||
snd += "wookiee_";
|
||||
break;
|
||||
}
|
||||
int gender = getGender(player);
|
||||
switch (gender)
|
||||
if(getGender(player) == Gender.FEMALE)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
snd += "female_eat.cef";
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
default:
|
||||
snd += "male_eat.cef";
|
||||
break;
|
||||
}
|
||||
if (!snd.equals(""))
|
||||
else
|
||||
{
|
||||
playClientEffectLoc(player, snd, getLocation(player), getScale(player));
|
||||
snd += "male_eat.cef";
|
||||
}
|
||||
playClientEffectLoc(player, snd, getLocation(player), getScale(player));
|
||||
prose_package pp = prose.getPackage(PROSE_CONSUME_ITEM, player, item);
|
||||
sendSystemMessageProse(target, pp);
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ public class npe extends script.base_script
|
||||
{
|
||||
obj_id pInv = utils.getInventoryContainer(player);
|
||||
int pSpecies = getSpecies(player);
|
||||
int pGender = getGender(player);
|
||||
Gender pGender = getGender(player);
|
||||
HashSet theSet = new HashSet();
|
||||
if (utils.isProfession(player, utils.FORCE_SENSITIVE))
|
||||
{
|
||||
@@ -684,7 +684,7 @@ public class npe extends script.base_script
|
||||
}
|
||||
else if (utils.isProfession(player, utils.ENTERTAINER))
|
||||
{
|
||||
if (pGender == GENDER_MALE)
|
||||
if (pGender == Gender.MALE)
|
||||
{
|
||||
theSet.add(static_item.createNewItemFunction("item_entertainer_shirt_02_01", pInv));
|
||||
theSet.add(static_item.createNewItemFunction("item_entertainer_pants_02_01", pInv));
|
||||
|
||||
@@ -3358,7 +3358,7 @@ public class performance extends script.base_script
|
||||
}
|
||||
location myLoc = getLocation(actor);
|
||||
int species = getSpecies(actor);
|
||||
int gender = getGender(actor);
|
||||
Gender gender = getGender(actor);
|
||||
String template = "object/mobile/hologram/";
|
||||
String speciesString = "human";
|
||||
String genderString = "male";
|
||||
@@ -3392,7 +3392,7 @@ public class performance extends script.base_script
|
||||
speciesString = "sullustan";
|
||||
break;
|
||||
}
|
||||
if (gender == GENDER_FEMALE)
|
||||
if (gender == Gender.FEMALE)
|
||||
{
|
||||
genderString = "female";
|
||||
}
|
||||
|
||||
@@ -3356,7 +3356,7 @@ public class stealth extends script.base_script
|
||||
{
|
||||
location myLoc = getLocation(spy);
|
||||
int species = getSpecies(spy);
|
||||
int gender = getGender(spy);
|
||||
Gender gender = getGender(spy);
|
||||
String template = "object/mobile/hologram/";
|
||||
String speciesString = "human";
|
||||
String genderString = "male";
|
||||
@@ -3390,7 +3390,7 @@ public class stealth extends script.base_script
|
||||
speciesString = "sullustan";
|
||||
break;
|
||||
}
|
||||
if (gender == GENDER_FEMALE)
|
||||
if (gender == Gender.FEMALE)
|
||||
{
|
||||
genderString = "female";
|
||||
}
|
||||
|
||||
@@ -1390,12 +1390,11 @@ public class base_player extends script.base_script
|
||||
chatEnterRoom("SWG." + getGalaxyName() + ".system");
|
||||
chatEnterRoom("SWG." + getGalaxyName() + "." + getCurrentSceneName() + ".system");
|
||||
float curScale = getScale(self);
|
||||
int gender = getGender(self);
|
||||
int intSpecies = getSpecies(self);
|
||||
String species = utils.getPlayerSpeciesName(intSpecies);
|
||||
float min = 1.0f;
|
||||
float max = 1.0f;
|
||||
if (gender == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
min = dataTableGetFloat("datatables/player/racial_scale.iff", species, "MALE_MIN");
|
||||
max = dataTableGetFloat("datatables/player/racial_scale.iff", species, "MALE_MAX");
|
||||
@@ -2063,7 +2062,7 @@ public class base_player extends script.base_script
|
||||
}
|
||||
String racial_tbl = "datatables/creation/racial_mods.iff";
|
||||
int templateRow = 0;
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
templateRow = dataTableSearchColumnForString(template, 0, racial_tbl);
|
||||
}
|
||||
@@ -8722,10 +8721,9 @@ public class base_player extends script.base_script
|
||||
public void createStartingEquipment(obj_id objPlayer) throws InterruptedException
|
||||
{
|
||||
obj_id playerInv = utils.getInventoryContainer(objPlayer);
|
||||
int gender = getGender(objPlayer);
|
||||
int species = getSpecies(objPlayer);
|
||||
int idx = -1;
|
||||
if (gender == GENDER_MALE)
|
||||
if (getGender(objPlayer) == Gender.MALE)
|
||||
{
|
||||
if (species == SPECIES_HUMAN || species == SPECIES_ZABRAK || species == SPECIES_BOTHAN || species == SPECIES_MON_CALAMARI || species == SPECIES_RODIAN || species == SPECIES_TWILEK)
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ public class live_conversions extends script.base_script
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (getGender(player) != GENDER_MALE && getSpecies(player) != SPECIES_ITHORIAN)
|
||||
if (getGender(player) != Gender.MALE && getSpecies(player) != SPECIES_ITHORIAN)
|
||||
{
|
||||
if (badge.hasBadge(player, "pilot_rebel_navy_naboo"))
|
||||
{
|
||||
|
||||
@@ -344,6 +344,7 @@ public class script_class_loader extends ClassLoader
|
||||
defaultLoad.add("script.base_class$attacker_results");
|
||||
defaultLoad.add("script.base_class$defender_results");
|
||||
defaultLoad.add("script.base_class$range_info");
|
||||
defaultLoad.add("script.base_class$Gender");
|
||||
defaultLoad.add("script.collections");
|
||||
defaultLoad.add("script.color");
|
||||
defaultLoad.add("script.combat_engine");
|
||||
|
||||
@@ -3670,7 +3670,7 @@ public class buff_handler extends script.base_script
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
String costume = dataTableGetString(DATATABLE_COSTUME, row, "APPEARANCE");
|
||||
if (getGender(self) == GENDER_FEMALE)
|
||||
if (getGender(self) == Gender.FEMALE)
|
||||
{
|
||||
String female_costume = dataTableGetString(DATATABLE_COSTUME, row, "FEMALE_APPEARANCE");
|
||||
if (female_costume != null && female_costume.length() > 0 && !female_costume.equals("none"))
|
||||
|
||||
@@ -324,7 +324,7 @@ public class npc_lair_ai extends script.theme_park.poi.base
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
if (getGender(self) == GENDER_FEMALE)
|
||||
if (getGender(self) == Gender.FEMALE)
|
||||
{
|
||||
ai_lib.setDefaultCalmMood(self, "themepark_oola");
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ public class qa_pilot_roadmap_tatooine_rebel extends script.base_script
|
||||
{
|
||||
space_quest.giveReward(self, "destroy", "master_rebel_2", 50000, "object/tangible/wearables/helmet/helmet_fighter_rebel_ace.iff");
|
||||
factions.addFactionStanding(self, factions.FACTION_REBEL, 400.0f);
|
||||
if (getGender(self) == GENDER_MALE)
|
||||
if (getGender(self) == Gender.MALE)
|
||||
{
|
||||
if (getSpecies(self) == SPECIES_ITHORIAN)
|
||||
{
|
||||
|
||||
@@ -151,18 +151,6 @@ public class citizen extends script.base_script
|
||||
}
|
||||
public String getGenderString(obj_id player) throws InterruptedException
|
||||
{
|
||||
String genderString = "it";
|
||||
int gender = getGender(player);
|
||||
switch (gender)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
genderString = "she";
|
||||
break;
|
||||
case GENDER_MALE:
|
||||
default:
|
||||
genderString = "he";
|
||||
break;
|
||||
}
|
||||
return genderString;
|
||||
return getGender(player) == Gender.FEMALE ? "she" : "he";
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -71,8 +71,8 @@ public class angry_meatlump extends script.base_script
|
||||
{
|
||||
string_id hintMsg = new string_id(STF, hintString);
|
||||
prose_package pp = prose.getPackage(hintMsg, emoteSayer, emoteSayer);
|
||||
String pronounTO = getGender(self) == GENDER_MALE ? "he" : "she";
|
||||
String pronounTT = getGender(self) == GENDER_MALE ? "his" : "her";
|
||||
String pronounTO = getGender(self) == Gender.MALE ? "he" : "she";
|
||||
String pronounTT = getGender(self) == Gender.MALE ? "his" : "her";
|
||||
prose.setTO(pp, pronounTO);
|
||||
prose.setTT(pp, pronounTT);
|
||||
chat.chat(emoteSayer, emoteSayer, chat.CHAT_EMOTE, null, pp);
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ public class meatlump_king extends script.base_script
|
||||
break;
|
||||
case CHAT:
|
||||
prose_package pp = prose.getPackage(new string_id("theme_park/corellia/quest", reaction), player, player);
|
||||
String pronounTT = getGender(player) == GENDER_MALE ? "boy" : "girl";
|
||||
String pronounTT = getGender(player) == Gender.MALE ? "boy" : "girl";
|
||||
prose.setTT(pp, pronounTT);
|
||||
chat.chat(self, player, chat.CHAT_SAY, null, pp);
|
||||
break;
|
||||
|
||||
@@ -67,8 +67,7 @@ public class trooper extends script.base_script
|
||||
{
|
||||
if (rand(1, 10) == 1)
|
||||
{
|
||||
int yourGender = getGender(breacher);
|
||||
if (yourGender == GENDER_MALE)
|
||||
if (getGender(breacher) == Gender.MALE)
|
||||
{
|
||||
chat.chat(self, new string_id(CONVO_FILE, "trooper_greeting_m"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user