Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating from Neb dev. #21

Merged
merged 63 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
abb890f
Adding a character comments system.
MistakeNot4892 Jun 28, 2023
ba61acd
Eggbox refactor.
MistakeNot4892 Jan 19, 2024
169e478
Broke up fancy.dm.
MistakeNot4892 Jan 19, 2024
774e796
Moved egg inhands into egg icon files.
MistakeNot4892 Jan 19, 2024
c84e3cc
Updating donut box/donuts.
MistakeNot4892 Jan 19, 2024
d886072
Repathed fancy storage to box for foldability.
MistakeNot4892 Jan 19, 2024
5eed4d6
Moved donut inhands into donut icons.
MistakeNot4892 Jan 19, 2024
57b3773
Crackerbag rework.
MistakeNot4892 Jan 19, 2024
7209fda
Pizza box rework.
MistakeNot4892 Jan 19, 2024
96888c0
Updating max storage space for fancy boxes.
MistakeNot4892 Jan 19, 2024
d40a7b7
Renamed pen vars to BYOND spelling of color, made crayon box fancy.
MistakeNot4892 Jan 24, 2024
61fcb22
Requested changes for fancy box PR.
MistakeNot4892 Jan 26, 2024
a087a8c
Fixes pikes not updating icons.
MistakeNot4892 Jan 26, 2024
4ed7476
Allowing fabricators to be messed with when depowered.
MistakeNot4892 Jan 26, 2024
8605a0a
Passes user target zone properly in Fire().
MistakeNot4892 Jan 27, 2024
3ea699e
Allows cycling out from tradeship EVA airlock.
MistakeNot4892 Jan 27, 2024
6a41f35
Quickfixes pizzabox icons.
MistakeNot4892 Jan 27, 2024
3a9d494
Rolls back attack selector atom stuff, didn't work anyway.
MistakeNot4892 Jan 27, 2024
f46490a
Firemodes are now counted towards gun value.
MistakeNot4892 Jan 27, 2024
addc7aa
Vendors now use atom info price instead of sale price.
MistakeNot4892 Jan 27, 2024
723482b
Cleaned up stored_product New().
MistakeNot4892 Jan 27, 2024
36aaa45
Syringes now autolabel like bottles.
MistakeNot4892 Jan 27, 2024
9128d5a
Large flora will now block movement and vision.
MistakeNot4892 Jan 27, 2024
a78d80a
Allowing skipping of offsetting in get_mob_overlay() and adjust_mob_o…
MistakeNot4892 Jan 27, 2024
0d57bf6
Prevents exoplanet names doubling up.
MistakeNot4892 Jan 27, 2024
a2814d5
Fixes runtime with remove_camera_from_channels().
MistakeNot4892 Jan 28, 2024
24ce289
Flame and smokables will only work as cauteries when lit.
MistakeNot4892 Jan 28, 2024
34de263
catwalk
Greenjoe12345 Jan 28, 2024
8a8abda
Cleaning up tcomm site name passing.
MistakeNot4892 Jan 29, 2024
04e8cea
Merge pull request #3635 from NebulaSS13/staging
MistakeNot4892 Jan 29, 2024
15da7f9
Should fix grabs not clearing reliably.
MistakeNot4892 Jan 29, 2024
de81c4c
Merge pull request #3633 from Greenjoe12345/catwalkstairs
MistakeNot4892 Jan 29, 2024
971a910
Forces flood overlay to be mouse transparent.
MistakeNot4892 Jan 29, 2024
6b13faf
Merge pull request #3165 from MistakeNot4892/comments
out-of-phaze Jan 30, 2024
f4ba9bb
Minor cleanup of survey disk code.
MistakeNot4892 Jan 30, 2024
933a14b
Minor cleanup of bookcase update_icon() calling.
MistakeNot4892 Jan 30, 2024
bfdf608
Temp fix for lava lamp icons.
MistakeNot4892 Jan 30, 2024
ee29bff
Minor cleanup of paper icon updates.
MistakeNot4892 Jan 30, 2024
501f1a0
Modular computers should count as off when shutdown.
MistakeNot4892 Jan 30, 2024
e633322
Minor paper string cleanup.
MistakeNot4892 Jan 30, 2024
4bd8ccc
Added network machinery to the bearcat wreck.
MistakeNot4892 Jan 30, 2024
364ff08
Corrects some non-lazy access of pages var on paper bundles.
MistakeNot4892 Jan 30, 2024
a9c27f8
Fixes issues with human Life() processing.
MistakeNot4892 Jan 31, 2024
fe005fa
Holders are now immune to damage.
MistakeNot4892 Jan 31, 2024
0da3624
Merge pull request #3601 from MistakeNot4892/eggbox
out-of-phaze Jan 31, 2024
7ec578b
Automatic changelog generation for PR #3601 [ci skip]
NebulaSS13Bot Jan 31, 2024
0aa1d61
Merge pull request #3643 from MistakeNot4892/stablefixes2
out-of-phaze Jan 31, 2024
31ca186
Merge pull request #3636 from MistakeNot4892/staging
out-of-phaze Jan 31, 2024
daaf8ce
Merge pull request #3644 from MistakeNot4892/bearcat
out-of-phaze Jan 31, 2024
e69ff42
Automatic changelog generation for PR #3644 [ci skip]
NebulaSS13Bot Jan 31, 2024
fa68561
Merge pull request #3628 from MistakeNot4892/stablefixes
out-of-phaze Feb 1, 2024
615202c
Automatic changelog generation [ci skip]
NebulaSS13Bot Feb 1, 2024
1258154
Merge branch 'stable' of github.com:NebulaSS13/Nebula into stagingupdate
MistakeNot4892 Feb 1, 2024
2dca167
Merge pull request #3651 from MistakeNot4892/stagingupdate
MistakeNot4892 Feb 1, 2024
221832e
Merge pull request #3648 from MistakeNot4892/devfixes
out-of-phaze Feb 1, 2024
8485046
Fixes flashlight icons keeping plane/layer at time of generation.
MistakeNot4892 Jan 30, 2024
0da464e
Skill selection for jobs no longer uses th for every field.
MistakeNot4892 Jan 30, 2024
5b9c3d3
Human glowing eyes now apply ZMANGLE.
MistakeNot4892 Jan 30, 2024
fe82940
Projectiles should handle going off the side of the map better now.
MistakeNot4892 Jan 30, 2024
208ea46
Fixes some broken filter syntax.
MistakeNot4892 Jan 31, 2024
5f1290a
Merge branch 'staging' of github.com:NebulaSS13/Nebula into devupdate
MistakeNot4892 Feb 2, 2024
f177692
Merge pull request #3653 from MistakeNot4892/devupdate
MistakeNot4892 Feb 2, 2024
246600e
Merge branch 'dev' of github.com:NebulaSS13/Nebula into cruxdev
MistakeNot4892 Feb 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions code/__defines/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
#define MCS_BLOCK 2 // Failed to change, but action was performed

