List of commits:
Subject Hash Author Date (UTC)
Make interact button also place items 3f1f27d32e162fc9e0cbe5e420b0ec78ef705d15 mse 2021-12-01 13:33:37
Switch entity button to interact a409b707d3e704e4370702bdb77a2a9841e624d3 mse 2021-11-30 06:37:25
Translate Continue button to Greek & bump version to 0.7.1 5dfb837cb70a16a71dc9338e1126f1cd69ada1a2 mse 2021-11-29 09:22:04
Bump version to v0.7.0 e303b764c874b5e61bedc64b634f4ac80d5f27e5 mse 2021-11-28 07:48:29
Add CSL functions, syntax enhancements, OnPlayerEat, & remove init.json a484c33465821c194fe5d34cfef6716de198aaa6 mse 2021-11-27 04:24:46
Fix libs.cpp c736b9be42a871adc4827431961e8b769572c26b mse 2021-11-20 02:34:34
Fix tile seams ae09d59880997b3e1fd1cdf2083f83b3f0f73312 mse 2021-11-20 00:29:03
Make particle light follow sun angle ef944efffd223dd843a1471d6b651f5dc46d871b mse 2021-11-19 22:14:29
Work on particle light and bump version to v0.6.5 73b7b68133f7767f78c47492f693c5e9e965e214 mse 2021-11-19 08:04:32
Improve rim lighting and flatten floor gibs 4a7082e02eda370dba12bb44089777552859c5bd mse 2021-11-18 04:30:05
Change rim lighting to specular 937d99bee19b936fbf95927c5877a915c4128de1 mse 2021-11-18 03:49:41
Add sprite rim lighting eb9ade21b6253e050d6962c273187f090c20ff2a mse 2021-11-18 01:29:22
Bump version to v0.6.4 c2aeae76122cc95d03756a55a528b62609762820 mse 2021-11-17 11:38:37
Attempt to fix JSON serializing in locales with commas beae8b63fb0deaaf0b66ef4f188df270120ebe1c mse 2021-11-17 11:19:18
Limit network settings to network-enabled builds 8ccef75176b9059a45afa9ea251c313be7b7cfe0 mse 2021-11-17 09:20:56
Add /fps console command 207ef051937c91f78dae3928ef004ee7aa7f2a7a mse 2021-11-16 21:33:32
Move userdata to game root directory f9bff9bb941b714e7c0987327804175d852b470b mse 2021-11-16 02:55:04
Add --savehere flag and bump version to v0.6.3 a59633113908903af57e4e1c62008fe154d4cbb7 mse 2021-11-16 02:12:25
Disable networking and remove dead code aaa8bd8300f89099bace4ee1de374d05dff2c089 mse 2021-11-15 05:17:06
Update gamecontrollerdb 828ce88dd2107d69b6332b9768f7c556473b8a24 mse 2021-11-14 00:29:26
Commit 3f1f27d32e162fc9e0cbe5e420b0ec78ef705d15 - Make interact button also place items
Author: mse
Author date (UTC): 2021-12-01 13:33
Committer name: mse
Committer date (UTC): 2021-12-01 13:33
Parent(s): a409b707d3e704e4370702bdb77a2a9841e624d3
Signer:
Signing key:
Signing status: N
Tree: 67539ede022f703f89c6c848a344f93ef5753c7e
File Lines added Lines deleted
confec.cpp 60 2
File confec.cpp changed (mode: 100644) (index b5b3bd0..8802b2c)
... ... int GetButtonState( std::string *button );
795 795
796 796 bool WorldInteract( int ent_index ); bool WorldInteract( int ent_index );
797 797
798 void PlaceEntity( long long place_x, long long place_y );
799
798 800 int GetTradingTotal(); int GetTradingTotal();
799 801
800 802 void BeginTrading(); void BeginTrading();
 
