Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rjw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scenty
rjw
Commits
a40859c1
Commit
a40859c1
authored
5 years ago
by
Ed86
Browse files
Options
Downloads
Patches
Plain Diff
cleanup whoring jobgiver
parent
ce9a2400
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Modules/Whoring/JobGivers/JobGiver_WhoreInvitingVisitors.cs
+18
-15
18 additions, 15 deletions
...dules/Whoring/JobGivers/JobGiver_WhoreInvitingVisitors.cs
with
18 additions
and
15 deletions
Source/Modules/Whoring/JobGivers/JobGiver_WhoreInvitingVisitors.cs
+
18
−
15
View file @
a40859c1
...
...
@@ -130,8 +130,8 @@ namespace rjw
if
(!
potentialClients
.
Any
())
return
null
;
//Log.Message("
[RJW] JobGiver_WhoreInvitingVisitors::
FindAttractivePawn whore: " + xxx.get_pawnname(whore));
//Log.Message("
[RJW] JobGiver_WhoreInvitingVisitors::
FindAttractivePawn number of potential clients
pass1
" + potentialClients.Count());
//Log.Message("
FindAttractivePawn whore: " + xxx.get_pawnname(whore));
//Log.Message("
FindAttractivePawn number of
all
potential clients " + potentialClients.Count());
List
<
Pawn
>
valid_targets
=
new
List
<
Pawn
>();
...
...
@@ -146,36 +146,34 @@ namespace rjw
&&
!
MemoryChecker
(
x
,
ThoughtDef
.
Named
(
"RJWFailedSolicitation"
))
&&
x
!=
LovePartnerRelationUtility
.
ExistingLovePartner
(
whore
));
//Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of potential clients pass2 " + potentialClients.Count());
if
(
guestsSpawned
.
Any
())
{
//Log.Message("
[RJW] JobGiver_WhoreInvitingVisitors::
FindAttractivePawn number of acceptable
g
uests " + guestsSpawned.Count());
//Log.Message("
FindAttractivePawn number of acceptable
G
uests " + guestsSpawned.Count());
return
guestsSpawned
.
RandomElement
();
}
//Log.Message("
[RJW] JobGiver_WhoreInvitingVisitors::
FindAttractivePawn - found no guests, trying colonists");
//Log.Message("
FindAttractivePawn - found no guests, trying colonists");
if
(!
WhoringHelper
.
WillPawnTryHookup
(
whore
))
if
(!
WhoringHelper
.
WillPawnTryHookup
(
whore
))
// will hookup colonists?
{
return
null
;
}
IEnumerable
<
Pawn
>
freeColonists
=
valid_targets
.
Where
(
x
=>
x
.
Faction
==
whore
.
Faction
&&
Roll_to_skip
(
x
,
whore
));
//Log.Message("
[RJW] JobGiver_WhoreInvitingVisitors::
FindAttractivePawn number of free colonists " + freeColonists.Count());
//Log.Message("
FindAttractivePawn number of free colonists " + freeColonists.Count());
freeColonists
=
freeColonists
.
Where
(
x
=>
client
.
RelationCheckPass
(
x
)
&&
!
MemoryChecker
(
x
,
ThoughtDef
.
Named
(
"RJWTurnedDownWhore"
)));
//Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::FindAttractivePawn number of acceptable colonists " + freeColonists.Count());
if
(
freeColonists
.
Any
())
{
//Log.Message("
[RJW] JobGiver_WhoreInvitingVisitors::
FindAttractivePawn number of acceptable
gue
sts " +
guestsSpawned
.Count());
//Log.Message("
FindAttractivePawn number of acceptable
Coloni
sts " +
freeColonists
.Count());
return
freeColonists
.
RandomElement
();
}
//Log.Message(" FindAttractivePawn - found no clients found");
return
null
;
}
...
...
@@ -194,19 +192,24 @@ namespace rjw
return
null
;
}
Building_Bed
whorebed
=
xxx
.
FindBed
(
pawn
);
if
(
whorebed
==
null
||
!
xxx
.
CanUse
(
pawn
,
whorebed
))
{
return
null
;
}
int
price
;
Pawn
client
=
FindAttractivePawn
(
pawn
,
out
price
);
//Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::TryGiveJob( " + xxx.get_pawnname(pawn) + " ) called1 - pawn2 is " + (pawn2 == null ? "NULL" : xxx.get_pawnname(pawn2)));
if
(
client
==
null
)
{
return
null
;
}
Building_Bed
whorebed
=
xxx
.
FindBed
(
pawn
);
if
(
whorebed
==
null
||
!
xxx
.
CanUse
(
pawn
,
whorebed
)
||
!
client
.
CanReach
(
whorebed
,
PathEndMode
.
OnCell
,
Danger
.
Some
))
if
(!
client
.
CanReach
(
whorebed
,
PathEndMode
.
OnCell
,
Danger
.
Some
))
{
return
null
;
}
//Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::TryGiveJob( " + xxx.get_pawnname(pawn) + " ) whore
-
" + xxx.get_pawnname(client) + " is client.");
//Log.Message("[RJW] JobGiver_WhoreInvitingVisitors::TryGiveJob( " + xxx.get_pawnname(pawn) + " )
is
whore
,
" + xxx.get_pawnname(client) + " is client.");
//whorebed.priceOfWhore = price;
return
new
Job
(
xxx
.
whore_inviting_visitors
,
client
,
whorebed
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment