diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index efbbe36228..6f064d64df 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -83,8 +83,12 @@ // If it's a generic arcade machine, pick a random arcade // circuit board for it and make the new machine if(!circuit) - var/choice = pick(subtypesof(/obj/item/circuitboard/computer/arcade)) - var/obj/item/circuitboard/CB = new choice() + var/list/gameodds = list(/obj/item/circuitboard/computer/arcade/battle = 33, + /obj/item/circuitboard/computer/arcade/orion_trail = 33, + /obj/item/circuitboard/computer/arcade/minesweeper = 33, + /obj/item/circuitboard/computer/arcade/amputation = 2) + var/thegame = pickweight(gameodds) + var/obj/item/circuitboard/CB = new thegame() new CB.build_path(loc, CB) return INITIALIZE_HINT_QDEL Reset() @@ -122,1022 +126,3 @@ empprize = pickweight(prizes) new empprize(loc) explosion(loc, -1, 0, 1+num_of_prizes, flame_range = 1+num_of_prizes) - - -// ** BATTLE ** // - - -/obj/machinery/computer/arcade/battle - name = "arcade machine" - desc = "Does not support Pinball." - icon_state = "arcade" - circuit = /obj/item/circuitboard/computer/arcade/battle - var/enemy_name = "Space Villain" - var/temp = "Winners don't use space drugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = FALSE - var/blocked = FALSE //Player cannot attack/heal while set - var/turtle = 0 - - var/turn_speed = 5 //Measured in deciseconds. - -/obj/machinery/computer/arcade/battle/Reset() - var/name_action - var/name_part1 - var/name_part2 - - name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ", "Ban ") - - name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ") - name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn", "Bloopers") - - enemy_name = replacetext((name_part1 + name_part2), "the ", "") - name = (name_action + name_part1 + name_part2) - -/obj/machinery/computer/arcade/battle/ui_interact(mob/user) - . = ..() - var/dat = "Close" - dat += "

[enemy_name]

" - - dat += "

[temp]

" - dat += "
Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]
" - - if (gameover) - dat += "
New Game" - else - dat += "
Attack | " - dat += "Heal | " - dat += "Recharge Power" - - dat += "
" - var/datum/browser/popup = new(user, "arcade", "Space Villain 2000") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) - popup.open() - -/obj/machinery/computer/arcade/battle/Topic(href, href_list) - if(..()) - return - - if (!blocked && !gameover) - if (href_list["attack"]) - blocked = TRUE - var/attackamt = rand(2,6) - temp = "You attack for [attackamt] damage!" - playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) - updateUsrDialog() - if(turtle > 0) - turtle-- - - sleep(turn_speed) - enemy_hp -= attackamt - arcade_action(usr) - - else if (href_list["heal"]) - blocked = TRUE - var/pointamt = rand(1,3) - var/healamt = rand(6,8) - temp = "You use [pointamt] magic to heal for [healamt] damage!" - playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) - updateUsrDialog() - turtle++ - - sleep(turn_speed) - player_mp -= pointamt - player_hp += healamt - blocked = TRUE - updateUsrDialog() - arcade_action(usr) - - else if (href_list["charge"]) - blocked = TRUE - var/chargeamt = rand(4,7) - temp = "You regain [chargeamt] points" - playsound(loc, 'sound/arcade/mana.ogg', 50, 1, extrarange = -3, falloff = 10) - player_mp += chargeamt - if(turtle > 0) - turtle-- - - updateUsrDialog() - sleep(turn_speed) - arcade_action(usr) - - if (href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=arcade") - - else if (href_list["newgame"]) //Reset everything - temp = "New Round" - player_hp = initial(player_hp) - player_mp = initial(player_mp) - enemy_hp = initial(enemy_hp) - enemy_mp = initial(enemy_mp) - gameover = FALSE - turtle = 0 - - if(obj_flags & EMAGGED) - Reset() - obj_flags &= ~EMAGGED - - add_fingerprint(usr) - updateUsrDialog() - return - -/obj/machinery/computer/arcade/battle/proc/arcade_action(mob/user) - if ((enemy_mp <= 0) || (enemy_hp <= 0)) - if(!gameover) - gameover = TRUE - temp = "[enemy_name] has fallen! Rejoice!" - playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) - - if(obj_flags & EMAGGED) - new /obj/effect/spawner/newbomb/timer/syndicate(loc) - new /obj/item/clothing/head/collectable/petehat(loc) - message_admins("[ADMIN_LOOKUPFLW(usr)] has outbombed Cuban Pete and been awarded a bomb.") - log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.") - Reset() - obj_flags &= ~EMAGGED - else - prizevend(user) - SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("win", (obj_flags & EMAGGED ? "emagged":"normal"))) - - - else if ((obj_flags & EMAGGED) && (turtle >= 4)) - var/boomamt = rand(5,10) - temp = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!" - playsound(loc, 'sound/arcade/boom.ogg', 50, 1, extrarange = -3, falloff = 10) - player_hp -= boomamt - - else if ((enemy_mp <= 5) && (prob(70))) - var/stealamt = rand(2,3) - temp = "[enemy_name] steals [stealamt] of your power!" - playsound(loc, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 10) - player_mp -= stealamt - updateUsrDialog() - - if (player_mp <= 0) - gameover = TRUE - sleep(turn_speed) - temp = "You have been drained! GAME OVER" - playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) - if(obj_flags & EMAGGED) - usr.gib() - SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (obj_flags & EMAGGED ? "emagged":"normal"))) - - else if ((enemy_hp <= 10) && (enemy_mp > 4)) - temp = "[enemy_name] heals for 4 health!" - playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) - enemy_hp += 4 - enemy_mp -= 4 - - else - var/attackamt = rand(3,6) - temp = "[enemy_name] attacks for [attackamt] damage!" - playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) - player_hp -= attackamt - - if ((player_mp <= 0) || (player_hp <= 0)) - gameover = TRUE - temp = "You have been crushed! GAME OVER" - playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) - if(obj_flags & EMAGGED) - usr.gib() - SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal"))) - - blocked = FALSE - return - - -/obj/machinery/computer/arcade/battle/emag_act(mob/user) - if(obj_flags & EMAGGED) - return - to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") - temp = "If you die in the game, you die for real!" - player_hp = 30 - player_mp = 10 - enemy_hp = 45 - enemy_mp = 20 - gameover = FALSE - blocked = FALSE - - obj_flags |= EMAGGED - - enemy_name = "Cuban Pete" - name = "Outbomb Cuban Pete" - - - updateUsrDialog() - - - -// *** THE ORION TRAIL ** // - -#define ORION_TRAIL_WINTURN 9 - -//Orion Trail Events -#define ORION_TRAIL_RAIDERS "Raiders" -#define ORION_TRAIL_FLUX "Interstellar Flux" -#define ORION_TRAIL_ILLNESS "Illness" -#define ORION_TRAIL_BREAKDOWN "Breakdown" -#define ORION_TRAIL_LING "Changelings?" -#define ORION_TRAIL_LING_ATTACK "Changeling Ambush" -#define ORION_TRAIL_MALFUNCTION "Malfunction" -#define ORION_TRAIL_COLLISION "Collision" -#define ORION_TRAIL_SPACEPORT "Spaceport" -#define ORION_TRAIL_BLACKHOLE "BlackHole" - -#define ORION_STATUS_START 1 -#define ORION_STATUS_NORMAL 2 -#define ORION_STATUS_GAMEOVER 3 -#define ORION_STATUS_MARKET 4 - -/obj/machinery/computer/arcade/orion_trail - name = "The Orion Trail" - desc = "Learn how our ancestors got to Orion, and have fun in the process!" - icon_state = "arcade" - circuit = /obj/item/circuitboard/computer/arcade/orion_trail - var/busy = FALSE //prevent clickspam that allowed people to ~speedrun~ the game. - var/engine = 0 - var/hull = 0 - var/electronics = 0 - var/food = 80 - var/fuel = 60 - var/turns = 4 - var/alive = 4 - var/eventdat = null - var/event = null - var/list/settlers = list("Harry","Larry","Bob") - var/list/events = list(ORION_TRAIL_RAIDERS = 3, - ORION_TRAIL_FLUX = 1, - ORION_TRAIL_ILLNESS = 3, - ORION_TRAIL_BREAKDOWN = 2, - ORION_TRAIL_LING = 3, - ORION_TRAIL_MALFUNCTION = 2, - ORION_TRAIL_COLLISION = 1, - ORION_TRAIL_SPACEPORT = 2 - ) - var/list/stops = list() - var/list/stopblurbs = list() - var/lings_aboard = 0 - var/spaceport_raided = 0 - var/spaceport_freebie = 0 - var/last_spaceport_action = "" - var/gameStatus = ORION_STATUS_START - var/canContinueEvent = 0 - -/obj/machinery/computer/arcade/orion_trail/kobayashi - name = "Kobayashi Maru control computer" - desc = "A test for cadets" - icon = 'icons/obj/machines/particle_accelerator.dmi' - icon_state = "control_boxp" - events = list("Raiders" = 3, "Interstellar Flux" = 1, "Illness" = 3, "Breakdown" = 2, "Malfunction" = 2, "Collision" = 1, "Spaceport" = 2) - prizes = list(/obj/item/paper/fluff/holodeck/trek_diploma = 1) - settlers = list("Kirk","Worf","Gene") - -/obj/machinery/computer/arcade/orion_trail/Reset() - // Sets up the main trail - stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") - stopblurbs = list( - "Pluto, long since occupied with long-range sensors and scanners, stands ready to, and indeed continues to probe the far reaches of the galaxy.", - "At the edge of the Sol system lies a treacherous asteroid belt. Many have been crushed by stray asteroids and misguided judgement.", - "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now a low-population sanctuary for adventurers and traders.", - "This region of space is particularly devoid of matter. Such low-density pockets are known to exist, but the vastness of it is astounding.", - "Rigel Prime, the center of the Rigel system, burns hot, basking its planetary bodies in warmth and radiation.", - "Tau Ceti Beta has recently become a waypoint for colonists headed towards Orion. There are many ships and makeshift stations in the vicinity.", - "Sensors indicate that a black hole's gravitational field is affecting the region of space we were headed through. We could stay of course, but risk of being overcome by its gravity, or we could change course to go around, which will take longer.", - "You have come into range of the first man-made structure in this region of space. It has been constructed not by travellers from Sol, but by colonists from Orion. It stands as a monument to the colonists' success.", - "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!" - ) - -/obj/machinery/computer/arcade/orion_trail/proc/newgame() - // Set names of settlers in crew - settlers = list() - for(var/i = 1; i <= 3; i++) - add_crewmember() - add_crewmember("[usr]") - // Re-set items to defaults - engine = 1 - hull = 1 - electronics = 1 - food = 80 - fuel = 60 - alive = 4 - turns = 1 - event = null - gameStatus = ORION_STATUS_NORMAL - lings_aboard = 0 - - //spaceport junk - spaceport_raided = 0 - spaceport_freebie = 0 - last_spaceport_action = "" - -/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user) - . = ..() - if(fuel <= 0 || food <=0 || settlers.len == 0) - gameStatus = ORION_STATUS_GAMEOVER - event = null - var/dat = "" - if(gameStatus == ORION_STATUS_GAMEOVER) - dat = "

