From d8490cae41cbb7eaa5caa3f6553300a9738c7c71 Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Mon, 18 Sep 2023 11:12:01 -0400 Subject: [PATCH 1/7] 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 --- documentation/changeLog.txt | 10 ++++++++++ server/server.cpp | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index 992813287..65068de2e 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -4,6 +4,16 @@ http://onehouronelife.com/updateLog.php + +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 + + + + Version 391 2023-September-15 --Fixed visual glitch when paved road hugged nearby walls. Fixes #921 diff --git a/server/server.cpp b/server/server.cpp index 52fbaa646..41fbce262 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -16149,7 +16149,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; } From 261fcbd356f11315a54fb2532c511f189d663dcd Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Mon, 18 Sep 2023 12:31:29 -0400 Subject: [PATCH 2/7] 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 --- documentation/changeLog.txt | 5 +++++ server/server.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index 65068de2e..18f60a5cd 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -11,6 +11,11 @@ Server Fixes: 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 diff --git a/server/server.cpp b/server/server.cpp index 41fbce262..b236408a1 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -24480,6 +24480,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; From 392d2554ccee2910dbcfbc1dfd8d102feba460d3 Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Wed, 20 Sep 2023 11:42:02 -0400 Subject: [PATCH 3/7] 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 --- documentation/changeLog.txt | 6 ++++++ server/server.cpp | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index 18f60a5cd..3ec5e2248 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -17,6 +17,12 @@ Server Fixes: 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 + + Version 391 2023-September-15 diff --git a/server/server.cpp b/server/server.cpp index b236408a1..f81ae18b1 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -20493,7 +20493,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 ); @@ -20503,8 +20502,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 && From 4075363f484ffb17eb7b885eb0dbb5d560c17848 Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Wed, 20 Sep 2023 12:25:18 -0400 Subject: [PATCH 4/7] 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 --- documentation/changeLog.txt | 7 ++++ gameSource/LivingLifePage.cpp | 25 ++++++++++++++ gameSource/languages/English.txt | 9 ++++- server/protocol.txt | 5 +++ server/server.cpp | 59 ++++++++++++++++++++++++++++++++ 5 files changed, 104 insertions(+), 1 deletion(-) diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index 3ec5e2248..ad56b64fe 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -4,6 +4,13 @@ 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: diff --git a/gameSource/LivingLifePage.cpp b/gameSource/LivingLifePage.cpp index b5001b558..9b9ead2c9 100644 --- a/gameSource/LivingLifePage.cpp +++ b/gameSource/LivingLifePage.cpp @@ -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 ) ) { @@ -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 ) { @@ -26064,6 +26084,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" ) ) { diff --git a/gameSource/languages/English.txt b/gameSource/languages/English.txt index 4b2fbb0e0..935f88234 100644 --- a/gameSource/languages/English.txt +++ b/gameSource/languages/English.txt @@ -455,6 +455,8 @@ expt "EXPT" owner "OWN" visitor "VSTR" property "PROP" +mother2 "MOM" + babyLabel "+BABY+" leadLabel "+LEADER+" @@ -526,12 +528,17 @@ propertyCommand "/PROPERTY" orderCommand "/ORDER" +motherCommand "/MOTHER" + + familyLabel "+FAMILY+" leaderLabel "+LEADER+" followerLabel "+FOLLOWER+" allyLabel "+ALLY+" +mother2Label "+MOTHER+" + followerCountMessage "YOU HAVE %d FOLLOWERS." @@ -804,7 +811,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'" diff --git a/server/protocol.txt b/server/protocol.txt index 8d1c37675..c50357267 100644 --- a/server/protocol.txt +++ b/server/protocol.txt @@ -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 @@ -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: diff --git a/server/server.cpp b/server/server.cpp index f81ae18b1..34097e176 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -2869,6 +2869,7 @@ typedef enum messageType { PROP, ORDR, FLIP, + MOTH, UNKNOWN } messageType; @@ -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; } @@ -20624,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; From 0f717dda13bd15229da1e68a2cdcacad9572ac02 Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Fri, 22 Sep 2023 22:52:47 -0400 Subject: [PATCH 5/7] 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. --- build/steam/app_build_content_595690.vdf | 11 +++++++++- documentation/changeLog.txt | 11 ++++++++-- scripts/generateDataOnlyDiffBundle.sh | 28 ++++++++++-------------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/build/steam/app_build_content_595690.vdf b/build/steam/app_build_content_595690.vdf index cb0ec0955..0e74537ff 100644 --- a/build/steam/app_build_content_595690.vdf +++ b/build/steam/app_build_content_595690.vdf @@ -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 diff --git a/documentation/changeLog.txt b/documentation/changeLog.txt index ad56b64fe..e93b4c66c 100644 --- a/documentation/changeLog.txt +++ b/documentation/changeLog.txt @@ -26,8 +26,15 @@ Server Fixes: --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 + 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. + diff --git a/scripts/generateDataOnlyDiffBundle.sh b/scripts/generateDataOnlyDiffBundle.sh index 6ba54d1aa..e1ac98eab 100755 --- a/scripts/generateDataOnlyDiffBundle.sh +++ b/scripts/generateDataOnlyDiffBundle.sh @@ -34,26 +34,18 @@ pauseToVerify=0 # two arguments means automation if [ $# -ne 2 ] then + echo "" echo "" - echo "Pause to verify Steam build along the way?" + echo "NOTE: Automation no longer works for making Steam build live." + echo "It must be pushed live through the Steamworks website." echo "" - echo "Enter YES to pause, or press [ENTER] to skip." + 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 -n "Pause later: " - read pauseWord - - if [ "$pauseWord" = "YES" ] - then - echo - echo "Pausing later to verify Steam build." - echo - pauseToVerify=1 - else - echo - echo "NOT pausing later." - echo - fi + echo "Press [ENTER] to contine." + echo "" + pauseToVerify=1 fi @@ -616,7 +608,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." From 52663720910e5d1fd3cc560cdbf8a2336acece92 Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Fri, 22 Sep 2023 22:54:27 -0400 Subject: [PATCH 6/7] Fixed read variable name in new pause to confirm Steam changes. --- scripts/generateDataOnlyDiffBundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generateDataOnlyDiffBundle.sh b/scripts/generateDataOnlyDiffBundle.sh index e1ac98eab..3a8656f14 100755 --- a/scripts/generateDataOnlyDiffBundle.sh +++ b/scripts/generateDataOnlyDiffBundle.sh @@ -73,7 +73,7 @@ then echo "Check Steamworks and verify that this is correct." echo "" echo -n "Hit [ENTER] when ready: " - read + read goWord fi From d3ac98f087708842d1c4cfa2064168f8a3225f9b Mon Sep 17 00:00:00 2001 From: Jason Rohrer Date: Fri, 22 Sep 2023 22:56:11 -0400 Subject: [PATCH 7/7] Whoops, fixed again. Fixed read variable name in new pause to confirm Steam changes. --- scripts/generateDataOnlyDiffBundle.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/generateDataOnlyDiffBundle.sh b/scripts/generateDataOnlyDiffBundle.sh index 3a8656f14..485775426 100755 --- a/scripts/generateDataOnlyDiffBundle.sh +++ b/scripts/generateDataOnlyDiffBundle.sh @@ -45,6 +45,8 @@ then echo "" echo "Press [ENTER] to contine." echo "" + read + pauseToVerify=1 fi @@ -73,7 +75,7 @@ then echo "Check Steamworks and verify that this is correct." echo "" echo -n "Hit [ENTER] when ready: " - read goWord + read fi