#define FABRICATOR_EXTRA_COST_FACTOR 1.25
#define FAB_HACKED 1
#define FAB_DISABLED 2
#define FAB_SHOCKED 4
#define FAB_BUSY 8
#define FAB_HACKED BITFLAG(0)
#define FAB_DISABLED BITFLAG(1)
#define FAB_SHOCKED BITFLAG(2)
#define FAB_BUSY BITFLAG(3)

#define PART_CPU /obj/item/stock_parts/computer/processor_unit // CPU. Without it the computer won't run. Better CPUs can run more programs at once.
#define PART_NETWORK /obj/item/stock_parts/computer/network_card // Network Card component of this computer. Allows connection to network
Expand Down
1 change: 1 addition & 0 deletions code/__defines/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define TOOL_SURGICAL_DRILL /decl/tool_archetype/surgical_drill

// Tool qualities (positive multplier)
#define TOOL_QUALITY_NONE 0
#define TOOL_QUALITY_WORST 0.1
#define TOOL_QUALITY_BAD 0.5
#define TOOL_QUALITY_MEDIOCRE 0.75
Expand Down
9 changes: 9 additions & 0 deletions code/controllers/subsystems/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ SUBSYSTEM_DEF(configuration)
load_sql()
load_event()

for(var/client/C)
C.update_post_config_load()