Game Over

" - dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." - if(!settlers.len) - dat += "
Your entire crew died, and your ship joins the fleet of ghost-ships littering the galaxy." - else - if(food <= 0) - dat += "
You ran out of food and starved." - if(obj_flags & EMAGGED) - user.nutrition = 0 //yeah you pretty hongry - to_chat(user, "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.") - if(fuel <= 0) - dat += "
You ran out of fuel, and drift, slowly, into a star." - if(obj_flags & EMAGGED) - var/mob/living/M = user - M.adjust_fire_stacks(5) - M.IgniteMob() //flew into a star, so you're on fire - to_chat(user, "You feel an immense wave of heat emanate from the arcade machine. Your skin bursts into flames.") - - if(obj_flags & EMAGGED) - to_chat(user, "You're never going to make it to Orion...") - user.death() - obj_flags &= ~EMAGGED //removes the emagged status after you lose - gameStatus = ORION_STATUS_START - name = "The Orion Trail" - desc = "Learn how our ancestors got to Orion, and have fun in the process!" - - dat += "

May They Rest In Peace

" - else if(event) - dat = eventdat - else if(gameStatus == ORION_STATUS_NORMAL) - var/title = stops[turns] - var/subtext = stopblurbs[turns] - dat = "

[title]

" - dat += "[subtext]" - dat += "

Crew:

" - dat += english_list(settlers) - dat += "
Food: [food] | Fuel: [fuel]" - dat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" - if(turns == 7) - dat += "

Go Around Continue

" - else - dat += "

Continue

" - dat += "

Kill a Crewmember

" - dat += "

Close

" - else - dat = "

The Orion Trail

" - dat += "

Experience the journey of your ancestors!



" - dat += "
New Game
" - dat += "

Close

" - var/datum/browser/popup = new(user, "arcade", "The Orion Trail",400,700) - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) - popup.open() - return - -/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) - if(..()) - return - if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=arcade") - - if(busy) - return - busy = TRUE - - if (href_list["continue"]) //Continue your travels - if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7) - if(turns >= ORION_TRAIL_WINTURN) - win(usr) - else - food -= (alive+lings_aboard)*2 - fuel -= 5 - if(turns == 2 && prob(30)) - event = ORION_TRAIL_COLLISION - event() - else if(prob(75)) - event = pickweight(events) - if(lings_aboard) - if(event == ORION_TRAIL_LING || prob(55)) - event = ORION_TRAIL_LING_ATTACK - event() - turns += 1 - if(obj_flags & EMAGGED) - var/mob/living/carbon/M = usr //for some vars - switch(event) - if(ORION_TRAIL_RAIDERS) - if(prob(50)) - to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?") - M.hallucination += 30 - else - to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...") - M.take_bodypart_damage(30) - playsound(loc, 'sound/weapons/genhit2.ogg', 100, 1) - if(ORION_TRAIL_ILLNESS) - var/severity = rand(1,3) //pray to RNGesus. PRAY, PIGS - if(severity == 1) - to_chat(M, "You suddenly feel slightly nauseated." ) - if(severity == 2) - to_chat(usr, "You suddenly feel extremely nauseated and hunch over until it passes.") - M.Stun(60) - if(severity >= 3) //you didn't pray hard enough - to_chat(M, "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.") - M.Stun(100) - sleep(30) - M.vomit(10, distance = 5) - if(ORION_TRAIL_FLUX) - if(prob(75)) - M.Knockdown(60) - say("A sudden gust of powerful wind slams [M] into the floor!") - M.take_bodypart_damage(25) - playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) - else - to_chat(M, "A violent gale blows past you, and you barely manage to stay standing!") - if(ORION_TRAIL_COLLISION) //by far the most damaging event - if(prob(90)) - playsound(loc, 'sound/effects/bang.ogg', 100, 1) - var/turf/open/floor/F - for(F in orange(1, src)) - F.ScrapeAway() - say("Something slams into the floor around [src], exposing it to space!") - if(hull) - sleep(10) - say("A new floor suddenly appears around [src]. What the hell?") - playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) - var/turf/open/space/T - for(T in orange(1, src)) - T.PlaceOnTop(/turf/open/floor/plating) - else - say("Something slams into the floor around [src] - luckily, it didn't get through!") - playsound(loc, 'sound/effects/bang.ogg', 50, 1) - if(ORION_TRAIL_MALFUNCTION) - playsound(loc, 'sound/effects/empulse.ogg', 50, 1) - visible_message("[src] malfunctions, randomizing in-game stats!") - var/oldfood = food - var/oldfuel = fuel - food = rand(10,80) / rand(1,2) - fuel = rand(10,60) / rand(1,2) - if(electronics) - sleep(10) - if(oldfuel > fuel && oldfood > food) - audible_message("[src] lets out a somehow reassuring chime.") - else if(oldfuel < fuel || oldfood < food) - audible_message("[src] lets out a somehow ominous chime.") - food = oldfood - fuel = oldfuel - playsound(loc, 'sound/machines/chime.ogg', 50, 1) - - else if(href_list["newgame"]) //Reset everything - if(gameStatus == ORION_STATUS_START) - newgame() - else if(href_list["menu"]) //back to the main menu - if(gameStatus == ORION_STATUS_GAMEOVER) - gameStatus = ORION_STATUS_START - event = null - food = 80 - fuel = 60 - settlers = list("Harry","Larry","Bob") - else if(href_list["slow"]) //slow down - if(event == ORION_TRAIL_FLUX) - food -= (alive+lings_aboard)*2 - fuel -= 5 - event = null - else if(href_list["pastblack"]) //slow down - if(turns == 7) - food -= ((alive+lings_aboard)*2)*3 - fuel -= 15 - turns += 1 - event = null - else if(href_list["useengine"]) //use parts - if(event == ORION_TRAIL_BREAKDOWN) - engine = max(0, --engine) - event = null - else if(href_list["useelec"]) //use parts - if(event == ORION_TRAIL_MALFUNCTION) - electronics = max(0, --electronics) - event = null - else if(href_list["usehull"]) //use parts - if(event == ORION_TRAIL_COLLISION) - hull = max(0, --hull) - event = null - else if(href_list["wait"]) //wait 3 days - if(event == ORION_TRAIL_BREAKDOWN || event == ORION_TRAIL_MALFUNCTION || event == ORION_TRAIL_COLLISION) - food -= ((alive+lings_aboard)*2)*3 - event = null - else if(href_list["keepspeed"]) //keep speed - if(event == ORION_TRAIL_FLUX) - if(prob(75)) - event = "Breakdown" - event() - else - event = null - else if(href_list["blackhole"]) //keep speed past a black hole - if(turns == 7) - if(prob(75)) - event = ORION_TRAIL_BLACKHOLE - event() - if(obj_flags & EMAGGED) - playsound(loc, 'sound/effects/supermatter.ogg', 100, 1) - say("A miniature black hole suddenly appears in front of [src], devouring [usr] alive!") - if(isliving(usr)) - var/mob/living/L = usr - L.Stun(200, ignore_canstun = TRUE) //you can't run :^) - var/S = new /obj/singularity/academy(usr.loc) - addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50) - QDEL_IN(S, 50) - else - event = null - turns += 1 - else if(href_list["holedeath"]) - if(event == ORION_TRAIL_BLACKHOLE) - gameStatus = ORION_STATUS_GAMEOVER - event = null - else if(href_list["eventclose"]) //end an event - if(canContinueEvent) - event = null - - else if(href_list["killcrew"]) //shoot a crewmember - if(gameStatus == ORION_STATUS_NORMAL || event == ORION_TRAIL_LING) - var/sheriff = remove_crewmember() //I shot the sheriff - playsound(loc,'sound/weapons/gunshot.ogg', 100, 1) - - if(settlers.len == 0 || alive == 0) - say("The last crewmember [sheriff], shot themselves, GAME OVER!") - if(obj_flags & EMAGGED) - usr.death(0) - obj_flags &= EMAGGED - gameStatus = ORION_STATUS_GAMEOVER - event = null - else if(obj_flags & EMAGGED) - if(usr.name == sheriff) - say("The crew of the ship chose to kill [usr.name]!") - usr.death(0) - - if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places - event = null - - //Spaceport specific interactions - //they get a header because most of them don't reset event (because it's a shop, you leave when you want to) - //they also call event() again, to regen the eventdata, which is kind of odd but necessary - else if(href_list["buycrew"]) //buy a crewmember - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && food >= 10 && fuel >= 10) - var/bought = add_crewmember() - last_spaceport_action = "You hired [bought] as a new crewmember." - fuel -= 10 - food -= 10 - event() - - else if(href_list["sellcrew"]) //sell a crewmember - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && settlers.len > 1) - var/sold = remove_crewmember() - last_spaceport_action = "You sold your crewmember, [sold]!" - fuel += 7 - food += 7 - event() - - else if(href_list["leave_spaceport"]) - if(gameStatus == ORION_STATUS_MARKET) - event = null - gameStatus = ORION_STATUS_NORMAL - spaceport_raided = 0 - spaceport_freebie = 0 - last_spaceport_action = "" - - else if(href_list["raid_spaceport"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided) - var/success = min(15 * alive,100) //default crew (4) have a 60% chance - spaceport_raided = 1 - - var/FU = 0 - var/FO = 0 - if(prob(success)) - FU = rand(5,15) - FO = rand(5,15) - last_spaceport_action = "You successfully raided the spaceport! You gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" - else - FU = rand(-5,-15) - FO = rand(-5,-15) - last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" - - //your chance of lose a crewmember is 1/2 your chance of success - //this makes higher % failures hurt more, don't get cocky space cowboy! - if(prob(success*5)) - var/lost_crew = remove_crewmember() - last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" - if(obj_flags & EMAGGED) - say("WEEWOO! WEEWOO! Spaceport security en route!") - playsound(src, 'sound/items/weeoo1.ogg', 100, FALSE) - for(var/i, i<=3, i++) - var/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion/O = new/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion(get_turf(src)) - O.target = usr - - - fuel += FU - food += FO - event() - - else if(href_list["buyparts"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided && fuel > 5) - switch(text2num(href_list["buyparts"])) - if(1) //Engine Parts - engine++ - last_spaceport_action = "Bought Engine Parts" - if(2) //Hull Plates - hull++ - last_spaceport_action = "Bought Hull Plates" - if(3) //Spare Electronics - electronics++ - last_spaceport_action = "Bought Spare Electronics" - fuel -= 5 //they all cost 5 - event() - - else if(href_list["trade"]) - if(gameStatus == ORION_STATUS_MARKET) - if(!spaceport_raided) - switch(text2num(href_list["trade"])) - if(1) //Fuel - if(fuel > 5) - fuel -= 5 - food += 5 - last_spaceport_action = "Traded Fuel for Food" - event() - if(2) //Food - if(food > 5) - fuel += 5 - food -= 5 - last_spaceport_action = "Traded Food for Fuel" - event() - - add_fingerprint(usr) - updateUsrDialog() - busy = FALSE - return - - -/obj/machinery/computer/arcade/orion_trail/proc/event() - eventdat = "

[event]

