From 4600375ae21a27fa69618367fa25168d0c235cad Mon Sep 17 00:00:00 2001 From: Adrinus Date: Tue, 3 Dec 2013 18:21:28 -0500 Subject: [PATCH 1/5] Adds a new Arcade Machine. --- code/game/machinery/computer/orion_trail.dm | 299 ++++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 code/game/machinery/computer/orion_trail.dm diff --git a/code/game/machinery/computer/orion_trail.dm b/code/game/machinery/computer/orion_trail.dm new file mode 100644 index 00000000000..acd29f16690 --- /dev/null +++ b/code/game/machinery/computer/orion_trail.dm @@ -0,0 +1,299 @@ +/obj/machinery/computer/orion_trail + name = "The Orion Trail" + desc = "Learn how our ancestors got to Orion, and have fun in the process!" + icon = 'icons/obj/computer.dmi' + icon_state = "arcade" + circuit = /obj/item/weapon/circuitboard/arcade + var/engine = 0 + var/hull = 0 + var/electronics = 0 + var/food = 80 + var/fuel = 60 + var/turns = 4 + var/gameover = 0 + var/playing = 0 + var/alive = 4 + var/eventdat = null + var/event = null + var/list/settlers = list("Harry","Larry","Bob") + var/list/events = list("Raiders" = 3, + "Interstellar Flux" = 1, + "Illness" = 3, + "Breakdown" = 2, + "Malfunction" = 2, + "Collision" = 1 + ) + // Sets up the main trail + var/list/stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") + var/list/stopblurbs = list( + "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 miss-guided judgement.", + "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now it is a low-population sanctuary for adventureres 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 it's planetary bodies in warmth and radiation.", + "Tau Ceti Beta has recently become a way-point for colonists headed towards Orion. There are many ships and makeshift stations in the viscinity.", + "Sensors indicate a black-hole's gravitational field is affecting the region of space we were headed through. We could stay the course, but risk being over-come by it's 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 colonist's success.", + "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for man-kind!" + ) + + var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2, + /obj/item/toy/AI = 2, + /obj/item/clothing/under/syndicate/tacticool = 2, + /obj/item/toy/sword = 2, + /obj/item/toy/gun = 2, + /obj/item/toy/crossbow = 2, + /obj/item/weapon/storage/box/fakesyndiesuit = 2, + /obj/item/weapon/storage/fancy/crayons = 2, + /obj/item/toy/spinningtoy = 2, + /obj/item/toy/prize/ripley = 1, + /obj/item/toy/prize/fireripley = 1, + /obj/item/toy/prize/deathripley = 1, + /obj/item/toy/prize/gygax = 1, + /obj/item/toy/prize/durand = 1, + /obj/item/toy/prize/honk = 1, + /obj/item/toy/prize/marauder = 1, + /obj/item/toy/prize/seraph = 1, + /obj/item/toy/prize/mauler = 1, + /obj/item/toy/prize/odysseus = 1, + /obj/item/toy/prize/phazon = 1 + ) + +/obj/machinery/computer/orion_trail/proc/newgame() + ..() + // Set names of settlers in crew + settlers = list() + var/list/settlernames = list("Bob","Henry","Joe","Mary","Jill","Mandy") + for(var/i = 1; i <= 3; i++) + var/choice = pick_n_take(settlernames) + settlers += choice + settlers += "[usr]" + // Re-set items to defaults + engine = 1 + hull = 1 + electronics = 1 + food = 80 + fuel = 60 + alive = 4 + turns = 1 + event = null + playing = 1 + gameover = 0 + +/obj/machinery/computer/orion_trail/attack_hand(mob/user as mob) + if(..()) + return + if(fuel <= 0 || food <=0 || settlers.len == 0) + gameover = 1 + event = null + user.set_machine(src) + var/dat = "" + if(gameover) + dat = "

Game Over

" + dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." + dat += "

OK...

" + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + else if(event) + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(eventdat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + else if(playing) + 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 += "

Close

" + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + 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") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + +/obj/machinery/computer/orion_trail/Topic(href, href_list) + if(..()) + return + if(href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=arcade") + else if (href_list["continue"]) //Continue your travels + if(turns >= 9) + win() + else if(turns == 2) + if(prob(30)) + event = "Collision" + event() + food -= alive*2 + fuel -= 5 + turns += 1 + else + food -= alive*2 + fuel -= 5 + turns += 1 + if(prob(75)) + event = pickweight(events) + event() + else + food -= alive*2 + fuel -= 5 + turns += 1 + if(prob(75)) + event = pickweight(events) + event() + else if(href_list["newgame"]) //Reset everything + newgame() + else if(href_list["menu"]) //back to the main menu + playing = 0 + event = null + gameover = 0 + food = 80 + fuel = 60 + settlers = list("Harry","Larry","Bob") + else if(href_list["slow"]) //slow down + food -= alive*2 + fuel -= 5 + event = null + else if(href_list["pastblack"]) //slow down + food -= (alive*2)*3 + fuel -= 15 + turns += 1 + event = null + else if(href_list["useengine"]) //use parts + engine -= 1 + event = null + else if(href_list["useelec"]) //use parts + electronics -= 1 + event = null + else if(href_list["usehull"]) //use parts + hull -= 1 + event = null + else if(href_list["wait"]) //wait 3 days + food -= (alive*2)*3 + event = null + else if(href_list["keepspeed"]) //keep speed + if(prob(75)) + event = "Breakdown" + event() + else + event = null + else if(href_list["blackhole"]) //keep speed past a black hole + if(prob(75)) + event = "BlackHole" + event() + else + event = null + else if(href_list["holedeath"]) + gameover = 1 + event = null + else if(href_list["eventclose"]) //end an event + event = null + + src.add_fingerprint(usr) + src.updateUsrDialog() + return + + +/obj/machinery/computer/orion_trail/proc/event() + eventdat = "

[event]

" + if(event == "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 = pick_n_take(settlers) + eventdat += "
[deadname] tried to fight back but was killed." + alive -= 1 + else + eventdat += "
Fortunately you fended them off without any trouble." + eventdat += "

Continue

" + eventdat += "

Close

" + + else if(event == "Interstellar 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

" + + else if(event == "Illness") + eventdat += "A deadly illness has been contracted!" + var/deadname = pick_n_take(settlers) + eventdat += "
[deadname] was killed by the disease." + alive -= 1 + eventdat += "

Continue

" + eventdat += "

Close

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

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + else if(event == "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

" + + else if(event == "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 = pick_n_take(settlers) + eventdat += "
[deadname] was killed by rapid depressurization." + alive -= 1 + 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

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

Oh...

" + eventdat += "

Close

" + + + +/obj/machinery/computer/orion_trail/proc/win() + playing = 0 + var/prizeselect = pickweight(prizes) + new prizeselect(src.loc) \ No newline at end of file From 26139a04028c1348d98a8c1c35e7c380d6997bf9 Mon Sep 17 00:00:00 2001 From: Adrinus Date: Tue, 3 Dec 2013 19:18:36 -0500 Subject: [PATCH 2/5] Made the Orion Trail machine a subclass of arcade. Added designs for its circuit board. --- code/game/machinery/computer/arcade.dm | 280 +++++++++++++++- .../game/machinery/computer/buildandrepair.dm | 4 + code/game/machinery/computer/orion_trail.dm | 299 ------------------ code/modules/research/designs.dm | 9 + 4 files changed, 292 insertions(+), 300 deletions(-) delete mode 100644 code/game/machinery/computer/orion_trail.dm diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 97d21c9fecf..e910c3725d5 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -253,4 +253,282 @@ empprize = pickweight(prizes) new empprize(src.loc) - ..(severity) \ No newline at end of file + ..(severity) + + + + + + +/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 = 'icons/obj/computer.dmi' + icon_state = "arcade" + circuit = /obj/item/weapon/circuitboard/orion_trail + var/engine = 0 + var/hull = 0 + var/electronics = 0 + var/food = 80 + var/fuel = 60 + var/turns = 4 + var/playing = 0 + var/alive = 4 + var/eventdat = null + var/event = null + var/list/settlers = list("Harry","Larry","Bob") + var/list/events = list("Raiders" = 3, + "Interstellar Flux" = 1, + "Illness" = 3, + "Breakdown" = 2, + "Malfunction" = 2, + "Collision" = 1 + ) + // Sets up the main trail + var/list/stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") + var/list/stopblurbs = list( + "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 miss-guided judgement.", + "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now it is a low-population sanctuary for adventureres 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 it's planetary bodies in warmth and radiation.", + "Tau Ceti Beta has recently become a way-point for colonists headed towards Orion. There are many ships and makeshift stations in the viscinity.", + "Sensors indicate a black-hole's gravitational field is affecting the region of space we were headed through. We could stay the course, but risk being over-come by it's 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 colonist's success.", + "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for man-kind!" + ) + + +/obj/machinery/computer/arcade/orion_trail/proc/newgame() + // Set names of settlers in crew + settlers = list() + var/list/settlernames = list("Bob","Henry","Joe","Mary","Jill","Mandy") + for(var/i = 1; i <= 3; i++) + var/choice = pick_n_take(settlernames) + settlers += choice + settlers += "[usr]" + // Re-set items to defaults + engine = 1 + hull = 1 + electronics = 1 + food = 80 + fuel = 60 + alive = 4 + turns = 1 + event = null + playing = 1 + gameover = 0 + +/obj/machinery/computer/arcade/orion_trail/attack_hand(mob/user as mob) + if(fuel <= 0 || food <=0 || settlers.len == 0) + gameover = 1 + event = null + user.set_machine(src) + var/dat = "" + if(gameover) + dat = "

Game Over

" + dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." + dat += "

OK...

" + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + else if(event) + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(eventdat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + else if(playing) + 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 += "

Close

" + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + 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") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + return + +/obj/machinery/computer/arcade/orion_trail/Topic(href, href_list) + if(href_list["close"]) + usr.unset_machine() + usr << browse(null, "window=arcade") + else if (href_list["continue"]) //Continue your travels + if(turns >= 9) + win() + else if(turns == 2) + if(prob(30)) + event = "Collision" + event() + food -= alive*2 + fuel -= 5 + turns += 1 + else + food -= alive*2 + fuel -= 5 + turns += 1 + if(prob(75)) + event = pickweight(events) + event() + else + food -= alive*2 + fuel -= 5 + turns += 1 + if(prob(75)) + event = pickweight(events) + event() + else if(href_list["newgame"]) //Reset everything + newgame() + else if(href_list["menu"]) //back to the main menu + playing = 0 + event = null + gameover = 0 + food = 80 + fuel = 60 + settlers = list("Harry","Larry","Bob") + else if(href_list["slow"]) //slow down + food -= alive*2 + fuel -= 5 + event = null + else if(href_list["pastblack"]) //slow down + food -= (alive*2)*3 + fuel -= 15 + turns += 1 + event = null + else if(href_list["useengine"]) //use parts + engine -= 1 + event = null + else if(href_list["useelec"]) //use parts + electronics -= 1 + event = null + else if(href_list["usehull"]) //use parts + hull -= 1 + event = null + else if(href_list["wait"]) //wait 3 days + food -= (alive*2)*3 + event = null + else if(href_list["keepspeed"]) //keep speed + if(prob(75)) + event = "Breakdown" + event() + else + event = null + else if(href_list["blackhole"]) //keep speed past a black hole + if(prob(75)) + event = "BlackHole" + event() + else + event = null + else if(href_list["holedeath"]) + gameover = 1 + event = null + else if(href_list["eventclose"]) //end an event + event = null + + src.add_fingerprint(usr) + src.updateUsrDialog() + return + + +/obj/machinery/computer/arcade/orion_trail/proc/event() + eventdat = "