/client/proc/update_post_config_load()
if(get_config_value(/decl/config/toggle/allow_character_comments))
verbs |= /client/proc/view_character_information
else
verbs -= /client/proc/view_character_information

/datum/controller/subsystem/configuration/proc/write_default_configuration(var/list/specific_files, var/modify_write_prefix)

if(!specific_files)
Expand Down
188 changes: 188 additions & 0 deletions code/controllers/subsystems/initialization/character_info.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
// Holder subsystem for character comment records.
SUBSYSTEM_DEF(character_info)
name = "Character Information"
flags = SS_NEEDS_SHUTDOWN
init_order = SS_INIT_EARLY
wait = 1 SECOND
var/static/comments_source = "data/character_info/"
var/list/_comment_holders_by_id = list()
var/list/_ids_to_save = list()

/datum/controller/subsystem/character_info/Initialize()
. = ..()
if(!get_config_value(/decl/config/toggle/allow_character_comments))
report_progress("Skipping mass load of character records as character comments are disabled.")
return
if(!fexists(comments_source))
report_progress("Character information directory [comments_source] does not exist, no character comments will be saved or loaded.")
return
var/loaded_json_manifest = load_text_from_directory(comments_source, ".json")
if(!islist(loaded_json_manifest) || !length(loaded_json_manifest["files"]))
return
var/list/loaded_files = loaded_json_manifest["files"]
var/loaded_comments = 0
for(var/loaded_file in loaded_files)
var/datum/character_information/comments = load_record(loaded_files[loaded_file])
if(!istext(comments.record_id))
PRINT_STACK_TRACE("Deserialized character information had invalid id '[comments.record_id || "NULL"]'!")
continue

// Remove any pre-created records (early joiners, etc.)
if(_comment_holders_by_id[comments.record_id])
var/old_record = _comment_holders_by_id[comments.record_id]
_comment_holders_by_id -= comments.record_id
qdel(old_record)

comments.file_location = loaded_file
_comment_holders_by_id[comments.record_id] = comments
loaded_comments += length(comments.comments)
report_progress("Loaded [loaded_comments] record\s for [length(_comment_holders_by_id)] character\s.")

/datum/controller/subsystem/character_info/Shutdown()
. = ..()
for(var/id in _comment_holders_by_id)
save_record(id)

/datum/controller/subsystem/character_info/stat_entry(msg)
..("R:[_comment_holders_by_id.len]Q:[_ids_to_save.len][msg]")

/datum/controller/subsystem/character_info/fire(resumed = FALSE, no_mc_tick = FALSE)
while(_ids_to_save.len)
var/id = _ids_to_save[1]
_ids_to_save -= id
save_record(id)
if(TICK_CHECK)
return

/datum/controller/subsystem/character_info/proc/queue_to_save(var/record_id)
if(istext(record_id) && length(record_id))
_ids_to_save |= record_id

/datum/controller/subsystem/character_info/proc/save_record(var/record_id)
if(!istext(record_id) || !record_id)
return
var/datum/character_information/comments = get_record(record_id, TRUE)
if(!istype(comments))
return
if(!comments.file_location)
comments.file_location = "[comments_source][ckey(comments.record_id)].json"
try
if(fexists(comments.file_location))
fdel(comments.file_location)
to_file(file(comments.file_location), comments.serialize_to_json())
catch(var/exception/E)
PRINT_STACK_TRACE("Exception when writing out character information file to [comments?.file_location || "NULL"]: [E]")

/datum/controller/subsystem/character_info/proc/load_record(var/load_from)
var/datum/character_information/comments = new(cached_json_decode(load_from))
_comment_holders_by_id[comments.record_id] = comments
return comments

/datum/controller/subsystem/character_info/proc/reload_record(var/record_id)
var/datum/character_information/comments = get_record(record_id, TRUE)
if(comments && comments.file_location && fexists(comments.file_location))
var/reload_from = comments.file_location
_comment_holders_by_id -= comments.record_id
qdel(comments)
try
. = load_record(safe_file2text(reload_from))
catch(var/exception/E)
PRINT_STACK_TRACE("Exception when reloading record from [reload_from]: [E]")