" - canContinueEvent = 0 - switch(event) - if(ORION_TRAIL_RAIDERS) - eventdat += "Raiders have come aboard your ship!" - if(prob(50)) - var/sfood = rand(1,10) - var/sfuel = rand(1,10) - food -= sfood - fuel -= sfuel - eventdat += "
They have stolen [sfood] Food and [sfuel] Fuel." - else if(prob(10)) - var/deadname = remove_crewmember() - eventdat += "
[deadname] tried to fight back, but was killed." - else - eventdat += "
Fortunately, you fended them off without any trouble." - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_FLUX) - eventdat += "This region of space is highly turbulent.
If we go slowly we may avoid more damage, but if we keep our speed we won't waste supplies." - eventdat += "
What will you do?" - eventdat += "

Slow Down Continue

" - eventdat += "

Close

" - - if(ORION_TRAIL_ILLNESS) - eventdat += "A deadly illness has been contracted!" - var/deadname = remove_crewmember() - eventdat += "
[deadname] was killed by the disease." - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_BREAKDOWN) - eventdat += "Oh no! The engine has broken down!" - eventdat += "
You can repair it with an engine part, or you can make repairs for 3 days." - if(engine >= 1) - eventdat += "

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_MALFUNCTION) - eventdat += "The ship's systems are malfunctioning!" - eventdat += "
You can replace the broken electronics with spares, or you can spend 3 days troubleshooting the AI." - if(electronics >= 1) - eventdat += "

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_COLLISION) - eventdat += "Something hit us! Looks like there's some hull damage." - if(prob(25)) - var/sfood = rand(5,15) - var/sfuel = rand(5,15) - food -= sfood - fuel -= sfuel - eventdat += "
[sfood] Food and [sfuel] Fuel was vented out into space." - if(prob(10)) - var/deadname = remove_crewmember() - eventdat += "
[deadname] was killed by rapid depressurization." - eventdat += "
You can repair the damage with hull plates, or you can spend the next 3 days welding scrap together." - if(hull >= 1) - eventdat += "

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - if(ORION_TRAIL_BLACKHOLE) - eventdat += "You were swept away into the black hole." - eventdat += "

Oh...

" - eventdat += "

Close

" - settlers = list() - - if(ORION_TRAIL_LING) - eventdat += "Strange reports warn of changelings infiltrating crews on trips to Orion..." - if(settlers.len <= 2) - eventdat += "
Your crew's chance of reaching Orion is so slim the changelings likely avoided your ship..." - eventdat += "

Continue

" - eventdat += "

Close

" - if(prob(10)) // "likely", I didn't say it was guaranteed! - lings_aboard = min(++lings_aboard,2) - else - if(lings_aboard) //less likely to stack lings - if(prob(20)) - lings_aboard = min(++lings_aboard,2) - else if(prob(70)) - lings_aboard = min(++lings_aboard,2) - - eventdat += "

Kill a Crewmember

" - eventdat += "

Risk it

" - eventdat += "

Close

" - canContinueEvent = 1 - - if(ORION_TRAIL_LING_ATTACK) - if(lings_aboard <= 0) //shouldn't trigger, but hey. - eventdat += "Haha, fooled you, there are no changelings on board!" - eventdat += "
(You should report this to a coder :S)" - else - var/ling1 = remove_crewmember() - var/ling2 = "" - if(lings_aboard >= 2) - ling2 = remove_crewmember() - - eventdat += "Changelings among your crew suddenly burst from hiding and attack!" - if(ling2) - eventdat += "
[ling1] and [ling2]'s arms twist and contort into grotesque blades!" - else - eventdat += "
[ling1]'s arm twists and contorts into a grotesque blade!" - - var/chance2attack = alive*20 - if(prob(chance2attack)) - var/chancetokill = 30*lings_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 lings, 2 crew is 50% chance - if(prob(chancetokill)) - var/deadguy = remove_crewmember() - var/murder_text = pick("The changeling[ling2 ? "s" : ""] bring[ling2 ? "" : "s"] down [deadguy] and disembowel[ling2 ? "" : "s"] them in a spray of gore!", \ - "[ling2 ? pick(ling1, ling2) : ling1] corners [deadguy] and impales them through the stomach!", \ - "[ling2 ? pick(ling1, ling2) : ling1] decapitates [deadguy] in a single cleaving arc!") - eventdat += "
[murder_text]" - else - eventdat += "

You valiantly fight off the changeling[ling2 ? "s":""]!" - if(ling2) - food += 30 - lings_aboard = max(0,lings_aboard-2) - else - food += 15 - lings_aboard = max(0,--lings_aboard) - eventdat += "
Well, it's perfectly good food...\ -
You cut the changeling[ling2 ? "s" : ""] into meat, gaining [ling2 ? "30" : "15"] Food!" - else - eventdat += "

[pick("Sensing unfavorable odds", "After a failed attack", "Suddenly breaking nerve")], \ - the changeling[ling2 ? "s":""] vanish[ling2 ? "" : "es"] into space through the airlocks! You're safe... for now." - if(ling2) - lings_aboard = max(0,lings_aboard-2) - else - lings_aboard = max(0,--lings_aboard) - - eventdat += "

Continue

" - eventdat += "

Close

" - canContinueEvent = 1 - - - if(ORION_TRAIL_SPACEPORT) - gameStatus = ORION_STATUS_MARKET - if(spaceport_raided) - eventdat += "The spaceport is on high alert! You've been barred from docking by the local authorities after your failed raid." - if(last_spaceport_action) - eventdat += "
Last Spaceport Action: [last_spaceport_action]" - eventdat += "

Depart Spaceport

" - eventdat += "

Close

" - else - eventdat += "Your jump into the sector yields a spaceport - a lucky find!" - eventdat += "
This spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." - eventdat += "
Trading terms: FU = Fuel, FO = Food" - if(last_spaceport_action) - eventdat += "
Last action: [last_spaceport_action]" - eventdat += "

Crew:

" - eventdat += english_list(settlers) - eventdat += "
Food: [food] | Fuel: [fuel]" - eventdat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" - - - //If your crew is pathetic you can get freebies (provided you haven't already gotten one from this port) - if(!spaceport_freebie && (fuel < 20 || food < 20)) - spaceport_freebie++ - var/FU = 10 - var/FO = 10 - var/freecrew = 0 - if(prob(30)) - FU = 25 - FO = 25 - - if(prob(10)) - add_crewmember() - freecrew++ - - eventdat += "
The traders of the spaceport take pity on you, and generously give you some free supplies! (+[FU]FU, +[FO]FO)" - if(freecrew) - eventdat += "
You also gain a new crewmember!" - - fuel += FU - food += FO - - //CREW INTERACTIONS - eventdat += "

Crew Management:

" - - //Buy crew - if(food >= 10 && fuel >= 10) - eventdat += "

Hire a New Crewmember (-10FU, -10FO)

" - else - eventdat += "

You cannot afford a new crewmember.

" - - //Sell crew - if(settlers.len > 1) - eventdat += "

Sell Crew for Fuel and Food (+7FU, +7FO)

" - else - eventdat += "

You have no other crew to sell.

" - - //BUY/SELL STUFF - eventdat += "

Spare Parts:

" - - //Engine parts - if(fuel > 5) - eventdat += "

Buy Engine Parts (-5FU)

" - else - eventdat += "

You cannot afford engine parts." - - //Hull plates - if(fuel > 5) - eventdat += "

Buy Hull Plates (-5FU)

" - else - eventdat += "

You cannot afford hull plates." - - //Electronics - if(fuel > 5) - eventdat += "

Buy Spare Electronics (-5FU)

" - else - eventdat += "

You cannot afford spare electronics." - - //Trade - if(fuel > 5) - eventdat += "

Trade Fuel for Food (-5FU,+5FO)

" - else - eventdat += "

You don't have 5FU to trade. 5) - eventdat += "

Trade Food for Fuel (+5FU,-5FO)

" - else - eventdat += "

You don't have 5FO to trade.You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.") - name = "The Orion Trail: Realism Edition" - desc = "Learn how our ancestors got to Orion, and try not to die in the process!" - newgame() - obj_flags |= EMAGGED - -/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion - name = "spaceport security" - desc = "Premier corporate security forces for all spaceports found along the Orion Trail." - faction = list("orion") - loot = list() - del_on_death = TRUE - -/obj/item/orion_ship - name = "model settler ship" - desc = "A model spaceship, it looks like those used back in the day when travelling to Orion! It even has a miniature FX-293 reactor, which was renowned for its instability and tendency to explode..." - icon = 'icons/obj/toy.dmi' - icon_state = "ship" - w_class = WEIGHT_CLASS_SMALL - var/active = 0 //if the ship is on - -/obj/item/orion_ship/examine(mob/user) - ..() - if(!(in_range(user, src))) - return - if(!active) - to_chat(user, "There's a little switch on the bottom. It's flipped down.") - else - to_chat(user, "There's a little switch on the bottom. It's flipped up.") - -/obj/item/orion_ship/attack_self(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse - if(active) - return - - message_admins("[ADMIN_LOOKUPFLW(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") - log_game("[key_name(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") - - to_chat(user, "You flip the switch on the underside of [src].") - active = 1 - visible_message("[src] softly beeps and whirs to life!") - playsound(loc, 'sound/machines/defib_SaftyOn.ogg', 25, 1) - say("This is ship ID #[rand(1,1000)] to Orion Port Authority. We're coming in for landing, over.") - sleep(20) - visible_message("[src] begins to vibrate...") - say("Uh, Port? Having some issues with our reactor, could you check it out? Over.") - sleep(30) - say("Oh, God! Code Eight! CODE EIGHT! IT'S GONNA BL-") - playsound(loc, 'sound/machines/buzz-sigh.ogg', 25, 1) - sleep(3.6) - visible_message("[src] explodes!") - explosion(loc, 2,4,8, flame_range = 16) - qdel(src) - - -#undef ORION_TRAIL_WINTURN -#undef ORION_TRAIL_RAIDERS -#undef ORION_TRAIL_FLUX -#undef ORION_TRAIL_ILLNESS -#undef ORION_TRAIL_BREAKDOWN -#undef ORION_TRAIL_LING -#undef ORION_TRAIL_LING_ATTACK -#undef ORION_TRAIL_MALFUNCTION -#undef ORION_TRAIL_COLLISION -#undef ORION_TRAIL_SPACEPORT -#undef ORION_TRAIL_BLACKHOLE - -#undef ORION_STATUS_START -#undef ORION_STATUS_NORMAL -#undef ORION_STATUS_GAMEOVER -#undef ORION_STATUS_MARKET diff --git a/code/game/machinery/computer/arcade/battle.dm b/code/game/machinery/computer/arcade/battle.dm new file mode 100644 index 0000000000..ded9cf95f6 --- /dev/null +++ b/code/game/machinery/computer/arcade/battle.dm @@ -0,0 +1,206 @@ +// ** BATTLE ** // + + +/obj/machinery/computer/arcade/battle + name = "arcade machine" + desc = "Does not support Pinball." + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/battle + var/enemy_name = "Space Villain" + var/temp = "Winners don't use space drugs" //Temporary message, for attack messages, etc + var/player_hp = 30 //Player health/attack points + var/player_mp = 10 + var/enemy_hp = 45 //Enemy health/attack points + var/enemy_mp = 20 + var/gameover = FALSE + var/blocked = FALSE //Player cannot attack/heal while set + var/turtle = 0 + + var/turn_speed = 5 //Measured in deciseconds. + +/obj/machinery/computer/arcade/battle/Reset() + var/name_action + var/name_part1 + var/name_part2 + + name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ", "Pwn ", "Own ", "Ban ") + + name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ") + name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn", "Bloopers") + + enemy_name = replacetext((name_part1 + name_part2), "the ", "") + name = (name_action + name_part1 + name_part2) + +/obj/machinery/computer/arcade/battle/ui_interact(mob/user) + . = ..() + var/dat = "Close" + dat += "

