Adjusts minesweeper rewards & syndicate mines (#21360)

* ok done

yay

* no mem

* haha im so smart

yay

* ok makes it not fuck up

hopefully

* meaningless change

what

* Fixes ticket counting + mine count

god im smart

* not a duck

other one is
This commit is contained in:
cowbot92
2024-02-06 15:31:44 -05:00
committed by GitHub
parent 49125a498c
commit a2aec4d392
4 changed files with 55 additions and 30 deletions

View File

@@ -150,7 +150,7 @@
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~"
icon = 'icons/obj/watercloset.dmi'
icon_state = "rubberducky"
var/sound = 'sound/items/bikehorn.ogg'
var/sound = 'yogstation/sound/misc/quack.ogg'
range_heavy = 2
range_light = 3
range_flash = 4
@@ -248,7 +248,7 @@
disarm_product = /obj/item/deployablemine/honk
/obj/effect/mine/sound/mineEffect(mob/victim)
playsound(loc, sound, 100, 1)
playsound(loc, sound, 150, 1)
/obj/effect/mine/sound/bwoink

View File

@@ -154,6 +154,8 @@
var/difficulty = MINESWEEPER_BEGINNER
var/value = MINESWEEPER_BEGINNER
var/current_difficulty = "Beginner"
///determines if a game has been won while it is emagged or not
var/emagwin = FALSE
var/starting_time = 0
var/time_frozen = 0
@@ -200,7 +202,10 @@
return TRUE
/datum/minesweeper/proc/change_difficulty(diff)
difficulty = diff
if(host.obj_flags & EMAGGED)
difficulty = MINESWEEPER_EXPERT
else
difficulty = diff
return TRUE
/datum/minesweeper/proc/new_game()
@@ -286,28 +291,7 @@
var/result = select_square(x,y)
game_status = result
if(result == MINESWEEPER_VICTORY)
play_snd('yogstation/sound/arcade/minesweeper_win.ogg')
host.say("You cleared the board of all mines! Congratulations!")
if(emaggable && host.obj_flags & EMAGGED && value >= 1)
var/itemname
switch(rand(1,3))
if(1)
itemname = "a syndicate bomb beacon"
new /obj/item/sbeacondrop/bomb(host.loc)
if(2)
itemname = "a rocket launcher"
new /obj/item/gun/ballistic/rocketlauncher/unrestricted(host.loc)
new /obj/item/ammo_casing/caseless/rocket/hedp(host.loc)
new /obj/item/ammo_casing/caseless/rocket/hedp(host.loc)
new /obj/item/ammo_casing/caseless/rocket/hedp(host.loc)
if(3)
itemname = "two bags of c4"
new /obj/item/storage/backpack/duffelbag/syndie/c4(host.loc)
new /obj/item/storage/backpack/duffelbag/syndie/x4(host.loc)
message_admins("[key_name_admin(user)] won emagged Minesweeper and got [itemname]!")
vis_msg(span_notice("[host] dispenses [itemname]!"), span_notice("You hear a chime and a clunk."))
else
ticket_count += value
winner_chicken_dinner(user)
if(result == MINESWEEPER_DEAD && emaggable && (host.obj_flags & EMAGGED))
// One crossed wire, one wayward pinch of potassium chlorate, ONE ERRANT TWITCH
@@ -319,6 +303,34 @@
return TRUE
/datum/minesweeper/proc/winner_chicken_dinner(mob/user)
play_snd('yogstation/sound/arcade/minesweeper_win.ogg')
host.say("You cleared the board of all mines! Congratulations!")
ticket_count += value
if(emaggable && host.obj_flags & EMAGGED && value >= 1 && !emagwin)
if(difficulty != MINESWEEPER_EXPERT)
return
else
var/itemname
switch(rand(1,3))
if(1)
itemname = "a syndicate bomb beacon"
new /obj/item/sbeacondrop/bomb(host.loc)
if(2)
itemname = "two deployable syndicate mines disguised as ducks"
new /obj/item/deployablemine/traitor(host.loc)
new /obj/item/deployablemine/traitor(host.loc)
if(3)
itemname = "a bag of c4 & x4 charges"
new /obj/item/storage/backpack/duffelbag/syndie/c4(host.loc)
new /obj/item/storage/backpack/duffelbag/syndie/x4(host.loc)
emagwin = TRUE
message_admins("[user] won emagged Minesweeper and got [itemname]!")
vis_msg(span_notice("[host] dispenses [itemname]!"), span_notice("You hear a chime and a clunk."))
return
/datum/minesweeper/proc/generate_new_board(diff)
board_data = new /list(31,18) // Fresh board
mine_spots = list()
@@ -447,3 +459,4 @@
/datum/minesweeper/proc/KABLOOEY()
explosion(get_turf(host),1,3,rand(1,5),rand(1,10))

View File

@@ -93,6 +93,7 @@ export const MinesweeperContent = (props, context) => {
<br />
<Button
content="Beginner"
disabled={emagged}
selected={difficulty==="Beginner"}
color={flag_mode ? "green" : "blue"}
onClick={() => act('PRG_difficulty', {
@@ -100,6 +101,7 @@ export const MinesweeperContent = (props, context) => {
})} />
<Button
content="Intermediate"
disabled={emagged}
selected={difficulty==="Intermediate"}
color="blue"
onClick={() => act('PRG_difficulty', {
@@ -114,6 +116,7 @@ export const MinesweeperContent = (props, context) => {
})} />
<Button
content="Custom"
disabled={emagged}
selected={difficulty==="Custom"}
color="blue"
onClick={() => act('PRG_difficulty', {

View File

@@ -3,7 +3,6 @@
desc = "An arcade machine that generates grids. It seems that the machine sparks and screeches when a grid is generated, as if it cannot cope with the intensity of generating the grid."
icon_state = "arcade"
circuit = /obj/item/circuitboard/computer/arcade/minesweeper
var/datum/minesweeper/board
/obj/machinery/computer/arcade/minesweeper/Initialize(mapload)
@@ -12,11 +11,22 @@
board.emaggable = TRUE
board.host = src
/obj/machinery/computer/arcade/minesweeper/screwdriver_act(mob/living/user, obj/item/I)
if(obj_flags & EMAGGED)
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
else
. = ..()
return
/obj/machinery/computer/arcade/minesweeper/Destroy(force)
board.host = null
QDEL_NULL(board)
if(obj_flags & EMAGGED)
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
else
board.host = null
QDEL_NULL(board)
. = ..()
/obj/machinery/computer/arcade/minesweeper/interact(mob/user, special_state)
. = ..()
if(!is_operational())
@@ -93,8 +103,7 @@
if(!diff)
return
board.play_snd('yogstation/sound/arcade/minesweeper_boardpress.ogg')
board.difficulty = diff
return TRUE
return board.change_difficulty(diff)
if("PRG_height")
var/cin = params["height"]