diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 324034253df..dce8f52ff30 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -1,9 +1,13 @@ // Flags for the obj_flags var on /obj -#define IN_USE (1<<0) // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! -#define CAN_BE_HIT (1<<1) //can this be bludgeoned by items? -#define PROJ_IGNORE_DENSITY (1<<2) // If non-dense structures can still get hit by projectiles -#define LIGHT_CAN_BE_SHUT (1<<3) // Is sensible to nightfall ability, and its light will be turned off +///If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING! +#define IN_USE (1<<0) +///can this be bludgeoned by items? +#define CAN_BE_HIT (1<<1) +///If non-dense structures can still get hit by projectiles +#define PROJ_IGNORE_DENSITY (1<<2) +///Is sensible to nightfall ability, and its light will be turned off +#define LIGHT_CAN_BE_SHUT (1<<3) //Fire and Acid stuff, for resistance_flags #define INDESTRUCTIBLE (1<<0) //doesn't take damage diff --git a/code/modules/reqs/supply.dm b/code/modules/reqs/supply.dm index a5a34373783..2ea9be6ee17 100644 --- a/code/modules/reqs/supply.dm +++ b/code/modules/reqs/supply.dm @@ -335,7 +335,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/cost = 0 for(var/P in SO.pack) var/datum/supply_packs/SP = P - packs += SP.type + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["requests"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["deniedrequests"] = list() @@ -347,7 +350,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/cost = 0 for(var/P in SO.pack) var/datum/supply_packs/SP = P - packs += SP.type + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["deniedrequests"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["approvedrequests"] = list() @@ -357,8 +363,12 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( continue var/list/packs = list() var/cost = 0 - for(var/datum/supply_packs/SP AS in SO.pack) - packs += SP.type + for(var/P in SO.pack) + var/datum/supply_packs/SP = P + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["approvedrequests"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["awaiting_delivery"] = list() @@ -367,16 +377,30 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/datum/supply_order/SO = LAZYACCESSASSOC(SSpoints.shoppinglist, faction, key) .["awaiting_delivery_orders"]++ var/list/packs = list() - for(var/datum/supply_packs/SP AS in SO.pack) - packs += SP.type - .["awaiting_delivery"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "packs" = packs, "authed_by" = SO.authorised_by)) + var/cost = 0 + for(var/P in SO.pack) + var/datum/supply_packs/SP = P + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 + cost += SP.cost + .["awaiting_delivery"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["export_history"] = list() var/id = 0 + var/lastexport = "" for(var/datum/export_report/report AS in SSpoints.export_history) if(report.faction != user.faction) continue - .["export_history"] += list(list("id" = id, "name" = report.export_name, "points" = report.points)) - id++ + if(report.points == 0) + continue + if(report.export_name == lastexport) + .["export_history"][id]["amount"] += 1 + .["export_history"][id]["total"] += report.points + else + .["export_history"] += list(list("id" = id, "name" = report.export_name, "points" = report.points, "amount" = 1, total = report.points)) + id++ + lastexport = report.export_name .["shopping_history"] = list() for(var/datum/supply_order/SO AS in SSpoints.shopping_history) if(SO.faction != user.faction) @@ -385,7 +409,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/cost = 0 for(var/P in SO.pack) var/datum/supply_packs/SP = P - packs += SP.type + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["shopping_history"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["shopping_list_cost"] = 0 @@ -542,7 +569,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/cost = 0 for(var/P in SO.pack) var/datum/supply_packs/SP = P - packs += SP.type + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["requests"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["deniedrequests"] = list() @@ -554,7 +584,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/cost = 0 for(var/P in SO.pack) var/datum/supply_packs/SP = P - packs += SP.type + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["deniedrequests"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["approvedrequests"] = list() @@ -566,7 +599,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list( var/cost = 0 for(var/P in SO.pack) var/datum/supply_packs/SP = P - packs += SP.type + if(packs[SP.type]) + packs[SP.type] += 1 + else + packs[SP.type] = 1 cost += SP.cost .["approvedrequests"] += list(list("id" = SO.id, "orderer" = SO.orderer, "orderer_rank" = SO.orderer_rank, "reason" = SO.reason, "cost" = cost, "packs" = packs, "authed_by" = SO.authorised_by)) .["awaiting_delivery"] = list() diff --git a/icons/UI_Icons/map_blips.dmi b/icons/UI_Icons/map_blips.dmi index ac690297967..9e7e1217c58 100644 Binary files a/icons/UI_Icons/map_blips.dmi and b/icons/UI_Icons/map_blips.dmi differ diff --git a/tgui/packages/tgui/interfaces/Cargo.js b/tgui/packages/tgui/interfaces/Cargo.js index 9e9569a19c4..9fa76a9acba 100644 --- a/tgui/packages/tgui/interfaces/Cargo.js +++ b/tgui/packages/tgui/interfaces/Cargo.js @@ -41,7 +41,7 @@ export const Cargo = (props, context) => { : null; return ( - + @@ -84,7 +84,9 @@ const Exports = (props, context) => { {export_history.map((exp) => ( {exp.name} - {exp.points} points + + {exp.amount} x {exp.points} points ({exp.total}) + ))} @@ -312,18 +314,21 @@ const Packs = (props, context) => { const { act, data } = useBackend(context); const { packs } = props; - return packs.map((pack) => ); + return Object.keys(packs).map((pack) => ( + + )); }; const Pack = (props, context) => { const { act, data } = useBackend(context); - const { pack } = props; + const { pack, amount } = props; const { supplypackscontents } = data; const { name, cost, contains } = supplypackscontents[pack]; + return !!contains && contains.constructor === Object ? ( }> + title={}>
@@ -334,12 +339,13 @@ const Pack = (props, context) => { }; const PackName = (props, context) => { - const { cost, name, pl } = props; + const { cost, name, pl, amount } = props; return ( - - {cost} points + + {amount ? amount + 'x' : ''} + {cost} points {amount ? '(' + amount * cost + ')' : ''} {name} @@ -583,7 +589,7 @@ export const CargoRequest = (props, context) => { : null; return ( - +