[enemy_name]

" + + dat += "

[temp]

" + dat += "
Health: [player_hp] | Magic: [player_mp] | Enemy Health: [enemy_hp]
" + + if (gameover) + dat += "
New Game" + else + dat += "
Attack | " + dat += "Heal | " + dat += "Recharge Power" + + dat += "
" + var/datum/browser/popup = new(user, "arcade", "Space Villain 2000") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) + popup.open() + +/obj/machinery/computer/arcade/battle/Topic(href, href_list) + if(..()) + return + + if (!blocked && !gameover) + if (href_list["attack"]) + blocked = TRUE + var/attackamt = rand(2,6) + temp = "You attack for [attackamt] damage!" + playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) + updateUsrDialog() + if(turtle > 0) + turtle-- + + sleep(turn_speed) + enemy_hp -= attackamt + arcade_action(usr) + + else if (href_list["heal"]) + blocked = TRUE + var/pointamt = rand(1,3) + var/healamt = rand(6,8) + temp = "You use [pointamt] magic to heal for [healamt] damage!" + playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) + updateUsrDialog() + turtle++ + + sleep(turn_speed) + player_mp -= pointamt + player_hp += healamt + blocked = TRUE + updateUsrDialog() + arcade_action(usr) + + else if (href_list["charge"]) + blocked = TRUE + var/chargeamt = rand(4,7) + temp = "You regain [chargeamt] points" + playsound(loc, 'sound/arcade/mana.ogg', 50, 1, extrarange = -3, falloff = 10) + player_mp += chargeamt + if(turtle > 0) + turtle-- + + updateUsrDialog() + sleep(turn_speed) + arcade_action(usr) + + if (href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=arcade") + + else if (href_list["newgame"]) //Reset everything + temp = "New Round" + player_hp = initial(player_hp) + player_mp = initial(player_mp) + enemy_hp = initial(enemy_hp) + enemy_mp = initial(enemy_mp) + gameover = FALSE + turtle = 0 + + if(obj_flags & EMAGGED) + Reset() + obj_flags &= ~EMAGGED + + add_fingerprint(usr) + updateUsrDialog() + return + +/obj/machinery/computer/arcade/battle/proc/arcade_action(mob/user) + if ((enemy_mp <= 0) || (enemy_hp <= 0)) + if(!gameover) + gameover = TRUE + temp = "[enemy_name] has fallen! Rejoice!" + playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) + + if(obj_flags & EMAGGED) + new /obj/effect/spawner/newbomb/timer/syndicate(loc) + new /obj/item/clothing/head/collectable/petehat(loc) + message_admins("[ADMIN_LOOKUPFLW(usr)] has outbombed Cuban Pete and been awarded a bomb.") + log_game("[key_name(usr)] has outbombed Cuban Pete and been awarded a bomb.") + Reset() + obj_flags &= ~EMAGGED + else + prizevend(user) + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("win", (obj_flags & EMAGGED ? "emagged":"normal"))) + + + else if ((obj_flags & EMAGGED) && (turtle >= 4)) + var/boomamt = rand(5,10) + temp = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!" + playsound(loc, 'sound/arcade/boom.ogg', 50, 1, extrarange = -3, falloff = 10) + player_hp -= boomamt + + else if ((enemy_mp <= 5) && (prob(70))) + var/stealamt = rand(2,3) + temp = "[enemy_name] steals [stealamt] of your power!" + playsound(loc, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 10) + player_mp -= stealamt + updateUsrDialog() + + if (player_mp <= 0) + gameover = TRUE + sleep(turn_speed) + temp = "You have been drained! GAME OVER" + playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) + if(obj_flags & EMAGGED) + usr.gib() + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "mana", (obj_flags & EMAGGED ? "emagged":"normal"))) + + else if ((enemy_hp <= 10) && (enemy_mp > 4)) + temp = "[enemy_name] heals for 4 health!" + playsound(loc, 'sound/arcade/heal.ogg', 50, 1, extrarange = -3, falloff = 10) + enemy_hp += 4 + enemy_mp -= 4 + + else + var/attackamt = rand(3,6) + temp = "[enemy_name] attacks for [attackamt] damage!" + playsound(loc, 'sound/arcade/hit.ogg', 50, 1, extrarange = -3, falloff = 10) + player_hp -= attackamt + + if ((player_mp <= 0) || (player_hp <= 0)) + gameover = TRUE + temp = "You have been crushed! GAME OVER" + playsound(loc, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 10) + if(obj_flags & EMAGGED) + usr.gib() + SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal"))) + + blocked = FALSE + return + + +/obj/machinery/computer/arcade/battle/emag_act(mob/user) + if(obj_flags & EMAGGED) + return + to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") + temp = "If you die in the game, you die for real!" + player_hp = 30 + player_mp = 10 + enemy_hp = 45 + enemy_mp = 20 + gameover = FALSE + blocked = FALSE + + obj_flags |= EMAGGED + + enemy_name = "Cuban Pete" + name = "Outbomb Cuban Pete" + + + updateUsrDialog() diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm new file mode 100644 index 0000000000..f3f810a5fc --- /dev/null +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -0,0 +1,400 @@ +#define MINESWEEPER_GAME_MAIN_MENU 0 +#define MINESWEEPER_GAME_PLAYING 1 +#define MINESWEEPER_GAME_LOST 2 +#define MINESWEEPER_GAME_WON 3 +#define MINESWEEPERIMG(what) {""} //Basically bypassing asset.icon_tag() + +/obj/machinery/computer/arcade/minesweeper + name = "Minesweeper" + 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/area + var/difficulty = "" //To show what difficulty you are playing + var/flag_text = "" + var/flagging = FALSE + var/game_status = MINESWEEPER_GAME_MAIN_MENU + var/mine_limit = 0 + var/mine_placed = 0 + var/mine_sound = TRUE //So it doesn't get repeated when multiple mines are exposed + var/randomcolour = 1 + var/randomnumber = 1 //Random emagged game iteration number to be displayed, put here so it is persistent across one individual arcade machine + var/safe_squares_revealed + var/saved_web = "" //To display the web if you click on the arcade + var/win_condition + var/rows = 1 + var/columns = 1 + var/table[31][51] //Make the board boys, 30x50 board + +/obj/machinery/computer/arcade/minesweeper/interact(mob/user) + var/web_difficulty_menu = " Reveal all the squares without hitting a mine!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + var/static_web = "Minesweeper
Minesweeper
" //When we need to revert to the main menu we set web as this + var/static_emagged_web = "Minesweeper
Minesweeper EXTREME EDITION: Iteration #[randomnumber]
" //Different colour mix for every random number made + var/emagged_web_difficulty_menu = "Explode in the game, explode in real life!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + user = usr + + var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/minesweeper) + assets.send(user) + + if(game_status == MINESWEEPER_GAME_MAIN_MENU) + if(obj_flags & EMAGGED) + playsound(loc, 'sound/arcade/minesweeper_emag2.ogg', 50, 0, extrarange = -3, falloff = 10) + user << browse(static_emagged_web+emagged_web_difficulty_menu,"window=minesweeper,size=400x500") + else + playsound(loc, 'sound/arcade/minesweeper_startup.ogg', 50, 0, extrarange = -3, falloff = 10) + user << browse(static_web+web_difficulty_menu,"window=minesweeper,size=400x500") + else + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + user << browse(saved_web,"window=minesweeper,size=400x500") + if(obj_flags & EMAGGED) + do_sparks(5, 1, src) + add_fingerprint(user) + + ..() + +/obj/machinery/computer/arcade/minesweeper/Topic(href, href_list) + if(..()) + return + + var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/minesweeper) + var/exploding_hell = FALSE //For emagged failures + var/reset_board = FALSE + var/prizevended = TRUE + var/mob/living/user = usr //To identify who the hell is using this window, this should also make things like aliens and monkeys able to use the machine!! + var/web_difficulty_menu = " Reveal all the squares without hitting a mine!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + var/web = "Minesweeper
Minesweeper
" + var/static_web = "Minesweeper
Minesweeper
" //When we need to revert to the main menu we set web as this + web = static_web + web += sheet.css_tag() + + if(obj_flags & EMAGGED) + web = "Minesweeper
Minesweeper EXTREME EDITION: Iteration #[randomnumber]
" //Different colour mix for every random number made + do_sparks(5, 1, src) + + if(href_list["Main_Menu"]) + game_status = MINESWEEPER_GAME_MAIN_MENU + mine_limit = 0 + rows = 0 + columns = 0 + mine_placed = 0 + if(href_list["Easy"]) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Easy" + rows = 10 //9x9 board + columns = 10 + mine_limit = 10 + if(href_list["Intermediate"]) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Intermediate" + rows = 17 //16x16 board + columns = 17 + mine_limit = 40 + if(href_list["Hard"]) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Hard" + rows = 17 //16x30 board + columns = 31 + mine_limit = 99 + if(href_list["Custom"]) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + flag_text = "OFF" + game_status = MINESWEEPER_GAME_PLAYING + reset_board = TRUE + difficulty = "Custom" + rows = text2num(input(usr, "How many rows do you want? (Maximum of 30 allowed)", "Minesweeper Rows"))+1 //+1 as dm arrays start at 1 + columns = text2num(input(usr, "How many columns do you want? (Maximum of 50 allowed)", "Minesweeper Squares"))+1 //+1 as dm arrays start at 1 + var/grid_area = (rows-1)*(columns-1) + mine_limit = text2num(input(usr, "How many mines do you want? (Maximum of [round(grid_area*0.85)] allowed)", "Minesweeper Mines")) + custom_generation() + if(href_list["Flag"]) + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + if(!flagging) + flagging = TRUE + flag_text = "ON" + else + flagging = FALSE + flag_text = "OFF" + + if(game_status == MINESWEEPER_GAME_MAIN_MENU) + if(obj_flags & EMAGGED) + playsound(loc, 'sound/arcade/minesweeper_emag2.ogg', 50, 0, extrarange = -3, falloff = 10) + web += "Explode in the game, explode in real life!
What difficulty do you want to play?



Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom" + else + playsound(loc, 'sound/arcade/minesweeper_startup.ogg', 50, 0, extrarange = -3, falloff = 10) + web += web_difficulty_menu + + if(game_status == MINESWEEPER_GAME_PLAYING) + prizevended = FALSE + mine_sound = TRUE + + area = (rows-1)*(columns-1) + + if(reset_board) + mine_placed = 0 + var/reset_everything = TRUE + make_mines(reset_everything) + + safe_squares_revealed = 0 + win_condition = area-mine_placed + + if(game_status != MINESWEEPER_GAME_MAIN_MENU) + for(var/y1=1;y1= 0) //Check that it's not already revealed, and stop flag removal if we're out of flag mode + table[y1][x1] += 10 + if(table[y1][x1] != 10) + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + else + if(game_status != MINESWEEPER_GAME_LOST && game_status != MINESWEEPER_GAME_WON) + game_status = MINESWEEPER_GAME_LOST + if(obj_flags & EMAGGED && !exploding_hell) + exploding_hell = TRUE + explode_EVERYTHING() + if(mine_sound) + switch(rand(1,3)) //Play every time a mine is hit + if(1) + playsound(loc, 'sound/arcade/minesweeper_explosion1.ogg', 50, 0, extrarange = -3, falloff = 10) + if(2) + playsound(loc, 'sound/arcade/minesweeper_explosion2.ogg', 50, 0, extrarange = -3, falloff = 10) + if(3) + playsound(loc, 'sound/arcade/minesweeper_explosion3.ogg', 50, 0, extrarange = -3, falloff = 10) + mine_sound = FALSE + else + playsound(loc, 'sound/arcade/minesweeper_boardpress.ogg', 50, 0, extrarange = -3, falloff = 10) + if(table[y1][x1] >= 0) //Check that it's not already flagged + table[y1][x1] -= 10 + else if(table[y1][x1] < 0) //If flagged, remove the flag + table[y1][x1] += 10 + if(href_list["same_board"]) //Reset the board... kinda + if(game_status != MINESWEEPER_GAME_PLAYING) + game_status = MINESWEEPER_GAME_PLAYING + if(table[y1][x1] >= 10) //If revealed, become unrevealed! + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + table[y1][x1] -= 10 + if(table[y1][x1] > 10 && !reset_board) + safe_squares_revealed += 1 + var/y2 = y1 + var/x2 = x1 + work_squares(y2, x2) //Work squares while in this loop so there's less load + reset_board = FALSE + + web += "" //Start setting up the html table + web += "" + for(var/y1=1;y1= win_condition && game_status == MINESWEEPER_GAME_PLAYING) + game_status = MINESWEEPER_GAME_WON + + if(game_status == MINESWEEPER_GAME_WON) + if(rows < 10 || columns < 10) //If less than easy difficulty + if(!prizevended) + playsound(loc, 'sound/arcade/minesweeper_winfail.ogg', 50, 0, extrarange = -3, falloff = 10) + say("You cleared the board of all mines, but you picked too small of a board! Try again with at least a 9x9 board!") + prizevended = TRUE + web += "You won, but your board was too small! Pick a bigger board next time!
Want to play again?
Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom

