Skip to content

Commit

Permalink
Merge pull request #159 from Ldip999/Tetris
Browse files Browse the repository at this point in the history
Tetris
  • Loading branch information
Tk420634 authored Dec 22, 2024
2 parents f634108 + b3fb1b0 commit 1efc5c8
Show file tree
Hide file tree
Showing 7 changed files with 369 additions and 19 deletions.
12 changes: 3 additions & 9 deletions _maps/map_files/coyote_bayou/foxybarupper.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3313,9 +3313,6 @@
/turf/open/floor/wood_common/wood_common_dark,
/area/f13/fb/bar)
"HK" = (
/obj/machinery/computer/arcade{
density = 0
},
/obj/effect/turf_decal/siding/wood{
dir = 1;
color = "#3B2B1A"
Expand All @@ -3332,6 +3329,7 @@
dir = 1;
color = "#3B2B1A"
},
/obj/machinery/computer/arcade/battle,
/turf/open/floor/carpet/arcade,
/area/f13/fb/bar)
"Ib" = (
Expand Down Expand Up @@ -3440,9 +3438,7 @@
dir = 4;
color = "#3B2B1A"
},
/obj/machinery/computer/arcade{
density = 0
},
/obj/machinery/computer/arcade/orion_trail,
/turf/open/floor/carpet/arcade,
/area/f13/fb/bar)
"JG" = (
Expand Down Expand Up @@ -4298,10 +4294,8 @@
dir = 1;
color = "#3B2B1A"
},
/obj/machinery/computer/arcade{
density = 0
},
/obj/effect/sound_emitter/foxybar/machinery,
/obj/machinery/computer/arcade/tetris,
/turf/open/floor/carpet/arcade,
/area/f13/fb/bar)
"Ts" = (
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/computer/arcade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
if(!circuit)
var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 33,
/obj/item/circuitboard/computer/arcade/orion_trail = 33,
/obj/item/circuitboard/computer/arcade/tetris = 33

)
var/thegame = pickweight(gameodds)
var/obj/item/circuitboard/CB = new thegame()
Expand Down
4 changes: 4 additions & 0 deletions fortune13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,7 @@
#include "modular_sand\code\_onclick\hud\hud.dm"
#include "modular_sand\code\_onclick\hud\screen_objects.dm"
#include "modular_sand\code\controllers\configuration\entries\sandstorm.dm"
#include "modular_sand\code\controllers\configuration\entries\sandstorm_balance.dm"
#include "modular_sand\code\controllers\subsystem\interactions.dm"
#include "modular_sand\code\datums\components\autoplapper.dm"
#include "modular_sand\code\datums\components\glory_kill.dm"
Expand Down Expand Up @@ -4017,16 +4018,19 @@
#include "modular_sand\code\game\area\ship_area.dm"
#include "modular_sand\code\game\area\areas\shuttles.dm"
#include "modular_sand\code\game\area\areas\ruins\lavaland.dm"
#include "modular_sand\code\game\machinery\computer\arcade\tetris.dm"
#include "modular_sand\code\game\objects\effects\decals\cleanable\lewd_decals.dm"
#include "modular_sand\code\game\objects\items\cigs_lighters.dm"
#include "modular_sand\code\game\objects\items\cosmetics.dm"
#include "modular_sand\code\game\objects\items\fleshlight.dm"
#include "modular_sand\code\game\objects\items\plushes.dm"
#include "modular_sand\code\game\objects\items\circuitboards\computer_circuitboards.dm"
#include "modular_sand\code\game\objects\items\plushes\plushes.dm"
#include "modular_sand\code\game\objects\items\plushes\saliith.dm"
#include "modular_sand\code\modules\arousal\arousal.dm"
#include "modular_sand\code\modules\arousal\genital_sprite_accessories.dm"
#include "modular_sand\code\modules\arousal\genitals.dm"
#include "modular_sand\code\modules\client\asset_cache.dm"
#include "modular_sand\code\modules\mob\mob.dm"
#include "modular_splurt\character_directory.dm"
#include "modular_splurt\code\datums\mind.dm"
Expand Down
18 changes: 10 additions & 8 deletions modular_sand/code/game/machinery/computer/arcade/tetris.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Configuration defines
#define TETRIS_REWARD_DIVISOR CONFIG_GET(number/tetris_reward_divisor)
#define TETRIS_PRIZES_MAX CONFIG_GET(number/tetris_prizes_max)
#define TETRIS_SCORE_HIGH CONFIG_GET(number/tetris_score_high)
#define TETRIS_SCORE_MAX CONFIG_GET(number/tetris_score_max)
#define TETRIS_SCORE_MAX_SCI CONFIG_GET(number/tetris_score_max_sci)
#define TETRIS_TIME_COOLDOWN CONFIG_GET(number/tetris_time_cooldown)
#define TETRIS_NO_SCIENCE CONFIG_GET(flag/tetris_no_science)
//Let's hardcode this because I can't get CONFIG_GET working for the life of me
#define TETRIS_REWARD_DIVISOR 1000
#define TETRIS_PRIZES_MAX 10
#define TETRIS_SCORE_HIGH 10000
#define TETRIS_SCORE_MAX 100000
#define TETRIS_SCORE_MAX_SCI 10000
#define TETRIS_TIME_COOLDOWN 600
#define TETRIS_NO_SCIENCE TRUE

// Cooldown defines
#define TETRIS_COOLDOWN_MAIN cooldown_timer
Expand Down Expand Up @@ -58,7 +59,8 @@
COOLDOWN_START(src, TETRIS_COOLDOWN_MAIN, TETRIS_TIME_COOLDOWN)

// Vend prizes
prizevend(usr, reward_count)
for(var/i = 0; i < reward_count; i++)
prizevend(usr)

// Check if science points are possible and allowed
if((!SSresearch.science_tech) || TETRIS_NO_SCIENCE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/obj/item/circuitboard/computer/telesci_console
/*/obj/item/circuitboard/computer/telesci_console
name = "Telescience Control Console (Computer Board)"
build_path = /obj/machinery/computer/telescience

*/
/obj/item/circuitboard/computer/arcade/tetris
name = "Tetris (Computer Board)"
build_path = /obj/machinery/computer/arcade/tetris
Loading

0 comments on commit 1efc5c8

Please sign in to comment.