|
@@ -13,3 +13,25 @@ const enum ESexEncounterType {
|
|
|
HJ_GIVE="hj_give",
|
|
|
HJ_RECEIVE="hj_receive"
|
|
|
}
|
|
|
+
|
|
|
+Macro.add('sex', {
|
|
|
+ skipArgs : false,
|
|
|
+ handler : function () {
|
|
|
+ try {
|
|
|
+ const pc = State.variables.pc;
|
|
|
+ const npcIdOrObject:NPC|string = this.args[0];
|
|
|
+ const flags:{[key:string]:any} = this.args[1] ?? {};
|
|
|
+
|
|
|
+ pc.sexEncounterRegister(
|
|
|
+ npcIdOrObject,
|
|
|
+ flags.type ?? ESexEncounterType.VAGINAL,
|
|
|
+ flags.fam ?? ESexEncounterFamiliarity.ACQUAINTANCE,
|
|
|
+ flags.aware ?? true,
|
|
|
+ flags.time ?? State.variables.time.now
|
|
|
+ )
|
|
|
+ }
|
|
|
+ catch (ex) {
|
|
|
+ return this.error('ERROR in sex-widget: ' + ex.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+});
|