Play on the same board
Return to Main Menu
" + else + if(!prizevended) + playsound(loc, 'sound/arcade/minesweeper_win.ogg', 50, 0, extrarange = -3, falloff = 10) + say("You cleared the board of all mines! Congratulations!") + if(obj_flags & EMAGGED) + var/itemname + switch(rand(1,3)) + if(1) + itemname = "a syndicate bomb beacon" + new /obj/item/sbeacondrop/bomb(loc) + if(2) + itemname = "a grenade launcher" + new /obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted(loc) + new /obj/item/ammo_casing/a40mm(loc) + new /obj/item/ammo_casing/a40mm(loc) + new /obj/item/ammo_casing/a40mm(loc) + if(3) + itemname = "two bags of c4" + new /obj/item/storage/backpack/duffelbag/syndie/c4(loc) + new /obj/item/storage/backpack/duffelbag/syndie/x4(loc) + message_admins("[key_name_admin(user)] won emagged Minesweeper and got [itemname]!") + visible_message("[src] dispenses [itemname]!", "You hear a chime and a clunk.") + else + prizevend(user) + prizevended = TRUE + web += "Congratulations, you have won!
Want to play again?
Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom

Play on the same board
Return to Main Menu
" + + if(game_status == MINESWEEPER_GAME_LOST) + web += "You have lost!
Try again?
Easy (9x9 board, 10 mines)
Intermediate (16x16 board, 40 mines)
Hard (16x30 board, 99 mines)
Custom

Play on the same board
Return to Main Menu
" + + if(game_status == MINESWEEPER_GAME_PLAYING) + web += "Return to Main Menu
" + web += "
Difficulty: [difficulty]
Mines: [mine_placed]
Rows: [rows-1]
Columns: [columns-1]
Flagging mode: [flag_text]
" + + web += "" + saved_web = web + user << browse(web,"window=minesweeper,size=400x500") + return + +/obj/machinery/computer/arcade/minesweeper/emag_act(mob/user) + if(obj_flags & EMAGGED) + return + desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!" + do_sparks(5, 1, src) + randomnumber = rand(1,255) + randomcolour = rgb(randomnumber,randomnumber/2,randomnumber/3) + obj_flags |= EMAGGED + if(game_status == MINESWEEPER_GAME_MAIN_MENU) + to_chat(user, "An ominous tune plays from the arcade's speakers!") + playsound(user, 'sound/arcade/minesweeper_emag1.ogg', 100, 0, extrarange = 3, falloff = 10) + else //Can't let you do that, star fox! + to_chat(user, "The machine buzzes and sparks... the game has been reset!") + playsound(user, 'sound/machines/buzz-sigh.ogg', 100, 0, extrarange = 3, falloff = 10) //Loud buzz + game_status = MINESWEEPER_GAME_MAIN_MENU + +/obj/machinery/computer/arcade/minesweeper/proc/custom_generation() + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) //Entered into the menu so ping sound + if(rows < 4) + rows = text2num(input(usr, "You must put at least 4 rows! Pick a higher amount of rows", "Minesweeper Rows"))+1 //+1 as dm arrays start at 1 + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + custom_generation() + if(columns < 4) + columns = text2num(input(usr, "You must put at least 4 columns! Pick a higher amount of columns", "Minesweeper Columns"))+1 //+1 as dm arrays start at 1 + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + custom_generation() + if(rows > 31) + rows = text2num(input(usr, "A maximum of 30 rows are allowed! Pick a lower amount of rows", "Minesweeper Rows"))+1 //+1 as dm arrays start at 1 + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + custom_generation() + if(columns > 51) + columns = text2num(input(usr, "A maximum of 50 columns are allowed! Pick a lower amount of columns", "Minesweeper Columns"))+1//+1 as dm arrays start at 1 + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + custom_generation() + var/grid_area = (rows-1)*(columns-1) //Need a live update of this, won't update if we use the area var in topic + if(mine_limit > round(grid_area*0.85)) + mine_limit = text2num(input(usr, "You can only put in [round(grid_area*0.85)] mines on this board! Pick a lower amount of mines to insert", "Minesweeper Mines")) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + custom_generation() + if(mine_limit < round(grid_area/6.4)) //Same mine density as intermediate difficulty + mine_limit = text2num(input(usr, "You must at least put [round(grid_area/6.4)] mines on this board! Pick a higher amount of mines to insert", "Minesweeper Mines")) + playsound(loc, 'sound/arcade/minesweeper_menuselect.ogg', 50, 0, extrarange = -3, falloff = 10) + custom_generation() + +/obj/machinery/computer/arcade/minesweeper/proc/make_mines(var/reset_everything) + if(mine_placed < mine_limit) + for(var/y1=1;y1 0 && x3 > 0) + y2 = y3 + x2 = x3 + if(table[y2][x2] == 1) + for(y3=y2-1;y3= rows || y3 < 1) + continue + for(x3=x2-1;x3= columns || x3 < 1) + continue + if(table[y3][x3] == 0) + table[y2][x2] += 1 + if(table[y2][x2] == 11) + for(y3=y2-1;y3= rows || y3 < 1) + continue + for(x3=x2-1;x3= columns || x3 < 1) + continue + if(table[y3][x3] > 0 && table[y3][x3] < 10) + table[y3][x3] += 10 + work_squares(y3, x3) //Refresh so we check everything we might be missing + +/obj/machinery/computer/arcade/minesweeper/proc/explode_EVERYTHING() + var/mob/living/user = usr + to_chat(user, "You feel a great sense of dread wash over you, as if you just unleashed armageddon upon yourself!") + var/row_limit = rows-1 + var/column_limit = columns-1 + var/mine_limit_v2 = mine_limit + if(rows > 11) + row_limit = 10 + if(columns > 11) + column_limit = 10 + if(mine_limit > (rows*columns) * 0.25) + mine_limit_v2 = 24 + message_admins("[key_name_admin(user)] failed Minesweeper and has unleashed an explosion armageddon of size [row_limit],[column_limit] around [ADMIN_LOOKUPFLW(user.loc)]!") + if(mine_limit_v2 < 10) + explosion(loc, 2, 4, 8, 16) //Thought you could survive by putting as few mines as possible, huh?? + else + explosion(loc, 1, 3, rand(1,5), rand(1,10)) + for(var/y69=y-row_limit;y69coward!\"" + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/amputation + +/obj/machinery/computer/arcade/amputation/attack_hand(mob/user) + if(!iscarbon(user)) + return + var/mob/living/carbon/c_user = user + if(!c_user.get_bodypart(BODY_ZONE_L_ARM) && !c_user.get_bodypart(BODY_ZONE_R_ARM)) + return + to_chat(c_user, "You move your hand towards the machine, and begin to hesitate as a bloodied guillotine emerges from inside of it...") + if(do_after(c_user, 50, target = src)) + to_chat(c_user, "The guillotine drops on your arm, and the machine sucks it in!") + playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) + var/which_hand = BODY_ZONE_L_ARM + if(!(c_user.active_hand_index % 2)) + which_hand = BODY_ZONE_R_ARM + var/obj/item/bodypart/chopchop = c_user.get_bodypart(which_hand) + chopchop.dismember() + qdel(chopchop) + playsound(loc, 'sound/arcade/win.ogg', 50, 1, extrarange = -3, falloff = 10) + for(var/i=1; i<=rand(3,5); i++) + prizevend(user) + else + to_chat(c_user, "You (wisely) decide against putting your hand in the machine.") \ No newline at end of file diff --git a/code/game/machinery/computer/arcade/orion_trail.dm b/code/game/machinery/computer/arcade/orion_trail.dm new file mode 100644 index 0000000000..12941dea35 --- /dev/null +++ b/code/game/machinery/computer/arcade/orion_trail.dm @@ -0,0 +1,809 @@ + + +// *** THE ORION TRAIL ** // + +#define ORION_TRAIL_WINTURN 9 + +//Orion Trail Events +#define ORION_TRAIL_RAIDERS "Raiders" +#define ORION_TRAIL_FLUX "Interstellar Flux" +#define ORION_TRAIL_ILLNESS "Illness" +#define ORION_TRAIL_BREAKDOWN "Breakdown" +#define ORION_TRAIL_LING "Changelings?" +#define ORION_TRAIL_LING_ATTACK "Changeling Ambush" +#define ORION_TRAIL_MALFUNCTION "Malfunction" +#define ORION_TRAIL_COLLISION "Collision" +#define ORION_TRAIL_SPACEPORT "Spaceport" +#define ORION_TRAIL_BLACKHOLE "BlackHole" + +#define ORION_STATUS_START 1 +#define ORION_STATUS_NORMAL 2 +#define ORION_STATUS_GAMEOVER 3 +#define ORION_STATUS_MARKET 4 + +/obj/machinery/computer/arcade/orion_trail + name = "The Orion Trail" + desc = "Learn how our ancestors got to Orion, and have fun in the process!" + icon_state = "arcade" + circuit = /obj/item/circuitboard/computer/arcade/orion_trail + var/busy = FALSE //prevent clickspam that allowed people to ~speedrun~ the game. + var/engine = 0 + var/hull = 0 + var/electronics = 0 + var/food = 80 + var/fuel = 60 + var/turns = 4 + var/alive = 4 + var/eventdat = null + var/event = null + var/list/settlers = list("Harry","Larry","Bob") + var/list/events = list(ORION_TRAIL_RAIDERS = 3, + ORION_TRAIL_FLUX = 1, + ORION_TRAIL_ILLNESS = 3, + ORION_TRAIL_BREAKDOWN = 2, + ORION_TRAIL_LING = 3, + ORION_TRAIL_MALFUNCTION = 2, + ORION_TRAIL_COLLISION = 1, + ORION_TRAIL_SPACEPORT = 2 + ) + var/list/stops = list() + var/list/stopblurbs = list() + var/lings_aboard = 0 + var/spaceport_raided = 0 + var/spaceport_freebie = 0 + var/last_spaceport_action = "" + var/gameStatus = ORION_STATUS_START + var/canContinueEvent = 0 + +/obj/machinery/computer/arcade/orion_trail/kobayashi + name = "Kobayashi Maru control computer" + desc = "A test for cadets" + icon = 'icons/obj/machines/particle_accelerator.dmi' + icon_state = "control_boxp" + events = list("Raiders" = 3, "Interstellar Flux" = 1, "Illness" = 3, "Breakdown" = 2, "Malfunction" = 2, "Collision" = 1, "Spaceport" = 2) + prizes = list(/obj/item/paper/fluff/holodeck/trek_diploma = 1) + settlers = list("Kirk","Worf","Gene") + +/obj/machinery/computer/arcade/orion_trail/Reset() + // Sets up the main trail + stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") + stopblurbs = list( + "Pluto, long since occupied with long-range sensors and scanners, stands ready to, and indeed continues to probe the far reaches of the galaxy.", + "At the edge of the Sol system lies a treacherous asteroid belt. Many have been crushed by stray asteroids and misguided judgement.", + "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now a low-population sanctuary for adventurers and traders.", + "This region of space is particularly devoid of matter. Such low-density pockets are known to exist, but the vastness of it is astounding.", + "Rigel Prime, the center of the Rigel system, burns hot, basking its planetary bodies in warmth and radiation.", + "Tau Ceti Beta has recently become a waypoint for colonists headed towards Orion. There are many ships and makeshift stations in the vicinity.", + "Sensors indicate that a black hole's gravitational field is affecting the region of space we were headed through. We could stay of course, but risk of being overcome by its gravity, or we could change course to go around, which will take longer.", + "You have come into range of the first man-made structure in this region of space. It has been constructed not by travellers from Sol, but by colonists from Orion. It stands as a monument to the colonists' success.", + "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!" + ) + +/obj/machinery/computer/arcade/orion_trail/proc/newgame() + // Set names of settlers in crew + settlers = list() + for(var/i = 1; i <= 3; i++) + add_crewmember() + add_crewmember("[usr]") + // Re-set items to defaults + engine = 1 + hull = 1 + electronics = 1 + food = 80 + fuel = 60 + alive = 4 + turns = 1 + event = null + gameStatus = ORION_STATUS_NORMAL + lings_aboard = 0 + + //spaceport junk + spaceport_raided = 0 + spaceport_freebie = 0 + last_spaceport_action = "" + +/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user) + . = ..() + if(fuel <= 0 || food <=0 || settlers.len == 0) + gameStatus = ORION_STATUS_GAMEOVER + event = null + var/dat = "" + if(gameStatus == ORION_STATUS_GAMEOVER) + dat = "