... ... bool WorldInteract( int ent_index ){
3691 3693 return true; return true;
3692 3694 } }
3693 3695
3696 void PlaceEntity( long long place_x, long long place_y ){
3697 if( world.followEntity < 0 || world.entities.empty() ) return;
3698 auto &player = world.entities[world.followEntity];
3699 // Constrain to world bounds.
3700 if( place_x < 0 ) place_x = 0;
3701 if( place_y < 0 ) place_y = 0;
3702 if( place_x > (long long)world.mapInfo[0].size() - 1 )
3703 place_x = world.mapInfo[0].size() - 1;
3704 if( place_y > (long long)world.mapInfo.size() - 1 )
3705 place_y = world.mapInfo.size() - 1;
3706 if( !world.tileBlocking( place_x, place_y, true )
3707 && world.mapEntities[place_y][place_x] < 0xB0 ){
3708 // Iterate in reverse order to place the last valid entity.
3709 for( int i = (int)item_selected.size() - 1; i >= 0; i-- ){
3710 auto &item =
3711 world.items[player.inventory[i].first];
3712 if( item_selected[i]
3713 && player.inventory[i].second > 0.0
3714 && item.entity.sprite.success ){
3715 AddEntity( item.entity, place_x, place_y );
3716 player.inventory[i].second--;
3717 if( player.inventory[i].second == 0.0 ){
3718 // Remove the item from the player's inventory.
3719 player.inventory.erase( player.inventory.begin() + i );
3720 // Deselect all.
3721 item_selected.assign( player.inventory.size(), false );
3722 somethingSelected = false;
3723 }
3724 // Do not propagate the task.
3725 player.task = fworld::TASK_NONE;
3726 // Wake the player and un-stun to avoid a perpetual sleep mode.
3727 sleep_mode = false;
3728 player.stun = 0.0;
3729 // TODO: Sound.
3730 break;
3731 }
3732 }
3733 }
3734 }
3735
3694 3736 int GetTradingTotal(){ int GetTradingTotal(){
3695 3737 // Calculate total. // Calculate total.
3696 3738 int total = 0; int total = 0;
 
... ... void GameLoop( double d ){
5812 5854 }else if( ( entityButtonDown }else if( ( entityButtonDown
5813 5855 || ( player.task == fworld::TASK_DROP && player.path.empty() ) ) || ( player.task == fworld::TASK_DROP && player.path.empty() ) )
5814 5856 && player.stun <= 0.0 && somethingSelected ){ && player.stun <= 0.0 && somethingSelected ){
5815 // Do not propagate the task.
5816 player.task = fworld::TASK_NONE;
5817 5857 // Trigger entity placement. // Trigger entity placement.
5818 5858 static const long long // Up, down, right, left. static const long long // Up, down, right, left.
5819 5859 offset_x[] = { 0, 0, 1, -1 }, offset_x[] = { 0, 0, 1, -1 },
 
... ... void GameLoop( double d ){
5828 5868 place_x += offset_x[player.direction]; place_x += offset_x[player.direction];
5829 5869 place_y += offset_y[player.direction]; place_y += offset_y[player.direction];
5830 5870 } }
5871 PlaceEntity( place_x, place_y );
5872 /*
5873 // Do not propagate the task.
5874 player.task = fworld::TASK_NONE;
5831 5875 if( place_x < 0 ) place_x = 0; if( place_x < 0 ) place_x = 0;
5832 5876 if( place_y < 0 ) place_y = 0; if( place_y < 0 ) place_y = 0;
5833 5877 if( place_x > (long long)world.mapInfo[0].size() - 1 ) if( place_x > (long long)world.mapInfo[0].size() - 1 )
 
... ... void GameLoop( double d ){
5858 5902 } }
5859 5903 } }
5860 5904 } }
5905 */
5861 5906 }else if( fgl::keystates[/*SDL_SCANCODE_GRAVE*/ SDL_SCANCODE_SLASH] }else if( fgl::keystates[/*SDL_SCANCODE_GRAVE*/ SDL_SCANCODE_SLASH]
5862 5907 && !fgl::textInputEnabled ){ && !fgl::textInputEnabled ){
5863 5908 // Trigger command input. // Trigger command input.
 
... ... void GameLoop( double d ){
6051 6096 // Trigger an interaction. // Trigger an interaction.
6052 6097 WorldInteract( world.facingEntity ); WorldInteract( world.facingEntity );
6053 6098 } }
6099 }else if( !show_cursor && world.facingEntity < 0 && interactButtonDown ){
6100 // Do not propagate the button press.
6101 interactButtonDown = false;
6102 actionButtonDown = false;
6103 // Drop items in front of the player.
6104 player.path.clear();
6105 static const long long // Up, down, right, left.
6106 offset_x[] = { 0, 0, 1, -1 },
6107 offset_y[] = { -1, 1, 0, 0 };
6108 long long
6109 place_x = player.x + 0.5 + offset_x[player.direction],
6110 place_y = player.y + 0.5 + offset_y[player.direction];
6111 PlaceEntity( place_x, place_y );
6054 6112 }else if( mouse_on_world }else if( mouse_on_world
6055 6113 && world.cursorOverEntity >= 0 && show_cursor ){ && world.cursorOverEntity >= 0 && show_cursor ){
6056 6114 // The cursor is visible over an entity and not over the inventory. // The cursor is visible over an entity and not over the inventory.
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using git:
git clone git://git.rocketgit.com/user/mse/ConfectionerEngine

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main