Merge branch 'dev' into ofMechfabAndPanic

Conflicts:
	code/__defines/research.dm
	code/game/mecha/equipment/tools/tools.dm
	code/game/mecha/mecha_parts.dm
	code/modules/research/designs.dm
	maps/exodus-1.dmm
This commit is contained in:
Kelenius
2015-08-21 16:59:57 +03:00
393 changed files with 13953 additions and 12053 deletions
+2 -2
View File
@@ -40,7 +40,7 @@
var/mob/living/bot/secbot/active // the active bot; if null, show bot list
var/list/botstatus // the status signal sent by the bot
var/control_freq = AI_FREQ
var/control_freq = BOT_FREQ
// create a new QM cartridge, and register to receive bot control & beacon message
New()
@@ -112,7 +112,7 @@
var/list/beacons
var/beacon_freq = 1400
var/control_freq = AI_FREQ
var/control_freq = BOT_FREQ
// create a new QM cartridge, and register to receive bot control & beacon message
New()
+1 -1
View File
@@ -46,7 +46,7 @@
ui.open()
ui.set_auto_update(1)
/obj/item/device/aicard/Topic(href, href_list, nowindow, state)
/obj/item/device/aicard/Topic(href, href_list, state)
if(..())
return 1
+1 -1
View File
@@ -19,7 +19,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
@@ -51,7 +51,7 @@
var/mob/living/carbon/human/H = M //mob has protective eyewear
if(istype(H))
for(var/obj/item/clothing/C in list(H.head,H.wear_mask,H.glasses))
if(istype(C) && C.flags & (HEADCOVERSEYES|MASKCOVERSEYES|GLASSESCOVERSEYES))
if(istype(C) && (C.body_parts_covered & EYES))
user << "<span class='warning'>You're going to need to remove [C.name] first.</span>"
return
+176 -195
View File
@@ -4,212 +4,193 @@
icon_state = "labeler1"
item_state = "flight"
var/mode_nice = "standard"
var/mode = "floor"
var/tile_dir_mode = 0
var/decal = "remove all decals"
var/paint_dir = "precise"
var/paint_colour = "white"
// mode 0 ignore direction; sets dir=0
// mode 1 all-direction
// mode 2 corner selecting the side CW from the selected corner
// mode 3 cardinal
// mode 4 warningcorner and warnwhitecorner direction fix
// mode 5 Opposite corner tiles where the second icon_state is "[mode]_inv"
/obj/item/device/floor_painter/afterattack(atom/A, mob/user as mob, proximity)
var/list/decals = list(
"quarter-turf" = list("path" = /obj/effect/floor_decal/corner, "precise" = 1, "coloured" = 1),
"hazard stripes" = list("path" = /obj/effect/floor_decal/industrial/warning),
"corner, hazard" = list("path" = /obj/effect/floor_decal/industrial/warning/corner),
"hatched marking" = list("path" = /obj/effect/floor_decal/industrial/hatch),
"dotted outline" = list("path" = /obj/effect/floor_decal/industrial/outline, "coloured" = 1),
"loading sign" = list("path" = /obj/effect/floor_decal/industrial/loading),
"1" = list("path" = /obj/effect/floor_decal/sign),
"2" = list("path" = /obj/effect/floor_decal/sign/two),
"A" = list("path" = /obj/effect/floor_decal/sign/a),
"B" = list("path" = /obj/effect/floor_decal/sign/b),
"C" = list("path" = /obj/effect/floor_decal/sign/c),
"D" = list("path" = /obj/effect/floor_decal/sign/d),
"Ex" = list("path" = /obj/effect/floor_decal/sign/ex),
"M" = list("path" = /obj/effect/floor_decal/sign/m),
"CMO" = list("path" = /obj/effect/floor_decal/sign/cmo),
"V" = list("path" = /obj/effect/floor_decal/sign/v),
"Psy" = list("path" = /obj/effect/floor_decal/sign/p),
"remove all decals" = list("path" = /obj/effect/floor_decal/reset)
)
var/list/paint_dirs = list(
"north" = NORTH,
"northwest" = NORTHWEST,
"west" = WEST,
"southwest" = SOUTHWEST,
"south" = SOUTH,
"southeast" = SOUTHEAST,
"east" = EAST,
"northeast" = NORTHEAST,
"precise" = 0
)
var/list/paint_colours = list(
"white" = COLOR_WHITE,
"light gray" = COLOR_SILVER,
"dark gray" = COLOR_GRAY,
"blue-grey" = "#6A97B0",
"pale blue-grey" = "#8BBBD5",
"green-grey" = "#8DAF6A",
"pale green-gray" = "#AED18B",
"red-gray" = "#AA5F61",
"pale red-gray" = "#CC9090",
"purple-gray" = "#A2819E",
"pale purple-gray" = "#BDA2BA",
"black" = COLOR_BLACK,
"red" = COLOR_RED,
"dark red" = COLOR_MAROON,
"yellow" = COLOR_YELLOW,
"dark yellow" = COLOR_OLIVE,
"green" = COLOR_LIME,
"dark green" = COLOR_GREEN,
"cyan" = COLOR_CYAN,
"teal" = COLOR_TEAL,
"blue" = COLOR_BLUE,
"dark blue" = COLOR_NAVY,
"magenta" = COLOR_PINK,
"purple" = COLOR_PURPLE,
"orange" = COLOR_ORANGE,
"dark orange" = "#B95A00",
"dark brown" = "#917448",
"brown" = "#B19664",
"pale brown" = "#CEB689"
)
/obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
if(!proximity)
return
if(istype(A, /turf/simulated/floor))
var/turf/simulated/floor/F = A
var/turf/simulated/floor/F = A
if(!istype(F))
user << "<span class='warning'>\The [src] can only be used on station flooring.</span>"
return
if(F.is_steel_floor()) // only tiled floors
if(tile_dir_mode)
var/D = get_dir(usr, F)
if(usr.loc == F)
D = usr.dir
if(!F.flooring || !F.flooring.can_paint || F.broken || F.burnt)
user << "<span class='warning'>\The [src] cannot paint broken or missing tiles.</span>"
return
switch(tile_dir_mode)
if(1) // All directions accepted
F.set_dir(D)
F.icon_state = mode
if(2) // Corner mode - diagonal directions converted CW around.
switch(D)
if(NORTHEAST)
D = EAST
if(SOUTHEAST)
D = SOUTH
if(SOUTHWEST)
D = WEST
if(NORTHWEST)
D = NORTH
F.set_dir(D)
F.icon_state = mode
if(3) // cardinal directions only. I've adjusted diagonals the same way the facing code does.
switch(D)
if(NORTHEAST)
D = EAST
if(SOUTHEAST)
D = EAST
if(SOUTHWEST)
D = WEST
if(NORTHWEST)
D = WEST
F.set_dir(D)
F.icon_state = mode
if(4) // floors.dmi icon_states "warningcorner" and "warnwhitecorner" are incorrect, this fixes it
var/D2
switch(D)
if(NORTHEAST)
D2 = WEST
if(SOUTHEAST)
D2 = SOUTH
if(SOUTHWEST)
D2 = NORTH
if(NORTHWEST)
D2 = EAST
F.set_dir(D2)
F.icon_state = mode
if(5)
F.set_dir(0)
if(D == NORTH || D == SOUTH || D == NORTHEAST || D == SOUTHWEST)
F.icon_state = mode
else
F.icon_state = "[mode]_inv"
else
F.set_dir(0)
F.icon_state = mode
var/list/decal_data = decals[decal]
var/config_error
if(!islist(decal_data))
config_error = 1
var/painting_decal
if(!config_error)
painting_decal = decal_data["path"]
if(!ispath(painting_decal))
config_error = 1
if(config_error)
user << "<span class='warning'>\The [src] flashes an error light. You might need to reconfigure it.</span>"
return
if(F.decals && F.decals.len > 5 && painting_decal != /obj/effect/floor_decal/reset)
user << "<span class='warning'>\The [F] has been painted too much; you need to clear it off.</span>"
return
var/painting_dir = 0
if(paint_dir == "precise")
if(!decal_data["precise"])
painting_dir = user.dir
else
usr << "You can't paint that!"
var/list/mouse_control = params2list(params)
var/mouse_x = text2num(mouse_control["icon-x"])
var/mouse_y = text2num(mouse_control["icon-y"])
if(isnum(mouse_x) && isnum(mouse_y))
if(mouse_x <= 16)
if(mouse_y <= 16)
painting_dir = WEST
else
painting_dir = NORTH
else
if(mouse_y <= 16)
painting_dir = SOUTH
else
painting_dir = EAST
else
painting_dir = user.dir
else if(paint_dirs[paint_dir])
painting_dir = paint_dirs[paint_dir]
var/painting_colour
if(paint_colour && !isnull(paint_colours[paint_colour]) && decal_data["coloured"])
painting_colour = paint_colours[paint_colour]
new painting_decal(F, painting_dir, painting_colour)
/obj/item/device/floor_painter/attack_self(mob/user as mob)
var/type = input("What type of floor?", "Floor painter", "solid") in list("solid", "corner", "opposite corners", "side/three corners", "special", "letters")
tile_dir_mode = 0
var/choice = input("Do you wish to change the decal type, paint direction, or paint colour?") as null|anything in list("Decal","Direction", "Colour")
switch(type)
if("solid")
tile_dir_mode = 0
var/design = input("Which color?", "Floor painter") in list("standard", "dark", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-red", "white-blue", "white-green", "white-yellow", "white-purple", "freezer", "hydro", "showroom")
if(design == "standard")
mode = "floor"
mode_nice = "standard"
return
if(design == "white")
mode = "white"
mode_nice = "white"
return
if(design == "dark")
mode = "dark"
mode_nice = "dark"
return
if(design == "showroom" || design == "hydro" || design == "freezer")
mode = "[design]floor"
mode_nice = design
return
mode_nice = design
mode = "[replacetext(design, "-", "")]full"
if("corner")
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
mode_nice = "[design] corner"
mode = "[replacetext(design, "-", "")]corner"
tile_dir_mode = 2
if("opposite corners")
var/design = input("Which design?", "Floor painter") in list("bar", "cmo", "yellowpatch", "cafeteria", "red-yellow", "red-blue", "red-green", "green-yellow", "green-blue", "blue-yellow")
mode_nice = design
if(design == "bar" || design == "cmo" || design == "yellowpatch" || design == "cafeteria")
mode = design
else
mode = "[replacetext(design, "-", "")]full"
if(design == "yellowpatch")
tile_dir_mode = 5
else
tile_dir_mode = 0
if("side/three corners")
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-red", "white-blue", "white-green", "white-yellow", "white-purple", "red-yellow", "red-blue", "blue-red", "red-green", "green-yellow", "green-blue", "blue-yellow")
if(design == "white")
mode = "whitehall"
mode_nice = "white side"
else if(design == "black") // because SOMEONE made the black/grey side/corner sprite have the same name as the 'empty space' sprite :(
mode = "blackfloor"
mode_nice = design
else
mode_nice = design
mode = replacetext(design, "-", "")
tile_dir_mode = 1
if("special")
var/design = input("Which design?", "Floor painter") in list("arrival", "escape", "caution", "warning", "white-warning", "white-blue-green", "loadingarea", "delivery", "bot", "white-delivery", "white-bot")
if(design == "white-blue-green")
mode_nice = design
mode = "whitebluegreencorners"
tile_dir_mode = 2
else if(design == "delivery" || design == "bot" || design == "white-delivery" || design == "white-bot")
mode_nice = design
mode = replacetext(design, "-", "")
tile_dir_mode = 0
else if(design == "loadingarea")
mode_nice = design
mode = design
tile_dir_mode = 3
else
if(design == "white-warning")
mode_nice = design
design = "warnwhite"
var/s_corner = alert("Do you want to paint a single corner of the tile?", "Floor painter","Yes","No") == "Yes"
if(s_corner)
mode_nice = "[design] corner"
mode = "[design]corner"
if(design == "warning" || design == "white-warning") // sprites for these are weird, need to fix dirs (icons/turf/floors.dmi, "warningcorner" and "warnwhitecorner")
tile_dir_mode = 4
else
tile_dir_mode = 2
else
mode_nice = design
mode = design
tile_dir_mode = 1
if("letters")
var/which = input("Which letters/design?", "Floor painter") in list("A1", "A2", "DI", "SA", "SA (red)", "SB", "SB (red)", "SC", "SC (red)", "W (red)", "V (green)", "Psy", "Ex", "Ex (blue)", "CMO", "O (OP)", "P (OP)")
mode_nice = which
switch(which)
if("A1")
mode = "white_1"
if("A2")
mode = "white_2"
if("DI")
mode = "white_d"
if("SA")
mode = "white_a"
if("SA (red)")
mode = "whitered_a"
tile_dir_mode = 3
if("SB")
mode = "white_b"
if("SB (red)")
mode = "whitered_b"
tile_dir_mode = 3
if("SC")
mode = "white_c"
if("SC (red)")
mode = "whitered_c"
tile_dir_mode = 3
if("W (red)")
mode = "whitered_w"
tile_dir_mode = 3
if("V (green)")
mode = "whitegreen_v"
tile_dir_mode = 3
if("Psy")
mode = "white_p"
if("Ex")
mode = "white_ex"
if("Ex (blue)")
mode = "whiteblue_ex"
tile_dir_mode = 3
if("CMO") // yes this is also in "opposite corners" choices, but it's a different icon_state (!!)
mode = "white_cmo"
if("O (OP)")
mode = "white_halfo"
if("P (OP)")
mode = "white_halfp"
if(choice == "Decal")
var/new_decal = input("Select a decal.") as null|anything in decals
if(new_decal && !isnull(decals[new_decal]))
decal = new_decal
user << "<span class='notice'>You set \the [src] decal to '[decal]'.</span>"
else if(choice == "Direction")
var/new_dir = input("Select a direction.") as null|anything in paint_dirs
if(new_dir && !isnull(paint_dirs[new_dir]))
paint_dir = new_dir
user << "<span class='notice'>You set \the [src] direction to '[paint_dir]'.</span>"
else if(choice == "Colour")
var/new_colour = input("Select a colour.") as null|anything in paint_colours
if(new_colour && !isnull(paint_colours[new_colour]))
paint_colour = new_colour
user << "<span class='notice'>You set \the [src] colour to '[paint_colour]'.</span>"
/obj/item/device/floor_painter/examine(mob/user)
..(user)
user << "It is in [mode_nice] mode."
user << "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint."
/obj/item/device/floor_painter/verb/choose_colour(new_colour in paint_colours)
set name = "Choose Colour"
set desc = "Choose a floor painter colour."
set category = "Object"
set src in usr
if(usr.incapacitated())
return
if(new_colour && !isnull(paint_colours[new_colour]))
paint_colour = new_colour
usr << "<span class='notice'>You set \the [src] colour to '[paint_colour]'.</span>"
/obj/item/device/floor_painter/verb/choose_decal(new_decal in decals)
set name = "Choose Decal"
set desc = "Choose a floor painter decal."
set category = "Object"
set src in usr
if(usr.incapacitated())
return
if(new_decal && !isnull(decals[new_decal]))
decal = new_decal
usr << "<span class='notice'>You set \the [src] decal to '[decal]'.</span>"
/obj/item/device/floor_painter/verb/choose_direction(new_dir in paint_dirs)
set name = "Choose Direction"
set desc = "Choose a floor painter direction."
set category = "Object"
set src in usr
if(usr.incapacitated())
return
if(new_dir && !isnull(paint_dirs[new_dir]))
paint_dir = new_dir
usr << "<span class='notice'>You set \the [src] direction to '[paint_dir]'.</span>"
+1 -1
View File
@@ -18,6 +18,6 @@
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/clonepod/connecting //same for cryopod linkage
@@ -16,16 +16,11 @@
/obj/item/device/pipe_painter/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
return
if(!istype(A,/obj/machinery/atmospherics/pipe) || istype(A,/obj/machinery/atmospherics/pipe/tank) || istype(A,/obj/machinery/atmospherics/pipe/vent) || istype(A,/obj/machinery/atmospherics/pipe/simple/heat_exchanging) || istype(A,/obj/machinery/atmospherics/pipe/simple/insulated) || !in_range(user, A))
return
var/obj/machinery/atmospherics/pipe/P = A
var/turf/T = P.loc
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
user << "<span class='warning'>You must remove the plating first.</span>"
return
P.change_color(pipe_colors[mode])
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
+2 -2
View File
@@ -22,7 +22,7 @@
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
var/drained_this_tick = 0 // This is unfortunately necessary to ensure we process powersinks BEFORE other machinery such as APCs.
var/datum/powernet/PN // Our powernet
var/datum/powernet/PN // Our powernet
var/obj/structure/cable/attached // the attached cable
/obj/item/device/powersink/Destroy()
@@ -34,7 +34,7 @@
if(istype(I, /obj/item/weapon/screwdriver))
if(mode == 0)
var/turf/T = loc
if(isturf(T) && !T.intact)
if(isturf(T) && !!T.is_plating())
attached = locate() in T
if(!attached)
user << "No exposed cable here to attach to."
@@ -67,3 +67,10 @@
icon_state = "intercom-p"
else
icon_state = "intercom"
/obj/item/device/radio/intercom/locked
freerange = 1
var/locked_frequency
/obj/item/device/radio/intercom/locked/set_frequency()
..(locked_frequency)
+2 -1
View File
@@ -8,6 +8,7 @@ MASS SPECTROMETER
REAGENT SCANNER
*/
/obj/item/device/healthanalyzer
name = "health analyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
@@ -200,7 +201,7 @@ REAGENT SCANNER
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 20)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
/obj/item/device/analyzer/atmosanalyze(var/mob/user)
var/air = user.return_air()
+2 -2
View File
@@ -14,7 +14,7 @@
throw_range = 15
throw_speed = 3
origin_tech = list(TECH_DATA = 1, TECH_ENGINERING = 1, TECH_ILLEGAL = 3)
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/camera
@@ -53,7 +53,7 @@
w_class = 2.0
origin_tech = list(TECH_DATA = 1, TECH_ENGINERING = 1, TECH_ILLEGAL = 3)
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
var/operating = 0
var/obj/item/device/radio/spy/radio
+9 -9
View File
@@ -8,7 +8,7 @@
w_class = 2
item_state = "electronic"
matter = list(DEFAULT_WALL_MATERIAL = 150)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/scan_range = 1
@@ -61,10 +61,10 @@
user_client.images += overlay
//Remove stale overlays
for(var/obj/O in update_remove)
for(var/obj/O in update_remove)
user_client.images -= active_scanned[O]
active_scanned -= O
//Flicker effect
for(var/obj/O in active_scanned)
var/image/overlay = active_scanned[O]
@@ -76,19 +76,19 @@
//creates a new overlay for a scanned object
/obj/item/device/t_scanner/proc/get_overlay(obj/scanned)
//Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room.
//Use a cache so we don't create a whole bunch of new images just because someone's walking back and forth in a room.
//Also means that images are reused if multiple people are using t-rays to look at the same objects.
if(scanned in overlay_cache)
. = overlay_cache[scanned]
else
var/image/I = image(loc = scanned, icon = scanned.icon, icon_state = scanned.icon_state, layer = HUD_LAYER)
//Pipes are special
if(istype(scanned, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/P = scanned
I.color = P.pipe_color
I.overlays += P.overlays
I.alpha = 128
I.mouse_opacity = 0
. = I
@@ -100,12 +100,12 @@
/obj/item/device/t_scanner/proc/get_scanned_objects(var/scan_dist)
. = list()
var/turf/center = get_turf(src.loc)
if(!center) return
for(var/turf/T in range(scan_range, center))
if(!T.intact)
if(!!T.is_plating())
continue
for(var/obj/O in T.contents)
@@ -9,6 +9,7 @@
var/mob/attacher = null
var/valve_open = 0
var/toggle = 1
flags = PROXMOVE
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
@@ -69,7 +70,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
@@ -80,7 +81,7 @@
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
@@ -15,6 +15,9 @@
/datum/uplink_category/ammunition
name = "Ammunition"
/datum/uplink_category/grenades
name = "Grenades and Thrown Objects"
/datum/uplink_category/visible_weapons
name = "Highly Visible and Dangerous Weapons"
@@ -36,5 +39,8 @@
/datum/uplink_category/hardsuit_modules
name = "Hardsuit Modules"
/datum/uplink_category/services
name = "Services"
/datum/uplink_category/badassery
name = "Badassery"
+164 -10
View File
@@ -9,6 +9,7 @@ var/datum/uplink/uplink = new()
items_assoc = list()
items = init_subtypes(/datum/uplink_item)
categories = init_subtypes(/datum/uplink_category)
categories = dd_sortedObjectList(categories)
for(var/datum/uplink_item/item in items)
if(!item.name)
@@ -38,15 +39,31 @@ var/datum/uplink/uplink = new()
..()
antag_roles = list()
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
purchase_log(U)
var/cost = cost(U.uses)
var/goods = get_goods(U, get_turf(user))
/datum/uplink_item/proc/buy(var/obj/item/device/uplink/U, var/mob/user)
var/extra_args = extra_args(user)
if(!extra_args)
return
if(!can_buy(U))
return
var/cost = cost(U.uses)
var/goods = get_goods(U, get_turf(user), user, extra_args)
if(!goods)
return
purchase_log(U)
U.uses -= cost
U.used_TC += cost
return goods
// Any additional arguments you wish to send to the get_goods
/datum/uplink_item/proc/extra_args(var/mob/user)
return 1
/datum/uplink_item/proc/can_buy(obj/item/device/uplink/U)
if(cost(U.uses) > U.uses)
return 0
@@ -90,11 +107,14 @@ datum/uplink_item/dd_SortValue()
/********************************
* *
* Physical Uplink Entires *
* Physical Uplink Entries *
* *
********************************/
/datum/uplink_item/item/buy(var/obj/item/device/uplink/U, var/mob/user)
var/obj/item/I = ..()
if(!I)
return
if(istype(I, /list))
var/list/L = I
if(L.len) I = L[1]
@@ -156,11 +176,6 @@ datum/uplink_item/dd_SortValue()
/datum/uplink_item/item/visible_weapons
category = /datum/uplink_category/visible_weapons
/datum/uplink_item/item/visible_weapons/emp
name = "5xEMP Grenades"
item_cost = 3
path = /obj/item/weapon/storage/box/emps
/datum/uplink_item/item/visible_weapons/energy_sword
name = "Energy Sword"
item_cost = 4
@@ -452,6 +467,27 @@ datum/uplink_item/dd_SortValue()
item_cost = 8
path = /obj/item/rig_module/mounted
/***********
* Grenades *
************/
/datum/uplink_item/item/grenades
category = /datum/uplink_category/grenades
/datum/uplink_item/item/grenades/anti_photon
name = "5xPhoton Disruption Grenades"
item_cost = 2
path = /obj/item/weapon/storage/box/anti_photons
/datum/uplink_item/item/grenades/emp
name = "5xEMP Grenades"
item_cost = 3
path = /obj/item/weapon/storage/box/emps
/datum/uplink_item/item/grenades/smoke
name = "5xSmoke Grenades"
item_cost = 2
path = /obj/item/weapon/storage/box/smokes
/************
* Badassery *
************/
@@ -531,6 +567,124 @@ datum/uplink_item/dd_SortValue()
return "\icon[icon]"
/********************************
* *
* Abstract Uplink Entries *
* *
********************************/
var/image/default_abstract_uplink_icon
/datum/uplink_item/abstract/log_icon()
if(!default_abstract_uplink_icon)
default_abstract_uplink_icon = image('icons/obj/pda.dmi', "pda-syn")
return "\icon[default_abstract_uplink_icon]"
/****************
* Announcements *
*****************/
/datum/uplink_item/abstract/announcements
category = /datum/uplink_category/services
/datum/uplink_item/abstract/announcements/buy(var/obj/item/device/uplink/U, var/mob/user)
. = ..()
if(.)
log_and_message_admins("has triggered a falsified [src]", user)
/datum/uplink_item/abstract/announcements/fake_centcom
item_cost = DEFAULT_TELECRYSTAL_AMOUNT / 2
/datum/uplink_item/abstract/announcements/fake_centcom/New()
..()
name = "[command_name()] Update Announcement"
desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data."
antag_roles = list(MODE_MERCENARY)
/datum/uplink_item/abstract/announcements/fake_centcom/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
command_announcement.Announce(args.["message"], args.["title"])
return 1
/datum/uplink_item/abstract/announcements/fake_crew_arrival
name = "Crew Arrival Announcement/Records"
desc = "Creates a fake crew arrival announcement as well as fake crew records, using your current appearance (including held items!) and worn id card. Trigger with care!"
item_cost = 4
/datum/uplink_item/abstract/announcements/fake_crew_arrival/New()
..()
antag_roles = list(MODE_MERCENARY)
/datum/uplink_item/abstract/announcements/fake_crew_arrival/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/user, var/list/args)
if(!user)
return 0
var/obj/item/weapon/card/id/I = GetIdCard(user)
var/datum/data/record/random_general_record
var/datum/data/record/random_medical_record
if(data_core.general.len)
random_general_record = pick(data_core.general)
random_medical_record = find_medical_record("id", random_general_record.fields["id"])
var/datum/data/record/general = data_core.CreateGeneralRecord(user)
if(I)
general.fields["age"] = I.age
general.fields["rank"] = I.assignment
general.fields["real_rank"] = I.assignment
general.fields["name"] = I.registered_name
general.fields["sex"] = I.sex
else
var/mob/living/carbon/human/H
if(istype(user,/mob/living/carbon/human))
H = user
general.fields["age"] = H.age
else
general.fields["age"] = initial(H.age)
var/assignment = GetAssignment(user)
general.fields["rank"] = assignment
general.fields["real_rank"] = assignment
general.fields["name"] = user.real_name
general.fields["sex"] = capitalize(user.gender)
general.fields["species"] = user.get_species()
var/datum/data/record/medical = data_core.CreateMedicalRecord(general.fields["name"], general.fields["id"])
data_core.CreateSecurityRecord(general.fields["name"], general.fields["id"])
if(!random_general_record)
general.fields["citizenship"] = random_general_record.fields["citizenship"]
general.fields["faction"] = random_general_record.fields["faction"]
general.fields["fingerprint"] = random_general_record.fields["fingerprint"]
general.fields["home_system"] = random_general_record.fields["home_system"]
general.fields["religion"] = random_general_record.fields["religion"]
if(random_medical_record)
medical.fields["b_type"] = random_medical_record.fields["b_type"]
medical.fields["b_dna"] = random_medical_record.fields["b_type"]
if(I)
general.fields["fingerprint"] = I.fingerprint_hash
medical.fields["b_type"] = I.blood_type
medical.fields["b_dna"] = I.dna_hash
AnnounceArrivalSimple(general.fields["name"], general.fields["rank"])
return 1
/datum/uplink_item/abstract/announcements/fake_ion_storm
name = "Ion Storm Announcement"
desc = "Interferes with the station's ion sensors. Triggers immediately upon investment."
item_cost = 1
/datum/uplink_item/abstract/announcements/fake_ion_storm/get_goods(var/obj/item/device/uplink/U, var/loc)
ion_storm_announcement()
return 1
/datum/uplink_item/abstract/announcements/fake_radiation
name = "Radiation Storm Announcement"
desc = "Interferes with the station's radiation sensors. Triggers immediately upon investment."
item_cost = 3
/datum/uplink_item/abstract/announcements/fake_radiation/get_goods(var/obj/item/device/uplink/U, var/loc)
var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0)
new/datum/event/radiation_storm/syndicate(EM)
return 1
/****************
* Support procs *
****************/
@@ -44,7 +44,7 @@ var/datum/uplink_random_selection/default_uplink_selection = new/datum/uplink_ra
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/a357)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/heavysniper, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/sniperammo, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/emp, 50)
items += new/datum/uplink_random_item(/datum/uplink_item/item/grenades/emp, 50)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/crossbow, 33)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/energy_sword, 75)