Game Over

" + dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." + if(!settlers.len) + dat += "
Your entire crew died, and your ship joins the fleet of ghost-ships littering the galaxy." + else + if(food <= 0) + dat += "
You ran out of food and starved." + if(obj_flags & EMAGGED) + user.nutrition = 0 //yeah you pretty hongry + to_chat(user, "Your body instantly contracts to that of one who has not eaten in months. Agonizing cramps seize you as you fall to the floor.") + if(fuel <= 0) + dat += "
You ran out of fuel, and drift, slowly, into a star." + if(obj_flags & EMAGGED) + var/mob/living/M = user + M.adjust_fire_stacks(5) + M.IgniteMob() //flew into a star, so you're on fire + to_chat(user, "You feel an immense wave of heat emanate from the arcade machine. Your skin bursts into flames.") + + if(obj_flags & EMAGGED) + to_chat(user, "You're never going to make it to Orion...") + user.death() + obj_flags &= ~EMAGGED //removes the emagged status after you lose + gameStatus = ORION_STATUS_START + name = "The Orion Trail" + desc = "Learn how our ancestors got to Orion, and have fun in the process!" + + dat += "

May They Rest In Peace

" + else if(event) + dat = eventdat + else if(gameStatus == ORION_STATUS_NORMAL) + var/title = stops[turns] + var/subtext = stopblurbs[turns] + dat = "

[title]

" + dat += "[subtext]" + dat += "

Crew:

" + dat += english_list(settlers) + dat += "
Food: [food] | Fuel: [fuel]" + dat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" + if(turns == 7) + dat += "

Go Around Continue

" + else + dat += "

Continue

" + dat += "

Kill a Crewmember

" + dat += "

Close

" + else + dat = "

The Orion Trail

" + dat += "

Experience the journey of your ancestors!



" + dat += "
New Game
" + dat += "

Close

" + var/datum/browser/popup = new(user, "arcade", "The Orion Trail",400,700) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) + popup.open() + return + +/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) + if(..()) + return + if(href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=arcade") + + if(busy) + return + busy = TRUE + + if (href_list["continue"]) //Continue your travels + if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7) + if(turns >= ORION_TRAIL_WINTURN) + win(usr) + else + food -= (alive+lings_aboard)*2 + fuel -= 5 + if(turns == 2 && prob(30)) + event = ORION_TRAIL_COLLISION + event() + else if(prob(75)) + event = pickweight(events) + if(lings_aboard) + if(event == ORION_TRAIL_LING || prob(55)) + event = ORION_TRAIL_LING_ATTACK + event() + turns += 1 + if(obj_flags & EMAGGED) + var/mob/living/carbon/M = usr //for some vars + switch(event) + if(ORION_TRAIL_RAIDERS) + if(prob(50)) + to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?") + M.hallucination += 30 + else + to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...") + M.take_bodypart_damage(30) + playsound(loc, 'sound/weapons/genhit2.ogg', 100, 1) + if(ORION_TRAIL_ILLNESS) + var/severity = rand(1,3) //pray to RNGesus. PRAY, PIGS + if(severity == 1) + to_chat(M, "You suddenly feel slightly nauseated." ) + if(severity == 2) + to_chat(usr, "You suddenly feel extremely nauseated and hunch over until it passes.") + M.Stun(60) + if(severity >= 3) //you didn't pray hard enough + to_chat(M, "An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit.") + M.Stun(100) + sleep(30) + M.vomit(10, distance = 5) + if(ORION_TRAIL_FLUX) + if(prob(75)) + M.Knockdown(60) + say("A sudden gust of powerful wind slams [M] into the floor!") + M.take_bodypart_damage(25) + playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) + else + to_chat(M, "A violent gale blows past you, and you barely manage to stay standing!") + if(ORION_TRAIL_COLLISION) //by far the most damaging event + if(prob(90)) + playsound(loc, 'sound/effects/bang.ogg', 100, 1) + var/turf/open/floor/F + for(F in orange(1, src)) + F.ScrapeAway() + say("Something slams into the floor around [src], exposing it to space!") + if(hull) + sleep(10) + say("A new floor suddenly appears around [src]. What the hell?") + playsound(loc, 'sound/weapons/genhit.ogg', 100, 1) + var/turf/open/space/T + for(T in orange(1, src)) + T.PlaceOnTop(/turf/open/floor/plating) + else + say("Something slams into the floor around [src] - luckily, it didn't get through!") + playsound(loc, 'sound/effects/bang.ogg', 50, 1) + if(ORION_TRAIL_MALFUNCTION) + playsound(loc, 'sound/effects/empulse.ogg', 50, 1) + visible_message("[src] malfunctions, randomizing in-game stats!") + var/oldfood = food + var/oldfuel = fuel + food = rand(10,80) / rand(1,2) + fuel = rand(10,60) / rand(1,2) + if(electronics) + sleep(10) + if(oldfuel > fuel && oldfood > food) + audible_message("[src] lets out a somehow reassuring chime.") + else if(oldfuel < fuel || oldfood < food) + audible_message("[src] lets out a somehow ominous chime.") + food = oldfood + fuel = oldfuel + playsound(loc, 'sound/machines/chime.ogg', 50, 1) + + else if(href_list["newgame"]) //Reset everything + if(gameStatus == ORION_STATUS_START) + newgame() + else if(href_list["menu"]) //back to the main menu + if(gameStatus == ORION_STATUS_GAMEOVER) + gameStatus = ORION_STATUS_START + event = null + food = 80 + fuel = 60 + settlers = list("Harry","Larry","Bob") + else if(href_list["slow"]) //slow down + if(event == ORION_TRAIL_FLUX) + food -= (alive+lings_aboard)*2 + fuel -= 5 + event = null + else if(href_list["pastblack"]) //slow down + if(turns == 7) + food -= ((alive+lings_aboard)*2)*3 + fuel -= 15 + turns += 1 + event = null + else if(href_list["useengine"]) //use parts + if(event == ORION_TRAIL_BREAKDOWN) + engine = max(0, --engine) + event = null + else if(href_list["useelec"]) //use parts + if(event == ORION_TRAIL_MALFUNCTION) + electronics = max(0, --electronics) + event = null + else if(href_list["usehull"]) //use parts + if(event == ORION_TRAIL_COLLISION) + hull = max(0, --hull) + event = null + else if(href_list["wait"]) //wait 3 days + if(event == ORION_TRAIL_BREAKDOWN || event == ORION_TRAIL_MALFUNCTION || event == ORION_TRAIL_COLLISION) + food -= ((alive+lings_aboard)*2)*3 + event = null + else if(href_list["keepspeed"]) //keep speed + if(event == ORION_TRAIL_FLUX) + if(prob(75)) + event = "Breakdown" + event() + else + event = null + else if(href_list["blackhole"]) //keep speed past a black hole + if(turns == 7) + if(prob(75)) + event = ORION_TRAIL_BLACKHOLE + event() + if(obj_flags & EMAGGED) + playsound(loc, 'sound/effects/supermatter.ogg', 100, 1) + say("A miniature black hole suddenly appears in front of [src], devouring [usr] alive!") + if(isliving(usr)) + var/mob/living/L = usr + L.Stun(200, ignore_canstun = TRUE) //you can't run :^) + var/S = new /obj/singularity/academy(usr.loc) + addtimer(CALLBACK(src, /atom/movable/proc/say, "[S] winks out, just as suddenly as it appeared."), 50) + QDEL_IN(S, 50) + else + event = null + turns += 1 + else if(href_list["holedeath"]) + if(event == ORION_TRAIL_BLACKHOLE) + gameStatus = ORION_STATUS_GAMEOVER + event = null + else if(href_list["eventclose"]) //end an event + if(canContinueEvent) + event = null + + else if(href_list["killcrew"]) //shoot a crewmember + if(gameStatus == ORION_STATUS_NORMAL || event == ORION_TRAIL_LING) + var/sheriff = remove_crewmember() //I shot the sheriff + playsound(loc,'sound/weapons/gunshot.ogg', 100, 1) + + if(settlers.len == 0 || alive == 0) + say("The last crewmember [sheriff], shot themselves, GAME OVER!") + if(obj_flags & EMAGGED) + usr.death(0) + obj_flags &= EMAGGED + gameStatus = ORION_STATUS_GAMEOVER + event = null + else if(obj_flags & EMAGGED) + if(usr.name == sheriff) + say("The crew of the ship chose to kill [usr.name]!") + usr.death(0) + + if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places + event = null + + //Spaceport specific interactions + //they get a header because most of them don't reset event (because it's a shop, you leave when you want to) + //they also call event() again, to regen the eventdata, which is kind of odd but necessary + else if(href_list["buycrew"]) //buy a crewmember + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided && food >= 10 && fuel >= 10) + var/bought = add_crewmember() + last_spaceport_action = "You hired [bought] as a new crewmember." + fuel -= 10 + food -= 10 + event() + + else if(href_list["sellcrew"]) //sell a crewmember + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided && settlers.len > 1) + var/sold = remove_crewmember() + last_spaceport_action = "You sold your crewmember, [sold]!" + fuel += 7 + food += 7 + event() + + else if(href_list["leave_spaceport"]) + if(gameStatus == ORION_STATUS_MARKET) + event = null + gameStatus = ORION_STATUS_NORMAL + spaceport_raided = 0 + spaceport_freebie = 0 + last_spaceport_action = "" + + else if(href_list["raid_spaceport"]) + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided) + var/success = min(15 * alive,100) //default crew (4) have a 60% chance + spaceport_raided = 1 + + var/FU = 0 + var/FO = 0 + if(prob(success)) + FU = rand(5,15) + FO = rand(5,15) + last_spaceport_action = "You successfully raided the spaceport! You gained [FU] Fuel and [FO] Food! (+[FU]FU,+[FO]FO)" + else + FU = rand(-5,-15) + FO = rand(-5,-15) + last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food in your scramble to escape! ([FU]FU,[FO]FO)" + + //your chance of lose a crewmember is 1/2 your chance of success + //this makes higher % failures hurt more, don't get cocky space cowboy! + if(prob(success*5)) + var/lost_crew = remove_crewmember() + last_spaceport_action = "You failed to raid the spaceport! You lost [FU*-1] Fuel and [FO*-1] Food, AND [lost_crew] in your scramble to escape! ([FU]FI,[FO]FO,-Crew)" + if(obj_flags & EMAGGED) + say("WEEWOO! WEEWOO! Spaceport security en route!") + playsound(src, 'sound/items/weeoo1.ogg', 100, FALSE) + for(var/i, i<=3, i++) + var/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion/O = new/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion(get_turf(src)) + O.target = usr + + + fuel += FU + food += FO + event() + + else if(href_list["buyparts"]) + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided && fuel > 5) + switch(text2num(href_list["buyparts"])) + if(1) //Engine Parts + engine++ + last_spaceport_action = "Bought Engine Parts" + if(2) //Hull Plates + hull++ + last_spaceport_action = "Bought Hull Plates" + if(3) //Spare Electronics + electronics++ + last_spaceport_action = "Bought Spare Electronics" + fuel -= 5 //they all cost 5 + event() + + else if(href_list["trade"]) + if(gameStatus == ORION_STATUS_MARKET) + if(!spaceport_raided) + switch(text2num(href_list["trade"])) + if(1) //Fuel + if(fuel > 5) + fuel -= 5 + food += 5 + last_spaceport_action = "Traded Fuel for Food" + event() + if(2) //Food + if(food > 5) + fuel += 5 + food -= 5 + last_spaceport_action = "Traded Food for Fuel" + event() + + add_fingerprint(usr) + updateUsrDialog() + busy = FALSE + return + + +/obj/machinery/computer/arcade/orion_trail/proc/event() + eventdat = "

