diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm index 3af05bb9a1c..706ce439b8a 100644 --- a/code/game/objects/items/contraband.dm +++ b/code/game/objects/items/contraband.dm @@ -26,7 +26,7 @@ /obj/item/reagent_containers/pill/random_drugs/Initialize(mapload) . = ..() - icon_state = "pill" + pick("2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20") + icon_state = "pill[rand(1,20)]" name = "[pick_list("chemistry_tools.json", "CYBERPUNK_drug_prefixes")] [pick_list("chemistry_tools.json", "CYBERPUNK_drug_suffixes")]" diff --git a/code/modules/asset_cache/assets/asset_chem_master.dm b/code/modules/asset_cache/assets/asset_chem_master.dm index 8b5e867a1de..a91776becdd 100644 --- a/code/modules/asset_cache/assets/asset_chem_master.dm +++ b/code/modules/asset_cache/assets/asset_chem_master.dm @@ -3,8 +3,10 @@ name = "chem_master" /datum/asset/spritesheet/chem_master/create_spritesheets() - for(var/pill_type = 1 to 20) + for(var/pill_type in 1 to 20) Insert("pill[pill_type]", 'icons/obj/chemical.dmi', "pill[pill_type]") + for(var/bandaid_type in 1 to 21) + Insert("bandaid[bandaid_type]", 'icons/obj/chemical.dmi', "bandaid[bandaid_type]") for(var/bottle_type in list("bottle", "reagent_bottle")) Insert(bottle_type, 'icons/obj/chemical.dmi', bottle_type) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 8c138aec169..c1d4a71c8a6 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -1,4 +1,5 @@ #define MAX_PILL_SPRITE 20 //max icon state of the pill sprites +#define MAX_PATCH_SPRITE 21 //max icon state of the patch sprites #define MAX_CUSTOM_NAME_LEN 64 // Max length of a custom pill/condiment/whatever #define CUSTOM_NAME_DISABLED null @@ -595,7 +596,7 @@ /datum/chemical_production_mode/pills/New() . = ..() sprites = list() - for(var/i = 1 to MAX_PILL_SPRITE) + for(var/i in 1 to MAX_PILL_SPRITE) sprites += list("pill[i]") /datum/chemical_production_mode/patches @@ -612,7 +613,13 @@ "spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone", "mitocholide", "rezadone", "menthol", "diphenhydramine", "ephedrine", "iron", "sanguine_reagent") -/datum/chemical_production_mode/patches/proc/SafetyCheck(datum/reagents/R) +/datum/chemical_production_mode/patches/New() + . = ..() + sprites = list() + for(var/i in 1 to MAX_PATCH_SPRITE) + sprites += list("bandaid[i]") + +/datum/chemical_production_mode/patches/proc/safety_check(datum/reagents/R) for(var/datum/reagent/A in R.reagent_list) if(!safe_chem_list.Find(A.id)) return FALSE @@ -621,15 +628,15 @@ return TRUE /datum/chemical_production_mode/patches/configure_item(data, datum/reagents/R, obj/item/reagent_containers/patch/P) + . = ..() var/chemicals_is_safe = data["chemicals_is_safe"] if(isnull(chemicals_is_safe)) - chemicals_is_safe = SafetyCheck(R) + chemicals_is_safe = safety_check(R) data["chemicals_is_safe"] = chemicals_is_safe if(chemicals_is_safe) P.instant_application = TRUE - P.icon_state = "bandaid_med" /datum/chemical_production_mode/bottles mode_id = "chem_bottles" @@ -667,6 +674,7 @@ return reagents.get_master_reagent_name() #undef MAX_PILL_SPRITE +#undef MAX_PATCH_SPRITE #undef MAX_CUSTOM_NAME_LEN #undef CUSTOM_NAME_DISABLED diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index d1ae9228325..2b6b6b40ae1 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -31,7 +31,7 @@ "spaceacillin" = image(icon = 'icons/obj/decals.dmi', icon_state = "bio"), "charcoal" = image(icon = 'icons/obj/chemical.dmi', icon_state = "pill17"), "hydrocodone" = image(icon = 'icons/obj/chemical.dmi', icon_state = "bottle19"), - "styptic_powder" = image(icon = 'icons/obj/chemical.dmi', icon_state = "bandaid_brute"), + "styptic_powder" = image(icon = 'icons/obj/chemical.dmi', icon_state = "bandaid2"), "salbutamol" = image(icon = 'icons/obj/chemical.dmi', icon_state = "pill8"), "sal_acid" = image(icon = 'icons/obj/chemical.dmi', icon_state = "pill4"), "syndicate_nanites" = image(icon = 'icons/obj/decals.dmi', icon_state = "greencross"), diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index e211fbc04a6..8807f19874f 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -2,8 +2,7 @@ name = "chemical patch" desc = "A chemical patch for touch based applications." icon = 'icons/obj/chemical.dmi' - icon_state = "bandaid" - item_state = "bandaid" + icon_state = "bandaid1" possible_transfer_amounts = null visible_transfer_rate = FALSE volume = 30 @@ -56,47 +55,48 @@ /obj/item/reagent_containers/patch/styptic name = "brute patch" desc = "Helps with brute injuries." - icon_state = "bandaid_brute" + icon_state = "bandaid2" instant_application = TRUE list_reagents = list("styptic_powder" = 30) /obj/item/reagent_containers/patch/styptic/small name = "brute mini-patch" - icon_state = "bandaid_brute_small" + icon_state = "bandaid3" list_reagents = list("styptic_powder" = 15) /obj/item/reagent_containers/patch/silver_sulf name = "burn patch" desc = "Helps with burn injuries." - icon_state = "bandaid_burn" + icon_state = "bandaid4" instant_application = TRUE list_reagents = list("silver_sulfadiazine" = 30) /obj/item/reagent_containers/patch/silver_sulf/small name = "burn mini-patch" - icon_state = "bandaid_burn_small" + icon_state = "bandaid5" list_reagents = list("silver_sulfadiazine" = 15) /obj/item/reagent_containers/patch/synthflesh name = "synthflesh patch" desc = "Helps with brute and burn injuries." - icon_state = "bandaid_med" + icon_state = "bandaid20" instant_application = TRUE list_reagents = list("synthflesh" = 10) /obj/item/reagent_containers/patch/nicotine name = "nicotine patch" desc = "Helps temporarily curb the cravings of nicotine dependency." + icon_state = "bandaid15" list_reagents = list("nicotine" = 10) /obj/item/reagent_containers/patch/jestosterone name = "jestosterone patch" desc = "Helps with brute injuries if the affected person is a clown, otherwise inflicts various annoying effects." - icon_state = "bandaid_clown" + icon_state = "bandaid21" list_reagents = list("jestosterone" = 20) /obj/item/reagent_containers/patch/perfluorodecalin name = "perfluorodecalin patch" desc = "Incredibly potent respiratory aid drug, may cause shortness of breath if used in large amounts." - icon_state = "bandaid_med" + icon_state = "bandaid12" list_reagents = list("perfluorodecalin" = 10) diff --git a/icons/obj/chemical.dmi b/icons/obj/chemical.dmi index 82ad7c7f7e1..49dde27ba2b 100644 Binary files a/icons/obj/chemical.dmi and b/icons/obj/chemical.dmi differ