April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/global/list/uplinks = list()
|
||||
GLOBAL_LIST_EMPTY(uplinks)
|
||||
|
||||
/**
|
||||
* Uplinks
|
||||
@@ -22,7 +22,7 @@ var/global/list/uplinks = list()
|
||||
|
||||
/obj/item/device/uplink/New()
|
||||
..()
|
||||
uplinks += src
|
||||
GLOB.uplinks += src
|
||||
uplink_items = get_uplink_items(gamemode)
|
||||
|
||||
/obj/item/device/uplink/proc/set_gamemode(gamemode)
|
||||
@@ -30,7 +30,7 @@ var/global/list/uplinks = list()
|
||||
uplink_items = get_uplink_items(gamemode)
|
||||
|
||||
/obj/item/device/uplink/Destroy()
|
||||
uplinks -= src
|
||||
GLOB.uplinks -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/uplink/attackby(obj/item/I, mob/user, params)
|
||||
@@ -60,7 +60,7 @@ var/global/list/uplinks = list()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = inventory_state)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
|
||||
|
||||
@@ -1,32 +1,38 @@
|
||||
var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
|
||||
/proc/initialize_global_uplink_items()
|
||||
GLOB.uplink_items = list()
|
||||
for(var/item in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/I = new item()
|
||||
if(!I.item)
|
||||
continue
|
||||
if(!GLOB.uplink_items[I.category])
|
||||
GLOB.uplink_items[I.category] = list()
|
||||
GLOB.uplink_items[I.category][I.name] = I
|
||||
|
||||
/proc/get_uplink_items(var/datum/game_mode/gamemode = null)
|
||||
if(!uplink_items.len)
|
||||
for(var/item in subtypesof(/datum/uplink_item))
|
||||
var/datum/uplink_item/I = new item()
|
||||
if(!I.item)
|
||||
continue
|
||||
if(!uplink_items[I.category])
|
||||
uplink_items[I.category] = list()
|
||||
uplink_items[I.category][I.name] = I
|
||||
if(!GLOB.uplink_items.len)
|
||||
initialize_global_uplink_items()
|
||||
|
||||
var/list/filtered_uplink_items = list()
|
||||
var/list/sale_items = list()
|
||||
|
||||
for(var/category in uplink_items)
|
||||
for(var/item in uplink_items[category])
|
||||
var/datum/uplink_item/I = uplink_items[category][item]
|
||||
for(var/category in GLOB.uplink_items)
|
||||
for(var/item in GLOB.uplink_items[category])
|
||||
var/datum/uplink_item/I = GLOB.uplink_items[category][item]
|
||||
if(!istype(I))
|
||||
continue
|
||||
if(I.include_modes.len)
|
||||
if(!gamemode && ticker && !(ticker.mode.type in I.include_modes))
|
||||
if(!gamemode && SSticker && !(SSticker.mode.type in I.include_modes))
|
||||
continue
|
||||
if(gamemode && !(gamemode in I.include_modes))
|
||||
continue
|
||||
if(I.exclude_modes.len)
|
||||
if(!gamemode && ticker && (ticker.mode.type in I.exclude_modes))
|
||||
if(!gamemode && SSticker && (SSticker.mode.type in I.exclude_modes))
|
||||
continue
|
||||
if(gamemode && (gamemode in I.exclude_modes))
|
||||
continue
|
||||
if(I.player_minimum && I.player_minimum > joined_player_list.len)
|
||||
if(I.player_minimum && I.player_minimum > GLOB.joined_player_list.len)
|
||||
continue
|
||||
|
||||
if(!filtered_uplink_items[category])
|
||||
@@ -117,6 +123,11 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
to_chat(H, "\The [A] materializes onto the floor.")
|
||||
return 1
|
||||
|
||||
/datum/uplink_item/Destroy()
|
||||
if(src in GLOB.uplink_items)
|
||||
GLOB.uplink_items -= src //Take us out instead of leaving a null!
|
||||
return ..()
|
||||
|
||||
//Discounts (dynamically filled above)
|
||||
/datum/uplink_item/discounts
|
||||
category = "Discounted Gear"
|
||||
@@ -822,17 +833,6 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
cost = 1
|
||||
surplus = 1
|
||||
|
||||
/datum/uplink_item/stealthy_tools/syndi_borer
|
||||
name = "Syndicate Brain Slug"
|
||||
desc = "A small cortical borer, modified to be completely loyal to the owner. \
|
||||
Genetically infertile, these brain slugs can assist medically in a support role, or take direct action \
|
||||
to assist their host."
|
||||
item = /obj/item/weapon/antag_spawner/syndi_borer
|
||||
refundable = TRUE
|
||||
cost = 10
|
||||
surplus = 20 //Let's not have this be too common
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
|
||||
//Space Suits and Hardsuits
|
||||
/datum/uplink_item/suits
|
||||
category = "Space Suits and Hardsuits"
|
||||
@@ -1092,10 +1092,10 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
cost = 20
|
||||
|
||||
/datum/uplink_item/device_tools/jammer
|
||||
name = "Radio jammer"
|
||||
name = "Radio Jammer"
|
||||
desc = "This device will disrupt any nearby outgoing radio communication when activated."
|
||||
item = /obj/item/device/jammer
|
||||
cost = 10
|
||||
cost = 5
|
||||
|
||||
// Implants
|
||||
/datum/uplink_item/implants
|
||||
@@ -1157,40 +1157,40 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
|
||||
/datum/uplink_item/cyber_implants/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
if(item)
|
||||
if(istype(item, /obj/item/organ/cyberimp))
|
||||
if(istype(item, /obj/item/organ))
|
||||
return new /obj/item/weapon/storage/box/cyber_implants(loc, item)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/uplink_item/cyber_implants/thermals
|
||||
name = "Thermal eyes"
|
||||
desc = "These cybernetic eyes will give you thermal vision. Comes with a free autoimplanter."
|
||||
item = /obj/item/organ/eyes/robotic/thermals
|
||||
name = "Thermal Eyes"
|
||||
desc = "These cybernetic eyes will give you thermal vision. Comes with a free autosurgeon."
|
||||
item = /obj/item/device/autosurgeon/thermal_eyes
|
||||
cost = 8
|
||||
|
||||
/datum/uplink_item/cyber_implants/xray
|
||||
name = "X-Ray Vision Implant"
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Comes with an autoimplanter."
|
||||
item = /obj/item/organ/eyes/robotic/xray
|
||||
desc = "These cybernetic eyes will give you X-ray vision. Comes with an autosurgeon."
|
||||
item = /obj/item/device/autosurgeon/xray_eyes
|
||||
cost = 10
|
||||
|
||||
/datum/uplink_item/cyber_implants/antistun
|
||||
name = "CNS Rebooter Implant"
|
||||
desc = "This implant will help you get back up on your feet faster after being stunned. Comes with an autoimplanter."
|
||||
item = /obj/item/organ/cyberimp/brain/anti_stun
|
||||
desc = "This implant will help you get back up on your feet faster after being stunned. Comes with an autosurgeon."
|
||||
item = /obj/item/device/autosurgeon/anti_stun
|
||||
cost = 12
|
||||
|
||||
/datum/uplink_item/cyber_implants/reviver
|
||||
name = "Reviver Implant"
|
||||
desc = "This implant will attempt to revive you if you lose consciousness. Comes with an autoimplanter."
|
||||
item = /obj/item/organ/cyberimp/chest/reviver
|
||||
desc = "This implant will attempt to revive you if you lose consciousness. Comes with an autosurgeon."
|
||||
item = /obj/item/device/autosurgeon/reviver
|
||||
cost = 8
|
||||
|
||||
/datum/uplink_item/cyber_implants/bundle
|
||||
name = "Cybernetic Implants Bundle"
|
||||
desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. Comes with an autoimplanter."
|
||||
item = /obj/item/weapon/storage/box/cyber_implants/bundle
|
||||
desc = "A random selection of cybernetic implants. Guaranteed 5 high quality implants. Comes with an autosurgeon."
|
||||
item = /obj/item/weapon/storage/box/cyber_implants
|
||||
cost = 40
|
||||
cant_discount = TRUE
|
||||
|
||||
@@ -1308,7 +1308,7 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/badass/surplus/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
var/list/uplink_items = get_uplink_items(ticker.mode)
|
||||
var/list/uplink_items = get_uplink_items(SSticker.mode)
|
||||
|
||||
var/crate_value = 50
|
||||
var/obj/structure/closet/crate/C = new(loc)
|
||||
@@ -1336,7 +1336,7 @@ var/list/uplink_items = list() // Global list so we only initialize this once.
|
||||
cant_discount = TRUE
|
||||
|
||||
/datum/uplink_item/badass/random/spawn_item(turf/loc, obj/item/device/uplink/U)
|
||||
var/list/uplink_items = get_uplink_items(ticker.mode)
|
||||
var/list/uplink_items = get_uplink_items(SSticker.mode)
|
||||
var/list/possible_items = list()
|
||||
for(var/category in uplink_items)
|
||||
for(var/item in uplink_items[category])
|
||||
|
||||
10
code/modules/uplink/uplink_item_cit.dm
Normal file
10
code/modules/uplink/uplink_item_cit.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
/datum/uplink_item/stealthy_tools/syndi_borer
|
||||
name = "Syndicate Brain Slug"
|
||||
desc = "A small cortical borer, modified to be completely loyal to the owner. \
|
||||
Genetically infertile, these brain slugs can assist medically in a support role, or take direct action \
|
||||
to assist their host."
|
||||
item = /obj/item/weapon/antag_spawner/syndi_borer
|
||||
refundable = TRUE
|
||||
cost = 10
|
||||
surplus = 20 //Let's not have this be too common
|
||||
exclude_modes = list(/datum/game_mode/nuclear)
|
||||
Reference in New Issue
Block a user