[event]

" + canContinueEvent = 0 + switch(event) + if(ORION_TRAIL_RAIDERS) + eventdat += "Raiders have come aboard your ship!" + if(prob(50)) + var/sfood = rand(1,10) + var/sfuel = rand(1,10) + food -= sfood + fuel -= sfuel + eventdat += "
They have stolen [sfood] Food and [sfuel] Fuel." + else if(prob(10)) + var/deadname = remove_crewmember() + eventdat += "
[deadname] tried to fight back, but was killed." + else + eventdat += "
Fortunately, you fended them off without any trouble." + eventdat += "

Continue

" + eventdat += "

Close

" + canContinueEvent = 1 + + if(ORION_TRAIL_FLUX) + eventdat += "This region of space is highly turbulent.
If we go slowly we may avoid more damage, but if we keep our speed we won't waste supplies." + eventdat += "
What will you do?" + eventdat += "

Slow Down Continue

" + eventdat += "

Close

" + + if(ORION_TRAIL_ILLNESS) + eventdat += "A deadly illness has been contracted!" + var/deadname = remove_crewmember() + eventdat += "
[deadname] was killed by the disease." + eventdat += "

Continue

" + eventdat += "

Close

" + canContinueEvent = 1 + + if(ORION_TRAIL_BREAKDOWN) + eventdat += "Oh no! The engine has broken down!" + eventdat += "
You can repair it with an engine part, or you can make repairs for 3 days." + if(engine >= 1) + eventdat += "

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + if(ORION_TRAIL_MALFUNCTION) + eventdat += "The ship's systems are malfunctioning!" + eventdat += "
You can replace the broken electronics with spares, or you can spend 3 days troubleshooting the AI." + if(electronics >= 1) + eventdat += "

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + if(ORION_TRAIL_COLLISION) + eventdat += "Something hit us! Looks like there's some hull damage." + if(prob(25)) + var/sfood = rand(5,15) + var/sfuel = rand(5,15) + food -= sfood + fuel -= sfuel + eventdat += "
[sfood] Food and [sfuel] Fuel was vented out into space." + if(prob(10)) + var/deadname = remove_crewmember() + eventdat += "
[deadname] was killed by rapid depressurization." + eventdat += "
You can repair the damage with hull plates, or you can spend the next 3 days welding scrap together." + if(hull >= 1) + eventdat += "

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + if(ORION_TRAIL_BLACKHOLE) + eventdat += "You were swept away into the black hole." + eventdat += "

Oh...

" + eventdat += "

Close

" + settlers = list() + + if(ORION_TRAIL_LING) + eventdat += "Strange reports warn of changelings infiltrating crews on trips to Orion..." + if(settlers.len <= 2) + eventdat += "
Your crew's chance of reaching Orion is so slim the changelings likely avoided your ship..." + eventdat += "

Continue

" + eventdat += "

Close

" + if(prob(10)) // "likely", I didn't say it was guaranteed! + lings_aboard = min(++lings_aboard,2) + else + if(lings_aboard) //less likely to stack lings + if(prob(20)) + lings_aboard = min(++lings_aboard,2) + else if(prob(70)) + lings_aboard = min(++lings_aboard,2) + + eventdat += "

Kill a Crewmember

" + eventdat += "

Risk it

" + eventdat += "

Close

" + canContinueEvent = 1 + + if(ORION_TRAIL_LING_ATTACK) + if(lings_aboard <= 0) //shouldn't trigger, but hey. + eventdat += "Haha, fooled you, there are no changelings on board!" + eventdat += "
(You should report this to a coder :S)" + else + var/ling1 = remove_crewmember() + var/ling2 = "" + if(lings_aboard >= 2) + ling2 = remove_crewmember() + + eventdat += "Changelings among your crew suddenly burst from hiding and attack!" + if(ling2) + eventdat += "
[ling1] and [ling2]'s arms twist and contort into grotesque blades!" + else + eventdat += "
[ling1]'s arm twists and contorts into a grotesque blade!" + + var/chance2attack = alive*20 + if(prob(chance2attack)) + var/chancetokill = 30*lings_aboard-(5*alive) //eg: 30*2-(10) = 50%, 2 lings, 2 crew is 50% chance + if(prob(chancetokill)) + var/deadguy = remove_crewmember() + var/murder_text = pick("The changeling[ling2 ? "s" : ""] bring[ling2 ? "" : "s"] down [deadguy] and disembowel[ling2 ? "" : "s"] them in a spray of gore!", \ + "[ling2 ? pick(ling1, ling2) : ling1] corners [deadguy] and impales them through the stomach!", \ + "[ling2 ? pick(ling1, ling2) : ling1] decapitates [deadguy] in a single cleaving arc!") + eventdat += "
[murder_text]" + else + eventdat += "

You valiantly fight off the changeling[ling2 ? "s":""]!" + if(ling2) + food += 30 + lings_aboard = max(0,lings_aboard-2) + else + food += 15 + lings_aboard = max(0,--lings_aboard) + eventdat += "
Well, it's perfectly good food...\ +
You cut the changeling[ling2 ? "s" : ""] into meat, gaining [ling2 ? "30" : "15"] Food!" + else + eventdat += "

[pick("Sensing unfavorable odds", "After a failed attack", "Suddenly breaking nerve")], \ + the changeling[ling2 ? "s":""] vanish[ling2 ? "" : "es"] into space through the airlocks! You're safe... for now." + if(ling2) + lings_aboard = max(0,lings_aboard-2) + else + lings_aboard = max(0,--lings_aboard) + + eventdat += "

Continue

" + eventdat += "

Close

" + canContinueEvent = 1 + + + if(ORION_TRAIL_SPACEPORT) + gameStatus = ORION_STATUS_MARKET + if(spaceport_raided) + eventdat += "The spaceport is on high alert! You've been barred from docking by the local authorities after your failed raid." + if(last_spaceport_action) + eventdat += "
Last Spaceport Action: [last_spaceport_action]" + eventdat += "

Depart Spaceport

" + eventdat += "

Close

" + else + eventdat += "Your jump into the sector yields a spaceport - a lucky find!" + eventdat += "
This spaceport is home to travellers who failed to reach Orion, but managed to find a different home..." + eventdat += "
Trading terms: FU = Fuel, FO = Food" + if(last_spaceport_action) + eventdat += "
Last action: [last_spaceport_action]" + eventdat += "

Crew:

