Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jasonrohrer/OneLife
Browse files Browse the repository at this point in the history
  • Loading branch information
skps2010 committed Sep 23, 2023
2 parents a2816f5 + d3ac98f commit a31b19e
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 21 deletions.
11 changes: 10 additions & 1 deletion build/steam/app_build_content_595690.vdf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@
// according to answer given here, we can use setlive with special "public"
// alias to force a build to become live right away
// https://steamcommunity.com/groups/steamworks/discussions/0/3276824488719073026/
"setlive" "public" // branch to set live after successful build, non if empty

// UPDATE 2023-Sept-22:
// Steam has new security settings preventing steamcmd from making a branch
// live like this. See this post:
// https://steamcommunity.com/groups/steamworks/discussions/0/3887225762855891646/

// Having anything other than "" set here results in Access Denied.
// (used to have "public" set here to force the build to go live).

"setlive" "" // branch to set live after successful build, none if empty

"preview" "0" // to enable preview builds

Expand Down
35 changes: 35 additions & 0 deletions documentation/changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ http://onehouronelife.com/updateLog.php



Version 393 ???

--New /MOTHER command to locate your mother (sometimes she's not your leader,
so the /LEADER command doesn't always work to find her). Fixes #926




Server Fixes:

--Touching your own race's waystone now always points you to a language expert,
even if population falls below special biome threshold. Expert waystones
always work, regardless of population size. Fixes #924

--Support for new wound-on-player generic transition that specifies what a
partly-healed wound would leave embedded in grave if person dies with that
wound. For example, if you pull the arrow out, and leave the head embedded
in, they can now have the head left in their grave when they die. Part of
jasonrohrer/OneLifeData7#1047

--Fixed so server looks for camera-on-camera transition when taking photo,
instead of player-on-camera transition, so the player can't interrupt the
process by clicking on the camera again mid-photo. Part of
jasonrohrer/OneLifeData7#1060

--Fixed content build scripts and Steam VDF file to not try to push build live
to the public branch automatically (which now gets Access Denied based on new
Steam security settings released in Sept 2023). Instead the build script now
pauses and waits for the user to use the Steamworks website to manually make
the build live.





Version 391 2023-September-15

--Fixed visual glitch when paved road hugged nearby walls. Fixes #921
Expand Down
25 changes: 25 additions & 0 deletions gameSource/LivingLifePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ static int getLocationKeyPriority( const char *inPersonKey ) {
strcmp( inPersonKey, "expt" ) == 0 ||
// explicitly touched a locked gate
strcmp( inPersonKey, "owner" ) == 0 ||
// manually requested mother location
strcmp( inPersonKey, "mother" ) == 0 ||
// manually-requested leader arrow
( leaderCommandTyped && strcmp( inPersonKey, "lead" ) == 0 ) ) {

Expand Down Expand Up @@ -19868,6 +19870,24 @@ void LivingLifePage::step() {
personKey = "visitor";
}
}


if( ! person ) {
char *motherPos =
strstr(
existing->currentSpeech,
" *mother" );

if( motherPos != NULL ) {
person = true;
sscanf( motherPos,
" *mother %d",
&personID );

motherPos[0] = '\0';
personKey = "mother2";
}
}


if( ! person ) {
Expand Down Expand Up @@ -26068,6 +26088,11 @@ void LivingLifePage::keyDown( unsigned char inASCII ) {
}
sendToServerSocket( (char*)"LEAD 0 0#" );
}
else if( commandTyped( typedText,
"motherCommand" ) ) {

sendToServerSocket( (char*)"MOTH 0 0#" );
}
else if( commandTyped( typedText,
"followerCommand" ) ) {

Expand Down
9 changes: 8 additions & 1 deletion gameSource/languages/English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ expt "EXPT"
owner "OWN"
visitor "VSTR"
property "PROP"
mother2 "MOM"


babyLabel "+BABY+"
leadLabel "+LEADER+"
Expand Down Expand Up @@ -528,12 +530,17 @@ propertyCommand "/PROPERTY"

orderCommand "/ORDER"

motherCommand "/MOTHER"



familyLabel "+FAMILY+"
leaderLabel "+LEADER+"
followerLabel "+FOLLOWER+"
allyLabel "+ALLY+"

mother2Label "+MOTHER+"



followerCountMessage "YOU HAVE %d FOLLOWERS."
Expand Down Expand Up @@ -806,7 +813,7 @@ pauseMessage4 "-"
commandHintsA "CHAT COMMANDS:##~~##/FAM##/DIE##/DISCONNECT##/FPS##/NETWORK##/PING####/HAPPY##/MAD##/ANGRY##/SAD##/DEVIOUS##/JOY##/BLUSH##/HUBBA##/ILL##/YOOHOO##/HMPH##/LOVE##/OREALLY##/SHOCK"


commandHintsB "/LEADER##/FOLLOWER##/ALLY /ORDER##/UNFOLLOW##/PROPERTY####I AM [NAME]##YOU ARE [NAME]##CURSE [NAME]##I FORGIVE [NAME]##[NAME] OWNS THIS##I'LL KILL [NAME]##I JOIN YOU##I FOLLOW [NAME]##I EXILE [NAME]##I REDEEM [NAME]##ORDER, [TEXT]##~~##NOTE:##~~##'YOU' FOR [NAME]##IS CLOSEST PERSON##LIKE: 'CURSE YOU'"
commandHintsB "/LEADER /MOTHER##/FOLLOWER##/ALLY /ORDER##/UNFOLLOW##/PROPERTY####I AM [NAME]##YOU ARE [NAME]##CURSE [NAME]##I FORGIVE [NAME]##[NAME] OWNS THIS##I'LL KILL [NAME]##I JOIN YOU##I FOLLOW [NAME]##I EXILE [NAME]##I REDEEM [NAME]##ORDER, [TEXT]##~~##NOTE:##~~##'YOU' FOR [NAME]##IS CLOSEST PERSON##LIKE: 'CURSE YOU'"



Expand Down
28 changes: 12 additions & 16 deletions scripts/generateDataOnlyDiffBundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,20 @@ pauseToVerify=0
# two arguments means automation
if [ $# -ne 2 ]
then

echo ""
echo ""
echo "NOTE: Automation no longer works for making Steam build live."
echo "It must be pushed live through the Steamworks website."
echo ""
echo "Pause to verify Steam build along the way?"
echo "The build process will pause part-way through and wait for you"
echo "to confirm that you have pushed the build live manually."
echo ""
echo "Enter YES to pause, or press [ENTER] to skip."
echo "Press [ENTER] to contine."
echo ""
echo -n "Pause later: "
read pauseWord
read

if [ "$pauseWord" = "YES" ]
then
echo
echo "Pausing later to verify Steam build."
echo
pauseToVerify=1
else
echo
echo "NOT pausing later."
echo
fi
pauseToVerify=1
fi


Expand Down Expand Up @@ -616,7 +610,9 @@ echo ""
if [ $pauseToVerify -eq 1 ]
then
echo ""
echo "As requested, PAUSING now that Steam build is done."
echo "PAUSING now."
echo ""
echo "Go into the Steamworks website and make the build live manually."
echo ""

echo "Press [ENTER] when ready."
Expand Down
5 changes: 5 additions & 0 deletions server/protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,8 @@ UNFOL x y#
PROP x y#
ORDR x y#
FLIP x y#
MOTH X Y#


KA is a keep-alive message used to keep the connection alive when the client
is idle and not sending any other messages (NATs and other routers can
Expand Down Expand Up @@ -1239,6 +1241,9 @@ ORDR repeats display of last-heard order from this player's leader.

FLIP requests flip to player's orientation, new facing toward x y

MOTH requests the player's mother's position as spoken map coordinates.
x and y are ignored



This one is more complicated:
Expand Down
101 changes: 98 additions & 3 deletions server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2869,6 +2869,7 @@ typedef enum messageType {
PROP,
ORDR,
FLIP,
MOTH,
UNKNOWN
} messageType;

Expand Down Expand Up @@ -3328,6 +3329,9 @@ ClientMessage parseMessage( LiveObject *inPlayer, char *inMessage ) {
else if( strcmp( nameBuffer, "FLIP" ) == 0 ) {
m.type = FLIP;
}
else if( strcmp( nameBuffer, "MOTH" ) == 0 ) {
m.type = MOTH;
}
else {
m.type = UNKNOWN;
}
Expand Down Expand Up @@ -16149,7 +16153,12 @@ static void findExpertForPlayer( LiveObject *inPlayer,
// they ARE this expert themselves

// point them toward polylingual race instead
race = getPolylingualRace();

// ignore pop limit for special biomes
// waystones always point to appropriate expert, regardless of
// population size
race = getPolylingualRace( true );

polylingual = true;
}

Expand Down Expand Up @@ -20488,7 +20497,6 @@ int main() {
delete [] message;
}
else if( m.type == PHOID ) {
// FIXME: still need to test
if( strlen( m.photoIDString ) == 40 ) {

int oldObjectID = getMapObject( m.x, m.y );
Expand All @@ -20498,8 +20506,14 @@ int main() {
if( oldO->writable &&
strstr( oldO->description, "+photo" ) ) {


// camera-on-camera transition specifies
// what should result if the photo succeeds.
// (The player could never cause this transition
// manually, since the camera is permanent when
// it's in photo-taking mode)
TransRecord *writingHappenTrans =
getMetaTrans( 0, oldObjectID );
getMetaTrans( oldObjectID, oldObjectID );

if( writingHappenTrans != NULL &&
writingHappenTrans->newTarget > 0 &&
Expand Down Expand Up @@ -20614,6 +20628,61 @@ int main() {
delete [] psMessage;
}
}
else if( m.type == MOTH ) {

LiveObject *motherO =
getLiveObject( nextPlayer->parentID );

if( motherO != NULL ) {

// give them an arrow toward that mother

// note that this will give them an arrow to
// her grave location if she has just died
// and her LiveObject hasn't been cleared out yet
// That's okay.

GridPos lPos = getPlayerPos( motherO );

char *motherName = motherO->name;

char *fullMotherName = NULL;

if( motherName == NULL ) {
fullMotherName = stringDuplicate( "MOTHER" );
}
else {
fullMotherName = autoSprintf( "MOTHER %s",
motherName );
}

char *psMessage =
autoSprintf( "PS\n"
"%d/0 MY %s "
"*mother %d *map %d %d\n#",
nextPlayer->id,
fullMotherName,
motherO->id,
lPos.x - nextPlayer->birthPos.x,
lPos.y - nextPlayer->birthPos.y );

delete [] fullMotherName;

sendMessageToPlayer( nextPlayer,
psMessage,
strlen( psMessage ) );
delete [] psMessage;
}
else {
char *psMessage =
autoSprintf( "PS\n"
"%d/0 +NO MOTHER+\n#",
nextPlayer->id );
sendMessageToPlayer( nextPlayer,
psMessage, strlen( psMessage ) );
delete [] psMessage;
}
}
else if( m.type == UNFOL ) {
// following no one
nextPlayer->followingID = -1;
Expand Down Expand Up @@ -24475,6 +24544,32 @@ int main() {
targetPlayer->embeddedWeaponID = 0;
targetPlayer->embeddedWeaponEtaDecay = 0;

// check if this new wound would leave
// something embedded in grave
TransRecord *newWoundEmbed =
getPTrans( targetPlayer->holdingID,
0, false, false );

if( newWoundEmbed != NULL &&
newWoundEmbed->newTarget > 0 ) {

targetPlayer->embeddedWeaponID =
newWoundEmbed->newTarget;
TransRecord *newDecayT =
getMetaTrans(
-1,
newWoundEmbed->newTarget );

if( newDecayT != NULL ) {
targetPlayer->
embeddedWeaponEtaDecay =
Time::timeSec() +
newDecayT->
autoDecaySeconds;
}
}



nextPlayer->holdingID =
healTrans->newActor;
Expand Down

0 comments on commit a31b19e

Please sign in to comment.