[event]

" + if(event == "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 = pick_n_take(settlers) + eventdat += "
[deadname] tried to fight back but was killed." + alive -= 1 + else + eventdat += "
Fortunately you fended them off without any trouble." + eventdat += "

Continue

" + eventdat += "

Close

" + + else if(event == "Interstellar 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

" + + else if(event == "Illness") + eventdat += "A deadly illness has been contracted!" + var/deadname = pick_n_take(settlers) + eventdat += "
[deadname] was killed by the disease." + alive -= 1 + eventdat += "

Continue

" + eventdat += "

Close

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

Use PartWait

" + else + eventdat += "

Wait

" + eventdat += "

Close

" + + else if(event == "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

" + + else if(event == "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 = pick_n_take(settlers) + eventdat += "
[deadname] was killed by rapid depressurization." + alive -= 1 + 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

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

Oh...

" + eventdat += "

Close

" + + + +/obj/machinery/computer/arcade/orion_trail/proc/win() + playing = 0 + var/prizeselect = pickweight(prizes) + new prizeselect(src.loc) \ No newline at end of file diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index eda624aa1d4..5e5fd3cc279 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -109,6 +109,10 @@ name = "circuit board (Arcade)" build_path = "/obj/machinery/computer/arcade" origin_tech = "programming=1" +/obj/item/weapon/circuitboard/orion_trail + name = "circuit board (Orion_Trail)" + build_path = "/obj/machinery/computer/arcade/orion_trail" + origin_tech = "programming=2" /obj/item/weapon/circuitboard/turbine_control name = "circuit board (Turbine control)" build_path = "/obj/machinery/computer/turbine_computer" diff --git a/code/game/machinery/computer/orion_trail.dm b/code/game/machinery/computer/orion_trail.dm deleted file mode 100644 index acd29f16690..00000000000 --- a/code/game/machinery/computer/orion_trail.dm +++ /dev/null @@ -1,299 +0,0 @@ -/obj/machinery/computer/orion_trail - name = "The Orion Trail" - desc = "Learn how our ancestors got to Orion, and have fun in the process!" - icon = 'icons/obj/computer.dmi' - icon_state = "arcade" - circuit = /obj/item/weapon/circuitboard/arcade - var/engine = 0 - var/hull = 0 - var/electronics = 0 - var/food = 80 - var/fuel = 60 - var/turns = 4 - var/gameover = 0 - var/playing = 0 - var/alive = 4 - var/eventdat = null - var/event = null - var/list/settlers = list("Harry","Larry","Bob") - var/list/events = list("Raiders" = 3, - "Interstellar Flux" = 1, - "Illness" = 3, - "Breakdown" = 2, - "Malfunction" = 2, - "Collision" = 1 - ) - // Sets up the main trail - var/list/stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") - var/list/stopblurbs = list( - "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 miss-guided judgement.", - "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now it is a low-population sanctuary for adventureres 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 it's planetary bodies in warmth and radiation.", - "Tau Ceti Beta has recently become a way-point for colonists headed towards Orion. There are many ships and makeshift stations in the viscinity.", - "Sensors indicate a black-hole's gravitational field is affecting the region of space we were headed through. We could stay the course, but risk being over-come by it's 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 colonist's success.", - "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for man-kind!" - ) - - var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2, - /obj/item/toy/AI = 2, - /obj/item/clothing/under/syndicate/tacticool = 2, - /obj/item/toy/sword = 2, - /obj/item/toy/gun = 2, - /obj/item/toy/crossbow = 2, - /obj/item/weapon/storage/box/fakesyndiesuit = 2, - /obj/item/weapon/storage/fancy/crayons = 2, - /obj/item/toy/spinningtoy = 2, - /obj/item/toy/prize/ripley = 1, - /obj/item/toy/prize/fireripley = 1, - /obj/item/toy/prize/deathripley = 1, - /obj/item/toy/prize/gygax = 1, - /obj/item/toy/prize/durand = 1, - /obj/item/toy/prize/honk = 1, - /obj/item/toy/prize/marauder = 1, - /obj/item/toy/prize/seraph = 1, - /obj/item/toy/prize/mauler = 1, - /obj/item/toy/prize/odysseus = 1, - /obj/item/toy/prize/phazon = 1 - ) - -/obj/machinery/computer/orion_trail/proc/newgame() - ..() - // Set names of settlers in crew - settlers = list() - var/list/settlernames = list("Bob","Henry","Joe","Mary","Jill","Mandy") - for(var/i = 1; i <= 3; i++) - var/choice = pick_n_take(settlernames) - settlers += choice - settlers += "[usr]" - // Re-set items to defaults - engine = 1 - hull = 1 - electronics = 1 - food = 80 - fuel = 60 - alive = 4 - turns = 1 - event = null - playing = 1 - gameover = 0 - -/obj/machinery/computer/orion_trail/attack_hand(mob/user as mob) - if(..()) - return - if(fuel <= 0 || food <=0 || settlers.len == 0) - gameover = 1 - event = null - user.set_machine(src) - var/dat = "" - if(gameover) - dat = "

