mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
TG: Late-join features and bug fixes:
- Merged 'Game' and 'Lobby' tabs during pre-game into one tab. - Late-joiners now see round duration. - Late-joiners are warned if the shuttle is not recallable or has already left to Centcomm. - Added the little red X to the top corner of the late-join job list window - Supply shuttle derp fix - Removed duplicate mining shuttle code that was inside atmos computer stuff - - This should fix the player seeing both the 'Shuttle has been sent' and 'The shuttle is already moving' messages. - Updated changelog Revision: r3433 Author: johnsonmt88
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//SUPPLY PACKS
|
||||
//NOTE: only secure crate types use the access var (and are lockable)
|
||||
//NOTE: hidden packs only show up when the computer has been hacked.
|
||||
//ANOTER NOTE: Contraband is obtainable through modified supplycomp circuitboards.
|
||||
//BIG NOTE: Don't add living things to crates, that's bad, it will break the shuttle.
|
||||
/datum/supply_packs/specialops
|
||||
name = "Special Ops supplies"
|
||||
@@ -793,5 +794,20 @@
|
||||
..()
|
||||
|
||||
|
||||
/datum/supply_packs/contraband
|
||||
contains = list("/obj/item/weapon/contraband/poster",) //We randomly pick 5 items from this list through the constructor, look below
|
||||
name = "Contraband Crate"
|
||||
cost = 30
|
||||
containertype = "/obj/structure/closet/crate/contraband"
|
||||
containername = "Contraband crate"
|
||||
group = "ERROR"
|
||||
contraband = 1
|
||||
|
||||
/datum/supply_packs/contraband/New()
|
||||
var/list/tempContains = list()
|
||||
for(var/i = 0,i<5,i++)
|
||||
tempContains += pick(contains)
|
||||
src.contains = tempContains
|
||||
..()
|
||||
|
||||
//SUPPLY PACKS
|
||||
@@ -39,31 +39,4 @@
|
||||
var/area/A2 = T2.loc
|
||||
if ( istype(A2) && A2.master && A2.master == A )
|
||||
SCRUBBER.on = scrubber_state
|
||||
SCRUBBER.update_icon()
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/mining_shuttle/attack_hand(user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
var/dat
|
||||
dat = text("<center>Mining shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
|
||||
user << browse("[dat]", "window=miningshuttle;size=200x100")
|
||||
|
||||
/obj/machinery/computer/mining_shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["move"])
|
||||
if(ticker.mode.name == "blob")
|
||||
if(ticker.mode:declared)
|
||||
usr << "Under directive 7-10, [station_name()] is quarantined until further notice."
|
||||
return
|
||||
|
||||
if (!mining_shuttle_moving)
|
||||
usr << "\blue Shuttle recieved message and will be sent shortly."
|
||||
move_mining_shuttle()
|
||||
else
|
||||
usr << "\blue Shuttle is already moving."
|
||||
|
||||
SCRUBBER.update_icon()
|
||||
@@ -48,7 +48,7 @@
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/scan_consolenew
|
||||
name = "Circuit board (DNA Machine)"
|
||||
build_path = "/obj/machinery/scan_consolenew"
|
||||
build_path = "/obj/machinery/computer/scan_consolenew"
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
/obj/item/weapon/circuitboard/communications
|
||||
name = "Circuit board (Communications)"
|
||||
@@ -147,6 +147,7 @@
|
||||
name = "Circuit board (Supply shuttle console)"
|
||||
build_path = "/obj/machinery/computer/supplycomp"
|
||||
origin_tech = "programming=3"
|
||||
var/contraband_enabled = 0
|
||||
/obj/item/weapon/circuitboard/operating
|
||||
name = "Circuit board (Operating Computer)"
|
||||
build_path = "/obj/machinery/computer/operating"
|
||||
@@ -207,6 +208,28 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/device/multitool))
|
||||
var/catastasis = src.contraband_enabled
|
||||
var/opposite_catastasis
|
||||
if(catastasis)
|
||||
opposite_catastasis = "STANDARD"
|
||||
catastasis = "BROAD"
|
||||
else
|
||||
opposite_catastasis = "BROAD"
|
||||
catastasis = "STANDARD"
|
||||
|
||||
switch( alert("Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface","Switch to [opposite_catastasis]","Cancel") )
|
||||
//switch( alert("Current receiver spectrum is set to: " {(src.contraband_enabled) ? ("BROAD") : ("STANDARD")} , "Multitool-Circuitboard interface" , "Switch to " {(src.contraband_enabled) ? ("STANDARD") : ("BROAD")}, "Cancel") )
|
||||
if("Switch to STANDARD","Switch to BROAD")
|
||||
src.contraband_enabled = !src.contraband_enabled
|
||||
|
||||
if("Cancel")
|
||||
return
|
||||
else
|
||||
user << "DERP! BUG! Report this (And what you were doing to cause it) to Agouri"
|
||||
return
|
||||
|
||||
/obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob)
|
||||
switch(state)
|
||||
if(0)
|
||||
@@ -306,4 +329,8 @@
|
||||
if(circuit.id) B:id = circuit.id
|
||||
if(circuit.records) B:records = circuit.records
|
||||
if(circuit.frequency) B:frequency = circuit.frequency
|
||||
if(istype(circuit,/obj/item/weapon/circuitboard/supplycomp))
|
||||
var/obj/machinery/computer/supplycomp/SC = B
|
||||
var/obj/item/weapon/circuitboard/supplycomp/C = circuit
|
||||
SC.can_order_contraband = C.contraband_enabled
|
||||
del(src)
|
||||
|
||||
@@ -38,6 +38,15 @@
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
|
||||
/obj/structure/closet/crate/contraband
|
||||
name = "Contraband crate"
|
||||
desc = "A random assortment of items manufactured by providers NOT listed under Nanotrasen's whitelist."
|
||||
icon = 'storage.dmi'
|
||||
icon_state = "crate"
|
||||
density = 1
|
||||
icon_opened = "crateopen"
|
||||
icon_closed = "crate"
|
||||
|
||||
/obj/structure/closet/crate/medical
|
||||
desc = "A medical crate."
|
||||
name = "Medical crate"
|
||||
|
||||
@@ -95,6 +95,7 @@ var/list/supply_groups = new()
|
||||
circuit = "/obj/item/weapon/circuitboard/supplycomp"
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/can_order_contraband = 0
|
||||
|
||||
/obj/machinery/computer/supplycomp/New()
|
||||
// add the supply pack groups, if they haven't already been added
|
||||
@@ -141,6 +142,7 @@ var/list/supply_groups = new()
|
||||
var/containername = null
|
||||
var/access = null
|
||||
var/hidden = 0
|
||||
var/contraband = 0
|
||||
var/group = "Miscellaneous"
|
||||
|
||||
/proc/supply_ticker()
|
||||
@@ -348,7 +350,7 @@ This method wont take into account storage items developed in the future and doe
|
||||
src.temp = "Supply points: [supply_shuttle_points]<BR><HR><BR>Request what?<BR><BR>"
|
||||
for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs - /datum/supply_packs/charge) )
|
||||
var/datum/supply_packs/N = new S()
|
||||
if(N.hidden) continue //Have to send the type instead of a reference to
|
||||
if(N.hidden || N.contraband) continue //Have to send the type instead of a reference to
|
||||
if(N.group != G) continue //correct group?
|
||||
src.temp += "<A href='?src=\ref[src];doorder=[N.type]'>[N.name]</A> Cost: [N.cost] " //the obj because it would get caught by the garbage
|
||||
src.temp += "<A href='?src=\ref[src];printform=[N.type]'>Print Requisition</A><br>" //collector. oh well.
|
||||
@@ -490,6 +492,8 @@ This method wont take into account storage items developed in the future and doe
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/supplycomp/M = new /obj/item/weapon/circuitboard/supplycomp( A )
|
||||
if(src.can_order_contraband)
|
||||
M.contraband_enabled = 1
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
A.circuit = M
|
||||
@@ -567,6 +571,7 @@ This method wont take into account storage items developed in the future and doe
|
||||
for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs - /datum/supply_packs/charge) )
|
||||
var/datum/supply_packs/N = new S()
|
||||
if(N.hidden && !src.hacked) continue //Have to send the type instead of a reference to
|
||||
if(N.contraband && !src.can_order_contraband){continue;} //Agouri -Kavalamarker
|
||||
if(N.group != G) continue //correct group?
|
||||
src.temp += "<A href='?src=\ref[src];doorder=[N.type]'>[N.name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
src.temp += "<BR><A href='?src=\ref[src];order=1'>Back</A>" //collector. oh well.
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
playsound(src, "clownstep", 50, 1) // this will get annoying very fast.
|
||||
else
|
||||
playsound(src, "clownstep", 20, 1)
|
||||
|
||||
switch (src.wet)
|
||||
if(1)
|
||||
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
|
||||
@@ -322,6 +323,12 @@
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
new /obj/item/stack/sheet/metal( src )
|
||||
|
||||
for(var/obj/O in src.contents) //Eject contents!
|
||||
if(istype(O,/obj/effect/decal/poster))
|
||||
var/obj/effect/decal/poster/P = O
|
||||
P.roll_and_drop(src)
|
||||
else
|
||||
O.loc = src
|
||||
ReplaceWithPlating(explode)
|
||||
|
||||
/turf/simulated/wall/examine()
|
||||
@@ -509,6 +516,12 @@
|
||||
var/obj/item/apc_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return
|
||||
|
||||
//Poster stuff
|
||||
else if(istype(W,/obj/item/weapon/contraband/poster))
|
||||
place_poster(W,user)
|
||||
return
|
||||
|
||||
else
|
||||
return attack_hand(user)
|
||||
return
|
||||
@@ -744,6 +757,11 @@
|
||||
var/obj/item/apc_frame/AH = W
|
||||
AH.try_build(src)
|
||||
|
||||
//Poster stuff
|
||||
else if(istype(W,/obj/item/weapon/contraband/poster))
|
||||
place_poster(W,user)
|
||||
return
|
||||
|
||||
//Finally, CHECKING FOR FALSE WALLS if it isn't damaged
|
||||
else if(!d_state)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
datum/preferences/preferences = null
|
||||
ready = 0
|
||||
spawning = 0//Referenced when you want to delete the new_player later on in the code.
|
||||
totalPlayers = 0 //Player counts for the Lobby tab
|
||||
totalPlayersReady = 0
|
||||
|
||||
invisibility = 101
|
||||
|
||||
@@ -157,8 +159,8 @@
|
||||
Stat()
|
||||
..()
|
||||
|
||||
statpanel("Game")
|
||||
if(client.statpanel=="Game" && ticker)
|
||||
statpanel("Lobby")
|
||||
if(client.statpanel=="Lobby" && ticker)
|
||||
if(ticker.hide_mode)
|
||||
stat("Game Mode:", "Secret")
|
||||
else
|
||||
@@ -168,14 +170,15 @@
|
||||
stat("Time To Start:", ticker.pregame_timeleft)
|
||||
if((ticker.current_state == GAME_STATE_PREGAME) && !going)
|
||||
stat("Time To Start:", "DELAYED")
|
||||
if((ticker.current_state == GAME_STATE_PLAYING) && going)
|
||||
stat("Round Duration:", "[round(world.time / 36000)]:[(((world.time / 600 % 60)/10) > 1 ? world.time / 600 % 60 : add_zero(world.time / 600 % 60, 2))]:[world.time / 100 % 6][world.time / 100 % 10]")
|
||||
|
||||
statpanel("Lobby")
|
||||
if(client.statpanel=="Lobby" && ticker)
|
||||
if(ticker.current_state == GAME_STATE_PREGAME)
|
||||
stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
|
||||
totalPlayers = 0
|
||||
totalPlayersReady = 0
|
||||
for(var/mob/new_player/player in world)
|
||||
stat("[player.key]", (player.ready)?("(Playing)"):(null))
|
||||
totalPlayers++
|
||||
if(player.ready)totalPlayersReady++
|
||||
|
||||
Topic(href, href_list[])
|
||||
if(!client) return 0
|
||||
@@ -185,7 +188,6 @@
|
||||
return 1
|
||||
|
||||
if(href_list["ready"])
|
||||
|
||||
if(!ready)
|
||||
ready = 1
|
||||
else
|
||||
@@ -249,6 +251,9 @@
|
||||
else if(!href_list["late_join"])
|
||||
new_player_panel()
|
||||
|
||||
if(href_list["priv_msg"])
|
||||
..() //pass PM calls along to /mob/Topic
|
||||
return
|
||||
|
||||
proc/IsJobAvailable(rank)
|
||||
var/datum/job/job = job_master.GetJob(rank)
|
||||
@@ -362,13 +367,27 @@
|
||||
|
||||
|
||||
proc/LateChoices()
|
||||
var/dat = "<html><body>"
|
||||
var/mills = world.time // 1/10 of a second, not real milliseconds but whatever
|
||||
//var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something
|
||||
var/mins = (mills % 36000) / 600
|
||||
var/hours = mills / 36000
|
||||
|
||||
var/dat = "<html><body><center>"
|
||||
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
|
||||
|
||||
if(emergency_shuttle) //In case Nanotrasen decides reposess CentComm's shuttles.
|
||||
if(emergency_shuttle.direction == 2) //Shuttle is going to centcomm, not recalled
|
||||
dat += "<font color='red'><b>The station has been evacuated.</b></font><br>"
|
||||
if(emergency_shuttle.direction == 1 && emergency_shuttle.timeleft() < 300) //Shuttle is past the point of no recall
|
||||
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
|
||||
|
||||
dat += "Choose from the following open positions:<br>"
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
if(job && IsJobAvailable(job.title))
|
||||
dat += "<a href='byond://?src=\ref[src];SelectedJob=[job.title]'>[job.title]</a><br>"
|
||||
|
||||
src << browse(dat, "window=latechoices;size=300x640;can_close=0")
|
||||
dat += "</center>"
|
||||
src << browse(dat, "window=latechoices;size=300x640;can_close=1")
|
||||
|
||||
|
||||
proc/create_character()
|
||||
@@ -387,7 +406,6 @@
|
||||
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
|
||||
new_character.dna.ready_dna(new_character)
|
||||
preferences.copydisabilities(new_character)
|
||||
if(mind)
|
||||
|
||||
Reference in New Issue
Block a user