mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-14 01:19:04 +01:00
Fix EOL issues
This commit is contained in:
+1038
-1037
File diff suppressed because it is too large
Load Diff
+2993
-2992
File diff suppressed because it is too large
Load Diff
+1455
-1454
File diff suppressed because it is too large
Load Diff
@@ -1,206 +1,207 @@
|
||||
#define MAX_EMAG_ROCKETS 8
|
||||
#define BEACON_COST 5000
|
||||
#define SP_LINKED 1
|
||||
#define SP_READY 2
|
||||
#define SP_LAUNCH 3
|
||||
#define SP_UNLINK 4
|
||||
#define SP_UNREADY 5
|
||||
|
||||
/obj/machinery/computer/cargo/express
|
||||
name = "express supply console"
|
||||
desc = "This console allows the user to purchase a package \
|
||||
with 1/40th of the delivery time: made possible by Kinaris's new \"1500mm Orbital Railgun\".\
|
||||
All sales are near instantaneous - please choose carefully"
|
||||
icon_screen = "supply_express"
|
||||
circuit = /obj/item/circuitboard/computer/cargo/express
|
||||
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
|
||||
var/obj/item/supplypod_beacon/beacon //the linked supplypod beacon
|
||||
var/area/landingzone = /area/quartermaster/storage //where we droppin boys
|
||||
var/podType = /obj/structure/closet/supplypod
|
||||
var/cooldown = 0 //cooldown to prevent printing supplypod beacon spam
|
||||
var/locked = TRUE //is the console locked? unlock with ID
|
||||
var/usingBeacon = FALSE //is the console in beacon mode? exists to let beacon know when a pod may come in
|
||||
|
||||
/obj/machinery/computer/cargo/express/Initialize()
|
||||
. = ..()
|
||||
packin_up()
|
||||
|
||||
/obj/machinery/computer/cargo/express/Destroy()
|
||||
if(beacon)
|
||||
beacon.unlink_console()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params)
|
||||
if((istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) && allowed(user))
|
||||
locked = !locked
|
||||
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
|
||||
to_chat(user, "<span class='notice'>You insert the disk into [src], allowing for advanced supply delivery vehicles.</span>")
|
||||
qdel(W)
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/supplypod_beacon))
|
||||
var/obj/item/supplypod_beacon/sb = W
|
||||
if (sb.express_console != src)
|
||||
sb.link_console(src, user)
|
||||
return TRUE
|
||||
else
|
||||
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
|
||||
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?
|
||||
for(var/pack in SSshuttle.supply_packs) // our quartermaster taught us not to be ashamed of our supply packs
|
||||
var/datum/supply_pack/P = SSshuttle.supply_packs[pack] // specially since they're such a good price and all
|
||||
if(!meme_pack_data[P.group]) // yeah, I see that, your quartermaster gave you good advice
|
||||
meme_pack_data[P.group] = list( // it gets cheaper when I return it
|
||||
"name" = P.group, // mmhm
|
||||
"packs" = list() // sometimes, I return it so much, I rip the manifest
|
||||
) // see, my quartermaster taught me a few things too
|
||||
if((P.hidden) || (P.special)) // like, how not to rip the manifest
|
||||
continue// by using someone else's crate
|
||||
if(!(obj_flags & EMAGGED) && P.contraband) // will you show me?
|
||||
continue // i'd be right happy to
|
||||
meme_pack_data[P.group]["packs"] += list(list(
|
||||
"name" = P.name,
|
||||
"cost" = P.cost,
|
||||
"id" = pack,
|
||||
"desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name.
|
||||
))
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_interact(mob/living/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "cargo_express", name, 600, 700, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/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()
|
||||
data["locked"] = locked//swipe an ID to unlock
|
||||
data["siliconUser"] = user.has_unlimited_silicon_privilege
|
||||
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 && 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)
|
||||
message = blockade_warning
|
||||
if(usingBeacon && !beacon)
|
||||
message = "BEACON ERROR: BEACON MISSING"//beacon was destroyed
|
||||
else if (usingBeacon && !canBeacon)
|
||||
message = "BEACON ERROR: MUST BE EXPOSED"//beacon's loc/user's loc must be a turf
|
||||
if(obj_flags & EMAGGED)
|
||||
message = "(&!#@ERROR: ROUTING_#PROTOCOL MALF(*CT#ON. $UG%ESTE@ ACT#0N: !^/PULS3-%E)ET CIR*)ITB%ARD."
|
||||
data["message"] = message
|
||||
if(!meme_pack_data)
|
||||
packin_up()
|
||||
stack_trace("You didn't give the cargo tech good advice, and he ripped the manifest. As a result, there was no pack data for [src]")
|
||||
data["supplies"] = meme_pack_data
|
||||
if (cooldown > 0)//cooldown used for printing beacons
|
||||
cooldown--
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui)
|
||||
switch(action)
|
||||
if("LZCargo")
|
||||
usingBeacon = FALSE
|
||||
if (beacon)
|
||||
beacon.update_status(SP_UNREADY) //ready light on beacon will turn off
|
||||
if("LZBeacon")
|
||||
usingBeacon = TRUE
|
||||
if (beacon)
|
||||
beacon.update_status(SP_READY) //turns on the beacon's ready light
|
||||
if("printBeacon")
|
||||
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"])
|
||||
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
|
||||
if(!istype(pack))
|
||||
return
|
||||
var/name = "*None Provided*"
|
||||
var/rank = "*None Provided*"
|
||||
var/ckey = usr.ckey
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
name = H.get_authentification_name()
|
||||
rank = H.get_assignment(hand_first = TRUE)
|
||||
else if(issilicon(usr))
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
var/reason = ""
|
||||
var/list/empty_turfs
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
if(SO.pack.cost <= SSshuttle.points)
|
||||
var/LZ
|
||||
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
|
||||
LZ = get_turf(beacon)
|
||||
beacon.update_status(SP_LAUNCH)
|
||||
else if (!usingBeacon)//find a suitable supplypod landing zone in cargobay
|
||||
landingzone = GLOB.areas_by_type[/area/quartermaster/storage]
|
||||
if (!landingzone)
|
||||
WARNING("[src] couldnt find a Quartermaster/Storage (aka cargobay) area on the station, and as such it has set the supplypod landingzone to the area it resides in.")
|
||||
landingzone = get_area(src)
|
||||
for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone
|
||||
if(is_blocked_turf(T))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
LZ = pick(empty_turfs)
|
||||
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
|
||||
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
else
|
||||
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))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
|
||||
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/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
CHECK_TICK
|
||||
#define MAX_EMAG_ROCKETS 8
|
||||
#define BEACON_COST 5000
|
||||
#define SP_LINKED 1
|
||||
#define SP_READY 2
|
||||
#define SP_LAUNCH 3
|
||||
#define SP_UNLINK 4
|
||||
#define SP_UNREADY 5
|
||||
|
||||
/obj/machinery/computer/cargo/express
|
||||
name = "express supply console"
|
||||
desc = "This console allows the user to purchase a package \
|
||||
with 1/40th of the delivery time: made possible by Kinaris's new \"1500mm Orbital Railgun\".\
|
||||
All sales are near instantaneous - please choose carefully"
|
||||
icon_screen = "supply_express"
|
||||
circuit = /obj/item/circuitboard/computer/cargo/express
|
||||
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
|
||||
var/obj/item/supplypod_beacon/beacon //the linked supplypod beacon
|
||||
var/area/landingzone = /area/quartermaster/storage //where we droppin boys
|
||||
var/podType = /obj/structure/closet/supplypod
|
||||
var/cooldown = 0 //cooldown to prevent printing supplypod beacon spam
|
||||
var/locked = TRUE //is the console locked? unlock with ID
|
||||
var/usingBeacon = FALSE //is the console in beacon mode? exists to let beacon know when a pod may come in
|
||||
|
||||
/obj/machinery/computer/cargo/express/Initialize()
|
||||
. = ..()
|
||||
packin_up()
|
||||
|
||||
/obj/machinery/computer/cargo/express/Destroy()
|
||||
if(beacon)
|
||||
beacon.unlink_console()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params)
|
||||
if((istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) && allowed(user))
|
||||
locked = !locked
|
||||
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
|
||||
to_chat(user, "<span class='notice'>You insert the disk into [src], allowing for advanced supply delivery vehicles.</span>")
|
||||
qdel(W)
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/supplypod_beacon))
|
||||
var/obj/item/supplypod_beacon/sb = W
|
||||
if (sb.express_console != src)
|
||||
sb.link_console(src, user)
|
||||
return TRUE
|
||||
else
|
||||
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
|
||||
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?
|
||||
for(var/pack in SSshuttle.supply_packs) // our quartermaster taught us not to be ashamed of our supply packs
|
||||
var/datum/supply_pack/P = SSshuttle.supply_packs[pack] // specially since they're such a good price and all
|
||||
if(!meme_pack_data[P.group]) // yeah, I see that, your quartermaster gave you good advice
|
||||
meme_pack_data[P.group] = list( // it gets cheaper when I return it
|
||||
"name" = P.group, // mmhm
|
||||
"packs" = list() // sometimes, I return it so much, I rip the manifest
|
||||
) // see, my quartermaster taught me a few things too
|
||||
if((P.hidden) || (P.special)) // like, how not to rip the manifest
|
||||
continue// by using someone else's crate
|
||||
if(!(obj_flags & EMAGGED) && P.contraband) // will you show me?
|
||||
continue // i'd be right happy to
|
||||
meme_pack_data[P.group]["packs"] += list(list(
|
||||
"name" = P.name,
|
||||
"cost" = P.cost,
|
||||
"id" = pack,
|
||||
"desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name.
|
||||
))
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_interact(mob/living/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "cargo_express", name, 600, 700, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/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()
|
||||
data["locked"] = locked//swipe an ID to unlock
|
||||
data["siliconUser"] = user.has_unlimited_silicon_privilege
|
||||
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 && 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)
|
||||
message = blockade_warning
|
||||
if(usingBeacon && !beacon)
|
||||
message = "BEACON ERROR: BEACON MISSING"//beacon was destroyed
|
||||
else if (usingBeacon && !canBeacon)
|
||||
message = "BEACON ERROR: MUST BE EXPOSED"//beacon's loc/user's loc must be a turf
|
||||
if(obj_flags & EMAGGED)
|
||||
message = "(&!#@ERROR: ROUTING_#PROTOCOL MALF(*CT#ON. $UG%ESTE@ ACT#0N: !^/PULS3-%E)ET CIR*)ITB%ARD."
|
||||
data["message"] = message
|
||||
if(!meme_pack_data)
|
||||
packin_up()
|
||||
stack_trace("You didn't give the cargo tech good advice, and he ripped the manifest. As a result, there was no pack data for [src]")
|
||||
data["supplies"] = meme_pack_data
|
||||
if (cooldown > 0)//cooldown used for printing beacons
|
||||
cooldown--
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui)
|
||||
switch(action)
|
||||
if("LZCargo")
|
||||
usingBeacon = FALSE
|
||||
if (beacon)
|
||||
beacon.update_status(SP_UNREADY) //ready light on beacon will turn off
|
||||
if("LZBeacon")
|
||||
usingBeacon = TRUE
|
||||
if (beacon)
|
||||
beacon.update_status(SP_READY) //turns on the beacon's ready light
|
||||
if("printBeacon")
|
||||
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"])
|
||||
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
|
||||
if(!istype(pack))
|
||||
return
|
||||
var/name = "*None Provided*"
|
||||
var/rank = "*None Provided*"
|
||||
var/ckey = usr.ckey
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
name = H.get_authentification_name()
|
||||
rank = H.get_assignment(hand_first = TRUE)
|
||||
else if(issilicon(usr))
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
var/reason = ""
|
||||
var/list/empty_turfs
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
if(SO.pack.cost <= SSshuttle.points)
|
||||
var/LZ
|
||||
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
|
||||
LZ = get_turf(beacon)
|
||||
beacon.update_status(SP_LAUNCH)
|
||||
else if (!usingBeacon)//find a suitable supplypod landing zone in cargobay
|
||||
landingzone = GLOB.areas_by_type[/area/quartermaster/storage]
|
||||
if (!landingzone)
|
||||
WARNING("[src] couldnt find a Quartermaster/Storage (aka cargobay) area on the station, and as such it has set the supplypod landingzone to the area it resides in.")
|
||||
landingzone = get_area(src)
|
||||
for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone
|
||||
if(is_blocked_turf(T))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
LZ = pick(empty_turfs)
|
||||
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
|
||||
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
else
|
||||
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))
|
||||
continue
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
|
||||
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/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
CHECK_TICK
|
||||
|
||||
|
||||
@@ -310,3 +310,4 @@
|
||||
icon_state = "cargodisk"
|
||||
item_state = "card-id"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
|
||||
@@ -1,167 +1,168 @@
|
||||
/*
|
||||
Immovable rod random event.
|
||||
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
|
||||
Everything solid in the way will be ex_act()'d
|
||||
In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
|
||||
--NEOFite
|
||||
*/
|
||||
|
||||
/datum/round_event_control/immovable_rod
|
||||
name = "Immovable Rod"
|
||||
typepath = /datum/round_event/immovable_rod
|
||||
min_players = 15
|
||||
max_occurrences = 5
|
||||
var/atom/special_target
|
||||
|
||||
|
||||
/datum/round_event_control/immovable_rod/admin_setup()
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/aimed = alert("Aimed at current location?","Sniperod", "Yes", "No")
|
||||
if(aimed == "Yes")
|
||||
special_target = get_turf(usr)
|
||||
|
||||
/datum/round_event/immovable_rod
|
||||
announceWhen = 5
|
||||
|
||||
/datum/round_event/immovable_rod/announce(fake)
|
||||
priority_announce("What the fuck was that?!", "General Alert")
|
||||
|
||||
/datum/round_event/immovable_rod/start()
|
||||
var/datum/round_event_control/immovable_rod/C = control
|
||||
var/startside = pick(GLOB.cardinals)
|
||||
var/z = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
var/turf/startT = spaceDebrisStartLoc(startside, z)
|
||||
var/turf/endT = spaceDebrisFinishLoc(startside, z)
|
||||
new /obj/effect/immovablerod(startT, endT, C.special_target)
|
||||
|
||||
/obj/effect/immovablerod
|
||||
name = "immovable rod"
|
||||
desc = "What the fuck is that?"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "immrod"
|
||||
throwforce = 100
|
||||
move_force = INFINITY
|
||||
move_resist = INFINITY
|
||||
pull_force = INFINITY
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
var/mob/living/wizard
|
||||
var/z_original = 0
|
||||
var/destination
|
||||
var/notify = TRUE
|
||||
var/atom/special_target
|
||||
|
||||
/obj/effect/immovablerod/New(atom/start, atom/end, aimed_at)
|
||||
..()
|
||||
SSaugury.register_doom(src, 2000)
|
||||
z_original = z
|
||||
destination = end
|
||||
special_target = aimed_at
|
||||
if(notify)
|
||||
notify_ghosts("\A [src] is inbound!",
|
||||
enter_link="<a href=?src=[REF(src)];orbit=1>(Click to orbit)</a>",
|
||||
source=src, action=NOTIFY_ORBIT)
|
||||
GLOB.poi_list += src
|
||||
|
||||
var/special_target_valid = FALSE
|
||||
if(special_target)
|
||||
var/turf/T = get_turf(special_target)
|
||||
if(T.z == z_original)
|
||||
special_target_valid = TRUE
|
||||
if(special_target_valid)
|
||||
walk_towards(src, special_target, 1)
|
||||
else if(end && end.z==z_original)
|
||||
walk_towards(src, destination, 1)
|
||||
|
||||
/obj/effect/immovablerod/Topic(href, href_list)
|
||||
if(href_list["orbit"])
|
||||
var/mob/dead/observer/ghost = usr
|
||||
if(istype(ghost))
|
||||
ghost.ManualFollow(src)
|
||||
|
||||
/obj/effect/immovablerod/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/effect/immovablerod/Moved()
|
||||
if((z != z_original) || (loc == destination))
|
||||
qdel(src)
|
||||
if(special_target && loc == get_turf(special_target))
|
||||
complete_trajectory()
|
||||
return ..()
|
||||
|
||||
/obj/effect/immovablerod/proc/complete_trajectory()
|
||||
//We hit what we wanted to hit, time to go
|
||||
special_target = null
|
||||
destination = get_edge_target_turf(src, dir)
|
||||
walk(src,0)
|
||||
walk_towards(src, destination, 1)
|
||||
|
||||
/obj/effect/immovablerod/ex_act(severity, target)
|
||||
return 0
|
||||
|
||||
/obj/effect/immovablerod/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/immovablerod/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/immovablerod/Bump(atom/clong)
|
||||
if(prob(10))
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, 1)
|
||||
audible_message("<span class='danger'>You hear a CLANG!</span>")
|
||||
|
||||
if(clong && prob(25))
|
||||
x = clong.x
|
||||
y = clong.y
|
||||
|
||||
if(special_target && clong == special_target)
|
||||
complete_trajectory()
|
||||
|
||||
if(isturf(clong) || isobj(clong))
|
||||
if(clong.density)
|
||||
clong.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
else if(isliving(clong))
|
||||
penetrate(clong)
|
||||
else if(istype(clong, type))
|
||||
var/obj/effect/immovablerod/other = clong
|
||||
visible_message("<span class='danger'>[src] collides with [other]!\
|
||||
</span>")
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(2, get_turf(src))
|
||||
smoke.start()
|
||||
qdel(src)
|
||||
qdel(other)
|
||||
|
||||
/obj/effect/immovablerod/proc/penetrate(mob/living/L)
|
||||
L.visible_message("<span class='danger'>[L] is penetrated by an immovable rod!</span>" , "<span class='userdanger'>The rod penetrates you!</span>" , "<span class ='danger'>You hear a CLANG!</span>")
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.adjustBruteLoss(160)
|
||||
if(L && (L.density || prob(10)))
|
||||
L.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
obj/effect/immovablerod/attack_hand(mob/living/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(U.job in list("Research Director"))
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
for(var/mob/M in urange(8, src))
|
||||
if(!M.stat)
|
||||
shake_camera(M, 2, 3)
|
||||
if(wizard)
|
||||
U.visible_message("<span class='boldwarning'>[src] transforms into [wizard] as [U] suplexes them!</span>", "<span class='warning'>As you grab [src], it suddenly turns into [wizard] as you suplex them!</span>")
|
||||
to_chat(wizard, "<span class='boldwarning'>You're suddenly jolted out of rod-form as [U] somehow manages to grab you, slamming you into the ground!</span>")
|
||||
wizard.Stun(60)
|
||||
wizard.apply_damage(25, BRUTE)
|
||||
qdel(src)
|
||||
else
|
||||
U.visible_message("<span class='boldwarning'>[U] suplexes [src] into the ground!</span>", "<span class='warning'>You suplex [src] into the ground!</span>")
|
||||
new /obj/structure/festivus/anchored(drop_location())
|
||||
new /obj/effect/anomaly/flux(drop_location())
|
||||
qdel(src)
|
||||
/*
|
||||
Immovable rod random event.
|
||||
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
|
||||
Everything solid in the way will be ex_act()'d
|
||||
In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
|
||||
--NEOFite
|
||||
*/
|
||||
|
||||
/datum/round_event_control/immovable_rod
|
||||
name = "Immovable Rod"
|
||||
typepath = /datum/round_event/immovable_rod
|
||||
min_players = 15
|
||||
max_occurrences = 5
|
||||
var/atom/special_target
|
||||
|
||||
|
||||
/datum/round_event_control/immovable_rod/admin_setup()
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/aimed = alert("Aimed at current location?","Sniperod", "Yes", "No")
|
||||
if(aimed == "Yes")
|
||||
special_target = get_turf(usr)
|
||||
|
||||
/datum/round_event/immovable_rod
|
||||
announceWhen = 5
|
||||
|
||||
/datum/round_event/immovable_rod/announce(fake)
|
||||
priority_announce("What the fuck was that?!", "General Alert")
|
||||
|
||||
/datum/round_event/immovable_rod/start()
|
||||
var/datum/round_event_control/immovable_rod/C = control
|
||||
var/startside = pick(GLOB.cardinals)
|
||||
var/z = pick(SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||
var/turf/startT = spaceDebrisStartLoc(startside, z)
|
||||
var/turf/endT = spaceDebrisFinishLoc(startside, z)
|
||||
new /obj/effect/immovablerod(startT, endT, C.special_target)
|
||||
|
||||
/obj/effect/immovablerod
|
||||
name = "immovable rod"
|
||||
desc = "What the fuck is that?"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "immrod"
|
||||
throwforce = 100
|
||||
move_force = INFINITY
|
||||
move_resist = INFINITY
|
||||
pull_force = INFINITY
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
var/mob/living/wizard
|
||||
var/z_original = 0
|
||||
var/destination
|
||||
var/notify = TRUE
|
||||
var/atom/special_target
|
||||
|
||||
/obj/effect/immovablerod/New(atom/start, atom/end, aimed_at)
|
||||
..()
|
||||
SSaugury.register_doom(src, 2000)
|
||||
z_original = z
|
||||
destination = end
|
||||
special_target = aimed_at
|
||||
if(notify)
|
||||
notify_ghosts("\A [src] is inbound!",
|
||||
enter_link="<a href=?src=[REF(src)];orbit=1>(Click to orbit)</a>",
|
||||
source=src, action=NOTIFY_ORBIT)
|
||||
GLOB.poi_list += src
|
||||
|
||||
var/special_target_valid = FALSE
|
||||
if(special_target)
|
||||
var/turf/T = get_turf(special_target)
|
||||
if(T.z == z_original)
|
||||
special_target_valid = TRUE
|
||||
if(special_target_valid)
|
||||
walk_towards(src, special_target, 1)
|
||||
else if(end && end.z==z_original)
|
||||
walk_towards(src, destination, 1)
|
||||
|
||||
/obj/effect/immovablerod/Topic(href, href_list)
|
||||
if(href_list["orbit"])
|
||||
var/mob/dead/observer/ghost = usr
|
||||
if(istype(ghost))
|
||||
ghost.ManualFollow(src)
|
||||
|
||||
/obj/effect/immovablerod/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/effect/immovablerod/Moved()
|
||||
if((z != z_original) || (loc == destination))
|
||||
qdel(src)
|
||||
if(special_target && loc == get_turf(special_target))
|
||||
complete_trajectory()
|
||||
return ..()
|
||||
|
||||
/obj/effect/immovablerod/proc/complete_trajectory()
|
||||
//We hit what we wanted to hit, time to go
|
||||
special_target = null
|
||||
destination = get_edge_target_turf(src, dir)
|
||||
walk(src,0)
|
||||
walk_towards(src, destination, 1)
|
||||
|
||||
/obj/effect/immovablerod/ex_act(severity, target)
|
||||
return 0
|
||||
|
||||
/obj/effect/immovablerod/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/immovablerod/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/immovablerod/Bump(atom/clong)
|
||||
if(prob(10))
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, 1)
|
||||
audible_message("<span class='danger'>You hear a CLANG!</span>")
|
||||
|
||||
if(clong && prob(25))
|
||||
x = clong.x
|
||||
y = clong.y
|
||||
|
||||
if(special_target && clong == special_target)
|
||||
complete_trajectory()
|
||||
|
||||
if(isturf(clong) || isobj(clong))
|
||||
if(clong.density)
|
||||
clong.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
else if(isliving(clong))
|
||||
penetrate(clong)
|
||||
else if(istype(clong, type))
|
||||
var/obj/effect/immovablerod/other = clong
|
||||
visible_message("<span class='danger'>[src] collides with [other]!\
|
||||
</span>")
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(2, get_turf(src))
|
||||
smoke.start()
|
||||
qdel(src)
|
||||
qdel(other)
|
||||
|
||||
/obj/effect/immovablerod/proc/penetrate(mob/living/L)
|
||||
L.visible_message("<span class='danger'>[L] is penetrated by an immovable rod!</span>" , "<span class='userdanger'>The rod penetrates you!</span>" , "<span class ='danger'>You hear a CLANG!</span>")
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.adjustBruteLoss(160)
|
||||
if(L && (L.density || prob(10)))
|
||||
L.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
obj/effect/immovablerod/attack_hand(mob/living/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/U = user
|
||||
if(U.job in list("Research Director"))
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
for(var/mob/M in urange(8, src))
|
||||
if(!M.stat)
|
||||
shake_camera(M, 2, 3)
|
||||
if(wizard)
|
||||
U.visible_message("<span class='boldwarning'>[src] transforms into [wizard] as [U] suplexes them!</span>", "<span class='warning'>As you grab [src], it suddenly turns into [wizard] as you suplex them!</span>")
|
||||
to_chat(wizard, "<span class='boldwarning'>You're suddenly jolted out of rod-form as [U] somehow manages to grab you, slamming you into the ground!</span>")
|
||||
wizard.Stun(60)
|
||||
wizard.apply_damage(25, BRUTE)
|
||||
qdel(src)
|
||||
else
|
||||
U.visible_message("<span class='boldwarning'>[U] suplexes [src] into the ground!</span>", "<span class='warning'>You suplex [src] into the ground!</span>")
|
||||
new /obj/structure/festivus/anchored(drop_location())
|
||||
new /obj/effect/anomaly/flux(drop_location())
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,411 +1,412 @@
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
has_unlimited_silicon_privilege = 1
|
||||
verb_say = "states"
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "declares"
|
||||
verb_yell = "alarms"
|
||||
initial_language_holder = /datum/language_holder/synthetic
|
||||
see_in_dark = 8
|
||||
bubble_icon = "machine"
|
||||
weather_immunities = list("ash")
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
mob_biotypes = list(MOB_SILICON)
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
speech_span = SPAN_ROBOT
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
var/designation = ""
|
||||
var/radiomod = "" //Radio character used before state laws/arrivals announce to allow department transmissions, default, or none at all.
|
||||
var/obj/item/camera/siliconcam/aicamera = null //photography
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/obj/item/radio/borg/radio = null //AIs dont use this but this is at the silicon level to advoid copypasta in say()
|
||||
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
|
||||
var/lawcheck[1]
|
||||
var/ioncheck[1]
|
||||
var/hackedcheck[1]
|
||||
var/devillawcheck[5]
|
||||
|
||||
var/sensors_on = 0
|
||||
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
|
||||
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
|
||||
var/d_hud = DATA_HUD_DIAGNOSTIC_BASIC //Determines the diag hud to use
|
||||
|
||||
var/law_change_counter = 0
|
||||
var/obj/machinery/camera/builtInCamera = null
|
||||
var/updating = FALSE //portable camera camerachunk update
|
||||
|
||||
var/hack_software = FALSE //Will be able to use hacking actions
|
||||
var/interaction_range = 7 //wireless control range
|
||||
|
||||
/mob/living/silicon/Initialize()
|
||||
. = ..()
|
||||
GLOB.silicon_mobs += src
|
||||
faction += "silicon"
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
diag_hud.add_to_hud(src)
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
/mob/living/silicon/med_hud_set_health()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/med_hud_set_status()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
radio = null
|
||||
aicamera = null
|
||||
QDEL_NULL(builtInCamera)
|
||||
GLOB.silicon_mobs -= src
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/contents_explosion(severity, target)
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/triggerAlarm()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/queueAlarm(message, type, incoming = 1)
|
||||
var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0)
|
||||
if(incoming)
|
||||
alarms_to_show += message
|
||||
alarm_types_show[type] += 1
|
||||
else
|
||||
alarms_to_clear += message
|
||||
alarm_types_clear[type] += 1
|
||||
|
||||
if(!in_cooldown)
|
||||
spawn(3 * 10) // 3 seconds
|
||||
|
||||
if(alarms_to_show.len < 5)
|
||||
for(var/msg in alarms_to_show)
|
||||
to_chat(src, msg)
|
||||
else if(alarms_to_show.len)
|
||||
|
||||
var/msg = "--- "
|
||||
|
||||
if(alarm_types_show["Burglar"])
|
||||
msg += "BURGLAR: [alarm_types_show["Burglar"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Motion"])
|
||||
msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Fire"])
|
||||
msg += "FIRE: [alarm_types_show["Fire"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Atmosphere"])
|
||||
msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Power"])
|
||||
msg += "POWER: [alarm_types_show["Power"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - "
|
||||
|
||||
msg += "<A href=?src=[REF(src)];showalerts=1'>\[Show Alerts\]</a>"
|
||||
to_chat(src, msg)
|
||||
|
||||
if(alarms_to_clear.len < 3)
|
||||
for(var/msg in alarms_to_clear)
|
||||
to_chat(src, msg)
|
||||
|
||||
else if(alarms_to_clear.len)
|
||||
var/msg = "--- "
|
||||
|
||||
if(alarm_types_clear["Motion"])
|
||||
msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Fire"])
|
||||
msg += "FIRE: [alarm_types_clear["Fire"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Atmosphere"])
|
||||
msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Power"])
|
||||
msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - "
|
||||
|
||||
msg += "<A href=?src=[REF(src)];showalerts=1'>\[Show Alerts\]</a>"
|
||||
to_chat(src, msg)
|
||||
|
||||
|
||||
alarms_to_show = list()
|
||||
alarms_to_clear = list()
|
||||
for(var/key in alarm_types_show)
|
||||
alarm_types_show[key] = 0
|
||||
for(var/key in alarm_types_clear)
|
||||
alarm_types_clear[key] = 0
|
||||
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>[p_their(TRUE)] outer shell is too tough.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return TRUE
|
||||
|
||||
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return FALSE
|
||||
if(bot.connected_ai == ai)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/Topic(href, href_list)
|
||||
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawc"])
|
||||
switch(lawcheck[L+1])
|
||||
if ("Yes")
|
||||
lawcheck[L+1] = "No"
|
||||
if ("No")
|
||||
lawcheck[L+1] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(ioncheck[L])
|
||||
if ("Yes")
|
||||
ioncheck[L] = "No"
|
||||
if ("No")
|
||||
ioncheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawh"])
|
||||
var/L = text2num(href_list["lawh"])
|
||||
switch(hackedcheck[L])
|
||||
if ("Yes")
|
||||
hackedcheck[L] = "No"
|
||||
if ("No")
|
||||
hackedcheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawdevil"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawdevil"])
|
||||
switch(devillawcheck[L])
|
||||
if ("Yes")
|
||||
devillawcheck[L] = "No"
|
||||
if ("No")
|
||||
devillawcheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
|
||||
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
|
||||
statelaws()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/proc/statelaws(force = 0)
|
||||
|
||||
//"radiomod" is inserted before a hardcoded message to change if and how it is handled by an internal radio.
|
||||
say("[radiomod] Current Active Laws:")
|
||||
//laws_sanity_check()
|
||||
//laws.show_laws(world)
|
||||
var/number = 1
|
||||
sleep(10)
|
||||
|
||||
if (laws.devillaws && laws.devillaws.len)
|
||||
for(var/index = 1, index <= laws.devillaws.len, index++)
|
||||
if (force || devillawcheck[index] == "Yes")
|
||||
say("[radiomod] 666. [laws.devillaws[index]]")
|
||||
sleep(10)
|
||||
|
||||
|
||||
if (laws.zeroth)
|
||||
if (force || lawcheck[1] == "Yes")
|
||||
say("[radiomod] 0. [laws.zeroth]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.hacked.len, index++)
|
||||
var/law = laws.hacked[index]
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (force || hackedcheck[index] == "Yes")
|
||||
say("[radiomod] [num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.ion.len, index++)
|
||||
var/law = laws.ion[index]
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (force || ioncheck[index] == "Yes")
|
||||
say("[radiomod] [num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.inherent.len, index++)
|
||||
var/law = laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (force || lawcheck[index+1] == "Yes")
|
||||
say("[radiomod] [number]. [law]")
|
||||
number++
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.supplied.len, index++)
|
||||
var/law = laws.supplied[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if(lawcheck.len >= number+1)
|
||||
if (force || lawcheck[number+1] == "Yes")
|
||||
say("[radiomod] [number]. [law]")
|
||||
number++
|
||||
sleep(10)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
|
||||
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
|
||||
|
||||
if (laws.devillaws && laws.devillaws.len)
|
||||
for(var/index = 1, index <= laws.devillaws.len, index++)
|
||||
if (!devillawcheck[index])
|
||||
devillawcheck[index] = "No"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawdevil=[index]'>[devillawcheck[index]] 666:</A> <font color='#cc5500'>[laws.devillaws[index]]</font><BR>"}
|
||||
|
||||
if (laws.zeroth)
|
||||
if (!lawcheck[1])
|
||||
lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
|
||||
list += {"<A href='byond://?src=[REF(src)];lawc=0'>[lawcheck[1]] 0:</A> <font color='#ff0000'><b>[laws.zeroth]</b></font><BR>"}
|
||||
|
||||
for (var/index = 1, index <= laws.hacked.len, index++)
|
||||
var/law = laws.hacked[index]
|
||||
if (length(law) > 0)
|
||||
if (!hackedcheck[index])
|
||||
hackedcheck[index] = "No"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawh=[index]'>[hackedcheck[index]] [ionnum()]:</A> <font color='#660000'>[law]</font><BR>"}
|
||||
hackedcheck.len += 1
|
||||
|
||||
for (var/index = 1, index <= laws.ion.len, index++)
|
||||
var/law = laws.ion[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (!ioncheck[index])
|
||||
ioncheck[index] = "Yes"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawi=[index]'>[ioncheck[index]] [ionnum()]:</A> <font color='#547DFE'>[law]</font><BR>"}
|
||||
ioncheck.len += 1
|
||||
|
||||
var/number = 1
|
||||
for (var/index = 1, index <= laws.inherent.len, index++)
|
||||
var/law = laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
lawcheck.len += 1
|
||||
|
||||
if (!lawcheck[number+1])
|
||||
lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawc=[number]'>[lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
|
||||
for (var/index = 1, index <= laws.supplied.len, index++)
|
||||
var/law = laws.supplied[index]
|
||||
if (length(law) > 0)
|
||||
lawcheck.len += 1
|
||||
if (!lawcheck[number+1])
|
||||
lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawc=[number]'>[lawcheck[number+1]] [number]:</A> <font color='#990099'>[law]</font><BR>"}
|
||||
number++
|
||||
list += {"<br><br><A href='byond://?src=[REF(src)];laws=1'>State Laws</A>"}
|
||||
|
||||
usr << browse(list, "window=laws")
|
||||
|
||||
/mob/living/silicon/proc/set_autosay() //For allowing the AI and borgs to set the radio behavior of auto announcements (state laws, arrivals).
|
||||
if(!radio)
|
||||
to_chat(src, "Radio not detected.")
|
||||
return
|
||||
|
||||
//Ask the user to pick a channel from what it has available.
|
||||
var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels
|
||||
|
||||
if(!Autochan)
|
||||
return
|
||||
if(Autochan == "Default") //Autospeak on whatever frequency to which the radio is set, usually Common.
|
||||
radiomod = ";"
|
||||
Autochan += " ([radio.frequency])"
|
||||
else if(Autochan == "None") //Prevents use of the radio for automatic annoucements.
|
||||
radiomod = ""
|
||||
else //For department channels, if any, given by the internal radio.
|
||||
for(var/key in GLOB.department_radio_keys)
|
||||
if(GLOB.department_radio_keys[key] == Autochan)
|
||||
radiomod = ":" + key
|
||||
break
|
||||
|
||||
to_chat(src, "<span class='notice'>Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]</span>")
|
||||
|
||||
/mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands.
|
||||
return 0
|
||||
|
||||
// The src mob is trying to place an item on someone
|
||||
// But the src mob is a silicon!! Disable.
|
||||
/mob/living/silicon/stripPanelEquip(obj/item/what, mob/who, slot)
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/silicon/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt silicon units
|
||||
return -10
|
||||
|
||||
/mob/living/silicon/proc/remove_sensors()
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
|
||||
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
|
||||
secsensor.remove_hud_from(src)
|
||||
medsensor.remove_hud_from(src)
|
||||
diagsensor.remove_hud_from(src)
|
||||
|
||||
/mob/living/silicon/proc/add_sensors()
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
|
||||
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
|
||||
secsensor.add_hud_to(src)
|
||||
medsensor.add_hud_to(src)
|
||||
diagsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensors()
|
||||
if(incapacitated())
|
||||
return
|
||||
sensors_on = !sensors_on
|
||||
if (!sensors_on)
|
||||
to_chat(src, "Sensor overlay deactivated.")
|
||||
remove_sensors()
|
||||
return
|
||||
add_sensors()
|
||||
to_chat(src, "Sensor overlay activated.")
|
||||
|
||||
/mob/living/silicon/proc/GetPhoto(mob/user)
|
||||
if (aicamera)
|
||||
return aicamera.selectpicture(user)
|
||||
|
||||
/*
|
||||
/mob/living/silicon/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/changed = 0
|
||||
if(resize != RESIZE_DEFAULT_SIZE)
|
||||
changed++
|
||||
ntransform.Scale(resize)
|
||||
resize = RESIZE_DEFAULT_SIZE
|
||||
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2,easing = EASE_IN|EASE_OUT)
|
||||
return ..() */
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/get_inactive_held_item()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/handle_high_gravity(gravity)
|
||||
return
|
||||
/mob/living/silicon
|
||||
gender = NEUTER
|
||||
has_unlimited_silicon_privilege = 1
|
||||
verb_say = "states"
|
||||
verb_ask = "queries"
|
||||
verb_exclaim = "declares"
|
||||
verb_yell = "alarms"
|
||||
initial_language_holder = /datum/language_holder/synthetic
|
||||
see_in_dark = 8
|
||||
bubble_icon = "machine"
|
||||
weather_immunities = list("ash")
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
mob_biotypes = list(MOB_SILICON)
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
speech_span = SPAN_ROBOT
|
||||
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
|
||||
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
var/designation = ""
|
||||
var/radiomod = "" //Radio character used before state laws/arrivals announce to allow department transmissions, default, or none at all.
|
||||
var/obj/item/camera/siliconcam/aicamera = null //photography
|
||||
hud_possible = list(ANTAG_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_TRACK_HUD)
|
||||
|
||||
var/obj/item/radio/borg/radio = null //AIs dont use this but this is at the silicon level to advoid copypasta in say()
|
||||
|
||||
var/list/alarm_types_show = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
var/list/alarm_types_clear = list("Motion" = 0, "Fire" = 0, "Atmosphere" = 0, "Power" = 0, "Camera" = 0)
|
||||
|
||||
var/lawcheck[1]
|
||||
var/ioncheck[1]
|
||||
var/hackedcheck[1]
|
||||
var/devillawcheck[5]
|
||||
|
||||
var/sensors_on = 0
|
||||
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
|
||||
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
|
||||
var/d_hud = DATA_HUD_DIAGNOSTIC_BASIC //Determines the diag hud to use
|
||||
|
||||
var/law_change_counter = 0
|
||||
var/obj/machinery/camera/builtInCamera = null
|
||||
var/updating = FALSE //portable camera camerachunk update
|
||||
|
||||
var/hack_software = FALSE //Will be able to use hacking actions
|
||||
var/interaction_range = 7 //wireless control range
|
||||
|
||||
/mob/living/silicon/Initialize()
|
||||
. = ..()
|
||||
GLOB.silicon_mobs += src
|
||||
faction += "silicon"
|
||||
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
|
||||
diag_hud.add_to_hud(src)
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
/mob/living/silicon/med_hud_set_health()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/med_hud_set_status()
|
||||
return //we use a different hud
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
radio = null
|
||||
aicamera = null
|
||||
QDEL_NULL(builtInCamera)
|
||||
GLOB.silicon_mobs -= src
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/contents_explosion(severity, target)
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/cancelAlarm()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/triggerAlarm()
|
||||
return
|
||||
|
||||
/mob/living/silicon/proc/queueAlarm(message, type, incoming = 1)
|
||||
var/in_cooldown = (alarms_to_show.len > 0 || alarms_to_clear.len > 0)
|
||||
if(incoming)
|
||||
alarms_to_show += message
|
||||
alarm_types_show[type] += 1
|
||||
else
|
||||
alarms_to_clear += message
|
||||
alarm_types_clear[type] += 1
|
||||
|
||||
if(!in_cooldown)
|
||||
spawn(3 * 10) // 3 seconds
|
||||
|
||||
if(alarms_to_show.len < 5)
|
||||
for(var/msg in alarms_to_show)
|
||||
to_chat(src, msg)
|
||||
else if(alarms_to_show.len)
|
||||
|
||||
var/msg = "--- "
|
||||
|
||||
if(alarm_types_show["Burglar"])
|
||||
msg += "BURGLAR: [alarm_types_show["Burglar"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Motion"])
|
||||
msg += "MOTION: [alarm_types_show["Motion"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Fire"])
|
||||
msg += "FIRE: [alarm_types_show["Fire"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Atmosphere"])
|
||||
msg += "ATMOSPHERE: [alarm_types_show["Atmosphere"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Power"])
|
||||
msg += "POWER: [alarm_types_show["Power"]] alarms detected. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_show["Camera"]] alarms detected. - "
|
||||
|
||||
msg += "<A href=?src=[REF(src)];showalerts=1'>\[Show Alerts\]</a>"
|
||||
to_chat(src, msg)
|
||||
|
||||
if(alarms_to_clear.len < 3)
|
||||
for(var/msg in alarms_to_clear)
|
||||
to_chat(src, msg)
|
||||
|
||||
else if(alarms_to_clear.len)
|
||||
var/msg = "--- "
|
||||
|
||||
if(alarm_types_clear["Motion"])
|
||||
msg += "MOTION: [alarm_types_clear["Motion"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Fire"])
|
||||
msg += "FIRE: [alarm_types_clear["Fire"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Atmosphere"])
|
||||
msg += "ATMOSPHERE: [alarm_types_clear["Atmosphere"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_clear["Power"])
|
||||
msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - "
|
||||
|
||||
if(alarm_types_show["Camera"])
|
||||
msg += "CAMERA: [alarm_types_clear["Camera"]] alarms cleared. - "
|
||||
|
||||
msg += "<A href=?src=[REF(src)];showalerts=1'>\[Show Alerts\]</a>"
|
||||
to_chat(src, msg)
|
||||
|
||||
|
||||
alarms_to_show = list()
|
||||
alarms_to_clear = list()
|
||||
for(var/key in alarm_types_show)
|
||||
alarm_types_show[key] = 0
|
||||
for(var/key in alarm_types_clear)
|
||||
alarm_types_clear[key] = 0
|
||||
|
||||
/mob/living/silicon/can_inject(mob/user, error_msg)
|
||||
if(error_msg)
|
||||
to_chat(user, "<span class='alert'>[p_their(TRUE)] outer shell is too tough.</span>")
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/IsAdvancedToolUser()
|
||||
return TRUE
|
||||
|
||||
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
|
||||
if(!istype(bot) || !istype(ai))
|
||||
return FALSE
|
||||
if(bot.connected_ai == ai)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/Topic(href, href_list)
|
||||
if (href_list["lawc"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawc"])
|
||||
switch(lawcheck[L+1])
|
||||
if ("Yes")
|
||||
lawcheck[L+1] = "No"
|
||||
if ("No")
|
||||
lawcheck[L+1] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawi"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawi"])
|
||||
switch(ioncheck[L])
|
||||
if ("Yes")
|
||||
ioncheck[L] = "No"
|
||||
if ("No")
|
||||
ioncheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawh"])
|
||||
var/L = text2num(href_list["lawh"])
|
||||
switch(hackedcheck[L])
|
||||
if ("Yes")
|
||||
hackedcheck[L] = "No"
|
||||
if ("No")
|
||||
hackedcheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
if (href_list["lawdevil"]) // Toggling whether or not a law gets stated by the State Laws verb --NeoFite
|
||||
var/L = text2num(href_list["lawdevil"])
|
||||
switch(devillawcheck[L])
|
||||
if ("Yes")
|
||||
devillawcheck[L] = "No"
|
||||
if ("No")
|
||||
devillawcheck[L] = "Yes"
|
||||
checklaws()
|
||||
|
||||
|
||||
if (href_list["laws"]) // With how my law selection code works, I changed statelaws from a verb to a proc, and call it through my law selection panel. --NeoFite
|
||||
statelaws()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/mob/living/silicon/proc/statelaws(force = 0)
|
||||
|
||||
//"radiomod" is inserted before a hardcoded message to change if and how it is handled by an internal radio.
|
||||
say("[radiomod] Current Active Laws:")
|
||||
//laws_sanity_check()
|
||||
//laws.show_laws(world)
|
||||
var/number = 1
|
||||
sleep(10)
|
||||
|
||||
if (laws.devillaws && laws.devillaws.len)
|
||||
for(var/index = 1, index <= laws.devillaws.len, index++)
|
||||
if (force || devillawcheck[index] == "Yes")
|
||||
say("[radiomod] 666. [laws.devillaws[index]]")
|
||||
sleep(10)
|
||||
|
||||
|
||||
if (laws.zeroth)
|
||||
if (force || lawcheck[1] == "Yes")
|
||||
say("[radiomod] 0. [laws.zeroth]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.hacked.len, index++)
|
||||
var/law = laws.hacked[index]
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (force || hackedcheck[index] == "Yes")
|
||||
say("[radiomod] [num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.ion.len, index++)
|
||||
var/law = laws.ion[index]
|
||||
var/num = ionnum()
|
||||
if (length(law) > 0)
|
||||
if (force || ioncheck[index] == "Yes")
|
||||
say("[radiomod] [num]. [law]")
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.inherent.len, index++)
|
||||
var/law = laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (force || lawcheck[index+1] == "Yes")
|
||||
say("[radiomod] [number]. [law]")
|
||||
number++
|
||||
sleep(10)
|
||||
|
||||
for (var/index = 1, index <= laws.supplied.len, index++)
|
||||
var/law = laws.supplied[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if(lawcheck.len >= number+1)
|
||||
if (force || lawcheck[number+1] == "Yes")
|
||||
say("[radiomod] [number]. [law]")
|
||||
number++
|
||||
sleep(10)
|
||||
|
||||
|
||||
/mob/living/silicon/proc/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite
|
||||
|
||||
var/list = "<b>Which laws do you want to include when stating them for the crew?</b><br><br>"
|
||||
|
||||
if (laws.devillaws && laws.devillaws.len)
|
||||
for(var/index = 1, index <= laws.devillaws.len, index++)
|
||||
if (!devillawcheck[index])
|
||||
devillawcheck[index] = "No"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawdevil=[index]'>[devillawcheck[index]] 666:</A> <font color='#cc5500'>[laws.devillaws[index]]</font><BR>"}
|
||||
|
||||
if (laws.zeroth)
|
||||
if (!lawcheck[1])
|
||||
lawcheck[1] = "No" //Given Law 0's usual nature, it defaults to NOT getting reported. --NeoFite
|
||||
list += {"<A href='byond://?src=[REF(src)];lawc=0'>[lawcheck[1]] 0:</A> <font color='#ff0000'><b>[laws.zeroth]</b></font><BR>"}
|
||||
|
||||
for (var/index = 1, index <= laws.hacked.len, index++)
|
||||
var/law = laws.hacked[index]
|
||||
if (length(law) > 0)
|
||||
if (!hackedcheck[index])
|
||||
hackedcheck[index] = "No"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawh=[index]'>[hackedcheck[index]] [ionnum()]:</A> <font color='#660000'>[law]</font><BR>"}
|
||||
hackedcheck.len += 1
|
||||
|
||||
for (var/index = 1, index <= laws.ion.len, index++)
|
||||
var/law = laws.ion[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
if (!ioncheck[index])
|
||||
ioncheck[index] = "Yes"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawi=[index]'>[ioncheck[index]] [ionnum()]:</A> <font color='#547DFE'>[law]</font><BR>"}
|
||||
ioncheck.len += 1
|
||||
|
||||
var/number = 1
|
||||
for (var/index = 1, index <= laws.inherent.len, index++)
|
||||
var/law = laws.inherent[index]
|
||||
|
||||
if (length(law) > 0)
|
||||
lawcheck.len += 1
|
||||
|
||||
if (!lawcheck[number+1])
|
||||
lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawc=[number]'>[lawcheck[number+1]] [number]:</A> [law]<BR>"}
|
||||
number++
|
||||
|
||||
for (var/index = 1, index <= laws.supplied.len, index++)
|
||||
var/law = laws.supplied[index]
|
||||
if (length(law) > 0)
|
||||
lawcheck.len += 1
|
||||
if (!lawcheck[number+1])
|
||||
lawcheck[number+1] = "Yes"
|
||||
list += {"<A href='byond://?src=[REF(src)];lawc=[number]'>[lawcheck[number+1]] [number]:</A> <font color='#990099'>[law]</font><BR>"}
|
||||
number++
|
||||
list += {"<br><br><A href='byond://?src=[REF(src)];laws=1'>State Laws</A>"}
|
||||
|
||||
usr << browse(list, "window=laws")
|
||||
|
||||
/mob/living/silicon/proc/set_autosay() //For allowing the AI and borgs to set the radio behavior of auto announcements (state laws, arrivals).
|
||||
if(!radio)
|
||||
to_chat(src, "Radio not detected.")
|
||||
return
|
||||
|
||||
//Ask the user to pick a channel from what it has available.
|
||||
var/Autochan = input("Select a channel:") as null|anything in list("Default","None") + radio.channels
|
||||
|
||||
if(!Autochan)
|
||||
return
|
||||
if(Autochan == "Default") //Autospeak on whatever frequency to which the radio is set, usually Common.
|
||||
radiomod = ";"
|
||||
Autochan += " ([radio.frequency])"
|
||||
else if(Autochan == "None") //Prevents use of the radio for automatic annoucements.
|
||||
radiomod = ""
|
||||
else //For department channels, if any, given by the internal radio.
|
||||
for(var/key in GLOB.department_radio_keys)
|
||||
if(GLOB.department_radio_keys[key] == Autochan)
|
||||
radiomod = ":" + key
|
||||
break
|
||||
|
||||
to_chat(src, "<span class='notice'>Automatic announcements [Autochan == "None" ? "will not use the radio." : "set to [Autochan]."]</span>")
|
||||
|
||||
/mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands.
|
||||
return 0
|
||||
|
||||
// The src mob is trying to place an item on someone
|
||||
// But the src mob is a silicon!! Disable.
|
||||
/mob/living/silicon/stripPanelEquip(obj/item/what, mob/who, slot)
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/silicon/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt silicon units
|
||||
return -10
|
||||
|
||||
/mob/living/silicon/proc/remove_sensors()
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
|
||||
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
|
||||
secsensor.remove_hud_from(src)
|
||||
medsensor.remove_hud_from(src)
|
||||
diagsensor.remove_hud_from(src)
|
||||
|
||||
/mob/living/silicon/proc/add_sensors()
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
|
||||
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
|
||||
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
|
||||
secsensor.add_hud_to(src)
|
||||
medsensor.add_hud_to(src)
|
||||
diagsensor.add_hud_to(src)
|
||||
|
||||
/mob/living/silicon/proc/toggle_sensors()
|
||||
if(incapacitated())
|
||||
return
|
||||
sensors_on = !sensors_on
|
||||
if (!sensors_on)
|
||||
to_chat(src, "Sensor overlay deactivated.")
|
||||
remove_sensors()
|
||||
return
|
||||
add_sensors()
|
||||
to_chat(src, "Sensor overlay activated.")
|
||||
|
||||
/mob/living/silicon/proc/GetPhoto(mob/user)
|
||||
if (aicamera)
|
||||
return aicamera.selectpicture(user)
|
||||
|
||||
/*
|
||||
/mob/living/silicon/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/changed = 0
|
||||
if(resize != RESIZE_DEFAULT_SIZE)
|
||||
changed++
|
||||
ntransform.Scale(resize)
|
||||
resize = RESIZE_DEFAULT_SIZE
|
||||
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2,easing = EASE_IN|EASE_OUT)
|
||||
return ..() */
|
||||
|
||||
/mob/living/silicon/is_literate()
|
||||
return 1
|
||||
|
||||
/mob/living/silicon/get_inactive_held_item()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/handle_high_gravity(gravity)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user