Game Over

" - dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." - dat += "

OK...

" - var/datum/browser/popup = new(user, "arcade", "The Orion Trail") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - else if(event) - var/datum/browser/popup = new(user, "arcade", "The Orion Trail") - popup.set_content(eventdat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - else if(playing) - 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 += "

Close

" - var/datum/browser/popup = new(user, "arcade", "The Orion Trail") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - 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") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return - -/obj/machinery/computer/orion_trail/Topic(href, href_list) - if(..()) - return - if(href_list["close"]) - usr.unset_machine() - usr << browse(null, "window=arcade") - else if (href_list["continue"]) //Continue your travels - if(turns >= 9) - win() - else if(turns == 2) - if(prob(30)) - event = "Collision" - event() - food -= alive*2 - fuel -= 5 - turns += 1 - else - food -= alive*2 - fuel -= 5 - turns += 1 - if(prob(75)) - event = pickweight(events) - event() - else - food -= alive*2 - fuel -= 5 - turns += 1 - if(prob(75)) - event = pickweight(events) - event() - else if(href_list["newgame"]) //Reset everything - newgame() - else if(href_list["menu"]) //back to the main menu - playing = 0 - event = null - gameover = 0 - food = 80 - fuel = 60 - settlers = list("Harry","Larry","Bob") - else if(href_list["slow"]) //slow down - food -= alive*2 - fuel -= 5 - event = null - else if(href_list["pastblack"]) //slow down - food -= (alive*2)*3 - fuel -= 15 - turns += 1 - event = null - else if(href_list["useengine"]) //use parts - engine -= 1 - event = null - else if(href_list["useelec"]) //use parts - electronics -= 1 - event = null - else if(href_list["usehull"]) //use parts - hull -= 1 - event = null - else if(href_list["wait"]) //wait 3 days - food -= (alive*2)*3 - event = null - else if(href_list["keepspeed"]) //keep speed - if(prob(75)) - event = "Breakdown" - event() - else - event = null - else if(href_list["blackhole"]) //keep speed past a black hole - if(prob(75)) - event = "BlackHole" - event() - else - event = null - else if(href_list["holedeath"]) - gameover = 1 - event = null - else if(href_list["eventclose"]) //end an event - event = null - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/computer/orion_trail/proc/event() - eventdat = "