/datum/controller/subsystem/character_info/proc/clear_record(var/record_id)
var/datum/character_information/comments = get_record(record_id, TRUE)
if(comments)
comments.comments.Cut()
comments.ic_info = null
comments.ooc_info = null

/datum/controller/subsystem/character_info/proc/get_record_id(var/record_id)
return trim(lowertext(record_id))

/datum/controller/subsystem/character_info/proc/get_record(var/record_id, var/override_prefs, var/discard_archived_record)
record_id = get_record_id(record_id)
if(!record_id)
CRASH("Attempt to retrieve null character information ID.")
var/datum/character_information/comments = _comment_holders_by_id[record_id]
if(istype(comments) && (override_prefs || (get_config_value(/decl/config/toggle/allow_character_comments) && comments.allow_comments) || comments.show_info_on_examine))
return comments

/datum/controller/subsystem/character_info/proc/get_or_create_record(var/record_id, var/override_prefs)
. = get_record(record_id, override_prefs)
if(!. && initialized)
// Let's assume they'll populate it if so desired.
var/datum/character_information/comments = new
comments.record_id = get_record_id(record_id)
_comment_holders_by_id[comments.record_id] = comments
. = comments

/datum/controller/subsystem/character_info/proc/search_records(var/search_for)
search_for = ckey(lowertext(trim(search_for)))
for(var/id in _comment_holders_by_id)
var/datum/character_information/comments = _comment_holders_by_id[id]
for(var/checkstring in list(comments.name, comments.ckey, comments.record_id))
if(findtext(ckey(lowertext(trim(checkstring))), search_for) > 0)
LAZYADD(., comments)
break

/datum/controller/subsystem/character_info/Topic(href, href_list)
. = ..()
if(!. && href_list["download_manifest"] && usr && check_rights(R_ADMIN))
try
var/dump_file_name = "[comments_source]dump_character_manifest.html"
if(fexists(dump_file_name))
fdel(dump_file_name)
text2file(JOINTEXT(SScharacter_info.get_character_manifest_html(apply_striping = FALSE)), dump_file_name)
if(fexists(dump_file_name))
direct_output(usr, ftp(dump_file_name, "dump_manifest.html"))
return TOPIC_HANDLED
catch(var/exception/E)
log_debug("Exception when dumping character relationship manifest: [E]")

#define COMMENT_CANDYSTRIPE_ONE "#343434"
#define COMMENT_CANDYSTRIPE_TWO "#454545"
/datum/controller/subsystem/character_info/proc/get_character_manifest_html(var/apply_striping = TRUE)
var/list/records_with_an_entry = list()
for(var/id in _comment_holders_by_id)
var/datum/character_information/comments = _comment_holders_by_id[id]
for(var/datum/character_comment/comment in comments.comments)
if(comment.is_stale())
continue
records_with_an_entry |= comment.author_id
sortTim(records_with_an_entry, /proc/cmp_text_asc)
. = list("<table>")
if(apply_striping)
. += "<tr bgcolor = '[COMMENT_CANDYSTRIPE_ONE]'>"
else
. += "<tr>"
. += "<th width = '170px'><center>Character Relationship Matrix</center></th>"
for(var/column_id in records_with_an_entry)
var/datum/character_information/column = _comment_holders_by_id[column_id]
. += "<td width = '360px' style=\"border: 1px solid #272727;\"><center>[column.char_name]<br/><small><i>[column.ckey]</i></small></center></td>"
. += "</tr>"
var/ticker = FALSE
for(var/row_id in records_with_an_entry)
if(apply_striping)
. += "<tr bgcolor = '[ticker ? COMMENT_CANDYSTRIPE_ONE : COMMENT_CANDYSTRIPE_TWO]'>"
ticker = !ticker
else
. += "<tr>"
var/datum/character_information/row = _comment_holders_by_id[row_id]
. += "<td width = '170px' style=\"border: 1px solid #272727;\"><center>[row.char_name]<br/><small><i>[row.ckey]</i></small></center></td>"
for(var/column_id in records_with_an_entry)
var/datum/character_information/column = _comment_holders_by_id[column_id]
var/found_comment = FALSE
for(var/datum/character_comment/comment in column.comments)
if(comment.author_id == row_id && !comment.is_stale())
found_comment = TRUE
var/mood_title = comment.main_mood.name
if(comment.border_mood)
mood_title = "[mood_title] ([comment.border_mood.name])"
. += "<td title = '[mood_title]' width = '360px' style=\"border: 1px solid [comment.border_mood ? comment.border_mood.bg_color : comment.main_mood.fg_color];\" bgcolor = '[comment.main_mood.bg_color]'><center><font color = '[comment.main_mood.fg_color]'>[comment.body]</font></center></td>"
break
if(!found_comment)
. += "<td width = '360px' style=\"border: 1px solid #272727;\"></td>"
. += "</tr>"
. += "</table>"
#undef COMMENT_CANDYSTRIPE_ONE
#undef COMMENT_CANDYSTRIPE_TWO
12 changes: 11 additions & 1 deletion code/datums/config/config_types/config_game_option.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
/decl/config/toggle/assistant_maint,
/decl/config/toggle/ghost_interaction,
/decl/config/toggle/aliens_allowed,
/decl/config/toggle/ninjas_allowed
/decl/config/toggle/ninjas_allowed,
/decl/config/toggle/allow_character_comments,
/decl/config/num/hide_comments_older_than
)