" + eventdat += english_list(settlers) + eventdat += "
Food: [food] | Fuel: [fuel]" + eventdat += "
Engine Parts: [engine] | Hull Panels: [hull] | Electronics: [electronics]" + + + //If your crew is pathetic you can get freebies (provided you haven't already gotten one from this port) + if(!spaceport_freebie && (fuel < 20 || food < 20)) + spaceport_freebie++ + var/FU = 10 + var/FO = 10 + var/freecrew = 0 + if(prob(30)) + FU = 25 + FO = 25 + + if(prob(10)) + add_crewmember() + freecrew++ + + eventdat += "
The traders of the spaceport take pity on you, and generously give you some free supplies! (+[FU]FU, +[FO]FO)" + if(freecrew) + eventdat += "
You also gain a new crewmember!" + + fuel += FU + food += FO + + //CREW INTERACTIONS + eventdat += "

Crew Management:

" + + //Buy crew + if(food >= 10 && fuel >= 10) + eventdat += "

Hire a New Crewmember (-10FU, -10FO)

" + else + eventdat += "

You cannot afford a new crewmember.

" + + //Sell crew + if(settlers.len > 1) + eventdat += "

Sell Crew for Fuel and Food (+7FU, +7FO)

" + else + eventdat += "

You have no other crew to sell.

" + + //BUY/SELL STUFF + eventdat += "

Spare Parts:

" + + //Engine parts + if(fuel > 5) + eventdat += "

Buy Engine Parts (-5FU)

" + else + eventdat += "

You cannot afford engine parts." + + //Hull plates + if(fuel > 5) + eventdat += "

Buy Hull Plates (-5FU)

" + else + eventdat += "

You cannot afford hull plates." + + //Electronics + if(fuel > 5) + eventdat += "

Buy Spare Electronics (-5FU)

" + else + eventdat += "

You cannot afford spare electronics." + + //Trade + if(fuel > 5) + eventdat += "

Trade Fuel for Food (-5FU,+5FO)

" + else + eventdat += "

You don't have 5FU to trade. 5) + eventdat += "

Trade Food for Fuel (+5FU,-5FO)

" + else + eventdat += "

You don't have 5FO to trade.You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.") + name = "The Orion Trail: Realism Edition" + desc = "Learn how our ancestors got to Orion, and try not to die in the process!" + newgame() + obj_flags |= EMAGGED + +/mob/living/simple_animal/hostile/syndicate/ranged/smg/orion + name = "spaceport security" + desc = "Premier corporate security forces for all spaceports found along the Orion Trail." + faction = list("orion") + loot = list() + del_on_death = TRUE + +/obj/item/orion_ship + name = "model settler ship" + desc = "A model spaceship, it looks like those used back in the day when travelling to Orion! It even has a miniature FX-293 reactor, which was renowned for its instability and tendency to explode..." + icon = 'icons/obj/toy.dmi' + icon_state = "ship" + w_class = WEIGHT_CLASS_SMALL + var/active = 0 //if the ship is on + +/obj/item/orion_ship/examine(mob/user) + ..() + if(!(in_range(user, src))) + return + if(!active) + to_chat(user, "There's a little switch on the bottom. It's flipped down.") + else + to_chat(user, "There's a little switch on the bottom. It's flipped up.") + +/obj/item/orion_ship/attack_self(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse + if(active) + return + + message_admins("[ADMIN_LOOKUPFLW(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") + log_game("[key_name(usr)] primed an explosive Orion ship for detonation at [AREACOORD(usr)].") + + to_chat(user, "You flip the switch on the underside of [src].") + active = 1 + visible_message("[src] softly beeps and whirs to life!") + playsound(loc, 'sound/machines/defib_SaftyOn.ogg', 25, 1) + say("This is ship ID #[rand(1,1000)] to Orion Port Authority. We're coming in for landing, over.") + sleep(20) + visible_message("[src] begins to vibrate...") + say("Uh, Port? Having some issues with our reactor, could you check it out? Over.") + sleep(30) + say("Oh, God! Code Eight! CODE EIGHT! IT'S GONNA BL-") + playsound(loc, 'sound/machines/buzz-sigh.ogg', 25, 1) + sleep(3.6) + visible_message("[src] explodes!") + explosion(loc, 2,4,8, flame_range = 16) + qdel(src) + +#undef ORION_TRAIL_WINTURN +#undef ORION_TRAIL_RAIDERS +#undef ORION_TRAIL_FLUX +#undef ORION_TRAIL_ILLNESS +#undef ORION_TRAIL_BREAKDOWN +#undef ORION_TRAIL_LING +#undef ORION_TRAIL_LING_ATTACK +#undef ORION_TRAIL_MALFUNCTION +#undef ORION_TRAIL_COLLISION +#undef ORION_TRAIL_SPACEPORT +#undef ORION_TRAIL_BLACKHOLE + +#undef ORION_STATUS_START +#undef ORION_STATUS_NORMAL +#undef ORION_STATUS_GAMEOVER +#undef ORION_STATUS_MARKET diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 26f00c730e..a1ee62e2eb 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -123,6 +123,14 @@ name = "Orion Trail (Computer Board)" build_path = /obj/machinery/computer/arcade/orion_trail +/obj/item/circuitboard/computer/arcade/minesweeper + name = "Minesweeper (Computer Board)" + build_path = /obj/machinery/computer/arcade/minesweeper + +/obj/item/circuitboard/computer/arcade/amputation + name = "Mediborg's Amputation Adventure (Computer Board)" + build_path = /obj/machinery/computer/arcade/amputation + /obj/item/circuitboard/computer/turbine_control name = "Turbine control (Computer Board)" build_path = /obj/machinery/computer/turbine_computer diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 7042913b0d..a1b0402021 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -2241,7 +2241,8 @@ /obj/item/storage/fancy/cigarettes/cigpack_shadyjims, /obj/item/clothing/mask/gas/syndicate, /obj/item/clothing/neck/necklace/dope, - /obj/item/vending_refill/donksoft) + /obj/item/vending_refill/donksoft, + /obj/item/circuitboard/computer/arcade/amputation) crate_name = "crate" /datum/supply_pack/costumes_toys/foamforce diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 7c08a3332c..e095ef304b 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -528,6 +528,12 @@ GLOBAL_LIST_EMPTY(asset_datums) "browserOutput.css" = 'code/modules/goonchat/browserassets/css/browserOutput.css', ) +/datum/asset/spritesheet/minesweeper + name = "minesweeper" + +/datum/asset/spritesheet/minesweeper/register() + InsertAll("minesweeper", 'icons/misc/minesweeper_tiles.dmi') + /datum/asset/spritesheet/goonchat name = "chat" diff --git a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm index 780a1bc97d..65a435a309 100644 --- a/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm +++ b/code/modules/research/designs/comp_board_designs/comp_board_designs_all_misc.dm @@ -21,6 +21,14 @@ category = list("Computer Boards") departmental_flags = DEPARTMENTAL_FLAG_ALL +/datum/design/board/minesweeper + name = "Computer Design (Minesweeper Arcade Machine)" + desc = "Allows for the construction of circuit boards used to build a new Minesweeper machine." + id = "arcade_minesweeper" + build_path = /obj/item/circuitboard/computer/arcade/minesweeper + category = list("Computer Boards") + departmental_flags = DEPARTMENTAL_FLAG_ALL + /datum/design/board/slot_machine name = "Computer Design (Slot Machine)" desc = "Allows for the construction of circuit boards used to build a new slot machine." diff --git a/icons/misc/minesweeper_tiles.dmi b/icons/misc/minesweeper_tiles.dmi new file mode 100644 index 0000000000..5a5a943832 Binary files /dev/null and b/icons/misc/minesweeper_tiles.dmi differ diff --git a/modular_citadel/code/modules/research/techweb/all_nodes.dm b/modular_citadel/code/modules/research/techweb/all_nodes.dm index e561b106d8..c0ddaceaf7 100644 --- a/modular_citadel/code/modules/research/techweb/all_nodes.dm +++ b/modular_citadel/code/modules/research/techweb/all_nodes.dm @@ -19,7 +19,7 @@ display_name = "Games and Toys" description = "For the slackers on the station." prereq_ids = list("comptech") - design_ids = list("arcade_battle", "arcade_orion", "slotmachine", "autoylathe") + design_ids = list("arcade_battle", "arcade_orion", "arcade_minesweeper", "slotmachine", "autoylathe") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000) export_price = 5000 diff --git a/sound/arcade/minesweeper_boardpress.ogg b/sound/arcade/minesweeper_boardpress.ogg new file mode 100644 index 0000000000..a928a7498d Binary files /dev/null and b/sound/arcade/minesweeper_boardpress.ogg differ diff --git a/sound/arcade/minesweeper_emag1.ogg b/sound/arcade/minesweeper_emag1.ogg new file mode 100644 index 0000000000..4601f8df89 Binary files /dev/null and b/sound/arcade/minesweeper_emag1.ogg differ diff --git a/sound/arcade/minesweeper_emag2.ogg b/sound/arcade/minesweeper_emag2.ogg new file mode 100644 index 0000000000..84cb5c2e25 Binary files /dev/null and b/sound/arcade/minesweeper_emag2.ogg differ diff --git a/sound/arcade/minesweeper_explosion1.ogg b/sound/arcade/minesweeper_explosion1.ogg new file mode 100644 index 0000000000..f8272722fd Binary files /dev/null and b/sound/arcade/minesweeper_explosion1.ogg differ diff --git a/sound/arcade/minesweeper_explosion2.ogg b/sound/arcade/minesweeper_explosion2.ogg new file mode 100644 index 0000000000..aabd43851d Binary files /dev/null and b/sound/arcade/minesweeper_explosion2.ogg differ diff --git a/sound/arcade/minesweeper_explosion3.ogg b/sound/arcade/minesweeper_explosion3.ogg new file mode 100644 index 0000000000..22aa309d9d Binary files /dev/null and b/sound/arcade/minesweeper_explosion3.ogg differ diff --git a/sound/arcade/minesweeper_menuselect.ogg b/sound/arcade/minesweeper_menuselect.ogg new file mode 100644 index 0000000000..b9e0b765dc Binary files /dev/null and b/sound/arcade/minesweeper_menuselect.ogg differ diff --git a/sound/arcade/minesweeper_startup.ogg b/sound/arcade/minesweeper_startup.ogg new file mode 100644 index 0000000000..c51d473d60 Binary files /dev/null and b/sound/arcade/minesweeper_startup.ogg differ diff --git a/sound/arcade/minesweeper_win.ogg b/sound/arcade/minesweeper_win.ogg new file mode 100644 index 0000000000..214f1925b0 Binary files /dev/null and b/sound/arcade/minesweeper_win.ogg differ diff --git a/sound/arcade/minesweeper_winfail.ogg b/sound/arcade/minesweeper_winfail.ogg new file mode 100644 index 0000000000..878f153063 Binary files /dev/null and b/sound/arcade/minesweeper_winfail.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 8e33f39524..c990446236 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -638,6 +638,10 @@ #include "code\game\machinery\computer\station_alert.dm" #include "code\game\machinery\computer\telecrystalconsoles.dm" #include "code\game\machinery\computer\teleporter.dm" +#include "code\game\machinery\computer\arcade\battle.dm" +#include "code\game\machinery\computer\arcade\minesweeper.dm" +#include "code\game\machinery\computer\arcade\misc_arcade.dm" +#include "code\game\machinery\computer\arcade\orion_trail.dm" #include "code\game\machinery\doors\airlock.dm" #include "code\game\machinery\doors\airlock_electronics.dm" #include "code\game\machinery\doors\airlock_types.dm"