[event]

" - if(event == "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 = pick_n_take(settlers) - eventdat += "
[deadname] tried to fight back but was killed." - alive -= 1 - else - eventdat += "
Fortunately you fended them off without any trouble." - eventdat += "

Continue

" - eventdat += "

Close

" - - else if(event == "Interstellar 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

" - - else if(event == "Illness") - eventdat += "A deadly illness has been contracted!" - var/deadname = pick_n_take(settlers) - eventdat += "
[deadname] was killed by the disease." - alive -= 1 - eventdat += "

Continue

" - eventdat += "

Close

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

Use PartWait

" - else - eventdat += "

Wait

" - eventdat += "

Close

" - - else if(event == "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

" - - else if(event == "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 = pick_n_take(settlers) - eventdat += "
[deadname] was killed by rapid depressurization." - alive -= 1 - 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

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

Oh...

" - eventdat += "

Close

" - - - -/obj/machinery/computer/orion_trail/proc/win() - playing = 0 - var/prizeselect = pickweight(prizes) - new prizeselect(src.loc) \ No newline at end of file diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index fbae5f41ff2..fee08772848 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -259,6 +259,15 @@ datum/design/arcademachine materials = list("$glass" = 2000, "sacid" = 20) build_path = "/obj/item/weapon/circuitboard/arcade" +datum/design/orion_trail + name = "Circuit Design (Orion Trail)" + desc = "Allows for the construction of circuit boards used to build a new Orion Trail machine." + id = "arcademachine" + req_tech = list("programming" = 2) + build_type = IMPRINTER + materials = list("$glass" = 2000, "sacid" = 20) + build_path = "/obj/item/weapon/circuitboard/orion_trail" + datum/design/powermonitor name = "Circuit Design (Power Monitor)" desc = "Allows for the construction of circuit boards used to build a new power monitor" From 12b43c997ed45a447441658cb12942ac45cb52ae Mon Sep 17 00:00:00 2001 From: Adrinus Date: Tue, 3 Dec 2013 20:11:57 -0500 Subject: [PATCH 3/5] Split up the arcade machines for future expansion. Added Game-Over explanations. A few tweaks and fixes. --- code/game/machinery/computer/arcade.dm | 63 +++++++++++-------- .../game/machinery/computer/buildandrepair.dm | 6 +- code/modules/research/designs.dm | 10 +-- 3 files changed, 46 insertions(+), 33 deletions(-) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index e910c3725d5..0e0efaafe63 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,17 +1,6 @@ -/obj/machinery/computer/arcade - name = "arcade machine" - desc = "Does not support Pinball." - icon = 'icons/obj/computer.dmi' - icon_state = "arcade" - circuit = /obj/item/weapon/circuitboard/arcade - var/enemy_name = "Space Villian" - var/temp = "Winners Don't Use Spacedrugs" //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 = 0 - var/blocked = 0 //Player cannot attack/heal while set +/obj/machinery/computer/arcade/ + name = "arcade" + desc = "generic arcade machine" var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2, /obj/item/toy/AI = 2, /obj/item/clothing/under/syndicate/tacticool = 2, @@ -34,10 +23,25 @@ /obj/item/toy/prize/phazon = 1 ) -/obj/machinery/computer/arcade +/obj/machinery/computer/arcade/battle + name = "arcade machine" + desc = "Does not support Pinball." + icon = 'icons/obj/computer.dmi' + icon_state = "arcade" + circuit = /obj/item/weapon/circuitboard/arcade + var/enemy_name = "Space Villian" + var/temp = "Winners Don't Use Spacedrugs" //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 = 0 + var/blocked = 0 //Player cannot attack/heal while set + +/obj/machinery/computer/arcade/battle var/turtle = 0 -/obj/machinery/computer/arcade/New() +/obj/machinery/computer/arcade/battle/New() ..() var/name_action var/name_part1 @@ -51,7 +55,7 @@ src.enemy_name = replacetext((name_part1 + name_part2), "the ", "") src.name = (name_action + name_part1 + name_part2) -/obj/machinery/computer/arcade/attack_hand(mob/user as mob) +/obj/machinery/computer/arcade/battle/attack_hand(mob/user as mob) if(..()) return user.set_machine(src) @@ -78,7 +82,7 @@ popup.open() return -/obj/machinery/computer/arcade/Topic(href, href_list) +/obj/machinery/computer/arcade/battle/Topic(href, href_list) if(..()) return @@ -143,7 +147,7 @@ src.updateUsrDialog() return -/obj/machinery/computer/arcade/proc/arcade_action() +/obj/machinery/computer/arcade/battle/proc/arcade_action() if ((src.enemy_mp <= 0) || (src.enemy_hp <= 0)) if(!gameover) src.gameover = 1 @@ -217,7 +221,7 @@ return -/obj/machinery/computer/arcade/attackby(I as obj, user as mob) +/obj/machinery/computer/arcade/battle/attackby(I as obj, user as mob) if(istype(I, /obj/item/weapon/card/emag) && !emagged) temp = "If you die in the game, you die for real!" player_hp = 30 @@ -238,7 +242,7 @@ ..() return -/obj/machinery/computer/arcade/emp_act(severity) +/obj/machinery/computer/arcade/battle/emp_act(severity) if(stat & (NOPOWER|BROKEN)) ..(severity) return @@ -265,7 +269,7 @@ desc = "Learn how our ancestors got to Orion, and have fun in the process!" icon = 'icons/obj/computer.dmi' icon_state = "arcade" - circuit = /obj/item/weapon/circuitboard/orion_trail + circuit = /obj/item/weapon/circuitboard/arcade/orion_trail var/engine = 0 var/hull = 0 var/electronics = 0 @@ -273,6 +277,7 @@ var/fuel = 60 var/turns = 4 var/playing = 0 + var/gameover = 0 var/alive = 4 var/eventdat = null var/event = null @@ -287,7 +292,7 @@ // Sets up the main trail var/list/stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") var/list/stopblurbs = list( - "Long since occupied with long-range sensors and scanners stands ready to, and indeed continues to, probe the far reaches of the galaxy.", + "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 miss-guided judgement.", "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now it is a low-population sanctuary for adventureres 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.", @@ -328,7 +333,14 @@ if(gameover) dat = "

Game Over

" dat += "Like many before you, your crew never made it to Orion, lost to space...
Forever." - dat += "

OK...

" + if(settlers.len == 0) + dat += "
Your entire crew died, your ship joins the fleet of ghost-ships littering the galaxy." + else + if(food <= 0) + dat += "
You ran out of food and starved." + if(fuel <= 0) + dat += "
You ran out of fuel, and drift, slowly, into a star." + dat += "

OK...

" var/datum/browser/popup = new(user, "arcade", "The Orion Trail") popup.set_content(dat) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) @@ -440,6 +452,7 @@ event() else event = null + turns += 1 else if(href_list["holedeath"]) gameover = 1 event = null @@ -525,7 +538,7 @@ eventdat += "You were swept away into the black hole." eventdat += "

Oh...

" eventdat += "

Close

" - + settlers = list() /obj/machinery/computer/arcade/orion_trail/proc/win() diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 5e5fd3cc279..042e9fd62d2 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -105,11 +105,11 @@ name = "circuit board (Cloning)" build_path = "/obj/machinery/computer/cloning" origin_tech = "programming=3;biotech=3" -/obj/item/weapon/circuitboard/arcade +/obj/item/weapon/circuitboard/arcade/battle name = "circuit board (Arcade)" - build_path = "/obj/machinery/computer/arcade" + build_path = "/obj/machinery/computer/arcade/battle" origin_tech = "programming=1" -/obj/item/weapon/circuitboard/orion_trail +/obj/item/weapon/circuitboard/arcade/orion_trail name = "circuit board (Orion_Trail)" build_path = "/obj/machinery/computer/arcade/orion_trail" origin_tech = "programming=2" diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index fee08772848..f0686ec1468 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -250,23 +250,23 @@ datum/design/clonescanner materials = list("$glass" = 2000, "sacid" = 20) build_path = "/obj/item/weapon/circuitboard/clonescanner" -datum/design/arcademachine - name = "Circuit Design (Arcade Machine)" +datum/design/arcadebattle + name = "Circuit Design (Battle Arcade Machine)" desc = "Allows for the construction of circuit boards used to build a new arcade machine." id = "arcademachine" req_tech = list("programming" = 1) build_type = IMPRINTER materials = list("$glass" = 2000, "sacid" = 20) - build_path = "/obj/item/weapon/circuitboard/arcade" + build_path = "/obj/item/weapon/circuitboard/arcade/battle" datum/design/orion_trail - name = "Circuit Design (Orion Trail)" + name = "Circuit Design (Orion Trail Arcade Machine)" desc = "Allows for the construction of circuit boards used to build a new Orion Trail machine." id = "arcademachine" req_tech = list("programming" = 2) build_type = IMPRINTER materials = list("$glass" = 2000, "sacid" = 20) - build_path = "/obj/item/weapon/circuitboard/orion_trail" + build_path = "/obj/item/weapon/circuitboard/arcade/orion_trail" datum/design/powermonitor name = "Circuit Design (Power Monitor)" From 482eb7a041f5762d2b70cf6b2e096d2e4d1ed2c4 Mon Sep 17 00:00:00 2001 From: Adrinus Date: Wed, 4 Dec 2013 13:13:09 -0500 Subject: [PATCH 4/5] Made the parent arcade machine a "randomized" arcade. Mapper can place the parent, and it will auto-magically become one of the existing arcade machines. This code should work for any future arcade machines. --- code/game/machinery/computer/arcade.dm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 0e0efaafe63..ff346067897 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,6 +1,8 @@ /obj/machinery/computer/arcade/ - name = "arcade" - desc = "generic arcade machine" + name = "random arcade" + desc = "random arcade machine" + icon = 'icons/obj/computer.dmi' + icon_state = "arcade" var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2, /obj/item/toy/AI = 2, /obj/item/clothing/under/syndicate/tacticool = 2, @@ -23,6 +25,12 @@ /obj/item/toy/prize/phazon = 1 ) +/obj/machinery/computer/arcade/New() + ..() + var/choice = pick(typesof(/obj/machinery/computer/arcade) - /obj/machinery/computer/arcade) + new choice(loc) + del(src) + /obj/machinery/computer/arcade/battle name = "arcade machine" desc = "Does not support Pinball." @@ -42,7 +50,6 @@ var/turtle = 0 /obj/machinery/computer/arcade/battle/New() - ..() var/name_action var/name_part1 var/name_part2 @@ -289,9 +296,13 @@ "Malfunction" = 2, "Collision" = 1 ) + var/list/stops = list() + var/list/stopblurbs = list() + +/obj/machinery/computer/arcade/orion_trail/New() // Sets up the main trail - var/list/stops = list("Pluto","Asteroid Belt","Proxima Centauri","Dead Space","Rigel Prime","Tau Ceti Beta","Black Hole","Space Outpost Beta-9","Orion Prime") - var/list/stopblurbs = list( + 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 miss-guided judgement.", "The nearest star system to Sol, in ages past it stood as a reminder of the boundaries of sub-light travel, now it is a low-population sanctuary for adventureres and traders.", @@ -303,7 +314,6 @@ "You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for man-kind!" ) - /obj/machinery/computer/arcade/orion_trail/proc/newgame() // Set names of settlers in crew settlers = list() From 6402574be8b06a0c702b176adce47ebab4d71be8 Mon Sep 17 00:00:00 2001 From: Adrinus Date: Mon, 9 Dec 2013 15:39:37 -0500 Subject: [PATCH 5/5] Made emp_act available to all arcades. Made prize vending with filled boxes a proc for use by any arcade machine. Names of your crew are now generated from the same name lists as random characters. Cleaned up the Topic code so there were less duplicate lines. --- code/game/machinery/computer/arcade.dm | 105 ++++++++---------- .../game/machinery/computer/buildandrepair.dm | 2 +- 2 files changed, 49 insertions(+), 58 deletions(-) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index ff346067897..02c31be6abc 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -31,6 +31,39 @@ new choice(loc) del(src) +/obj/machinery/computer/arcade/proc/prizevend() + if(!contents.len) + var/prizeselect = pickweight(prizes) + new prizeselect(src.loc) + + if(istype(prizeselect, /obj/item/toy/gun)) //Ammo comes with the gun + new /obj/item/toy/ammo/gun(src.loc) + + else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit + new /obj/item/clothing/head/syndicatefake(src.loc) + + else + var/atom/movable/prize = pick(contents) + prize.loc = src.loc + +/obj/machinery/computer/arcade/emp_act(severity) + if(stat & (NOPOWER|BROKEN)) + ..(severity) + return + var/empprize = null + var/num_of_prizes = 0 + switch(severity) + if(1) + num_of_prizes = rand(1,4) + if(2) + num_of_prizes = rand(0,2) + for(num_of_prizes; num_of_prizes > 0; num_of_prizes--) + empprize = pickweight(prizes) + new empprize(src.loc) + + ..(severity) + + /obj/machinery/computer/arcade/battle name = "arcade machine" desc = "Does not support Pinball." @@ -45,8 +78,6 @@ var/enemy_mp = 20 var/gameover = 0 var/blocked = 0 //Player cannot attack/heal while set - -/obj/machinery/computer/arcade/battle var/turtle = 0 /obj/machinery/computer/arcade/battle/New() @@ -168,21 +199,9 @@ log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.") src.New() emagged = 0 - else if(!contents.len) - feedback_inc("arcade_win_normal") - var/prizeselect = pickweight(prizes) - new prizeselect(src.loc) - - if(istype(prizeselect, /obj/item/toy/gun)) //Ammo comes with the gun - new /obj/item/toy/ammo/gun(src.loc) - - else if(istype(prizeselect, /obj/item/clothing/suit/syndicatefake)) //Helmet is part of the suit - new /obj/item/clothing/head/syndicatefake(src.loc) - else feedback_inc("arcade_win_normal") - var/atom/movable/prize = pick(contents) - prize.loc = src.loc + prizevend() else if (emagged && (turtle >= 4)) var/boomamt = rand(5,10) @@ -249,24 +268,6 @@ ..() return -/obj/machinery/computer/arcade/battle/emp_act(severity) - if(stat & (NOPOWER|BROKEN)) - ..(severity) - return - var/empprize = null - var/num_of_prizes = 0 - switch(severity) - if(1) - num_of_prizes = rand(1,4) - if(2) - num_of_prizes = rand(0,2) - for(num_of_prizes; num_of_prizes > 0; num_of_prizes--) - empprize = pickweight(prizes) - new empprize(src.loc) - - ..(severity) - - @@ -317,9 +318,12 @@ /obj/machinery/computer/arcade/orion_trail/proc/newgame() // Set names of settlers in crew settlers = list() - var/list/settlernames = list("Bob","Henry","Joe","Mary","Jill","Mandy") + var/choice = null for(var/i = 1; i <= 3; i++) - var/choice = pick_n_take(settlernames) + if(prob(50)) + choice = pick(first_names_male) + else + choice = pick(first_names_female) settlers += choice settlers += "[usr]" // Re-set items to defaults @@ -351,17 +355,8 @@ if(fuel <= 0) dat += "
You ran out of fuel, and drift, slowly, into a star." dat += "

