And fixes to make stuff work
This commit is contained in:
@@ -13,42 +13,14 @@
|
||||
var/code = DEFAULT_SIGNALER_CODE
|
||||
var/frequency = FREQ_SIGNALER
|
||||
var/datum/radio_frequency/radio_connection
|
||||
///Holds the mind that commited suicide.
|
||||
var/datum/mind/suicider
|
||||
///Holds a reference string to the mob, decides how much of a gamer you are.
|
||||
var/suicide_mob
|
||||
var/hearing_range = 1
|
||||
|
||||
/obj/item/assembly/signaler/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] eats \the [src]! If it is signaled, [user.p_they()] will die!</span>")
|
||||
playsound(src, 'sound/items/eatfood.ogg', 50, TRUE)
|
||||
moveToNullspace()
|
||||
suicider = user.mind
|
||||
suicide_mob = REF(user)
|
||||
return MANUAL_SUICIDE_NONLETHAL
|
||||
|
||||
/obj/item/assembly/signaler/proc/manual_suicide(datum/mind/suicidee)
|
||||
var/mob/living/user = suicidee.current
|
||||
if(!istype(user))
|
||||
return
|
||||
if(suicide_mob == REF(user))
|
||||
user.visible_message("<span class='suicide'>[user]'s [src] receives a signal, killing [user.p_them()] instantly!</span>")
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user]'s [src] receives a signal and [user.p_they()] die[user.p_s()] like a gamer!</span>")
|
||||
user.adjustOxyLoss(200)//it sends an electrical pulse to their heart, killing them. or something.
|
||||
user.death(0)
|
||||
user.set_suicide(TRUE)
|
||||
user.suicide_log()
|
||||
playsound(user, 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/assembly/signaler/Initialize()
|
||||
. = ..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/item/assembly/signaler/Destroy()
|
||||
SSradio.remove_object(src,frequency)
|
||||
suicider = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/assembly/signaler/activate()
|
||||
@@ -137,9 +109,6 @@
|
||||
return
|
||||
if(!(src.wires & WIRE_RADIO_RECEIVE))
|
||||
return
|
||||
if(suicider)
|
||||
manual_suicide(suicider)
|
||||
return
|
||||
pulse(TRUE)
|
||||
audible_message("[icon2html(src, hearers(src))] *beep* *beep* *beep*", null, hearing_range)
|
||||
for(var/CHM in get_hearers_in_view(hearing_range, src))
|
||||
@@ -192,8 +161,6 @@
|
||||
return FALSE
|
||||
if(signal.data["code"] != code)
|
||||
return FALSE
|
||||
if(suicider)
|
||||
manual_suicide(suicider)
|
||||
for(var/obj/effect/anomaly/A in get_turf(src))
|
||||
A.anomalyNeutralize()
|
||||
return TRUE
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
if("time")
|
||||
timing = !timing
|
||||
if(timing && istype(holder, /obj/item/transfer_valve))
|
||||
log_bomber(usr, "activated a", src, "attachment on [holder]")
|
||||
log_game(usr, "activated a", src, "attachment on [holder]")
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("repeat")
|
||||
|
||||
@@ -206,19 +206,19 @@
|
||||
/datum/asset/spritesheet/simple/minesweeper
|
||||
name = "minesweeper"
|
||||
assets = list(
|
||||
"1" = 'icons/misc/minesweeper_tiles/one.png',
|
||||
"2" = 'icons/misc/minesweeper_tiles/two.png',
|
||||
"3" = 'icons/misc/minesweeper_tiles/three.png',
|
||||
"4" = 'icons/misc/minesweeper_tiles/four.png',
|
||||
"5" = 'icons/misc/minesweeper_tiles/five.png',
|
||||
"6" = 'icons/misc/minesweeper_tiles/six.png',
|
||||
"7" = 'icons/misc/minesweeper_tiles/seven.png',
|
||||
"8" = 'icons/misc/minesweeper_tiles/eight.png',
|
||||
"empty" = 'icons/misc/minesweeper_tiles/empty.png',
|
||||
"flag" = 'icons/misc/minesweeper_tiles/flag.png',
|
||||
"hidden" = 'icons/misc/minesweeper_tiles/hidden.png',
|
||||
"mine" = 'icons/misc/minesweeper_tiles/mine.png',
|
||||
"minehit" = 'icons/misc/minesweeper_tiles/minehit.png'
|
||||
"1" = 'icons/UI_Icons/minesweeper_tiles/one.png',
|
||||
"2" = 'icons/UI_Icons/minesweeper_tiles/two.png',
|
||||
"3" = 'icons/UI_Icons/minesweeper_tiles/three.png',
|
||||
"4" = 'icons/UI_Icons/minesweeper_tiles/four.png',
|
||||
"5" = 'icons/UI_Icons/minesweeper_tiles/five.png',
|
||||
"6" = 'icons/UI_Icons/minesweeper_tiles/six.png',
|
||||
"7" = 'icons/UI_Icons/minesweeper_tiles/seven.png',
|
||||
"8" = 'icons/UI_Icons/minesweeper_tiles/eight.png',
|
||||
"empty" = 'icons/UI_Icons/minesweeper_tiles/empty.png',
|
||||
"flag" = 'icons/UI_Icons/minesweeper_tiles/flag.png',
|
||||
"hidden" = 'icons/UI_Icons/minesweeper_tiles/hidden.png',
|
||||
"mine" = 'icons/UI_Icons/minesweeper_tiles/mine.png',
|
||||
"minehit" = 'icons/UI_Icons/minesweeper_tiles/minehit.png'
|
||||
)
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
name = "pipes"
|
||||
|
||||
/datum/asset/spritesheet/pipes/register()
|
||||
for (var/each in list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi', 'icons/obj/atmospherics/pipes/transit_tube.dmi', 'icons/obj/plumbing/fluid_ducts.dmi'))
|
||||
for (var/each in list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi'))
|
||||
InsertAll("", each, GLOB.alldirs)
|
||||
..()
|
||||
|
||||
|
||||
@@ -74,12 +74,9 @@
|
||||
/obj/machinery/computer/cargo/ui_data()
|
||||
var/list/data = list()
|
||||
data["location"] = SSshuttle.supply.getStatusText()
|
||||
/*var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
data["points"] = D.account_balance*/
|
||||
data["away"] = SSshuttle.supply.getDockedId() == "supply_away"
|
||||
//data["self_paid"] = self_paid
|
||||
data["docked"] = SSshuttle.supply.mode == SHUTTLE_IDLE
|
||||
data["points"] = SSshuttle.points
|
||||
data["loan"] = !!SSshuttle.shuttle_loan
|
||||
data["loan_dispatched"] = SSshuttle.shuttle_loan && SSshuttle.shuttle_loan.dispatched
|
||||
var/message = "Remember to stamp and send back the supply manifests."
|
||||
@@ -95,7 +92,6 @@
|
||||
"cost" = SO.pack.cost,
|
||||
"id" = SO.id,
|
||||
"orderer" = SO.orderer,
|
||||
"paid" = !isnull(SO.paying_account) //paid by requester
|
||||
))
|
||||
|
||||
data["requests"] = list()
|
||||
@@ -128,7 +124,6 @@
|
||||
"cost" = P.cost,
|
||||
"id" = pack,
|
||||
"desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name.
|
||||
//"small_item" = P.small_item,
|
||||
"access" = P.access
|
||||
))
|
||||
return data
|
||||
@@ -167,8 +162,6 @@
|
||||
else
|
||||
SSshuttle.shuttle_loan.loan_shuttle()
|
||||
say("The supply shuttle has been loaned to CentCom.")
|
||||
investigate_log("[key_name(usr)] accepted a shuttle loan event.", INVESTIGATE_CARGO)
|
||||
log_game("[key_name(usr)] accepted a shuttle loan event.")
|
||||
. = TRUE
|
||||
if("add")
|
||||
var/id = text2path(params["id"])
|
||||
@@ -189,36 +182,19 @@
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
|
||||
/* var/datum/bank_account/account
|
||||
if(self_paid && ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
var/obj/item/card/id/id_card = H.get_idcard(TRUE)
|
||||
if(!istype(id_card))
|
||||
say("No ID card detected.")
|
||||
return
|
||||
account = id_card.registered_account
|
||||
if(!istype(account))
|
||||
say("Invalid bank account.")
|
||||
return
|
||||
*/
|
||||
var/reason = ""
|
||||
if(requestonly && !self_paid)
|
||||
if(requestonly)
|
||||
reason = stripped_input("Reason:", name, "")
|
||||
if(isnull(reason) || ..())
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason, account)
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
SO.generateRequisition(T)
|
||||
if(requestonly && !self_paid)
|
||||
if(requestonly)
|
||||
SSshuttle.requestlist += SO
|
||||
else
|
||||
SSshuttle.shoppinglist += SO
|
||||
if(self_paid)
|
||||
say("Order processed. The price will be charged to [account.account_holder]'s bank account on delivery.")
|
||||
if(requestonly && message_cooldown < world.time)
|
||||
radio.talk_into(src, "A new order has been requested.", RADIO_CHANNEL_SUPPLY)
|
||||
message_cooldown = world.time + 30 SECONDS
|
||||
. = TRUE
|
||||
if("remove")
|
||||
var/id = text2num(params["id"])
|
||||
@@ -248,9 +224,6 @@
|
||||
if("denyall")
|
||||
SSshuttle.requestlist.Cut()
|
||||
. = TRUE
|
||||
/* if("toggleprivate")
|
||||
self_paid = !self_paid
|
||||
*/ . = TRUE
|
||||
if(.)
|
||||
post_signal("supply")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define MAX_EMAG_ROCKETS 8
|
||||
#define BEACON_COST 500
|
||||
#define BEACON_COST 5000
|
||||
#define SP_LINKED 1
|
||||
#define SP_READY 2
|
||||
#define SP_LAUNCH 3
|
||||
@@ -17,7 +17,6 @@
|
||||
ui_y = 700
|
||||
blockade_warning = "Bluespace instability detected. Delivery impossible."
|
||||
req_access = list(ACCESS_QM)
|
||||
|
||||
var/message
|
||||
var/printed_beacons = 0 //number of beacons printed. Used to determine beacon names.
|
||||
var/list/meme_pack_data
|
||||
@@ -43,7 +42,7 @@
|
||||
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the interface.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/disk/cargo/bluespace_pod))
|
||||
podType = /obj/structure/closet/supplypod/bluespacepod//doesnt effect circuit board, making reversal possible
|
||||
podType = /obj/structure/closet/supplypod/bluespacepod
|
||||
to_chat(user, "<span class='notice'>You insert the disk into [src], allowing for advanced supply delivery vehicles.</span>")
|
||||
qdel(W)
|
||||
return TRUE
|
||||
@@ -53,20 +52,22 @@
|
||||
sb.link_console(src, user)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='alert'>[src] is already linked to [sb].</span>")
|
||||
to_chat(user, "<span class='notice'>[src] is already linked to [sb].</span>")
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/cargo/express/emag_act(mob/living/user)
|
||||
. = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT)
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
if(user)
|
||||
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!</span>",
|
||||
"<span class='notice'>You change the routing protocols, allowing the Supply Pod to land anywhere on the station.</span>")
|
||||
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!</span>",
|
||||
"<span class='notice'>You change the routing protocols, allowing the Supply Pod to land anywhere on the station.</span>")
|
||||
obj_flags |= EMAGGED
|
||||
// This also sets this on the circuit board
|
||||
var/obj/item/circuitboard/computer/cargo/board = circuit
|
||||
board.obj_flags |= EMAGGED
|
||||
packin_up()
|
||||
req_access = list()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/express/proc/packin_up() // oh shit, I'm sorry
|
||||
meme_pack_data = list() // sorry for what?
|
||||
@@ -97,19 +98,17 @@
|
||||
/obj/machinery/computer/cargo/express/ui_data(mob/user)
|
||||
var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location?
|
||||
var/list/data = list()
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
data["points"] = D.account_balance
|
||||
data["locked"] = locked//swipe an ID to unlock
|
||||
data["siliconUser"] = user.has_unlimited_silicon_privilege
|
||||
data["siliconUser"] = hasSiliconAccessInArea(user)
|
||||
data["beaconzone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui
|
||||
data["usingBeacon"] = usingBeacon //is the mode set to deliver to the beacon or the cargobay?
|
||||
data["canBeacon"] = !usingBeacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location?
|
||||
data["canBuyBeacon"] = cooldown <= 0 && D.account_balance >= BEACON_COST
|
||||
data["canBuyBeacon"] = cooldown <= 0 && SSshuttle.points >= BEACON_COST
|
||||
data["beaconError"] = usingBeacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary
|
||||
data["hasBeacon"] = beacon != null//is there a linked beacon?
|
||||
data["beaconName"] = beacon ? beacon.name : "No Beacon Found"
|
||||
data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons
|
||||
data["points"] = SSshuttle.points
|
||||
data["supplies"] = list()
|
||||
message = "Sales are near-instantaneous - please choose carefully."
|
||||
if(SSshuttle.supplyBlocked)
|
||||
@@ -140,15 +139,13 @@
|
||||
if (beacon)
|
||||
beacon.update_status(SP_READY) //turns on the beacon's ready light
|
||||
if("printBeacon")
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
if(D.adjust_money(-BEACON_COST))
|
||||
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
|
||||
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
|
||||
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
|
||||
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
|
||||
beacon.name = "Supply Pod Beacon #[printed_beacons]"
|
||||
|
||||
if (SSshuttle.points >= BEACON_COST)
|
||||
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
|
||||
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
|
||||
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
|
||||
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
|
||||
beacon.name = "Supply Pod Beacon #[printed_beacons]"
|
||||
SSshuttle.points -= BEACON_COST
|
||||
|
||||
if("add")//Generate Supply Order first
|
||||
var/id = text2path(params["id"])
|
||||
@@ -168,12 +165,8 @@
|
||||
var/reason = ""
|
||||
var/list/empty_turfs
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
var/points_to_check
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
points_to_check = D.account_balance
|
||||
if(!(obj_flags & EMAGGED))
|
||||
if(SO.pack.cost <= points_to_check)
|
||||
if(SO.pack.cost <= SSshuttle.points)
|
||||
var/LZ
|
||||
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
|
||||
LZ = get_turf(beacon)
|
||||
@@ -190,13 +183,14 @@
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
LZ = pick(empty_turfs)
|
||||
if (SO.pack.cost <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
|
||||
D.adjust_money(-SO.pack.cost)
|
||||
new /obj/effect/DPtarget(LZ, podType, SO)
|
||||
if (SO.pack.cost <= SSshuttle.points && LZ)//we need to call the cost check again because of the CHECK_TICK call
|
||||
SSshuttle.points -= SO.pack.cost
|
||||
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
|
||||
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
else
|
||||
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= points_to_check) // bulk discount :^)
|
||||
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= SSshuttle.points) // bulk discount :^)
|
||||
landingzone = GLOB.areas_by_type[pick(GLOB.the_station_areas)] //override default landing zone
|
||||
for(var/turf/open/floor/T in landingzone.contents)
|
||||
if(is_blocked_turf(T))
|
||||
@@ -204,13 +198,13 @@
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
D.adjust_money(-(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)))
|
||||
|
||||
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
|
||||
SSblackbox.record_feedback("nested tally", "cargo_imports", MAX_EMAG_ROCKETS, list("[SO.pack.cost * 0.72]", "[SO.pack.name]"))
|
||||
SO.generateRequisition(get_turf(src))
|
||||
for(var/i in 1 to MAX_EMAG_ROCKETS)
|
||||
var/LZ = pick(empty_turfs)
|
||||
LAZYREMOVE(empty_turfs, LZ)
|
||||
new /obj/effect/DPtarget(LZ, podType, SO)
|
||||
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
CHECK_TICK
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
"smmon_3.gif" = 'icons/program_icons/smmon_3.gif',
|
||||
"smmon_4.gif" = 'icons/program_icons/smmon_4.gif',
|
||||
"smmon_5.gif" = 'icons/program_icons/smmon_5.gif',
|
||||
"smmon_6.gif" = 'icons/program_icons/smmon_6.gif',
|
||||
"borg_mon.gif" = 'icons/program_icons/borg_mon.gif'
|
||||
"smmon_6.gif" = 'icons/program_icons/smmon_6.gif'
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/simple/pda
|
||||
@@ -147,7 +146,8 @@
|
||||
"json2.min.js" = 'code/modules/goonchat/browserassets/js/json2.min.js',
|
||||
"browserOutput.js" = 'code/modules/goonchat/browserassets/js/browserOutput.js',
|
||||
"browserOutput.css" = 'code/modules/goonchat/browserassets/css/browserOutput.css',
|
||||
"browserOutput_white.css" = 'code/modules/goonchat/browserassets/css/browserOutput_white.css',
|
||||
"browserOutput_dark.css" = 'code/modules/goonchat/browserassets/css/browserOutput_dark.css',
|
||||
"browserOutput_light.css" = 'code/modules/goonchat/browserassets/css/browserOutput_light.css'
|
||||
)
|
||||
|
||||
/datum/asset/simple/fontawesome
|
||||
@@ -202,33 +202,6 @@
|
||||
"boss6.gif" = 'icons/UI_Icons/Arcade/boss6.gif',
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/simple/achievements
|
||||
name ="achievements"
|
||||
assets = list(
|
||||
"default" = 'icons/UI_Icons/Achievements/default.png',
|
||||
"basemisc" = 'icons/UI_Icons/Achievements/basemisc.png',
|
||||
"baseboss" = 'icons/UI_Icons/Achievements/baseboss.png',
|
||||
"baseskill" = 'icons/UI_Icons/Achievements/baseskill.png',
|
||||
"bbgum" = 'icons/UI_Icons/Achievements/Boss/bbgum.png',
|
||||
"colossus" = 'icons/UI_Icons/Achievements/Boss/colossus.png',
|
||||
"hierophant" = 'icons/UI_Icons/Achievements/Boss/hierophant.png',
|
||||
"legion" = 'icons/UI_Icons/Achievements/Boss/legion.png',
|
||||
"miner" = 'icons/UI_Icons/Achievements/Boss/miner.png',
|
||||
"swarmer" = 'icons/UI_Icons/Achievements/Boss/swarmer.png',
|
||||
"tendril" = 'icons/UI_Icons/Achievements/Boss/tendril.png',
|
||||
"featofstrength" = 'icons/UI_Icons/Achievements/Misc/featofstrength.png',
|
||||
"helbital" = 'icons/UI_Icons/Achievements/Misc/helbital.png',
|
||||
"jackpot" = 'icons/UI_Icons/Achievements/Misc/jackpot.png',
|
||||
"meteors" = 'icons/UI_Icons/Achievements/Misc/meteors.png',
|
||||
"timewaste" = 'icons/UI_Icons/Achievements/Misc/timewaste.png',
|
||||
"upgrade" = 'icons/UI_Icons/Achievements/Misc/upgrade.png',
|
||||
"clownking" = 'icons/UI_Icons/Achievements/Misc/clownking.png',
|
||||
"clownthanks" = 'icons/UI_Icons/Achievements/Misc/clownthanks.png',
|
||||
"rule8" = 'icons/UI_Icons/Achievements/Misc/rule8.png',
|
||||
"snail" = 'icons/UI_Icons/Achievements/Misc/snail.png',
|
||||
"mining" = 'icons/UI_Icons/Achievements/Skills/mining.png',
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/simple/pills
|
||||
name ="pills"
|
||||
assets = list(
|
||||
@@ -263,14 +236,6 @@
|
||||
var/datum/language/L = new path ()
|
||||
L.get_icon()
|
||||
|
||||
/datum/asset/spritesheet/pipes
|
||||
name = "pipes"
|
||||
|
||||
/datum/asset/spritesheet/pipes/register()
|
||||
for (var/each in list('icons/obj/atmospherics/pipes/pipe_item.dmi', 'icons/obj/atmospherics/pipes/disposal.dmi', 'icons/obj/atmospherics/pipes/transit_tube.dmi', 'icons/obj/plumbing/fluid_ducts.dmi'))
|
||||
InsertAll("", each, GLOB.alldirs)
|
||||
..()
|
||||
|
||||
// Representative icons for each research design
|
||||
/datum/asset/spritesheet/research_designs
|
||||
name = "design"
|
||||
|
||||
@@ -488,19 +488,19 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
/datum/asset/spritesheet/simple/minesweeper
|
||||
name = "minesweeper"
|
||||
assets = list(
|
||||
"1" = 'icons/UI_Icons/minesweeper_tiles/one.png',
|
||||
"2" = 'icons/UI_Icons/minesweeper_tiles/two.png',
|
||||
"3" = 'icons/UI_Icons/minesweeper_tiles/three.png',
|
||||
"4" = 'icons/UI_Icons/minesweeper_tiles/four.png',
|
||||
"5" = 'icons/UI_Icons/minesweeper_tiles/five.png',
|
||||
"6" = 'icons/UI_Icons/minesweeper_tiles/six.png',
|
||||
"7" = 'icons/UI_Icons/minesweeper_tiles/seven.png',
|
||||
"8" = 'icons/UI_Icons/minesweeper_tiles/eight.png',
|
||||
"empty" = 'icons/UI_Icons/minesweeper_tiles/empty.png',
|
||||
"flag" = 'icons/UI_Icons/minesweeper_tiles/flag.png',
|
||||
"hidden" = 'icons/UI_Icons/minesweeper_tiles/hidden.png',
|
||||
"mine" = 'icons/UI_Icons/minesweeper_tiles/mine.png',
|
||||
"minehit" = 'icons/UI_Icons/minesweeper_tiles/minehit.png'
|
||||
"1" = 'icons/UI_Icons/minesweeper_tiles//one.png',
|
||||
"2" = 'icons/UI_Icons/minesweeper_tiles//two.png',
|
||||
"3" = 'icons/UI_Icons/minesweeper_tiles//three.png',
|
||||
"4" = 'icons/UI_Icons/minesweeper_tiles//four.png',
|
||||
"5" = 'icons/UI_Icons/minesweeper_tiles//five.png',
|
||||
"6" = 'icons/UI_Icons/minesweeper_tiles//six.png',
|
||||
"7" = 'icons/UI_Icons/minesweeper_tiles//seven.png',
|
||||
"8" = 'icons/UI_Icons/minesweeper_tiles//eight.png',
|
||||
"empty" = 'icons/UI_Icons/minesweeper_tiles//empty.png',
|
||||
"flag" = 'icons/UI_Icons/minesweeper_tiles//flag.png',
|
||||
"hidden" = 'icons/UI_Icons/minesweeper_tiles//hidden.png',
|
||||
"mine" = 'icons/UI_Icons/minesweeper_tiles//mine.png',
|
||||
"minehit" = 'icons/UI_Icons/minesweeper_tiles//minehit.png'
|
||||
)
|
||||
|
||||
/datum/asset/spritesheet/simple/pills
|
||||
|
||||
@@ -20,9 +20,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
When somebody clicks a link in game, this Topic is called first.
|
||||
It does the stuff in this proc and then is redirected to the Topic() proc for the src=[0xWhatever]
|
||||
(if specified in the link). ie locate(hsrc).Topic()
|
||||
|
||||
Such links can be spoofed.
|
||||
|
||||
Because of this certain things MUST be considered whenever adding a Topic() for something:
|
||||
- Can it be fed harmful values which could cause runtimes?
|
||||
- Is the Topic call an admin-only thing?
|
||||
@@ -40,7 +38,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
var/asset_cache_job
|
||||
if(href_list["asset_cache_confirm_arrival"])
|
||||
asset_cache_job = asset_cache_confirm_arrival(href_list["asset_cache_confirm_arrival"])
|
||||
if (!asset_cache_job)
|
||||
if(!asset_cache_job)
|
||||
return
|
||||
|
||||
var/mtl = CONFIG_GET(number/minute_topic_limit)
|
||||
@@ -58,7 +56,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
topiclimiter[ADMINSWARNED_AT] = minute
|
||||
msg += " Administrators have been informed."
|
||||
log_game("[key_name(src)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [mtl] topic calls in a given game minute")
|
||||
to_chat(src, "<span class='danger'>[msg]</span>")
|
||||
return
|
||||
|
||||
@@ -105,11 +103,18 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
cmd_admin_pm(href_list["priv_msg"],null)
|
||||
return
|
||||
|
||||
// CITADEL Start - Mentor PM
|
||||
if (citadel_client_procs(href_list))
|
||||
return
|
||||
// CITADEL End
|
||||
|
||||
switch(href_list["_src_"])
|
||||
if("holder")
|
||||
hsrc = holder
|
||||
if("usr")
|
||||
hsrc = mob
|
||||
if("mentor") // CITADEL
|
||||
hsrc = mentor_datum // CITADEL END
|
||||
if("prefs")
|
||||
if (inprefs)
|
||||
return
|
||||
@@ -137,6 +142,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href=\"https://secure.byond.com/membership\">Click Here to find out more</a>.")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/*
|
||||
* Call back proc that should be checked in all paths where a client can send messages
|
||||
*
|
||||
@@ -255,11 +261,13 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
new /datum/admins(localhost_rank, ckey, 1, 1)
|
||||
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = GLOB.preferences_datums[ckey]
|
||||
|
||||
if(prefs)
|
||||
prefs.parent = src
|
||||
else
|
||||
prefs = new /datum/preferences(src)
|
||||
GLOB.preferences_datums[ckey] = prefs
|
||||
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
fps = prefs.clientfps
|
||||
@@ -297,16 +305,12 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
player_details = GLOB.player_details[ckey]
|
||||
player_details.byond_version = full_version
|
||||
else
|
||||
player_details = new(ckey)
|
||||
player_details = new
|
||||
player_details.byond_version = full_version
|
||||
GLOB.player_details[ckey] = player_details
|
||||
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
if (length(GLOB.stickybanadminexemptions))
|
||||
GLOB.stickybanadminexemptions -= ckey
|
||||
if (!length(GLOB.stickybanadminexemptions))
|
||||
restore_stickybans()
|
||||
|
||||
if (byond_version >= 512)
|
||||
if (!byond_build || byond_build < 1386)
|
||||
@@ -328,7 +332,6 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
|
||||
if(SSinput.initialized)
|
||||
set_macros()
|
||||
update_movement_keys()
|
||||
|
||||
chatOutput.start() // Starts the chat
|
||||
|
||||
@@ -341,13 +344,12 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
connection_timeofday = world.timeofday
|
||||
winset(src, null, "command=\".configure graphics-hwmode on\"")
|
||||
var/cev = CONFIG_GET(number/client_error_version)
|
||||
var/ceb = CONFIG_GET(number/client_error_build)
|
||||
var/cwv = CONFIG_GET(number/client_warn_version)
|
||||
if (byond_version < cev || (byond_version == cev && byond_build < ceb)) //Out of date client.
|
||||
if (byond_version < cev) //Out of date client.
|
||||
to_chat(src, "<span class='danger'><b>Your version of BYOND is too old:</b></span>")
|
||||
to_chat(src, CONFIG_GET(string/client_error_message))
|
||||
to_chat(src, "Your version: [byond_version].[byond_build]")
|
||||
to_chat(src, "Required version: [cev].[ceb] or later")
|
||||
to_chat(src, "Your version: [byond_version]")
|
||||
to_chat(src, "Required version: [cev] or later")
|
||||
to_chat(src, "Visit <a href=\"https://secure.byond.com/download\">BYOND's website</a> to get the latest version of BYOND.")
|
||||
if (connecting_admin)
|
||||
to_chat(src, "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade")
|
||||
@@ -397,7 +399,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
if (nnpa >= 0)
|
||||
message_admins("New user: [key_name_admin(src)] is connecting here for the first time.")
|
||||
if (CONFIG_GET(flag/irc_first_connection_alert))
|
||||
send2tgs_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
|
||||
send2irc_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
|
||||
else if (isnum(cached_player_age) && cached_player_age < nnpa)
|
||||
message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age==1?"":"s")]")
|
||||
if(CONFIG_GET(flag/use_account_age_for_jobs) && account_age >= 0)
|
||||
@@ -405,7 +407,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
if(account_age >= 0 && account_age < nnpa)
|
||||
message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
|
||||
if (CONFIG_GET(flag/irc_first_connection_alert))
|
||||
send2tgs_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
|
||||
send2irc_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
|
||||
get_message_output("watchlist entry", ckey)
|
||||
check_ip_intel()
|
||||
validate_key_in_db()
|
||||
@@ -466,17 +468,9 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
//////////////
|
||||
|
||||
/client/Del()
|
||||
if(!gc_destroyed)
|
||||
Destroy() //Clean up signals and timers.
|
||||
return ..()
|
||||
|
||||
/client/Destroy()
|
||||
GLOB.clients -= src
|
||||
GLOB.directory -= ckey
|
||||
log_access("Logout: [key_name(src)]")
|
||||
GLOB.ahelp_tickets.ClientLogout(src)
|
||||
if(credits)
|
||||
QDEL_LIST(credits)
|
||||
log_access("Logout: [key_name(src)]")
|
||||
if(holder)
|
||||
adminGreet(1)
|
||||
holder.owner = null
|
||||
@@ -497,13 +491,19 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
"Forever alone :("\
|
||||
)
|
||||
|
||||
send2tgs("Server", "[cheesy_message] (No admins online)")
|
||||
send2irc("Server", "[cheesy_message] (No admins online)")
|
||||
|
||||
GLOB.ahelp_tickets.ClientLogout(src)
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
QDEL_LIST_ASSOC_VAL(char_render_holders)
|
||||
if(movingmob != null)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
Master.UpdateTickRate()
|
||||
. = ..() //Even though we're going to be hard deleted there are still some things that want to know the destroy is happening
|
||||
return ..()
|
||||
|
||||
/client/Destroy()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/client/proc/set_client_age_from_db(connectiontopic)
|
||||
@@ -513,9 +513,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(src.ckey)
|
||||
var/datum/DBQuery/query_get_related_ip = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
|
||||
if(!query_get_related_ip.Execute())
|
||||
qdel(query_get_related_ip)
|
||||
return
|
||||
query_get_related_ip.Execute()
|
||||
related_accounts_ip = ""
|
||||
while(query_get_related_ip.NextRow())
|
||||
related_accounts_ip += "[query_get_related_ip.item[1]], "
|
||||
@@ -543,10 +541,10 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
qdel(query_client_in_db)
|
||||
return
|
||||
if(!query_client_in_db.NextRow())
|
||||
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey])
|
||||
if (CONFIG_GET(flag/panic_bunker) && !holder && !GLOB.deadmins[ckey] && !(ckey in GLOB.bunker_passthrough))
|
||||
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
to_chat(src, CONFIG_GET(string/panic_bunker_message))
|
||||
to_chat(src, "<span class='notice'>You must first join the Discord to verify your account before joining this server.<br>To do so, read the rules and post a request in the #station-access-requests channel under the \"Main server\" category in the Discord server linked here: <a href='https://discord.gg/E6SQuhz'>https://discord.gg/E6SQuhz</a><br>If you have already done so, wait a few minutes then try again; sometimes the server needs to fully load before you can join.</span>") //CIT CHANGE - makes the panic bunker disconnect message point to the discord
|
||||
var/list/connectiontopic_a = params2list(connectiontopic)
|
||||
var/list/panic_addr = CONFIG_GET(string/panic_server_address)
|
||||
if(panic_addr && !connectiontopic_a["redirect"])
|
||||
@@ -570,6 +568,8 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
if(!account_join_date)
|
||||
account_join_date = "Error"
|
||||
account_age = -1
|
||||
else if(ckey in GLOB.bunker_passthrough)
|
||||
GLOB.bunker_passthrough -= ckey
|
||||
qdel(query_client_in_db)
|
||||
var/datum/DBQuery/query_get_client_age = SSdbcore.NewQuery("SELECT firstseen, DATEDIFF(Now(),firstseen), accountjoindate, DATEDIFF(Now(),accountjoindate) FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
if(!query_get_client_age.Execute())
|
||||
@@ -693,7 +693,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
|
||||
if (!cidcheck_failedckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name(src)] has been detected as using a cid randomizer. Connection rejected.</span>")
|
||||
send2tgs_adminless_only("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
|
||||
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
|
||||
cidcheck_failedckeys[ckey] = TRUE
|
||||
note_randomizer_user()
|
||||
|
||||
@@ -704,7 +704,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
else
|
||||
if (cidcheck_failedckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after showing they removed their cid randomizer</span>")
|
||||
send2tgs_adminless_only("CidRandomizer", "[key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
|
||||
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
|
||||
cidcheck_failedckeys -= ckey
|
||||
if (cidcheck_spoofckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after appearing to have attempted to spoof a cid randomizer check because it <i>appears</i> they aren't spoofing one this time</span>")
|
||||
@@ -738,7 +738,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
var/sql_system_ckey = sanitizeSQL(system_ckey)
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
//check to see if we noted them in the last day.
|
||||
var/datum/DBQuery/query_get_notes = SSdbcore.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[sql_ckey]' AND adminckey = '[sql_system_ckey]' AND timestamp + INTERVAL 1 DAY < NOW() AND deleted = 0 AND (expire_timestamp > NOW() OR expire_timestamp IS NULL)")
|
||||
var/datum/DBQuery/query_get_notes = SSdbcore.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[sql_ckey]' AND adminckey = '[sql_system_ckey]' AND timestamp + INTERVAL 1 DAY < NOW() AND deleted = 0 AND expire_timestamp > NOW()")
|
||||
if(!query_get_notes.Execute())
|
||||
qdel(query_get_notes)
|
||||
return
|
||||
@@ -747,7 +747,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
return
|
||||
qdel(query_get_notes)
|
||||
//regardless of above, make sure their last note is not from us, as no point in repeating the same note over and over.
|
||||
query_get_notes = SSdbcore.NewQuery("SELECT adminckey FROM [format_table_name("messages")] WHERE targetckey = '[sql_ckey]' AND deleted = 0 AND (expire_timestamp > NOW() OR expire_timestamp IS NULL) ORDER BY timestamp DESC LIMIT 1")
|
||||
query_get_notes = SSdbcore.NewQuery("SELECT adminckey FROM [format_table_name("messages")] WHERE targetckey = '[sql_ckey]' AND deleted = 0 AND expire_timestamp > NOW() ORDER BY timestamp DESC LIMIT 1")
|
||||
if(!query_get_notes.Execute())
|
||||
qdel(query_get_notes)
|
||||
return
|
||||
@@ -767,19 +767,13 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
message_admins("<span class='adminnotice'>Proxy Detection: [key_name_admin(src)] IP intel rated [res.intel*100]% likely to be a Proxy/VPN.</span>")
|
||||
ip_intel = res.intel
|
||||
|
||||
/client/Click(atom/object, atom/location, control, params)
|
||||
/client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE)
|
||||
var/ab = FALSE
|
||||
var/list/L = params2list(params)
|
||||
|
||||
var/dragged = L["drag"]
|
||||
if(dragged && !L[dragged])
|
||||
return
|
||||
|
||||
if (object && object == middragatom && L["left"])
|
||||
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
|
||||
|
||||
var/mcl = CONFIG_GET(number/minute_click_limit)
|
||||
if (!holder && mcl)
|
||||
if (!holder && !ignore_spam && mcl)
|
||||
var/minute = round(world.time, 600)
|
||||
if (!clicklimiter)
|
||||
clicklimiter = new(LIMITER_SIZE)
|
||||
@@ -795,15 +789,16 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
msg += " Administrators have been informed."
|
||||
if (ab)
|
||||
log_game("[key_name(src)] is using the middle click aimbot exploit")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit</span>")
|
||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit</span>")
|
||||
add_system_note("aimbot", "Is using the middle click aimbot exploit")
|
||||
|
||||
log_game("[key_name(src)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
|
||||
to_chat(src, "<span class='danger'>[msg]</span>")
|
||||
return
|
||||
|
||||
var/scl = CONFIG_GET(number/second_click_limit)
|
||||
if (!holder && scl)
|
||||
if (!holder && !ignore_spam && scl)
|
||||
var/second = round(world.time, 10)
|
||||
if (!clicklimiter)
|
||||
clicklimiter = new(LIMITER_SIZE)
|
||||
@@ -815,15 +810,15 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
to_chat(src, "<span class='danger'>Your previous click was ignored because you've done too many in a second</span>")
|
||||
return
|
||||
|
||||
if(ab) //Citadel edit, things with stuff.
|
||||
return
|
||||
|
||||
if (prefs.hotkeys)
|
||||
// If hotkey mode is enabled, then clicking the map will automatically
|
||||
// unfocus the text bar. This removes the red color from the text bar
|
||||
// so that the visual focus indicator matches reality.
|
||||
winset(src, null, "input.background-color=[COLOR_INPUT_DISABLED]")
|
||||
|
||||
else
|
||||
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED]")
|
||||
|
||||
..()
|
||||
|
||||
/client/proc/add_verbs_from_config()
|
||||
@@ -859,18 +854,17 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
'html/browser/playeroptions.css',
|
||||
)
|
||||
spawn (10) //removing this spawn causes all clients to not get verbs.
|
||||
|
||||
//load info on what assets the client has
|
||||
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
|
||||
|
||||
//Precache the client with all other assets slowly, so as to not block other browse() calls
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/getFilesSlow, src, SSassets.preload, FALSE), 5 SECONDS)
|
||||
|
||||
getFilesSlow(src, SSassets.preload, register_asset = FALSE)
|
||||
#if (PRELOAD_RSC == 0)
|
||||
for (var/name in GLOB.vox_sounds)
|
||||
var/file = GLOB.vox_sounds[name]
|
||||
Export("##action=load_rsc", file)
|
||||
stoplag()
|
||||
for (var/name in GLOB.vox_sounds_male)
|
||||
var/file = GLOB.vox_sounds_male[name]
|
||||
Export("##action=load_rsc", file)
|
||||
stoplag()
|
||||
#endif
|
||||
|
||||
|
||||
@@ -900,29 +894,15 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
y = clamp(y+change, min,max)
|
||||
change_view("[x]x[y]")
|
||||
|
||||
/client/proc/update_movement_keys(datum/preferences/direct_prefs)
|
||||
var/datum/preferences/D = prefs || direct_prefs
|
||||
if(!D?.key_bindings)
|
||||
return
|
||||
movement_keys = list()
|
||||
for(var/key in D.key_bindings)
|
||||
for(var/kb_name in D.key_bindings[key])
|
||||
switch(kb_name)
|
||||
if("North")
|
||||
movement_keys[key] = NORTH
|
||||
if("East")
|
||||
movement_keys[key] = EAST
|
||||
if("West")
|
||||
movement_keys[key] = WEST
|
||||
if("South")
|
||||
movement_keys[key] = SOUTH
|
||||
|
||||
/client/proc/change_view(new_size)
|
||||
if (isnull(new_size))
|
||||
CRASH("change_view called without argument.")
|
||||
|
||||
if(prefs && !prefs.widescreenpref && new_size == CONFIG_GET(string/default_view))
|
||||
new_size = CONFIG_GET(string/default_view_square)
|
||||
//CIT CHANGES START HERE - makes change_view change DEFAULT_VIEW to 15x15 depending on preferences
|
||||
if(prefs && CONFIG_GET(string/default_view))
|
||||
if(!prefs.widescreenpref && new_size == CONFIG_GET(string/default_view))
|
||||
new_size = "15x15"
|
||||
//END OF CIT CHANGES
|
||||
|
||||
view = new_size
|
||||
apply_clickcatcher()
|
||||
@@ -931,7 +911,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
var/mob/living/M = mob
|
||||
M.update_damage_hud()
|
||||
if (prefs.auto_fit_viewport)
|
||||
addtimer(CALLBACK(src,.verb/fit_viewport,10)) //Delayed to avoid wingets from Login calls.
|
||||
fit_viewport()
|
||||
|
||||
/client/proc/generate_clickcatcher()
|
||||
if(!void)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
max_occurrences = 1
|
||||
min_players = 10
|
||||
earliest_start = 30 MINUTES
|
||||
gamemode_blacklist = list("nuclear")
|
||||
gamemode_blacklist = list("nuclear","dynamic")
|
||||
|
||||
/datum/round_event_control/pirates/preRunEvent()
|
||||
if (!SSmapping.empty_space)
|
||||
@@ -15,9 +15,8 @@
|
||||
|
||||
/datum/round_event/pirates
|
||||
startWhen = 60 //2 minutes to answer
|
||||
var/datum/comm_message/threat
|
||||
var/datum/comm_message/threat_message
|
||||
var/payoff = 0
|
||||
var/payoff_min = 20000
|
||||
var/paid_off = FALSE
|
||||
var/ship_name = "Space Privateers Association"
|
||||
var/shuttle_spawned = FALSE
|
||||
@@ -26,38 +25,30 @@
|
||||
ship_name = pick(strings(PIRATE_NAMES_FILE, "ship_names"))
|
||||
|
||||
/datum/round_event/pirates/announce(fake)
|
||||
priority_announce("Incoming subspace communication. Secure channel opened at all communication consoles.", "Incoming Message", 'sound/ai/commandreport.ogg')
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "commandreport") // CITADEL EDIT metabreak
|
||||
if(fake)
|
||||
return
|
||||
threat = new
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
payoff = max(payoff_min, FLOOR(D.account_balance * 0.80, 1000))
|
||||
threat.title = "Business proposition"
|
||||
threat.content = "This is [ship_name]. Pay up [payoff] credits or you'll walk the plank."
|
||||
threat.possible_answers = list("We'll pay.","No way.")
|
||||
threat.answer_callback = CALLBACK(src,.proc/answered)
|
||||
SScommunications.send_message(threat,unique = TRUE)
|
||||
threat_message = new
|
||||
payoff = round(SSshuttle.points * 0.80)
|
||||
threat_message.title = "Business proposition"
|
||||
threat_message.content = "This is [ship_name]. Pay up [payoff] credits or you'll walk the plank."
|
||||
threat_message.possible_answers = list("We'll pay.","No way.")
|
||||
threat_message.answer_callback = CALLBACK(src,.proc/answered)
|
||||
SScommunications.send_message(threat_message,unique = TRUE)
|
||||
|
||||
/datum/round_event/pirates/proc/answered()
|
||||
if(threat && threat.answered == 1)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
if(D.adjust_money(-payoff))
|
||||
priority_announce("Thanks for the credits, landlubbers.", sender_override = ship_name)
|
||||
paid_off = TRUE
|
||||
return
|
||||
else
|
||||
priority_announce("Trying to cheat us? You'll regret this!", sender_override = ship_name)
|
||||
if(threat_message && threat_message.answered == 1)
|
||||
if(SSshuttle.points >= payoff)
|
||||
SSshuttle.points -= payoff
|
||||
priority_announce("Thanks for the credits, landlubbers.",sender_override = ship_name)
|
||||
paid_off = TRUE
|
||||
return
|
||||
else
|
||||
priority_announce("Trying to cheat us? You'll regret this!",sender_override = ship_name)
|
||||
if(!shuttle_spawned)
|
||||
spawn_shuttle()
|
||||
else
|
||||
priority_announce("Too late to beg for mercy!", sender_override = ship_name)
|
||||
|
||||
/datum/round_event/pirates/start()
|
||||
if(threat && !threat.answered)
|
||||
threat.possible_answers = list("Too late")
|
||||
threat.answered = 1
|
||||
if(!paid_off && !shuttle_spawned)
|
||||
spawn_shuttle()
|
||||
|
||||
@@ -68,8 +59,8 @@
|
||||
shuffle_inplace(candidates)
|
||||
|
||||
var/datum/map_template/shuttle/pirate/default/ship = new
|
||||
var/x = rand(TRANSITIONEDGE, world.maxx - TRANSITIONEDGE - ship.width)
|
||||
var/y = rand(TRANSITIONEDGE, world.maxy - TRANSITIONEDGE - ship.height)
|
||||
var/x = rand(TRANSITIONEDGE,world.maxx - TRANSITIONEDGE - ship.width)
|
||||
var/y = rand(TRANSITIONEDGE,world.maxy - TRANSITIONEDGE - ship.height)
|
||||
var/z = SSmapping.empty_space.z_value
|
||||
var/turf/T = locate(x,y,z)
|
||||
if(!T)
|
||||
@@ -77,18 +68,16 @@
|
||||
|
||||
if(!ship.load(T))
|
||||
CRASH("Loading pirate ship failed!")
|
||||
|
||||
for(var/turf/A in ship.get_affected_turfs(T))
|
||||
for(var/obj/effect/mob_spawn/human/pirate/spawner in A)
|
||||
if(candidates.len > 0)
|
||||
var/mob/M = candidates[1]
|
||||
spawner.create(M.ckey)
|
||||
candidates -= M
|
||||
announce_to_ghosts(M)
|
||||
else
|
||||
announce_to_ghosts(spawner)
|
||||
notify_ghosts("Space pirates are waking up!", source = spawner, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_dnr_observers = TRUE)
|
||||
|
||||
priority_announce("Unidentified armed ship detected near the station.")
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "commandreport") //CITADEL EDIT also metabreak here too
|
||||
|
||||
//Shuttle equipment
|
||||
|
||||
@@ -105,16 +94,16 @@
|
||||
|
||||
/obj/machinery/shuttle_scrambler/Initialize(mapload)
|
||||
. = ..()
|
||||
gps = new/obj/item/gps/internal/pirate(src)
|
||||
gps.tracking = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/shuttle_scrambler/process()
|
||||
if(active)
|
||||
if(is_station_level(z))
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
var/siphoned = min(D.account_balance,siphon_per_tick)
|
||||
D.adjust_money(-siphoned)
|
||||
credits_stored += siphoned
|
||||
var/siphoned = min(SSshuttle.points,siphon_per_tick)
|
||||
SSshuttle.points -= siphoned
|
||||
credits_stored += siphoned
|
||||
interrupt_research()
|
||||
else
|
||||
return
|
||||
@@ -133,7 +122,7 @@
|
||||
if(!active)
|
||||
if(alert(user, "Turning the scrambler on will make the shuttle trackable by GPS. Are you sure you want to do it?", "Scrambler", "Yes", "Cancel") == "Cancel")
|
||||
return
|
||||
if(active || !user.canUseTopic(src, BE_CLOSE))
|
||||
if(active || !user.canUseTopic(src))
|
||||
return
|
||||
toggle_on(user)
|
||||
update_icon()
|
||||
@@ -150,12 +139,14 @@
|
||||
new /obj/effect/temp_visual/emp(get_turf(S))
|
||||
|
||||
/obj/machinery/shuttle_scrambler/proc/dump_loot(mob/user)
|
||||
if(credits_stored) // Prevents spamming empty holochips
|
||||
new /obj/item/holochip(drop_location(), credits_stored)
|
||||
if(credits_stored < 200)
|
||||
to_chat(user,"<span class='notice'>Not enough credits to retrieve.</span>")
|
||||
return
|
||||
while(credits_stored >= 200)
|
||||
new /obj/item/stack/spacecash/c200(drop_location())
|
||||
credits_stored -= 200
|
||||
to_chat(user,"<span class='notice'>You retrieve the siphoned credits!</span>")
|
||||
credits_stored = 0
|
||||
else
|
||||
to_chat(user,"<span class='notice'>There's nothing to withdraw.</span>")
|
||||
|
||||
/obj/machinery/shuttle_scrambler/proc/send_notification()
|
||||
priority_announce("Data theft signal detected, source registered on local gps units.")
|
||||
@@ -180,6 +171,7 @@
|
||||
/obj/item/gps/internal/pirate
|
||||
gpstag = "Nautical Signal"
|
||||
desc = "You can hear shanties over the static."
|
||||
|
||||
/obj/machinery/computer/shuttle/pirate
|
||||
name = "pirate shuttle console"
|
||||
shuttleId = "pirateship"
|
||||
@@ -203,7 +195,27 @@
|
||||
/obj/docking_port/mobile/pirate
|
||||
name = "pirate shuttle"
|
||||
id = "pirateship"
|
||||
rechargeTime = 3 MINUTES
|
||||
var/engines_cooling = FALSE
|
||||
var/engine_cooldown = 3 MINUTES
|
||||
|
||||
/obj/docking_port/mobile/pirate/getStatusText()
|
||||
. = ..()
|
||||
if(engines_cooling)
|
||||
return "[.] - Engines cooling."
|
||||
|
||||
/obj/docking_port/mobile/pirate/initiate_docking(obj/docking_port/stationary/new_dock, movement_direction, force=FALSE)
|
||||
. = ..()
|
||||
if(. == DOCKING_SUCCESS && !is_reserved_level(new_dock.z))
|
||||
engines_cooling = TRUE
|
||||
addtimer(CALLBACK(src,.proc/reset_cooldown),engine_cooldown,TIMER_UNIQUE)
|
||||
|
||||
/obj/docking_port/mobile/pirate/proc/reset_cooldown()
|
||||
engines_cooling = FALSE
|
||||
|
||||
/obj/docking_port/mobile/pirate/canMove()
|
||||
if(engines_cooling)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/suit_storage_unit/pirate
|
||||
suit_type = /obj/item/clothing/suit/space
|
||||
@@ -211,11 +223,13 @@
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
storage_type = /obj/item/tank/internals/oxygen
|
||||
|
||||
|
||||
/obj/machinery/loot_locator
|
||||
name = "Booty Locator"
|
||||
desc = "This sophisticated machine scans the nearby space for items of value."
|
||||
icon = 'icons/obj/machines/research.dmi'
|
||||
icon_state = "tdoppler"
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
density = TRUE
|
||||
var/cooldown = 300
|
||||
var/next_use = 0
|
||||
@@ -249,13 +263,13 @@
|
||||
name = "cargo hold pad"
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "lpad-idle-o"
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
var/idle_state = "lpad-idle-o"
|
||||
var/warmup_state = "lpad-idle"
|
||||
var/sending_state = "lpad-beam"
|
||||
var/cargo_hold_id
|
||||
|
||||
/obj/machinery/piratepad/multitool_act(mob/living/user, obj/item/multitool/I)
|
||||
. = ..()
|
||||
if (istype(I))
|
||||
to_chat(user, "<span class='notice'>You register [src] in [I]s buffer.</span>")
|
||||
I.buffer = src
|
||||
@@ -279,7 +293,6 @@
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/computer/piratepad_control/multitool_act(mob/living/user, obj/item/multitool/I)
|
||||
. = ..()
|
||||
if (istype(I) && istype(I.buffer,/obj/machinery/piratepad))
|
||||
to_chat(user, "<span class='notice'>You link [src] with [I.buffer] in [I] buffer.</span>")
|
||||
pad = I.buffer
|
||||
@@ -330,7 +343,6 @@
|
||||
/obj/machinery/computer/piratepad_control/proc/recalc()
|
||||
if(sending)
|
||||
return
|
||||
|
||||
status_report = "Predicted value: "
|
||||
var/value = 0
|
||||
var/datum/export_report/ex = new
|
||||
@@ -381,7 +393,6 @@
|
||||
|
||||
if(!value)
|
||||
status_report += "Nothing"
|
||||
|
||||
pad.visible_message("<span class='notice'>[pad] activates!</span>")
|
||||
flick(pad.sending_state,pad)
|
||||
pad.icon_state = pad.idle_state
|
||||
@@ -400,7 +411,7 @@
|
||||
if(!sending)
|
||||
return
|
||||
sending = FALSE
|
||||
status_report = "Ready for delivery."
|
||||
status_report = "Idle"
|
||||
pad.icon_state = pad.idle_state
|
||||
deltimer(sending_timer)
|
||||
|
||||
@@ -456,11 +467,3 @@
|
||||
var/obj/item/stack/spacecash/C = O
|
||||
return ..() * C.amount * C.value
|
||||
|
||||
/datum/export/pirate/holochip
|
||||
cost = 1
|
||||
unit_name = "holochip"
|
||||
export_types = list(/obj/item/holochip)
|
||||
|
||||
/datum/export/pirate/holochip/get_cost(atom/movable/AM)
|
||||
var/obj/item/holochip/H = AM
|
||||
return H.credits
|
||||
|
||||
@@ -121,7 +121,7 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker
|
||||
force_connect = TRUE
|
||||
var/points = 0 //The unclaimed value of ore stacked.
|
||||
damage_deflection = 21
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
|
||||
points += inp.point_value * inp.amount
|
||||
..()
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
icon_state = "mining"
|
||||
density = TRUE
|
||||
circuit = /obj/item/circuitboard/machine/mining_equipment_vendor
|
||||
ui_x = 425
|
||||
ui_y = 600
|
||||
var/icon_deny = "mining-deny"
|
||||
var/obj/item/card/id/inserted_id
|
||||
var/list/prize_list = list( //if you add something to this, please, for the love of god, sort it by price/type. use tabs and not spaces.
|
||||
@@ -83,9 +85,14 @@
|
||||
src.equipment_path = path
|
||||
src.cost = cost
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
/obj/machinery/mineral/equipment_vendor/Initialize()
|
||||
. = ..()
|
||||
build_inventory()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/proc/build_inventory()
|
||||
for(var/p in prize_list)
|
||||
var/datum/data/mining_equipment/M = p
|
||||
GLOB.vending_products[M.equipment_path] = 1
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon_state()
|
||||
if(powered())
|
||||
@@ -110,39 +117,65 @@
|
||||
. = list()
|
||||
.["product_records"] = list()
|
||||
for(var/datum/data/mining_equipment/prize in prize_list)
|
||||
dat += "<tr><td>[prize.equipment_name]</td><td>[prize.cost]</td><td><A href='?src=[REF(src)];purchase=[REF(prize)]'>Purchase</A></td></tr>"
|
||||
dat += "</table>"
|
||||
var/list/product_data = list(
|
||||
path = replacetext(replacetext("[prize.equipment_path]", "/obj/item/", ""), "/", "-"),
|
||||
name = prize.equipment_name,
|
||||
price = prize.cost,
|
||||
ref = REF(prize)
|
||||
)
|
||||
.["product_records"] += list(product_data)
|
||||
|
||||
var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350)
|
||||
popup.set_content(dat.Join())
|
||||
popup.open()
|
||||
return
|
||||
/obj/machinery/mineral/equipment_vendor/ui_data(mob/user)
|
||||
. = list()
|
||||
var/mob/living/carbon/human/H
|
||||
var/obj/item/card/id/C
|
||||
if(ishuman(user))
|
||||
H = user
|
||||
C = H.get_idcard(TRUE)
|
||||
if(C)
|
||||
.["user"] = list()
|
||||
.["user"]["points"] = C.mining_points
|
||||
if(C.assignment)
|
||||
.["user"]["job"] = C.assignment
|
||||
else
|
||||
.["user"]["job"] = "No Job"
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
|
||||
/obj/machinery/mineral/equipment_vendor/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(href_list["purchase"])
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(istype(I))
|
||||
var/datum/data/mining_equipment/prize = locate(href_list["purchase"]) in prize_list
|
||||
if (!prize || !(prize in prize_list))
|
||||
to_chat(usr, "<span class='warning'>Error: Invalid choice!</span>")
|
||||
|
||||
switch(action)
|
||||
if("purchase")
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(!istype(I))
|
||||
to_chat(usr, "<span class='alert'>Error: An ID is required!</span>")
|
||||
flick(icon_deny, src)
|
||||
return
|
||||
var/datum/data/mining_equipment/prize = locate(params["ref"]) in prize_list
|
||||
if(!prize || !(prize in prize_list))
|
||||
to_chat(usr, "<span class='alert'>Error: Invalid choice!</span>")
|
||||
flick(icon_deny, src)
|
||||
return
|
||||
if(prize.cost > I.mining_points)
|
||||
to_chat(usr, "<span class='warning'>Error: Insufficient credits for [prize.equipment_name] on [I]!</span>")
|
||||
to_chat(usr, "<span class='alert'>Error: Insufficient points for [prize.equipment_name] on [I]!</span>")
|
||||
flick(icon_deny, src)
|
||||
else
|
||||
I.mining_points -= prize.cost
|
||||
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
|
||||
new prize.equipment_path(src.loc)
|
||||
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Error: An ID with a registered account is required!</span>")
|
||||
flick(icon_deny, src)
|
||||
updateUsrDialog()
|
||||
return
|
||||
return
|
||||
I.mining_points -= prize.cost
|
||||
to_chat(usr, "<span class='notice'>[src] clanks to life briefly before vending [prize.equipment_name]!</span>")
|
||||
new prize.equipment_path(loc)
|
||||
SSblackbox.record_feedback("nested tally", "mining_equipment_bought", 1, list("[type]", "[prize.equipment_path]"))
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/mining_voucher))
|
||||
RedeemVoucher(I, user)
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/mining_voucher))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
var/list/cyborg_data = list(
|
||||
name = R.name,
|
||||
locked_down = R.lockcharge,
|
||||
locked_down = R.locked_down,
|
||||
status = R.stat,
|
||||
shell_discon = shell,
|
||||
charge = R.cell ? round(R.cell.percent()) : null,
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
var/nopower_state = "dispenser_nopower"
|
||||
var/has_panel_overlay = TRUE
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
//dispensable_reagents is copypasted in plumbing synthesizers. Please update accordingly. (I didn't make it global because that would limit custom chem dispensers)
|
||||
var/list/dispensable_reagents = list(
|
||||
/datum/reagent/hydrogen,
|
||||
/datum/reagent/lithium,
|
||||
|
||||
Reference in New Issue
Block a user