/decl/config/num/movement_human
Expand Down Expand Up @@ -162,3 +164,11 @@
/decl/config/toggle/ninjas_allowed
uid = "ninjas_allowed"
desc = "Remove the # to let ninjas spawn."

/decl/config/toggle/allow_character_comments
uid = "allow_character_comments"
desc = "Remove the # to allow people to leave public comments on each other's characters via the comments system."

/decl/config/num/hide_comments_older_than
uid = "hide_comments_older_than"
desc = "Specify a number of days after which to hide comments on public profiles (to avoid bloat from retired characters)."
6 changes: 4 additions & 2 deletions code/datums/position_point_vector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
pixel_y = _pixel_y

/datum/position/proc/return_turf()
return locate(x, y, z)
var/turf/T = locate(x, y, z)
return T?.resolve_to_actual_turf()

/datum/position/proc/return_px()
return pixel_x
Expand Down Expand Up @@ -111,7 +112,8 @@
AM.pixel_y = return_py()

/datum/point/proc/return_turf()
return locate(CEILING(x / world.icon_size), CEILING(y / world.icon_size), z)
var/turf/T = locate(CEILING(x / world.icon_size), CEILING(y / world.icon_size), z)
return T?.resolve_to_actual_turf()

/datum/point/proc/return_coordinates() //[turf_x, turf_y, z]
return list(CEILING(x / world.icon_size), CEILING(y / world.icon_size), z)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/supplypacks/galley.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
contains = list(/obj/item/chems/condiment/flour = 6,
/obj/item/chems/drinks/milk = 4,
/obj/item/chems/drinks/soymilk = 2,
/obj/item/storage/fancy/egg_box = 2,
/obj/item/storage/box/fancy/egg_box = 2,
/obj/item/chems/food/tofu = 4,
/obj/item/chems/food/meat = 4,
/obj/item/chems/condiment/enzyme = 1
Expand Down Expand Up @@ -45,7 +45,7 @@

/decl/hierarchy/supply_pack/galley/eggs
name = "Perishables - Eggs"
contains = list(/obj/item/storage/fancy/egg_box = 2)
contains = list(/obj/item/storage/box/fancy/egg_box = 2)
containertype = /obj/structure/closet/crate/freezer
containername = "egg crate"

Expand Down Expand Up @@ -93,7 +93,7 @@
/obj/item/chems/drinks/bottle/patron,
/obj/item/chems/drinks/bottle/goldschlager,
/obj/item/chems/drinks/bottle/agedwhiskey,
/obj/item/storage/fancy/cigarettes/dromedaryco,
/obj/item/storage/box/fancy/cigarettes/dromedaryco,
/obj/random/lipstick,
/obj/item/chems/drinks/bottle/small/ale = 2,
/obj/item/chems/drinks/bottle/small/beer = 4,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/supplypacks/nonessent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/decl/hierarchy/supply_pack/nonessent/artscrafts
name = "Art - Arts and Crafts supplies"
contains = list(
/obj/item/storage/fancy/crayons,
/obj/item/storage/box/fancy/crayons,
/obj/item/camera,
/obj/item/camera_film = 2,
/obj/item/storage/photo_album,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/trading/traders/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ They sell generic supplies and ask for generic supplies.
/obj/item/storage/backpack/dufflebag/syndie = TRADER_BLACKLIST_SUB,
/obj/item/storage/belt/champion = TRADER_THIS_TYPE,
/obj/item/storage/briefcase = TRADER_THIS_TYPE,
/obj/item/storage/fancy = TRADER_SUBTYPES_ONLY,
/obj/item/storage/box/fancy = TRADER_SUBTYPES_ONLY,
/obj/item/storage/laundry_basket = TRADER_THIS_TYPE,
/obj/item/storage/secure/briefcase = TRADER_THIS_TYPE,
/obj/item/storage/plants = TRADER_THIS_TYPE,
Expand Down
4 changes: 3 additions & 1 deletion code/datums/trading/traders/food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
var/obj/item/pizzabox/box = new(location)
M.forceMove(box)
box.pizza = M
box.boxtag = "A special order from [origin]"
box.box_tag = "A special order from [origin]!"
box.update_strings()
box.update_icon()

/datum/trader/ship/chinese
name = "Chinese Restaurant"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/trading/traders/goods.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ Sells devices, odds and ends, and medical stuff
/obj/item/organ/internal/kidneys = TRADER_THIS_TYPE,
/obj/item/organ/internal/lungs = TRADER_THIS_TYPE,
/obj/item/organ/internal/heart = TRADER_THIS_TYPE,
/obj/item/storage/fancy/cigarettes = TRADER_ALL
/obj/item/storage/box/fancy/cigarettes = TRADER_ALL
)

possible_trading_items = list(
Expand Down
16 changes: 10 additions & 6 deletions code/datums/vending/stored_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
var/list/instances //What items are actually stored
var/atom/storing_object

/datum/stored_items/New(var/atom/storing_object, var/path, var/name = null, var/amount = 0)
/datum/stored_items/New(atom/_storing_object, _path, _name, _amount = 1)
if(_storing_object)
storing_object = _storing_object
if(!istype(storing_object))
CRASH("Unexpected storing object.")
src.storing_object = storing_object
src.item_path = path
src.amount = amount
src.item_name = name || atom_info_repository.get_name_for(path)
CRASH("Unexpected storing object: [storing_object]")
if(_path)
item_path = _path
if(!ispath(item_path))
CRASH("Unexpected item path: [item_path || "NULL"]")
item_name = _name || atom_info_repository.get_name_for(item_path)
amount = _amount
..()

/datum/stored_items/Destroy()
Expand Down
18 changes: 8 additions & 10 deletions code/datums/vending/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
*/

/datum/stored_items/vending_products
item_name = "generic" // Display name for the product
var/price = 0 // Price to buy one
var/display_color = null // Display color for vending machine listing
var/category = CAT_NORMAL // CAT_HIDDEN for contraband

/datum/stored_items/vending_products/New(var/atom/storing_object, var/path, var/name = null, var/amount = 0, var/price = 0, var/color = null, var/category = CAT_NORMAL)
..()
src.price = price
src.display_color = color
src.category = category
/// Display name for the product
item_name = "generic"
/// Price to buy one
var/price = 0
/// Display color for vending machine listing
var/display_color = null
// CAT_HIDDEN for contraband
var/category = CAT_NORMAL
2 changes: 1 addition & 1 deletion code/game/machinery/biogenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/obj/item/chems/drinks/milk/smallcarton = 30,
/obj/item/chems/drinks/milk = 50,
/obj/item/chems/food/meat/syntiflesh = 50,
/obj/item/storage/fancy/egg_box = 300),
/obj/item/storage/box/fancy/egg_box = 300),
"Nutrients" = list(
/obj/item/chems/glass/bottle/eznutrient = 60,
/obj/item/chems/glass/bottle/left4zed = 120,
Expand Down
Loading
Loading