OK...

" - var/datum/browser/popup = new(user, "arcade", "The Orion Trail") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return else if(event) - var/datum/browser/popup = new(user, "arcade", "The Orion Trail") - popup.set_content(eventdat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return + dat = eventdat else if(playing) var/title = stops[turns] var/subtext = stopblurbs[turns] @@ -376,23 +371,20 @@ else dat += "

Continue

" dat += "

Close

" - var/datum/browser/popup = new(user, "arcade", "The Orion Trail") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return 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") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open() - return + var/datum/browser/popup = new(user, "arcade", "The Orion Trail") + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.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") @@ -553,5 +545,4 @@ /obj/machinery/computer/arcade/orion_trail/proc/win() playing = 0 - var/prizeselect = pickweight(prizes) - new prizeselect(src.loc) \ No newline at end of file + prizevend() \ No newline at end of file diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 042e9fd62d2..8a39ee4a54d 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -106,7 +106,7 @@ build_path = "/obj/machinery/computer/cloning" origin_tech = "programming=3;biotech=3" /obj/item/weapon/circuitboard/arcade/battle - name = "circuit board (Arcade)" + name = "circuit board (Arcade Battle)" build_path = "/obj/machinery/computer/arcade/battle" origin_tech = "programming=1" /obj/item/weapon/circuitboard/arcade/orion_trail