diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index ec34b6632f3..1069dd6b2d6 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -33,23 +33,28 @@ CREATE TABLE `characters` ( `hair_red` smallint(4) NOT NULL, `hair_green` smallint(4) NOT NULL, `hair_blue` smallint(4) NOT NULL, + `secondary_hair_red` smallint(4) NOT NULL, + `secondary_hair_green` smallint(4) NOT NULL, + `secondary_hair_blue` smallint(4) NOT NULL, `facial_red` smallint(4) NOT NULL, `facial_green` smallint(4) NOT NULL, `facial_blue` smallint(4) NOT NULL, + `secondary_facial_red` smallint(4) NOT NULL, + `secondary_facial_green` smallint(4) NOT NULL, + `secondary_facial_blue` smallint(4) NOT NULL, `skin_tone` smallint(4) NOT NULL, `skin_red` smallint(4) NOT NULL, `skin_green` smallint(4) NOT NULL, `skin_blue` smallint(4) NOT NULL, - `markings_red` smallint(4) NOT NULL, - `markings_green` smallint(4) NOT NULL, - `markings_blue` smallint(4) NOT NULL, + `marking_colours` varchar(255) NOT NULL DEFAULT 'head=%23000000&body=%23000000&tail=%23000000', `head_accessory_red` smallint(4) NOT NULL, `head_accessory_green` smallint(4) NOT NULL, `head_accessory_blue` smallint(4) NOT NULL, `hair_style_name` varchar(45) NOT NULL, `facial_style_name` varchar(45) NOT NULL, - `marking_style_name` varchar(45) NOT NULL, + `marking_styles` varchar(255) NOT NULL DEFAULT 'head=None&body=None&tail=None', `head_accessory_style_name` varchar(45) NOT NULL, + `alt_head_name` varchar(45) NOT NULL, `eyes_red` smallint(4) NOT NULL, `eyes_green` smallint(4) NOT NULL, `eyes_blue` smallint(4) NOT NULL, diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql index b5115a93caf..55e71aa2aab 100644 --- a/SQL/paradise_schema_prefixed.sql +++ b/SQL/paradise_schema_prefixed.sql @@ -33,23 +33,28 @@ CREATE TABLE `SS13_characters` ( `hair_red` smallint(4) NOT NULL, `hair_green` smallint(4) NOT NULL, `hair_blue` smallint(4) NOT NULL, + `secondary_hair_red` smallint(4) NOT NULL, + `secondary_hair_green` smallint(4) NOT NULL, + `secondary_hair_blue` smallint(4) NOT NULL, `facial_red` smallint(4) NOT NULL, `facial_green` smallint(4) NOT NULL, `facial_blue` smallint(4) NOT NULL, + `secondary_facial_red` smallint(4) NOT NULL, + `secondary_facial_green` smallint(4) NOT NULL, + `secondary_facial_blue` smallint(4) NOT NULL, `skin_tone` smallint(4) NOT NULL, `skin_red` smallint(4) NOT NULL, `skin_green` smallint(4) NOT NULL, `skin_blue` smallint(4) NOT NULL, - `markings_red` smallint(4) NOT NULL, - `markings_green` smallint(4) NOT NULL, - `markings_blue` smallint(4) NOT NULL, + `marking_colours` varchar(255) NOT NULL DEFAULT 'head=%23000000&body=%23000000&tail=%23000000', `head_accessory_red` smallint(4) NOT NULL, `head_accessory_green` smallint(4) NOT NULL, `head_accessory_blue` smallint(4) NOT NULL, `hair_style_name` varchar(45) NOT NULL, `facial_style_name` varchar(45) NOT NULL, - `marking_style_name` varchar(45) NOT NULL, + `marking_styles` varchar(255) NOT NULL DEFAULT 'head=None&body=None&tail=None', `head_accessory_style_name` varchar(45) NOT NULL, + `alt_head_name` varchar(45) NOT NULL, `eyes_red` smallint(4) NOT NULL, `eyes_green` smallint(4) NOT NULL, `eyes_blue` smallint(4) NOT NULL, diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index 1590325df0e..15a969e7a47 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -365,7 +365,7 @@ "aha" = (/obj/machinery/computer/prisoner,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) "ahb" = (/obj/machinery/computer/security,/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) "ahc" = (/obj/machinery/computer/secure_data,/obj/structure/cable/yellow{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) -"ahd" = (/obj/structure/table/woodentable,/obj/machinery/requests_console{announcementConsole = 1; department = "Head of Security's Desk"; departmentType = 5; name = "Head of Security RC"; pixel_x = 0; pixel_y = 30},/obj/machinery/computer/med_data/laptop,/obj/item/weapon/storage/secure/safe/HoS{pixel_x = 36; pixel_y = 28},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) +"ahd" = (/obj/structure/table/woodentable,/obj/machinery/requests_console{announcementConsole = 1; department = "Head of Security's Desk"; departmentType = 5; name = "Head of Security RC"; pixel_x = 0; pixel_y = 30},/obj/machinery/computer/med_data/laptop,/obj/item/weapon/storage/secure/safe{pixel_x = 36; pixel_y = 28},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/security/hos) "ahe" = (/turf/simulated/wall,/area/security/range) "ahf" = (/obj/machinery/alarm{pixel_y = 28},/obj/structure/rack,/obj/item/weapon/gun/energy/ionrifle,/obj/item/clothing/suit/armor/laserproof,/obj/machinery/light{dir = 1; on = 1},/turf/simulated/floor/plasteel{tag = "icon-vault (WEST)"; icon_state = "vault"; dir = 8},/area/security/warden) "ahg" = (/obj/machinery/door/airlock/external{name = "Escape Pod Three"},/turf/simulated/floor/plating,/area/crew_quarters/fitness{name = "\improper Recreation Area"}) diff --git a/_maps/map_files/RandomZLevels/spacehotel.dmm b/_maps/map_files/RandomZLevels/spacehotel.dmm index 6a368e05b16..c09808a51f8 100644 --- a/_maps/map_files/RandomZLevels/spacehotel.dmm +++ b/_maps/map_files/RandomZLevels/spacehotel.dmm @@ -523,7 +523,7 @@ "kc" = (/obj/machinery/door/airlock{name = "Supply Closet"},/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "kd" = (/obj/machinery/door/airlock/glass{name = "Gateway"},/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "ke" = (/obj/item/weapon/melee/cultblade,/turf/unsimulated/floor{name = "engraved floor"; icon_state = "cult"},/area/awaymission/spacehotel) -"kf" = (/obj/item/weapon/kitchen/knife/butcher{blood_DNA = 1e+009},/obj/effect/decal/cleanable/blood/old,/turf/unsimulated/floor{name = "engraved floor"; icon_state = "cult"},/area/awaymission/spacehotel) +"kf" = (/obj/item/weapon/kitchen/knife/butcher{blood_DNA = list("1e+009" = "O-")},/obj/effect/decal/cleanable/blood/old,/turf/unsimulated/floor{name = "engraved floor"; icon_state = "cult"},/area/awaymission/spacehotel) "kg" = (/obj/machinery/light{dir = 8},/obj/structure/stool/bed/chair/sofa/left{icon_state = "sofaend_left"; dir = 4},/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "kh" = (/obj/effect/hotel_controller,/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel) "ki" = (/obj/item/weapon/pen,/obj/structure/table/reinforced,/turf/unsimulated/floor/carpet,/area/awaymission/spacehotel/reception) diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 8ce7b1ce0ba..b6c5d55e5a9 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -2,77 +2,84 @@ //node2, air2, network2 correspond to output /obj/machinery/atmospherics/binary/circulator name = "circulator/heat exchanger" - desc = "A gas circulator pump and heat exchanger." - icon = 'icons/obj/pipes.dmi' - icon_state = "circ-off" - anchored = 0 - density = 1 + desc = "A gas circulator pump and heat exchanger. Its input port is on the south side, and its output port is on the north side." + icon = 'icons/obj/atmospherics/circulator.dmi' + icon_state = "circ1-off" + + var/side = CIRC_LEFT + + var/global/const/CIRC_LEFT = WEST + var/global/const/CIRC_RIGHT = EAST - var/recent_moles_transferred = 0 - var/last_heat_capacity = 0 - var/last_temperature = 0 var/last_pressure_delta = 0 - var/last_worldtime_transfer = 0 + + var/obj/machinery/power/generator/generator -/obj/machinery/atmospherics/binary/circulator/New() - ..() - desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]." + layer = 2.45 // Just above wires + + anchored = 1 + density = 1 + + can_unwrench = 1 + +// Creating a custom circulator pipe subtype to be delivered through cargo +/obj/item/pipe/circulator + name = "circulator/heat exchanger fitting" + +/obj/item/pipe/circulator/New(loc) + var/obj/machinery/atmospherics/binary/circulator/C = new /obj/machinery/atmospherics/binary/circulator(null) + ..(loc, make_from = C) + +/obj/machinery/atmospherics/binary/circulator/Destroy() + if(generator && generator.cold_circ == src) + generator.cold_circ = null + else if(generator && generator.hot_circ == src) + generator.hot_circ = null + return ..() /obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air() - var/datum/gas_mixture/removed - if(anchored && !(stat & BROKEN)) - var/input_starting_pressure = air1.return_pressure() - var/output_starting_pressure = air2.return_pressure() - last_pressure_delta = max(input_starting_pressure - output_starting_pressure + 10, 0) + var/output_starting_pressure = air1.return_pressure() + var/input_starting_pressure = air2.return_pressure() - //only circulate air if there is a pressure difference (plus 10 kPa to represent friction in the machine) - if(air1.temperature > 0 && last_pressure_delta > 0) + if(output_starting_pressure >= input_starting_pressure - 10) + //Need at least 10 KPa difference to overcome friction in the mechanism + last_pressure_delta = 0 + return null - //Calculate necessary moles to transfer using PV = nRT - recent_moles_transferred = last_pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION) + //Calculate necessary moles to transfer using PV = nRT + if(air2.temperature > 0) + var/pressure_delta = (input_starting_pressure - output_starting_pressure) / 2 - //Actually transfer the gas - removed = air1.remove(recent_moles_transferred) - if(removed) - last_heat_capacity = removed.heat_capacity() - last_temperature = removed.temperature + var/transfer_moles = pressure_delta * air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION) - //Update the gas networks. - parent1.update = 1 + last_pressure_delta = pressure_delta - last_worldtime_transfer = world.time - else - recent_moles_transferred = 0 + //log_debug("pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];") + + //Actually transfer the gas + var/datum/gas_mixture/removed = air2.remove(transfer_moles) + + parent1.update = 1 + parent2.update = 1 - update_icon() return removed + else + last_pressure_delta = 0 + /obj/machinery/atmospherics/binary/circulator/process() - if(!..()) - return 0 - if(last_worldtime_transfer < world.time - 50) - recent_moles_transferred = 0 - update_icon() + ..() + update_icon() /obj/machinery/atmospherics/binary/circulator/update_icon() - if(stat & (BROKEN|NOPOWER) || !anchored) - icon_state = "circ-p" - else if(last_pressure_delta > 0 && recent_moles_transferred > 0) - if(last_pressure_delta > 5*ONE_ATMOSPHERE) - icon_state = "circ-run" + if(stat & (BROKEN|NOPOWER)) + icon_state = "circ[side]-p" + else if(last_pressure_delta > 0) + if(last_pressure_delta > ONE_ATMOSPHERE) + icon_state = "circ[side]-run" else - icon_state = "circ-slow" + icon_state = "circ[side]-slow" else - icon_state = "circ-off" + icon_state = "circ[side]-off" - return 1 - -/obj/machinery/atmospherics/binary/circulator/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - if(istype(W, /obj/item/weapon/wrench)) - var/turf/T = get_turf(src) - if(!istype(T, /turf/simulated)) - return ..() - anchored = !anchored - to_chat(user, "You [(anchored) ? "fasten" : "loosen"] \the [src] to the floor") - playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) - else return ..() + return 1 \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 8570977d617..244e9c26aa3 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -213,7 +213,7 @@ var/datum/gas_mixture/environment = tile.return_air() if(scrubbing) - if((environment.toxins>0.001) || (environment.carbon_dioxide>0.001) || (environment.trace_gases.len>0)) + if((scrub_O2 && environment.oxygen>0.001) || (scrub_N2 && environment.nitrogen>0.001) || (scrub_CO2 && environment.carbon_dioxide>0.001) || (scrub_Toxins && environment.toxins>0.001) || (environment.trace_gases.len>0)) var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() //Take a gas sample diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 2b2adbdbaf2..61bc32d378e 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -59,10 +59,14 @@ #define HAS_SKIN_TONE 64 #define HAS_ICON_SKIN_TONE 128 #define HAS_SKIN_COLOR 256 -#define HAS_MARKINGS 512 -#define TAIL_WAGGING 1024 -#define NO_EYES 2048 -#define HAS_FUR 4096 +#define HAS_HEAD_MARKINGS 512 +#define HAS_BODY_MARKINGS 1024 +#define HAS_TAIL_MARKINGS 2048 +#define HAS_MARKINGS HAS_HEAD_MARKINGS|HAS_BODY_MARKINGS|HAS_TAIL_MARKINGS +#define TAIL_WAGGING 4096 +#define NO_EYES 8192 +#define HAS_FUR 16384 +#define HAS_ALT_HEADS 32768 //Species Diet Flags #define DIET_CARN 1 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 85221f5cf3c..dad6165400f 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -208,14 +208,14 @@ #define GLOVES_LAYER 11 #define EARS_LAYER 12 #define SUIT_LAYER 13 -#define GLASSES_LAYER 14 -#define BELT_LAYER 15 //Possible make this an overlay of somethign required to wear a belt? -#define SUIT_STORE_LAYER 16 -#define BACK_LAYER 17 -#define TAIL_LAYER 18 //bs12 specific. this hack is probably gonna come back to haunt me -#define HAIR_LAYER 19 //TODO: make part of head layer? -#define HEAD_ACCESSORY_LAYER 20 -#define FHAIR_LAYER 21 +#define BELT_LAYER 14 //Possible make this an overlay of somethign required to wear a belt? +#define SUIT_STORE_LAYER 15 +#define BACK_LAYER 16 +#define HAIR_LAYER 17 //TODO: make part of head layer? +#define HEAD_ACCESSORY_LAYER 18 +#define FHAIR_LAYER 19 +#define TAIL_LAYER 20 //bs12 specific. this hack is probably gonna come back to haunt me +#define GLASSES_LAYER 21 #define FACEMASK_LAYER 22 #define HEAD_LAYER 23 #define COLLAR_LAYER 24 diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 736ca0d291f..bf9c479d3e8 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -50,6 +50,10 @@ #define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up +//Mob attribute defaults. +#define DEFAULT_MARKING_STYLES list("head" = "None", "body" = "None", "tail" = "None") //Marking styles. Use instead of initial() for m_styles. +#define DEFAULT_MARKING_COLOURS list("head" = "#000000", "body" = "#000000", "tail" = "#000000") //Marking colours. Use instead of initial() for m_colours. + ////////REAGENT STUFF//////// // How many units of reagent are consumed per tick, by default. #define REAGENTS_METABOLISM 0.4 @@ -72,15 +76,18 @@ #define APPEARANCE_SKIN 8 #define APPEARANCE_HAIR 16 #define APPEARANCE_HAIR_COLOR 32 -#define APPEARANCE_FACIAL_HAIR 64 -#define APPEARANCE_FACIAL_HAIR_COLOR 128 -#define APPEARANCE_EYE_COLOR 256 -#define APPEARANCE_ALL_HAIR APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR -#define APPEARANCE_HEAD_ACCESSORY 512 -#define APPEARANCE_MARKINGS 1024 -#define APPEARANCE_BODY_ACCESSORY 2048 -#define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY -#define APPEARANCE_ALL 4095 +#define APPEARANCE_SECONDARY_HAIR_COLOR 64 +#define APPEARANCE_FACIAL_HAIR 128 +#define APPEARANCE_FACIAL_HAIR_COLOR 256 +#define APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR 512 +#define APPEARANCE_EYE_COLOR 1024 +#define APPEARANCE_ALL_HAIR APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_SECONDARY_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR|APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR +#define APPEARANCE_HEAD_ACCESSORY 2048 +#define APPEARANCE_MARKINGS 4096 +#define APPEARANCE_BODY_ACCESSORY 8192 +#define APPEARANCE_ALT_HEAD 16384 +#define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY|APPEARANCE_ALT_HEAD +#define APPEARANCE_ALL 32767 // Intents #define I_HELP "help" diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 8e0b22ffc2b..155f7dfae58 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -401,23 +401,6 @@ mobs_found += M return mobs_found -/proc/GetRedPart(const/hexa) - return hex2num(copytext(hexa,2,4)) - -/proc/GetGreenPart(const/hexa) - return hex2num(copytext(hexa,4,6)) - -/proc/GetBluePart(const/hexa) - return hex2num(copytext(hexa,6,8)) - -/proc/GetHexColors(const/hexa) - return list( - GetRedPart(hexa), - GetGreenPart(hexa), - GetBluePart(hexa) - ) - - /proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon) var/area/our_area = get_area_master(the_area) for(var/C in living_mob_list) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 7398518bb03..ed0b7887e5a 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -18,6 +18,8 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, undershirt_list, undershirt_m, undershirt_f) //socks init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, socks_list, socks_m, socks_f) + //alt heads + init_sprite_accessory_subtypes(/datum/sprite_accessory/alt_heads, alt_heads_list) init_subtypes(/datum/surgery_step, surgery_steps) diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index 114588009ed..986cbac0bd3 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -85,3 +85,18 @@ var/gaussian_next gaussian_next = R2 * working return (mean + stddev * R1) #undef ACCURACY + + + +// oof, what a mouthful +// Used in status_procs' "adjust" to let them modify a status effect by a given +// amount, without inadverdently increasing it in the wrong direction +/proc/directional_bounded_sum(orig_val, modifier, bound_lower, bound_upper) + var/new_val = orig_val + modifier + if(modifier > 0) + if(new_val > bound_upper) + new_val = max(orig_val, bound_upper) + else if(modifier < 0) + if(new_val < bound_lower) + new_val = min(orig_val, bound_lower) + return new_val diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index edde3f13142..a2e8542b825 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -1,3 +1,15 @@ +proc/GetOppositeDir(var/dir) + switch(dir) + if(NORTH) return SOUTH + if(SOUTH) return NORTH + if(EAST) return WEST + if(WEST) return EAST + if(SOUTHWEST) return NORTHEAST + if(NORTHWEST) return SOUTHEAST + if(NORTHEAST) return SOUTHWEST + if(SOUTHEAST) return NORTHWEST + return 0 + proc/random_underwear(gender, species = "Human") var/list/pick_list = list() switch(gender) @@ -34,57 +46,133 @@ proc/pick_species_allowed_underwear(list/all_picks, species) return pick(valid_picks) -proc/random_hair_style(var/gender, species = "Human") +proc/random_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead) var/h_style = "Bald" - var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if( !(species in S.species_allowed)) - continue - valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] + if(hairstyle == "Bald") //Just in case. + valid_hairstyles += hairstyle + continue + if((gender == MALE && S.gender == FEMALE) || (gender == FEMALE && S.gender == MALE)) + continue + if(species == "Machine") //If the user is a species who can have a robotic head... + if(!robohead) + robohead = all_robolimbs["Morpheus Cyberkinetics"] + if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_hairstyles += hairstyle //Give them their hairstyles if they do. + else + if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */ + valid_hairstyles += hairstyle + else //If the user is not a species who can have robotic heads, use the default handling. + if(species in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list. + valid_hairstyles += hairstyle if(valid_hairstyles.len) h_style = pick(valid_hairstyles) - return h_style + return h_style -proc/GetOppositeDir(var/dir) - switch(dir) - if(NORTH) return SOUTH - if(SOUTH) return NORTH - if(EAST) return WEST - if(WEST) return EAST - if(SOUTHWEST) return NORTHEAST - if(NORTHWEST) return SOUTHEAST - if(NORTHEAST) return SOUTHWEST - if(SOUTHEAST) return NORTHWEST - return 0 - -proc/random_facial_hair_style(var/gender, species = "Human") +proc/random_facial_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead) var/f_style = "Shaved" - - var/list/valid_facialhairstyles = list() + var/list/valid_facial_hairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if( !(species in S.species_allowed)) - continue - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] + if(facialhairstyle == "Shaved") //Just in case. + valid_facial_hairstyles += facialhairstyle + continue + if((gender == MALE && S.gender == FEMALE) || (gender == FEMALE && S.gender == MALE)) + continue + if(species == "Machine") //If the user is a species who can have a robotic head... + if(!robohead) + robohead = all_robolimbs["Morpheus Cyberkinetics"] + if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do. + else + if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */ + valid_facial_hairstyles += facialhairstyle + else //If the user is not a species who can have robotic heads, use the default handling. + if(species in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list. + valid_facial_hairstyles += facialhairstyle - if(valid_facialhairstyles.len) - f_style = pick(valid_facialhairstyles) + if(valid_facial_hairstyles.len) + f_style = pick(valid_facial_hairstyles) - return f_style + return f_style + +proc/random_head_accessory(species = "Human") + var/ha_style = "None" + var/list/valid_head_accessories = list() + for(var/head_accessory in head_accessory_styles_list) + var/datum/sprite_accessory/S = head_accessory_styles_list[head_accessory] + + if(!(species in S.species_allowed)) + continue + valid_head_accessories += head_accessory + + if(valid_head_accessories.len) + ha_style = pick(valid_head_accessories) + + return ha_style + +proc/random_marking_style(var/location = "body", species = "Human", var/datum/robolimb/robohead, var/body_accessory, var/alt_head) + var/m_style = "None" + var/list/valid_markings = list() + for(var/marking in marking_styles_list) + var/datum/sprite_accessory/body_markings/S = marking_styles_list[marking] + if(S.name == "None") + valid_markings += marking + continue + if(S.marking_location != location) //If the marking isn't for the location we desire, skip. + continue + if(!(species in S.species_allowed)) //If the user's head is not of a species the marking style allows, skip it. Otherwise, add it to the list. + continue + if(location == "tail") + if(!body_accessory) + if(S.tails_allowed) + continue + else + if(!S.tails_allowed || !(body_accessory in S.tails_allowed)) + continue + if(location == "head") + var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name] + if(species == "Machine")//If the user is a species that can have a robotic head... + if(!robohead) + robohead = all_robolimbs["Morpheus Cyberkinetics"] + if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head. + continue + else if(alt_head && alt_head != "None") //If the user's got an alt head, validate markings for that head. + if(!("All" in M.heads_allowed) && !(alt_head in M.heads_allowed)) + continue + else + if(M.heads_allowed && !("All" in M.heads_allowed)) + continue + valid_markings += marking + + if(valid_markings.len) + m_style = pick(valid_markings) + + return m_style + +proc/random_body_accessory(species = "Vulpkanin") + var/body_accessory = null + var/list/valid_body_accessories = list() + for(var/B in body_accessory_by_name) + var/datum/body_accessory/A = body_accessory_by_name[B] + if(!istype(A)) + valid_body_accessories += "None" //The only null entry should be the "None" option. + continue + if(species in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list. + valid_body_accessories += B + + if(valid_body_accessories.len) + body_accessory = pick(valid_body_accessories) + + return body_accessory proc/random_name(gender, species = "Human") diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 7e4fca82c32..1265846d199 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -10,7 +10,7 @@ //Returns an integer given a hex input /proc/hex2num(hex) - if(!( istext(hex) )) + if(!(istext(hex))) return var/num = 0 @@ -59,6 +59,27 @@ hex = "0[hex]" return hex || "0" +//Returns an integer value for R of R/G/B given a hex color input. +/proc/color2R(hex) + if(!(istext(hex))) + return + + return hex2num(copytext(hex, 2, 4)) //Returning R + +//Returns an integer value for G of R/G/B given a hex color input. +/proc/color2G(hex) + if(!(istext(hex))) + return + + return hex2num(copytext(hex, 4, 6)) //Returning G + +//Returns an integer value for B of R/G/B given a hex color input. +/proc/color2B(hex) + if(!(istext(hex))) + return + + return hex2num(copytext(hex, 6, 8)) //Returning B + /proc/text2numlist(text, delimiter="\n") var/list/num_list = list() for(var/x in splittext(text, delimiter)) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index d409d6e54c9..713289c737c 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -23,6 +23,8 @@ var/global/list/undershirt_f = list() //stores only undershirt name var/global/list/socks_list = list() //stores /datum/sprite_accessory/socks indexed by name var/global/list/socks_m = list() //stores only socks name var/global/list/socks_f = list() //stores only socks name + //Alt Heads +var/global/list/alt_heads_list = list() //stores /datum/sprite_accessory/alt_heads indexed by name //Backpacks var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt") diff --git a/code/_globalvars/mapping.dm b/code/_globalvars/mapping.dm index 44b678a8f67..ae26485208b 100644 --- a/code/_globalvars/mapping.dm +++ b/code/_globalvars/mapping.dm @@ -18,7 +18,6 @@ var/global/list/global_map = null //3 - AI satellite //5 - empty space -var/list/monkeystart = list() var/list/wizardstart = list() var/list/newplayer_start = list() var/list/latejoin = list() @@ -26,10 +25,9 @@ var/list/latejoin_gateway = list() var/list/latejoin_cryo = list() var/list/latejoin_cyborg = list() var/list/prisonwarp = list() //prisoners go to these -var/list/holdingfacility = list() //captured people go here var/list/xeno_spawn = list()//Aliens spawn at these. var/list/ertdirector = list() -// list/mazewarp = list() +var/list/emergencyresponseteamspawn = list() var/list/tdome1 = list() var/list/tdome2 = list() var/list/team_alpha = list() diff --git a/code/_globalvars/unused.dm b/code/_globalvars/unused.dm index d3945b68eab..e55794c3dc9 100644 --- a/code/_globalvars/unused.dm +++ b/code/_globalvars/unused.dm @@ -31,10 +31,4 @@ var/endicon = null var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null var/going = 1.0 var/datum/engine_eject/engine_eject_control = null -// list/traitors = list() //traitor list -// list/traitobj = list( ) -var/airtunnel_start = 68 // default -var/airtunnel_stop = 68 // default -var/airtunnel_bottom = 72 // default -// reverse_dir[dir] = reverse of dir diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index a476fbc78d5..66377ec3fcd 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -62,7 +62,7 @@ CtrlClickOn(A) return - if(stat || paralysis || stunned || weakened) + if(incapacitated(ignore_restraints = 1, ignore_grab = 1, ignore_lying = 1)) return face_atom(A) diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm index 1f60c26f885..a15176af87c 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -39,7 +39,7 @@ CtrlClickOn(A) return - if(stat || lockcharge || weakened || stunned || paralysis) + if(incapacitated()) return if(next_move >= world.time) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 26738b137fe..c7edd88803a 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -141,7 +141,12 @@ proc/get_id_photo(var/mob/living/carbon/human/H) var/icon/temp temp = new /icon(icobase, "groin_[g]") preview_icon.Blend(temp, ICON_OVERLAY) - temp = new /icon(icobase, "head_[g]") + var/head = "head" + if(head_organ.alt_head && head_organ.species.bodyflags & HAS_ALT_HEADS) + var/datum/sprite_accessory/alt_heads/alternate_head = alt_heads_list[head_organ.alt_head] + if(alternate_head.icon_state) + head = alternate_head.icon_state + temp = new /icon(icobase, "[head]_[g]") preview_icon.Blend(temp, ICON_OVERLAY) //Tail @@ -188,6 +193,13 @@ proc/get_id_photo(var/mob/living/carbon/human/H) hair_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin, 160), ICON_ADD) else hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD) + + if(hair_style.secondary_theme) + var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") + if(!hair_style.no_sec_colour) + hair_secondary_s.Blend(rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec), ICON_ADD) + hair_s.Blend(hair_secondary_s, ICON_OVERLAY) + face_s.Blend(hair_s, ICON_OVERLAY) //Head Accessory @@ -205,15 +217,31 @@ proc/get_id_photo(var/mob/living/carbon/human/H) facial_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin, 160), ICON_ADD) else facial_s.Blend(rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial), ICON_ADD) + + if(facial_hair_style.secondary_theme) + var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") + if(!facial_hair_style.no_sec_colour) + facial_secondary_s.Blend(rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec), ICON_ADD) + facial_s.Blend(facial_secondary_s, ICON_OVERLAY) + face_s.Blend(facial_s, ICON_OVERLAY) //Markings - if(H.species.bodyflags & HAS_MARKINGS) - var/datum/sprite_accessory/marking_style = marking_styles_list[H.m_style] - if(marking_style && marking_style.species_allowed) - var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") - markings_s.Blend(rgb(H.r_markings, H.g_markings, H.b_markings), ICON_ADD) - face_s.Blend(markings_s, ICON_OVERLAY) + if((H.species.bodyflags & HAS_HEAD_MARKINGS) || (H.species.bodyflags & HAS_BODY_MARKINGS)) + if(H.species.bodyflags & HAS_BODY_MARKINGS) //Body markings. + var/body_marking = H.m_styles["body"] + var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking] + if(body_marking_style && body_marking_style.species_allowed) + var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") + b_marking_s.Blend(H.m_colours["body"], ICON_ADD) + face_s.Blend(b_marking_s, ICON_OVERLAY) + if(H.species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. + var/head_marking = H.m_styles["head"] + var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] + if(head_marking_style && head_marking_style.species_allowed) + var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") + h_marking_s.Blend(H.m_colours["head"], ICON_ADD) + face_s.Blend(h_marking_s, ICON_OVERLAY) preview_icon.Blend(face_s, ICON_OVERLAY) diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index 8f388c45edc..9e806b24f41 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -35,6 +35,6 @@ Bonus to_chat(M, "[pick("Your head hurts.", "Your mind blanks for a moment.")]") else to_chat(M, "You can't think straight!") - M.confused = min(100, M.confused + 8) + M.AdjustConfused(8, bound_lower = 0, bound_upper = 100) return diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index 6c65e330fa8..1a9bba6961e 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -33,11 +33,11 @@ Bonus if(3, 4) to_chat(M, "[pick("You hear a ringing in your ear.", "Your ears pop.")]") if(5) - if(!(M.ear_deaf)) + if(!(M.disabilities & DEAF)) to_chat(M, "Your ears pop and begin ringing loudly!") - M.setEarDamage(-1,INFINITY) //Shall be enough + M.BecomeDeaf() spawn(200) if(M) to_chat(M, "The ringing in your ears fades...") - M.setEarDamage(-1,0) - return \ No newline at end of file + M.CureDeaf() + return diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm index cac8b4d2e03..e117dbf51f8 100644 --- a/code/datums/diseases/advance/symptoms/hallucigen.dm +++ b/code/datums/diseases/advance/symptoms/hallucigen.dm @@ -36,6 +36,6 @@ Bonus to_chat(M, "[pick("Something is following you.", "You are being watched.", "You hear a whisper in your ear.", "Thumping footsteps slam toward you from nowhere.")]") else to_chat(M, "[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]") - M.hallucination += 5 + M.AdjustHallucinate(5) return diff --git a/code/datums/diseases/anxiety.dm b/code/datums/diseases/anxiety.dm index 150b7483aaa..4d9716e44da 100644 --- a/code/datums/diseases/anxiety.dm +++ b/code/datums/diseases/anxiety.dm @@ -24,18 +24,18 @@ to_chat(affected_mob, "You feel panicky.") if(prob(2)) to_chat(affected_mob, "You're overtaken with panic!") - affected_mob.confused += (rand(2,3)) + affected_mob.AdjustConfused(rand(2,3)) if(4) if(prob(10)) to_chat(affected_mob, "You feel butterflies in your stomach.") if(prob(5)) affected_mob.visible_message("[affected_mob] stumbles around in a panic.", \ "You have a panic attack!") - affected_mob.confused += (rand(6,8)) - affected_mob.jitteriness += (rand(6,8)) + affected_mob.AdjustConfused(rand(6,8)) + affected_mob.AdjustJitter(rand(6,8)) if(prob(2)) affected_mob.visible_message("[affected_mob] coughs up butterflies!", \ "You cough up butterflies!") new /mob/living/simple_animal/butterfly(affected_mob.loc) new /mob/living/simple_animal/butterfly(affected_mob.loc) - return \ No newline at end of file + return diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 7f04eb5fc56..e3482955865 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -106,7 +106,7 @@ if(3) if(prob(4)) to_chat(affected_mob, "You feel a stabbing pain in your head.") - affected_mob.confused += 10 + affected_mob.AdjustConfused(10) if(4) if(prob(3)) affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh.")) @@ -241,4 +241,4 @@ stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.") stage4 = list("You're ravenous.") stage5 = list("You have become a morph.") - new_form = /mob/living/simple_animal/hostile/morph \ No newline at end of file + new_form = /mob/living/simple_animal/hostile/morph diff --git a/code/datums/diseases/tuberculosis.dm b/code/datums/diseases/tuberculosis.dm index 11c06e386c5..4cd027a7d7d 100644 --- a/code/datums/diseases/tuberculosis.dm +++ b/code/datums/diseases/tuberculosis.dm @@ -44,7 +44,7 @@ affected_mob.AdjustSleeping(5) if(prob(2)) to_chat(affected_mob, "You feel your mind relax and your thoughts drift!") - affected_mob.confused = min(100, affected_mob.confused + 8) + affected_mob.AdjustConfused(8, bound_lower = 0, bound_upper = 100) if(prob(10)) affected_mob.vomit(20) if(prob(3)) @@ -55,4 +55,3 @@ to_chat(affected_mob, "[pick("You feel uncomfortably hot...", "You feel like unzipping your jumpsuit", "You feel like taking off some clothes...")]") affected_mob.bodytemperature += 40 return - diff --git a/code/datums/diseases/vampire.dm b/code/datums/diseases/vampire.dm index dbcc9bbb3c0..16706087673 100644 --- a/code/datums/diseases/vampire.dm +++ b/code/datums/diseases/vampire.dm @@ -20,15 +20,15 @@ if(prob(10)) affected_mob.emote(pick("cough","groan", "gasp")) - affected_mob.losebreath++ + affected_mob.AdjustLoseBreath(1) if(prob(15)) if(prob(33)) to_chat(affected_mob, "You feel sickly and weak.") - affected_mob.slowed += 3 + affected_mob.AdjustSlowed(3) affected_mob.adjustToxLoss(toxdamage) if(prob(5)) to_chat(affected_mob, "Your joints ache horribly!") affected_mob.Weaken(stuntime) - affected_mob.Stun(stuntime) \ No newline at end of file + affected_mob.Stun(stuntime) diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 645af5e8aea..2e953f3ec91 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -42,7 +42,7 @@ var/byproduct // example: = /obj/item/weapon/kitchen/mould // byproduct to return, such as a mould or trash -/datum/recipe/proc/check_reagents(var/datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous +/datum/recipe/proc/check_reagents(datum/reagents/avail_reagents) //1=precisely, 0=insufficiently, -1=superfluous . = 1 for(var/r_r in reagents) var/aval_r_amnt = avail_reagents.get_reagent_amount(r_r) @@ -55,7 +55,7 @@ return -1 return . -/datum/recipe/proc/check_fruit(var/obj/container) +/datum/recipe/proc/check_fruit(obj/container) . = 1 if(fruit && fruit.len) var/list/checklist = list() @@ -74,7 +74,7 @@ break return . -/datum/recipe/proc/check_items(var/obj/container as obj) +/datum/recipe/proc/check_items(obj/container) . = 1 if(items && items.len) var/list/checklist = list() @@ -96,7 +96,7 @@ return . //general version -/datum/recipe/proc/make(var/obj/container as obj) +/datum/recipe/proc/make(obj/container) var/obj/result_obj = new result(container) for(var/obj/O in (container.contents-result_obj)) O.reagents.trans_to(result_obj, O.reagents.total_volume) @@ -106,7 +106,7 @@ return result_obj // food-related -/datum/recipe/proc/make_food(var/obj/container as obj) +/datum/recipe/proc/make_food(obj/container) var/obj/result_obj = new result(container) for(var/obj/O in (container.contents-result_obj)) if(O.reagents) @@ -118,7 +118,7 @@ score_meals++ return result_obj -/proc/select_recipe(var/list/datum/recipe/avaiable_recipes, var/obj/obj as obj, var/exact = 1 as num) +/proc/select_recipe(list/datum/recipe/avaiable_recipes, obj/obj, exact = 1) if(!exact) exact = -1 var/list/datum/recipe/possible_recipes = new diff --git a/code/datums/spells/cluwne.dm b/code/datums/spells/cluwne.dm index d4d3b383f9d..fe0e02bda6d 100644 --- a/code/datums/spells/cluwne.dm +++ b/code/datums/spells/cluwne.dm @@ -16,7 +16,7 @@ adjustBrainLoss(80) nutrition = 9000 overeatduration = 9000 - confused = 30 + Confused(30) if(mind) mind.assigned_role = "Cluwne" @@ -44,8 +44,8 @@ adjustBrainLoss(-120) nutrition = NUTRITION_LEVEL_STARVING overeatduration = 0 - confused = 0 - jitteriness = 0 + SetConfused(0) + SetJitter(0) if(mind) mind.assigned_role = "Lawyer" diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm index 9ddac0b0920..1eed65bbed4 100644 --- a/code/datums/spells/inflict_handler.dm +++ b/code/datums/spells/inflict_handler.dm @@ -50,8 +50,8 @@ target.Paralyse(amt_paralysis) target.Stun(amt_stunned) - target.eye_blind += amt_eye_blind - target.eye_blurry += amt_eye_blurry + target.AdjustEyeBlind(amt_eye_blind) + target.AdjustEyeBlurry(amt_eye_blurry) //summoning if(summon_type) - new summon_type(target.loc, target) \ No newline at end of file + new summon_type(target.loc, target) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 73c653369eb..7a8f05e08fc 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -581,7 +581,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /obj/item/clothing/head/helmet/space, /obj/item/clothing/head/helmet/space, /obj/item/clothing/mask/breath, - /obj/item/clothing/mask/breath,) + /obj/item/clothing/mask/breath) cost = 30 containertype = /obj/structure/closet/crate/secure containername = "space suit crate" @@ -607,9 +607,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine name = "Thermo-Electric Generator Crate" contains = list( /obj/machinery/power/generator, - /obj/machinery/atmospherics/binary/circulator, - /obj/machinery/atmospherics/binary/circulator - ) + /obj/item/pipe/circulator, + /obj/item/pipe/circulator) cost = 25 containertype = /obj/structure/closet/crate/secure containername = "thermo-electric generator crate" diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index c147bd9235c..6c9387644b0 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -60,9 +60,9 @@ Sound(message_sound) Log(message, message_title) -datum/announcement/proc/Message(message as text, message_title as text) +/datum/announcement/proc/Message(message as text, message_title as text) for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) to_chat(M, "

[title]

") to_chat(M, "[message]") if(announcer) @@ -72,14 +72,14 @@ datum/announcement/proc/Message(message as text, message_title as text) to_chat(world, "[message_title]") to_chat(world, "[message]") -datum/announcement/priority/Message(message as text, message_title as text) +/datum/announcement/priority/Message(message as text, message_title as text) to_chat(world, "

[message_title]

") to_chat(world, "[message]") if(announcer) to_chat(world, " -[html_encode(announcer)]") to_chat(world, "
") -datum/announcement/priority/command/Message(message as text, message_title as text) +/datum/announcement/priority/command/Message(message as text, message_title as text) var/command command += "

[command_name()] Update

" if(message_title) @@ -88,10 +88,10 @@ datum/announcement/priority/command/Message(message as text, message_title as te command += "
[message]
" command += "
" for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) to_chat(M, command) -datum/announcement/priority/enemy/Message(message as text, message_title as text, from as text) +/datum/announcement/priority/enemy/Message(message as text, message_title as text, from as text) var/command command += "

[from]

" if(message_title) @@ -100,14 +100,14 @@ datum/announcement/priority/enemy/Message(message as text, message_title as text command += "
[message]
" command += "
" for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) to_chat(M, command) -datum/announcement/priority/security/Message(message as text, message_title as text) +/datum/announcement/priority/security/Message(message as text, message_title as text) to_chat(world, "[message_title]") to_chat(world, "[message]") -datum/announcement/proc/NewsCast(message as text, message_title as text) +/datum/announcement/proc/NewsCast(message as text, message_title as text) if(disable_newscasts) return if(!newscast) @@ -121,28 +121,28 @@ datum/announcement/proc/NewsCast(message as text, message_title as text) news.can_be_redacted = 0 announce_newscaster_news(news) -datum/announcement/proc/PlaySound(var/message_sound) +/datum/announcement/proc/PlaySound(var/message_sound) if(!message_sound) return for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) + if(M.can_hear()) M << message_sound -datum/announcement/proc/Sound(var/message_sound) +/datum/announcement/proc/Sound(var/message_sound) PlaySound(message_sound) -datum/announcement/priority/Sound(var/message_sound) +/datum/announcement/priority/Sound(var/message_sound) if(sound) world << sound -datum/announcement/priority/command/Sound(var/message_sound) +/datum/announcement/priority/command/Sound(var/message_sound) PlaySound(message_sound) -datum/announcement/proc/Log(message as text, message_title as text) +/datum/announcement/proc/Log(message as text, message_title as text) if(log) log_say("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]") message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1) - + /proc/GetNameAndAssignmentFromId(var/obj/item/weapon/card/id/I) // Format currently matches that of newscaster feeds: Registered Name (Assigned Rank) - return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name + return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name \ No newline at end of file diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 78b889071f5..82f7ffb2e93 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -30,19 +30,27 @@ #define DNA_UI_HACC_R 11 #define DNA_UI_HACC_G 12 #define DNA_UI_HACC_B 13 -#define DNA_UI_MARK_R 14 -#define DNA_UI_MARK_G 15 -#define DNA_UI_MARK_B 16 -#define DNA_UI_EYES_R 17 -#define DNA_UI_EYES_G 18 -#define DNA_UI_EYES_B 19 -#define DNA_UI_GENDER 20 -#define DNA_UI_BEARD_STYLE 21 -#define DNA_UI_HAIR_STYLE 22 +#define DNA_UI_HEAD_MARK_R 14 +#define DNA_UI_HEAD_MARK_G 15 +#define DNA_UI_HEAD_MARK_B 16 +#define DNA_UI_BODY_MARK_R 17 +#define DNA_UI_BODY_MARK_G 18 +#define DNA_UI_BODY_MARK_B 19 +#define DNA_UI_TAIL_MARK_R 20 +#define DNA_UI_TAIL_MARK_G 21 +#define DNA_UI_TAIL_MARK_B 22 +#define DNA_UI_EYES_R 23 +#define DNA_UI_EYES_G 24 +#define DNA_UI_EYES_B 25 +#define DNA_UI_GENDER 26 +#define DNA_UI_BEARD_STYLE 27 +#define DNA_UI_HAIR_STYLE 28 /*#define DNA_UI_BACC_STYLE 23*/ -#define DNA_UI_HACC_STYLE 23 -#define DNA_UI_MARK_STYLE 24 -#define DNA_UI_LENGTH 24 // Update this when you add something, or you WILL break shit. +#define DNA_UI_HACC_STYLE 29 +#define DNA_UI_HEAD_MARK_STYLE 30 +#define DNA_UI_BODY_MARK_STYLE 31 +#define DNA_UI_TAIL_MARK_STYLE 32 +#define DNA_UI_LENGTH 32 // Update this when you add something, or you WILL break shit. #define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow. @@ -128,16 +136,18 @@ var/global/list/bad_blocks[0] var/obj/item/organ/external/head/H = character.get_organ("head") var/obj/item/organ/internal/eyes/eyes_organ = character.get_int_organ(/obj/item/organ/internal/eyes) - /*// Body Accessory if(!character.body_accessory) character.body_accessory = null var/bodyacc = character.body_accessory*/ // Markings - if(!character.m_style) - character.m_style = "None" - var/marks = marking_styles_list.Find(character.m_style) + if(!character.m_styles) + character.m_styles = DEFAULT_MARKING_STYLES + + var/head_marks = marking_styles_list.Find(character.m_styles["head"]) + var/body_marks = marking_styles_list.Find(character.m_styles["body"]) + var/tail_marks = marking_styles_list.Find(character.m_styles["tail"]) head_traits_to_dna(H) eye_color_to_dna(eyes_organ) @@ -146,15 +156,25 @@ var/global/list/bad_blocks[0] SetUIValueRange(DNA_UI_SKIN_G, character.g_skin, 255, 1) SetUIValueRange(DNA_UI_SKIN_B, character.b_skin, 255, 1) - SetUIValueRange(DNA_UI_MARK_R, character.r_markings, 255, 1) - SetUIValueRange(DNA_UI_MARK_G, character.g_markings, 255, 1) - SetUIValueRange(DNA_UI_MARK_B, character.b_markings, 255, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_R, color2R(character.m_colours["head"]), 255, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_G, color2G(character.m_colours["head"]), 255, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_B, color2B(character.m_colours["head"]), 255, 1) - SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative. + SetUIValueRange(DNA_UI_BODY_MARK_R, color2R(character.m_colours["body"]), 255, 1) + SetUIValueRange(DNA_UI_BODY_MARK_G, color2G(character.m_colours["body"]), 255, 1) + SetUIValueRange(DNA_UI_BODY_MARK_B, color2B(character.m_colours["body"]), 255, 1) - SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_R, color2R(character.m_colours["tail"]), 255, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_G, color2G(character.m_colours["tail"]), 255, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_B, color2B(character.m_colours["tail"]), 255, 1) + + SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative. + + SetUIState(DNA_UI_GENDER, character.gender!=MALE, 1) /*SetUIValueRange(DNA_UI_BACC_STYLE, bodyacc, facial_hair_styles_list.len, 1)*/ - SetUIValueRange(DNA_UI_MARK_STYLE, marks, marking_styles_list.len, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_STYLE, head_marks, marking_styles_list.len, 1) + SetUIValueRange(DNA_UI_BODY_MARK_STYLE, body_marks, marking_styles_list.len, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_STYLE, tail_marks, marking_styles_list.len, 1) UpdateUI() diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 137617ffd1e..2c5fdbbb5b1 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -138,9 +138,9 @@ H.g_skin = dna.GetUIValueRange(DNA_UI_SKIN_G, 255) H.b_skin = dna.GetUIValueRange(DNA_UI_SKIN_B, 255) - H.r_markings = dna.GetUIValueRange(DNA_UI_MARK_R, 255) - H.g_markings = dna.GetUIValueRange(DNA_UI_MARK_G, 255) - H.b_markings = dna.GetUIValueRange(DNA_UI_MARK_B, 255) + H.m_colours["head"] = rgb(dna.GetUIValueRange(DNA_UI_HEAD_MARK_R, 255), dna.GetUIValueRange(DNA_UI_HEAD_MARK_G, 255), dna.GetUIValueRange(DNA_UI_HEAD_MARK_B, 255)) + H.m_colours["body"] = rgb(dna.GetUIValueRange(DNA_UI_BODY_MARK_R, 255), dna.GetUIValueRange(DNA_UI_BODY_MARK_G, 255), dna.GetUIValueRange(DNA_UI_BODY_MARK_B, 255)) + H.m_colours["tail"] = rgb(dna.GetUIValueRange(DNA_UI_TAIL_MARK_R, 255), dna.GetUIValueRange(DNA_UI_TAIL_MARK_G, 255), dna.GetUIValueRange(DNA_UI_TAIL_MARK_B, 255)) H.s_tone = 35 - dna.GetUIValueRange(DNA_UI_SKIN_TONE, 220) // Value can be negative. @@ -149,16 +149,37 @@ else H.change_gender(MALE, 0) - //Markings - var/marks = dna.GetUIValueRange(DNA_UI_MARK_STYLE,marking_styles_list.len) - if((0 < marks) && (marks <= marking_styles_list.len)) - H.m_style = marking_styles_list[marks] + var/number_head_marks = 0 + var/number_body_marks = 0 + var/number_tail_marks = 0 + for(var/m in marking_styles_list) + var/datum/sprite_accessory/body_markings/marking = marking_styles_list[m] + if(marking.marking_location == "head") + number_head_marks++ + else if(marking.marking_location == "body") + number_body_marks++ + else if(marking.marking_location == "tail") + number_tail_marks++ + + //Head Markings + var/head_marks = dna.GetUIValueRange(DNA_UI_HEAD_MARK_STYLE, marking_styles_list.len) + if((head_marks > 0) && (head_marks <= number_head_marks)) + H.m_styles["head"] = marking_styles_list[head_marks] + //Body Markings + var/body_marks = dna.GetUIValueRange(DNA_UI_BODY_MARK_STYLE, marking_styles_list.len) + if((body_marks > 0) && (body_marks <= number_body_marks)) + H.m_styles["body"] = marking_styles_list[body_marks] + //Tail Markings + var/tail_marks = dna.GetUIValueRange(DNA_UI_TAIL_MARK_STYLE, marking_styles_list.len) + if((tail_marks > 0) && (tail_marks <= number_tail_marks)) + H.m_styles["tail"] = marking_styles_list[tail_marks] H.force_update_limbs() H.update_eyes() H.update_hair() H.update_fhair() H.update_markings() + H.update_tail_layer() H.update_head_accessory() return 1 @@ -178,7 +199,7 @@ //Hair var/hair = GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len) - if((0 < hair) && (hair <= hair_styles_list.len)) + if((hair > 0) && (hair <= hair_styles_list.len)) head_organ.h_style = hair_styles_list[hair] head_organ.r_hair = GetUIValueRange(DNA_UI_HAIR_R, 255) @@ -187,7 +208,7 @@ //Facial Hair var/beard = GetUIValueRange(DNA_UI_BEARD_STYLE,facial_hair_styles_list.len) - if((0 < beard) && (beard <= facial_hair_styles_list.len)) + if((beard > 0) && (beard <= facial_hair_styles_list.len)) head_organ.f_style = facial_hair_styles_list[beard] head_organ.r_facial = GetUIValueRange(DNA_UI_BEARD_R, 255) @@ -196,7 +217,7 @@ //Head Accessories var/headacc = GetUIValueRange(DNA_UI_HACC_STYLE,head_accessory_styles_list.len) - if((0 < headacc) && (headacc <= head_accessory_styles_list.len)) + if((headacc > 0) && (headacc <= head_accessory_styles_list.len)) head_organ.ha_style = head_accessory_styles_list[headacc] head_organ.r_headacc = GetUIValueRange(DNA_UI_HACC_R, 255) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 40814a72c78..63c42687b67 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -144,7 +144,7 @@ if(usr.stat != 0) return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(!ishuman(usr)) //Make sure they're a mob that has dna to_chat(usr, "Try as you might, you can not climb up into the [src].") @@ -169,7 +169,7 @@ return if(O.loc == user) //no you can't pull things out of your ass return - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source return @@ -973,4 +973,4 @@ return 1 -/////////////////////////// DNA MACHINES \ No newline at end of file +/////////////////////////// DNA MACHINES diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index a30d160fd92..4cfa6f45750 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -24,7 +24,7 @@ /datum/dna/gene/disability/can_activate(var/mob/M,var/flags) return 1 // Always set! -/datum/dna/gene/disability/activate(var/mob/M, var/connected, var/flags) +/datum/dna/gene/disability/activate(var/mob/living/M, var/connected, var/flags) ..() if(mutation && !(mutation in M.mutations)) M.mutations.Add(mutation) @@ -35,7 +35,7 @@ else testing("[name] has no activation message.") -/datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags) +/datum/dna/gene/disability/deactivate(var/mob/living/M, var/connected, var/flags) ..() if(mutation && (mutation in M.mutations)) M.mutations.Remove(mutation) @@ -127,7 +127,7 @@ /datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags) ..(M,connected,flags) - M.ear_deaf = 1 + M.EarDeaf(1) /datum/dna/gene/disability/nearsighted name="Nearsightedness" diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index 992e4326317..a194ddfeed1 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -54,10 +54,14 @@ eyes_blue = eyes_organ.eye_colour[3] var/new_eyes = input("Please select eye color.", "Character Generation", rgb(eyes_red,eyes_green,eyes_blue)) as null|color if(new_eyes) - eyes_red = hex2num(copytext(new_eyes, 2, 4)) - eyes_green = hex2num(copytext(new_eyes, 4, 6)) - eyes_blue = hex2num(copytext(new_eyes, 6, 8)) - M.change_eye_color(eyes_red, eyes_green, eyes_blue) + M.change_eye_color(color2R(new_eyes), color2G(new_eyes), color2B(new_eyes)) + + //Alt heads. + if(head_organ.species.bodyflags & HAS_ALT_HEADS) + var/list/valid_alt_heads = M.generate_valid_alt_heads() + var/new_alt_head = input("Please select alternate head", "Character Generation", head_organ.alt_head) as null|anything in valid_alt_heads + if(new_alt_head) + M.change_alt_head(new_alt_head) // hair var/list/valid_hairstyles = M.generate_valid_hairstyles() @@ -65,52 +69,45 @@ // if new style selected (not cancel) if(new_style) - head_organ.h_style = new_style + M.change_hair(new_style) var/new_hair = input("Please select hair color.", "Character Generation", rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair)) as null|color if(new_hair) - head_organ.r_hair = hex2num(copytext(new_hair, 2, 4)) - head_organ.g_hair = hex2num(copytext(new_hair, 4, 6)) - head_organ.b_hair = hex2num(copytext(new_hair, 6, 8)) + M.change_hair_color(color2R(new_hair), color2G(new_hair), color2B(new_hair)) + + var/datum/sprite_accessory/hair_style = hair_styles_list[head_organ.h_style] + if(hair_style.secondary_theme && !hair_style.no_sec_colour) + new_hair = input("Please select secondary hair color.", "Character Generation", rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec)) as null|color + if(new_hair) + M.change_hair_color(color2R(new_hair), color2G(new_hair), color2B(new_hair), 1) // facial hair var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles() new_style = input("Please select facial style", "Character Generation", head_organ.f_style) as null|anything in valid_facial_hairstyles if(new_style) - head_organ.f_style = new_style + M.change_facial_hair(new_style) var/new_facial = input("Please select facial hair color.", "Character Generation", rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial)) as null|color if(new_facial) - head_organ.r_facial = hex2num(copytext(new_facial, 2, 4)) - head_organ.g_facial = hex2num(copytext(new_facial, 4, 6)) - head_organ.b_facial = hex2num(copytext(new_facial, 6, 8)) + M.change_facial_hair_color(color2R(new_facial), color2G(new_facial), color2B(new_facial)) + + var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style] + if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour) + new_facial = input("Please select secondary facial hair color.", "Character Generation", rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec)) as null|color + if(new_facial) + M.change_facial_hair_color(color2R(new_facial), color2G(new_facial), color2B(new_facial), 1) //Head accessory. if(head_organ.species.bodyflags & HAS_HEAD_ACCESSORY) var/list/valid_head_accessories = M.generate_valid_head_accessories() var/new_head_accessory = input("Please select head accessory style", "Character Generation", head_organ.ha_style) as null|anything in valid_head_accessories if(new_head_accessory) - head_organ.ha_style = new_head_accessory + M.change_head_accessory(new_head_accessory) var/new_head_accessory_colour = input("Please select head accessory colour.", "Character Generation", rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc)) as null|color if(new_head_accessory_colour) - head_organ.r_headacc = hex2num(copytext(new_head_accessory_colour, 2, 4)) - head_organ.g_headacc = hex2num(copytext(new_head_accessory_colour, 4, 6)) - head_organ.b_headacc = hex2num(copytext(new_head_accessory_colour, 6, 8)) - - //Body markings. - if(M.species.bodyflags & HAS_MARKINGS) - var/list/valid_markings = M.generate_valid_markings() - var/new_marking = input("Please select marking style", "Character Generation", M.m_style) as null|anything in valid_markings - if(new_marking) - M.m_style = new_marking - - var/new_marking_colour = input("Please select marking colour.", "Character Generation", rgb(M.r_markings, M.g_markings, M.b_markings)) as null|color - if(new_marking_colour) - M.r_markings = hex2num(copytext(new_marking_colour, 2, 4)) - M.g_markings = hex2num(copytext(new_marking_colour, 4, 6)) - M.b_markings = hex2num(copytext(new_marking_colour, 6, 8)) + M.change_head_accessory_color(color2R(new_head_accessory_colour), color2G(new_head_accessory_colour), color2B(new_head_accessory_colour)) //Body accessory. if(M.species.tail && M.species.bodyflags & HAS_TAIL) @@ -118,18 +115,51 @@ if(valid_body_accessories.len > 1) //By default valid_body_accessories will always have at the very least a 'none' entry populating the list, even if the user's species is not present in any of the list items. var/new_body_accessory = input("Please select body accessory style", "Character Generation", M.body_accessory) as null|anything in valid_body_accessories if(new_body_accessory) - M.body_accessory = body_accessory_by_name[new_body_accessory] + M.change_body_accessory(new_body_accessory) + + //Head markings. + if(M.species.bodyflags & HAS_HEAD_MARKINGS) + var/list/valid_head_markings = M.generate_valid_markings("head") + var/new_marking = input("Please select head marking style", "Character Generation", M.m_styles["head"]) as null|anything in valid_head_markings + if(new_marking) + M.change_markings(new_marking, "head") + + var/new_marking_colour = input("Please select head marking colour.", "Character Generation", M.m_colours["head"]) as null|color + if(new_marking_colour) + M.change_marking_color(new_marking_colour, "head") + //Body markings. + if(M.species.bodyflags & HAS_BODY_MARKINGS) + var/list/valid_body_markings = M.generate_valid_markings("body") + var/new_marking = input("Please select body marking style", "Character Generation", M.m_styles["body"]) as null|anything in valid_body_markings + if(new_marking) + M.change_markings(new_marking, "body") + + var/new_marking_colour = input("Please select body marking colour.", "Character Generation", M.m_colours["body"]) as null|color + if(new_marking_colour) + M.change_marking_color(new_marking_colour, "body") + //Tail markings. + if(M.species.bodyflags & HAS_TAIL_MARKINGS) + var/list/valid_tail_markings = M.generate_valid_markings("tail") + var/new_marking = input("Please select tail marking style", "Character Generation", M.m_styles["tail"]) as null|anything in valid_tail_markings + if(new_marking) + M.change_markings(new_marking, "tail") + + var/new_marking_colour = input("Please select tail marking colour.", "Character Generation", M.m_colours["tail"]) as null|color + if(new_marking_colour) + M.change_marking_color(new_marking_colour, "tail") //Skin tone. if(M.species.bodyflags & HAS_SKIN_TONE) var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", M.s_tone) as null|text if(!new_tone) new_tone = 35 - M.s_tone = 35 - max(min(round(text2num(new_tone)), 220), 1) + else + new_tone = 35 - max(min(round(text2num(new_tone)), 220), 1) + M.change_skin_tone(new_tone) if(M.species.bodyflags & HAS_ICON_SKIN_TONE) var/prompt = "Please select skin tone: 1-[M.species.icon_skin_tones.len] (" - for(var/i = 1; i <= M.species.icon_skin_tones.len; i++) + for(var/i = 1 to M.species.icon_skin_tones.len) prompt += "[i] = [M.species.icon_skin_tones[i]]" if(i != M.species.icon_skin_tones.len) prompt += ", " @@ -138,18 +168,16 @@ var/new_tone = input(prompt, "Character Generation", M.s_tone) as null|text if(!new_tone) new_tone = 0 - M.s_tone = max(min(round(text2num(new_tone)), M.species.icon_skin_tones.len), 1) + else + new_tone = max(min(round(text2num(new_tone)), M.species.icon_skin_tones.len), 1) + M.change_skin_tone(new_tone) //Skin colour. if(M.species.bodyflags & HAS_SKIN_COLOR) var/new_body_colour = input("Please select body colour.", "Character Generation", rgb(M.r_skin, M.g_skin, M.b_skin)) as null|color if(new_body_colour) - M.r_skin = hex2num(copytext(new_body_colour, 2, 4)) - M.g_skin = hex2num(copytext(new_body_colour, 4, 6)) - M.b_skin = hex2num(copytext(new_body_colour, 6, 8)) + M.change_skin_color(color2R(new_body_colour), color2G(new_body_colour), color2B(new_body_colour)) - M.force_update_limbs() - M.regenerate_icons() M.update_dna() M.visible_message("[src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") diff --git a/code/game/gamemodes/changeling/powers/headcrab.dm b/code/game/gamemodes/changeling/powers/headcrab.dm index 07ae44d9a9a..4adbc39e7fc 100644 --- a/code/game/gamemodes/changeling/powers/headcrab.dm +++ b/code/game/gamemodes/changeling/powers/headcrab.dm @@ -17,11 +17,11 @@ for(var/mob/living/carbon/human/H in range(2,user)) to_chat(H, "You are blinded by a shower of blood!") H.Stun(1) - H.eye_blurry = max(20, H.eye_blurry) + H.EyeBlurry(20) var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) if(istype(E)) E.damage = max(E.damage+5, 0) - H.confused += 3 + H.AdjustConfused(3) for(var/mob/living/silicon/S in range(2,user)) to_chat(S, "Your sensors are disabled by a shower of blood!") S.Weaken(3) @@ -37,4 +37,4 @@ to_chat(crab, "You burst out of the remains of your former body in a shower of gore!") user.gib() feedback_add_details("changeling_powers","LR") - return 1 \ No newline at end of file + return 1 diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index b6692817650..2585287528c 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -17,10 +17,14 @@ user.SetStunned(0) user.SetWeakened(0) user.radiation = 0 - user.eye_blind = 0 - user.eye_blurry = 0 - user.setEarDamage(0,0) + user.SetEyeBlind(0) + user.SetEyeBlurry(0) + user.SetEarDamage(0) + user.SetEarDeaf(0) user.heal_overall_damage(user.getBruteLoss(), user.getFireLoss()) + user.CureBlind() + user.CureDeaf() + user.CureNearsighted() user.reagents.clear_reagents() user.germ_level = 0 user.next_pain_time = 0 diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index 7babc2a5a62..5185b61e508 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -11,8 +11,8 @@ for(var/mob/living/M in get_mobs_in_view(4, user)) if(iscarbon(M)) if(!M.mind || !M.mind.changeling) - M.adjustEarDamage(0, 30) - M.confused += 20 + M.AdjustEarDeaf(30) + M.AdjustConfused(20) M.Jitter(50) else M << sound('sound/effects/screech.ogg') @@ -41,5 +41,3 @@ L.broken() empulse(get_turf(user), 2, 4, 1) return 1 - - diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index f4aa6f3d8f2..0df371009a8 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -153,7 +153,7 @@ obj/effect/proc_holder/changeling/sting/mute /obj/effect/proc_holder/changeling/sting/mute/sting_action(var/mob/user, var/mob/living/carbon/target) add_logs(user, target, "stung", object="mute sting") - target.silent += 30 + target.AdjustSilence(30) feedback_add_details("changeling_powers","MS") return 1 @@ -165,12 +165,12 @@ obj/effect/proc_holder/changeling/sting/blind chemical_cost = 25 dna_cost = 1 -/obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/user, var/mob/target) +/obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/living/user, var/mob/living/target) add_logs(user, target, "stung", object="blind sting") to_chat(target, "Your eyes burn horrifically!") - target.disabilities |= NEARSIGHTED - target.eye_blind = 20 - target.eye_blurry = 40 + target.BecomeNearsighted() + target.EyeBlind(20) + target.EyeBlurry(40) feedback_add_details("changeling_powers","BS") return 1 @@ -186,7 +186,7 @@ obj/effect/proc_holder/changeling/sting/LSD add_logs(user, target, "stung", object="LSD sting") spawn(rand(300,600)) if(target) - target.hallucination = max(400, target.hallucination) + target.Hallucinate(400) feedback_add_details("changeling_powers","HS") return 1 diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index ca96b4f869f..20133d972c8 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -840,7 +840,7 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.adjustEarDamage(0,50) + C.AdjustEarDeaf(50) C.show_message("\red The world around you suddenly becomes quiet.", 3) affected++ if(prob(1)) @@ -859,7 +859,7 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.adjustEarDamage(0,30) + C.AdjustEarDeaf(30) //talismans is weaker. C.show_message("\red The world around you suddenly becomes quiet.", 3) affected++ @@ -880,12 +880,12 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.eye_blurry += 50 - C.eye_blind += 20 + C.AdjustEyeBlurry(50) + C.AdjustEyeBlind(20) if(prob(5)) - C.disabilities |= NEARSIGHTED + C.BecomeNearsighted() if(prob(10)) - C.disabilities |= BLIND + C.BecomeBlind() C.show_message("\red Suddenly you see red flash that blinds you.", 3) affected++ if(affected) @@ -902,8 +902,8 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.eye_blurry += 30 - C.eye_blind += 10 + C.AdjustEyeBlurry(30) + C.AdjustEyeBlind(10) //talismans is weaker. affected++ C.show_message("\red You feel a sharp pain in your eyes, and the world disappears into darkness..", 3) @@ -1016,7 +1016,7 @@ var/list/sacrificed = list() var/mob/living/carbon/C = T C.flash_eyes() if(!(HULK in C.mutations)) - C.silent += 15 + C.AdjustSilence(15) C.Weaken(10) C.Stun(10) return diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 4d98876ccd6..29f217b44bc 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -466,7 +466,7 @@ Congratulations! You are now trained for xenobiology research!"} L.Sleeping(60) add_logs(user, L, "put to sleep") else - L.drowsyness += 1 + L.AdjustDrowsy(1) to_chat(user, "Sleep inducement works fully only on stunned specimens! ") L.visible_message("[user] tried to induce sleep in [L] with [src]!", \ "You suddenly feel drowsy!") diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index 8a3fbd8ff60..b59f1fd8454 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -98,7 +98,7 @@ if(H == owner) continue to_chat(H, "You hear a buzz in your head.") - H.confused += 20 + H.AdjustConfused(20) /obj/item/organ/internal/gland/pop origin_tech = "materials=4;biotech=6;abductor=3" diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 26fb00b42a8..0f9173c31ea 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -253,7 +253,7 @@ to_chat(human, "You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")].") human.adjustStaminaLoss(stamdamage) human.adjustToxLoss(toxdamage) - human.confused = min(human.confused+confusion, maxconfusion) + human.AdjustConfused(confusion, bound_lower = 0, bound_upper = maxconfusion) new/obj/effect/overlay/temp/revenant(human.loc) if(!istype(T, /turf/simulated/shuttle) && !istype(T, /turf/simulated/wall/rust) && !istype(T, /turf/simulated/wall/r_wall) && istype(T, /turf/simulated/wall) && prob(15)) new/obj/effect/overlay/temp/revenant(T) @@ -317,4 +317,4 @@ playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1) new/obj/effect/overlay/temp/revenant(S.loc) S.spark_system.start() - S.emp_act(1) \ No newline at end of file + S.emp_act(1) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index e0fc32f1eda..43892b6c474 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -150,30 +150,19 @@ proc/issyndicate(mob/living/M as mob) var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue var/skin_tone = pick(-50, -30, -10, 0, 0, 0, 10) // Caucasian/black - var/hair_style = "Bald" - var/facial_hair_style = "Shaved" - if(M.gender == MALE) - hair_style = pick(hair_styles_male_list) - facial_hair_style = pick(facial_hair_styles_list) - else - hair_style = pick(hair_styles_female_list) - if(prob(5)) - facial_hair_style = pick(facial_hair_styles_list) - - head_organ.r_facial = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_facial = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_facial = hex2num(copytext(hair_c, 6, 8)) - head_organ.r_hair = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_hair = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_hair = hex2num(copytext(hair_c, 6, 8)) - var/eyes_red = hex2num(copytext(eye_c, 2, 4)) - var/eyes_green = hex2num(copytext(eye_c, 4, 6)) - var/eyes_blue = hex2num(copytext(eye_c, 6, 8)) - M.change_eye_color(eyes_red, eyes_green, eyes_blue) + head_organ.r_facial = color2R(hair_c) + head_organ.g_facial = color2G(hair_c) + head_organ.b_facial = color2B(hair_c) + head_organ.r_hair = color2R(hair_c) + head_organ.g_hair = color2G(hair_c) + head_organ.b_hair = color2B(hair_c) + M.change_eye_color(color2R(eye_c), color2G(eye_c), color2B(eye_c)) M.s_tone = skin_tone - head_organ.h_style = hair_style - head_organ.f_style = facial_hair_style + head_organ.h_style = random_hair_style(M.gender, head_organ.species.name) + head_organ.f_style = random_facial_hair_style(M.gender, head_organ.species.name) M.body_accessory = null + M.regenerate_icons() + M.update_body() /datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code) var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord") diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 83846818091..461fe0e4ca7 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -241,7 +241,7 @@ revolutionaries += rev_mind if(iscarbon(rev_mind.current)) var/mob/living/carbon/carbon_mob = rev_mind.current - carbon_mob.silent = max(carbon_mob.silent, 5) + carbon_mob.Silence(5) carbon_mob.flash_eyes(1, 1) rev_mind.current.Stun(5) to_chat(rev_mind.current, " You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!") diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 70471a91aff..b9525ee282e 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -46,7 +46,7 @@ else //Only alludes to the shadowling if the target is close by to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by the heavenly lights...") target.Stun(10) - M.silent += 10 + M.AdjustSilence(10) /obj/effect/proc_holder/spell/targeted/lesser_glare @@ -79,7 +79,7 @@ else to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by their heavenly beauty...") target.Stun(3) //Roughly 30% as long as the normal one - M.silent += 3 + M.AdjustSilence(3) /obj/effect/proc_holder/spell/aoe_turf/veil @@ -519,7 +519,7 @@ /datum/reagent/shadowling_blindness_smoke/on_mob_life(mob/living/M) if(!is_shadow_or_thrall(M)) to_chat(M, "You breathe in the black smoke, and your eyes burn horribly!") - M.eye_blind = 5 + M.EyeBlind(5) if(prob(25)) M.visible_message("[M] claws at their eyes!") M.Stun(3) @@ -556,8 +556,8 @@ if(iscarbon(target)) var/mob/living/carbon/M = target to_chat(M, "A spike of pain drives into your head and scrambles your thoughts!") - M.confused += 10 - M.setEarDamage(M.ear_damage + 3) + M.AdjustConfused(10) + M.AdjustEarDamage(3) else if(issilicon(target)) var/mob/living/silicon/S = target to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#") diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index f8e1575efc1..92a1a3dfa19 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -259,8 +259,8 @@ continue to_chat(C, "You hear a ear piercing shriek and your senses dull!") C.Weaken(4) - C.adjustEarDamage(0,20) - C.stuttering = 20 + C.AdjustEarDeaf(20) + C.Stuttering(20) C.Stun(4) C.Jitter(150) for(var/obj/structure/window/W in view(4)) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 34886dde2e0..689fb350b0d 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -782,7 +782,7 @@ var/global/list/multiverse = list() else if(istype(I,/obj/item/weapon/bikehorn)) to_chat(target, "HONK") target << 'sound/items/AirHorn.ogg' - target.adjustEarDamage(0,3) + target.AdjustEarDeaf(3) GiveHint(target) cooldown = world.time +cooldown_time return diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 08a580923f4..4c06f84d7cd 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -747,7 +747,7 @@ /obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user as mob) ..() to_chat(user, "You go blind!") - user.eye_blind = 10 + user.EyeBlind(10) /obj/item/weapon/spellbook/oneuse/mindswap spell = /obj/effect/proc_holder/spell/targeted/mind_transfer diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 8c139dabdbd..58d041b9442 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -129,7 +129,6 @@ var/const/access_trade_sol = 160 return 0 - /obj/item/proc/GetAccess() return list() diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 60e650691e5..fb49e6a5970 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -546,7 +546,7 @@ if(panel_open) to_chat(usr, "Close the maintenance panel first.") return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return for(var/mob/living/carbon/slime/M in range(1,usr)) if(M.Victim == usr) @@ -590,4 +590,4 @@ component_parts += new /obj/item/stack/cable_coil(null, 1) RefreshParts() -#undef ADDICTION_SPEEDUP_TIME \ No newline at end of file +#undef ADDICTION_SPEEDUP_TIME diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 65a1730bacd..5be99b2ab1c 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -448,7 +448,7 @@ if(ORION_TRAIL_RAIDERS) if(prob(50)) to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?") - M.hallucination += 30 + M.AdjustHallucinate(30) else to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...") M.take_organ_damage(30) diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 0a84ee81821..f1d7149f9fa 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -20,7 +20,7 @@ jump_action.Grant(user) /obj/machinery/computer/camera_advanced/check_eye(mob/user) - if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || user.eye_blind || user.incapacitated()) + if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || !user.can_see() || user.incapacitated()) user.unset_machine() return 0 return 1 @@ -167,4 +167,4 @@ var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T var/obj/machinery/camera/final = T[camera] if(final) - remote_eye.setLoc(get_turf(final)) \ No newline at end of file + remote_eye.setLoc(get_turf(final)) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 7c77ca6099f..01608efedcb 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -1,9 +1,12 @@ - #define COMM_SCREEN_MAIN 1 #define COMM_SCREEN_STAT 2 #define COMM_SCREEN_MESSAGES 3 #define COMM_SCREEN_SECLEVEL 4 +#define COMM_AUTHENTICATION_NONE 0 +#define COMM_AUTHENTICATION_MIN 1 +#define COMM_AUTHENTICATION_MAX 2 + // The communications computer /obj/machinery/computer/communications name = "communications console" @@ -13,7 +16,7 @@ req_access = list(access_heads) circuit = /obj/item/weapon/circuitboard/communications var/prints_intercept = 1 - var/authenticated = 0 + var/authenticated = COMM_AUTHENTICATION_NONE var/list/messagetitle = list() var/list/messagetext = list() var/currmsg = 0 @@ -39,16 +42,16 @@ crew_announcement.newscast = 1 /obj/machinery/computer/communications/proc/is_authenticated(var/mob/user, var/message = 1) - if(authenticated == 2) - return 2 + if(authenticated == COMM_AUTHENTICATION_MAX) + return COMM_AUTHENTICATION_MAX else if(user.can_admin_interact()) - return 2 + return COMM_AUTHENTICATION_MAX else if(authenticated) - return 1 + return COMM_AUTHENTICATION_MIN else if(message) to_chat(user, "Access denied.") - return 0 + return COMM_AUTHENTICATION_NONE /obj/machinery/computer/communications/Topic(href, href_list) if(..(href, href_list)) @@ -62,23 +65,23 @@ if(!ishuman(usr)) to_chat(usr, "Access denied.") return - var/mob/living/carbon/human/M = usr - var/obj/item/card = M.get_active_hand() - var/obj/item/weapon/card/id/I = (card && card.GetID())||M.wear_id||M.wear_pda - if(istype(I, /obj/item/device/pda)) - var/obj/item/device/pda/pda = I - I = pda.id - if(I && istype(I)) - if(src.check_access(I)) - authenticated = 1 - if(access_captain in I.access) - authenticated = 2 - crew_announcement.announcer = GetNameAndAssignmentFromId(I) + + var/list/access = usr.get_access() + if(allowed(usr)) + authenticated = COMM_AUTHENTICATION_MIN + + if(access_captain in access) + authenticated = COMM_AUTHENTICATION_MAX + var/mob/living/carbon/human/H = usr + var/obj/item/weapon/card/id = H.get_idcard(TRUE) + if(istype(id)) + crew_announcement.announcer = GetNameAndAssignmentFromId(id) + nanomanager.update_uis(src) return if(href_list["logout"]) - authenticated = 0 + authenticated = COMM_AUTHENTICATION_NONE crew_announcement.announcer = "" setMenuState(usr,COMM_SCREEN_MAIN) nanomanager.update_uis(src) @@ -131,13 +134,13 @@ to_chat(usr, "You need to swipe your ID.") if("announce") - if(is_authenticated(usr) == 2) + if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(message_cooldown) to_chat(usr, "Please allow at least one minute to pass between announcements.") nanomanager.update_uis(src) return var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") - if(!input || message_cooldown || ..() || !(is_authenticated(usr) == 2)) + if(!input || message_cooldown || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) nanomanager.update_uis(src) return crew_announcement.Announce(input) @@ -213,13 +216,13 @@ setMenuState(usr,COMM_SCREEN_STAT) if("nukerequest") - if(is_authenticated(usr) == 2) + if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") nanomanager.update_uis(src) return var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null - if(!input || ..() || !(is_authenticated(usr) == 2)) + if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) nanomanager.update_uis(src) return Nuke_request(input, usr) @@ -232,13 +235,13 @@ setMenuState(usr,COMM_SCREEN_MAIN) if("MessageCentcomm") - if(is_authenticated(usr) == 2) + if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") nanomanager.update_uis(src) return var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null - if(!input || ..() || !(is_authenticated(usr) == 2)) + if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) nanomanager.update_uis(src) return Centcomm_announce(input, usr) @@ -251,13 +254,13 @@ // OMG SYNDICATE ...LETTERHEAD if("MessageSyndicate") - if((is_authenticated(usr) == 2) && (src.emagged)) + if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (src.emagged)) if(centcomm_message_cooldown) to_chat(usr, "Arrays recycling. Please stand by.") nanomanager.update_uis(src) return var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null - if(!input || ..() || !(is_authenticated(usr) == 2)) + if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) nanomanager.update_uis(src) return Syndicate_announce(input, usr) @@ -518,7 +521,7 @@ return ..() shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.") - log_game("All the AIs, comm consoles and boards are destroyed. Shuttle called.") - message_admins("All the AIs, comm consoles and boards are destroyed. Shuttle called.", 1) + log_game("All the AI's, communication consoles and boards are destroyed. Shuttle called.") + message_admins("All the AI's, communication consoles and boards are destroyed. Shuttle called.", 1) return ..() diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 6dd6182c930..a46f6a97b50 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -80,10 +80,10 @@ beaker = null return ..() -/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) +/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/living/user as mob) if(O.loc == user) //no you can't pull things out of your ass return - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source return @@ -371,7 +371,7 @@ occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature)*current_heat_capacity/(current_heat_capacity + air_contents.heat_capacity()) occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise if(occupant.bodytemperature < T0C) - occupant.sleeping = max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency) + occupant.Sleeping(max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency)) occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency)) if(air_contents.oxygen > 2) if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1) @@ -469,9 +469,9 @@ if(M.Victim == usr) to_chat(usr, "You're too busy getting your life sucked out of you.") return - if(usr.stat != 0 || stat & (NOPOWER|BROKEN)) + if(usr.stat != CONSCIOUS || stat & (NOPOWER|BROKEN)) return - if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other + if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other return put_mob(usr) return diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9ffec3cb02c..4c462b5a05c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -485,7 +485,7 @@ if(O.loc == user) //no you can't pull things out of your ass return - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other + if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other return if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source return diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 30e5cac609f..acad5a5a563 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -4,7 +4,7 @@ name = "airlock electronics" icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" - w_class = 2 //It should be tiny! -Agouri + w_class = 2 materials = list(MAT_METAL=50, MAT_GLASS=50) req_access = list(access_engine) @@ -12,101 +12,96 @@ var/list/conf_access = null var/one_access = 0 //if set to 1, door would receive req_one_access instead of req_access var/last_configurator = null - var/locked = 1 + var/locked = TRUE + var/const/max_brain_damage = 60 // Maximum brain damage a mob can have until it can't use the electronics - attack_self(mob/user as mob) - if(!ishuman(user) && !istype(user,/mob/living/silicon/robot)) - return ..(user) +/obj/item/weapon/airlock_electronics/attack_self(mob/user) + if(!ishuman(user) && !isrobot(user)) + return ..() + if(ishuman(user)) var/mob/living/carbon/human/H = user - if(H.getBrainLoss() >= 60) + if(H.getBrainLoss() >= max_brain_damage) + to_chat(user, "You forget how to use \the [src].") return - var/t1 = text("Access control
\n") + var/t1 = text("Access control
\n") + if(last_configurator) + t1 += "Operator: [last_configurator]
" - if(last_configurator) - t1 += "Operator: [last_configurator]
" + if(locked) + t1 += "Swipe ID
" + else + t1 += "Block
" - if(locked) - t1 += "Swipe ID
" + t1 += "Access requirement is set to " + t1 += one_access ? "ONE
" : "ALL
" + + t1 += conf_access == null ? "All
" : "All
" + + t1 += "
" + + var/list/accesses = get_all_accesses() + for(var/acc in accesses) + var/aname = get_access_desc(acc) + + if(!conf_access || !conf_access.len || !(acc in conf_access)) + t1 += "[aname]
" + else if(one_access) + t1 += "[aname]
" + else + t1 += "[aname]
" + + t1 += "

Close

\n" + + var/datum/browser/popup = new(user, "airlock_electronics", name, 400, 400) + popup.set_content(t1) + popup.open(0) + onclose(user, "airlock") + +/obj/item/weapon/airlock_electronics/Topic(href, href_list) + ..() + + if(usr.incapacitated() || (!ishuman(usr) && !isrobot(usr))) + return 1 + + if(href_list["close"]) + usr << browse(null, "window=airlock") + return + + if(href_list["login"]) + if(allowed(usr)) + locked = FALSE + last_configurator = usr.name + + if(locked) + return + + if(href_list["logout"]) + locked = TRUE + + if(href_list["one_access"]) + one_access = !one_access + + if(href_list["access"]) + toggle_access(href_list["access"]) + + attack_self(usr) + +/obj/item/weapon/airlock_electronics/proc/toggle_access(var/access) + if(access == "all") + conf_access = null + else + var/req = text2num(access) + + if(conf_access == null) + conf_access = list() + + if(!(req in conf_access)) + conf_access += req else - t1 += "Block
" - - t1 += "Access requirement is set to " - t1 += one_access ? "ONE
" : "ALL
" - - t1 += conf_access == null ? "All
" : "All
" - - t1 += "
" - - var/list/accesses = get_all_accesses() - for(var/acc in accesses) - var/aname = get_access_desc(acc) - - if(!conf_access || !conf_access.len || !(acc in conf_access)) - t1 += "[aname]
" - else if(one_access) - t1 += "[aname]
" - else - t1 += "[aname]
" - - t1 += "

Close

\n" - - var/datum/browser/popup = new(user, "airlock_electronics", name, 400, 400) - popup.set_content(t1) - popup.open(0) - onclose(user, "airlock") - - Topic(href, href_list) - ..() - if(usr.stat || usr.restrained() || (!ishuman(usr) && !istype(usr,/mob/living/silicon))) - return - if(href_list["close"]) - usr << browse(null, "window=airlock") - return - - if(href_list["login"]) - if(istype(usr,/mob/living/silicon)) - src.locked = 0 - src.last_configurator = usr.name - else - var/obj/item/I = usr.get_active_hand() - if(istype(I, /obj/item/device/pda)) - var/obj/item/device/pda/pda = I - I = pda.id - if(I && src.check_access(I)) - src.locked = 0 - src.last_configurator = I:registered_name - - if(locked) - return - - if(href_list["logout"]) - locked = 1 - - if(href_list["one_access"]) - one_access = !one_access - - if(href_list["access"]) - toggle_access(href_list["access"]) - - attack_self(usr) - - proc - toggle_access(var/acc) - if(acc == "all") + conf_access -= req + if(!conf_access.len) conf_access = null - else - var/req = text2num(acc) - - if(conf_access == null) - conf_access = list() - - if(!(req in conf_access)) - conf_access += req - else - conf_access -= req - if(!conf_access.len) - conf_access = null diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index 151478ddee6..73e590361a7 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -111,21 +111,21 @@ if(do_after(user, 50, target = H)) switch(what_to_dye) if("hair") - var/r_hair = hex2num(copytext(dye_color, 2, 4)) - var/g_hair = hex2num(copytext(dye_color, 4, 6)) - var/b_hair = hex2num(copytext(dye_color, 6, 8)) + var/r_hair = color2R(dye_color) + var/g_hair = color2G(dye_color) + var/b_hair = color2B(dye_color) if(H.change_hair_color(r_hair, g_hair, b_hair)) H.update_dna() if("facial hair") - var/r_facial = hex2num(copytext(dye_color, 2, 4)) - var/g_facial = hex2num(copytext(dye_color, 4, 6)) - var/b_facial = hex2num(copytext(dye_color, 6, 8)) + var/r_facial = color2R(dye_color) + var/g_facial = color2G(dye_color) + var/b_facial = color2B(dye_color) if(H.change_facial_hair_color(r_facial, g_facial, b_facial)) H.update_dna() if("body") - var/r_skin = hex2num(copytext(dye_color, 2, 4)) - var/g_skin = hex2num(copytext(dye_color, 4, 6)) - var/b_skin = hex2num(copytext(dye_color, 6, 8)) + var/r_skin = color2R(dye_color) + var/g_skin = color2G(dye_color) + var/b_skin = color2B(dye_color) if(H.change_skin_color(r_skin, g_skin, b_skin)) H.update_dna() user.visible_message("[user] finishes dying [M]'s [what_to_dye]!", "You finish dying [M]'s [what_to_dye]!") diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index afe79ca48e3..bf2eedeaf23 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -37,6 +37,7 @@ #define PIPE_DP_VENT 36 #define PIPE_PASV_VENT 37 #define PIPE_DTVALVE 38 +#define PIPE_CIRCULATOR 39 /obj/item/pipe name = "pipe" @@ -150,10 +151,16 @@ src.pipe_type = PIPE_OMNI_MIXER else if(istype(make_from, /obj/machinery/atmospherics/omni/filter)) src.pipe_type = PIPE_OMNI_FILTER + else if(istype(make_from, /obj/machinery/atmospherics/binary/circulator)) + src.pipe_type = PIPE_CIRCULATOR var/obj/machinery/atmospherics/trinary/triP = make_from if(istype(triP) && triP.flipped) src.flipped = 1 + + var/obj/machinery/atmospherics/binary/circulator/circP = make_from + if(istype(circP) && circP.side == circP.CIRC_RIGHT) + src.flipped = 1 else src.pipe_type = pipe_type @@ -214,6 +221,7 @@ "dual-port vent", \ "passive vent", \ "digital t-valve", \ + "circulator/heat exchanger", \ ) name = nlist[pipe_type+1] + " fitting" var/list/islist = list( \ @@ -256,11 +264,15 @@ "dual-port vent", \ "passive vent", \ "dtvalve", \ + "circ", \ ) icon_state = islist[pipe_type + 1] var/obj/machinery/atmospherics/trinary/triP = make_from if(istype(triP) && triP.flipped) icon_state = "m_[icon_state]" + var/obj/machinery/atmospherics/binary/circulator/circP = make_from + if(istype(circP) && circP.side == circP.CIRC_RIGHT) + icon_state = "m_[icon_state]" // called by turf to know if should treat as bent or not on placement /obj/item/pipe/proc/is_bent_pipe() @@ -280,6 +292,10 @@ if( usr.stat || usr.restrained() ) return + + if(pipe_type == PIPE_CIRCULATOR) + flip() + return src.dir = turn(src.dir, -90) @@ -295,7 +311,7 @@ if(usr.stat || usr.restrained()) return - if(pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE)) + if(pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE, PIPE_CIRCULATOR)) if(flipped) icon_state = copytext(icon_state,3) else @@ -529,6 +545,14 @@ if(pipename) P.name = pipename P.construction(unflip(dir), pipe_dir, color) + + if(PIPE_CIRCULATOR) //circulator + var/obj/machinery/atmospherics/binary/circulator/C = new(src.loc) + if(flipped) + C.side = C.CIRC_RIGHT + if(pipename) + C.name = pipename + C.construction(C.dir, C.initialize_directions, color) if(PIPE_SCRUBBER) //scrubber var/obj/machinery/atmospherics/unary/vent_scrubber/S = new(src.loc) @@ -682,3 +706,4 @@ #undef PIPE_DP_VENT #undef PIPE_PASV_VENT #undef PIPE_DTVALVE +#undef PIPE_CIRCULATOR diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index d8f23599f74..452408ccdaa 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -104,11 +104,11 @@ return if(drownee.stat) //Mob is in critical. - drownee.losebreath -= 3 //You're gonna die here. + drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20) add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs drownee.visible_message("\The [drownee] appears to be drowning!","You're quickly drowning!") //inform them that they are fucked. else - drownee.losebreath -= 2 //For every time you drown, you miss 2 breath attempts. Hope you catch on quick! + drownee.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 20) //For every time you drown, you miss 2 breath attempts. Hope you catch on quick! add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then. drownee.visible_message("\The [drownee] flails, almost like they are drowning!","You're lacking air!") //*gasp* *gasp* *gasp* *gasp* *gasp* diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 68b2c83059e..fedb792c37d 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -164,9 +164,9 @@ if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs)) continue to_chat(M, "HONK") - M.sleeping = 0 - M.stuttering = 20 - M.adjustEarDamage(0,30) + M.SetSleeping(0) + M.Stuttering(20) + M.AdjustEarDeaf(30) M.Weaken(3) if(prob(30)) M.Stun(10) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 47b6c1bf57b..90e4c47b276 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -583,7 +583,7 @@ steam.start() -- spawns the effect // if(M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // I'll work on it later else M.drop_item() - M:sleeping += 5 + M.AdjustSleeping(5) if(M.coughedtime != 1) M.coughedtime = 1 M.emote("cough") @@ -600,7 +600,7 @@ steam.start() -- spawns the effect return else M.drop_item() - M:sleeping += 5 + M.AdjustSleeping(5) if(M.coughedtime != 1) M.coughedtime = 1 M.emote("cough") diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index ecb8590c103..43fd8ad3dc7 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -12,22 +12,6 @@ invisibility = 101 switch(name) //some of these are probably obsolete - if("shuttle") - log_runtime(EXCEPTION("Obsolete landmark '[name]' at ([x],[y],[z])"), src) - qdel(src) - - if("airtunnel_stop") - airtunnel_stop = x - - if("airtunnel_start") - airtunnel_start = x - - if("airtunnel_bottom") - airtunnel_bottom = y - - if("monkey") - monkeystart += loc - qdel(src) if("start") newplayer_start += loc qdel(src) @@ -52,29 +36,28 @@ latejoin_cyborg += loc qdel(src) - //prisoners if("prisonwarp") prisonwarp += loc qdel(src) - // if("mazewarp") - // mazewarp += loc - if("Holding Facility") - holdingfacility += loc - if("tdome1") - tdome1 += loc - if("tdome2") - tdome2 += loc - if("tdomeadmin") - tdomeadmin += loc - if("tdomeobserve") - tdomeobserve += loc - if("aroomwarp") - aroomwarp += loc - - //not prisoners + if("prisonsecuritywarp") prisonsecuritywarp += loc qdel(src) + + if("tdome1") + tdome1 += loc + + if("tdome2") + tdome2 += loc + + if("tdomeadmin") + tdomeadmin += loc + + if("tdomeobserve") + tdomeobserve += loc + + if("aroomwarp") + aroomwarp += loc if("blobstart") blobstart += loc @@ -96,6 +79,11 @@ if("ERT Director") ertdirector += loc + qdel(src) + + if("Response Team") + emergencyresponseteamspawn += loc + qdel(src) landmarks_list += src return 1 diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 79b09f48835..9d1fb75d25e 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -215,6 +215,7 @@ desc = "Green squishy mess." icon = 'icons/effects/effects.dmi' icon_state = "greenshatter" + anchored = 1 /obj/effect/spider/cocoon name = "cocoon" diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 32bf9a2fea5..9e36faae088 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -57,10 +57,11 @@ var/close = range(world.view+round(devastation_range,1), epicenter) // to all distanced mobs play a different sound - for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close)) - // check if the mob can hear - if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space)) - M << 'sound/effects/explosionfar.ogg' + for(var/mob/M in world) + if(M.z == epicenter.z && !(M in close)) + // check if the mob can hear + if(M.can_hear() && !istype(M.loc,/turf/space)) + M << 'sound/effects/explosionfar.ogg' if(heavy_impact_range > 1) var/datum/effect/system/explosion/E = new/datum/effect/system/explosion() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6ea2906c072..b34cc09ca89 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -474,10 +474,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly to_chat(M, "Your eyes start to bleed profusely!") if(prob(50)) - if(M.stat != 2) + if(M.stat != DEAD) to_chat(M, "You drop what you're holding and clutch at your eyes!") M.drop_item() - M.eye_blurry += 10 + M.AdjustEyeBlurry(10) M.Paralyse(1) M.Weaken(2) if(eyes.damage >= eyes.min_broken_damage) @@ -488,7 +488,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d H.UpdateDamageIcon() else M.take_organ_damage(7) - M.eye_blurry += rand(3,4) + M.AdjustEyeBlurry(rand(3,4)) return /obj/item/clean_blood() diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index a91c4e2ebe3..065392a9222 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -236,10 +236,10 @@ var/mob/living/carbon/human/C = target user.visible_message(" [user] sprays [src] into the face of [target]!") if(C.client) - C.eye_blurry = max(C.eye_blurry, 3) - C.eye_blind = max(C.eye_blind, 1) + C.EyeBlurry(3) + C.EyeBlind(1) if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS. - C.confused = max(C.confused, 3) + C.Confused(3) C.Weaken(3) C.lip_style = "spray_face" C.lip_color = colour @@ -251,4 +251,4 @@ overlays.Cut() var/image/I = image('icons/obj/crayons.dmi',icon_state = "[capped ? "spraycan_cap_colors" : "spraycan_colors"]") I.color = colour - overlays += I \ No newline at end of file + overlays += I diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index 7f2afb179e4..fb617133d83 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -55,7 +55,7 @@ interact(user) /obj/item/device/camera_bug/check_eye(var/mob/user as mob) - if(user.stat || loc != user || !user.canmove || user.eye_blind || !current) + if(user.stat || loc != user || !user.canmove || !user.can_see() || !current) user.reset_view(null) user.unset_machine() return null diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index cec1c106e48..52a9a343e6b 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -81,7 +81,7 @@ if(M.weakeyes) M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash if(M.flash_eyes(1, 1)) - M.confused += power + M.AdjustConfused(power) terrible_conversion_proc(M, user) M.Stun(1) visible_message("[user] blinds [M] with the flash!") @@ -96,7 +96,7 @@ to_chat(M, "[user] fails to blind you with the flash!") else if(M.flash_eyes()) - M.confused += power + M.AdjustConfused(power) /obj/item/device/flash/attack(mob/living/M, mob/user) if(!try_use_flash(user)) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index e6b0ff92c32..22b589c7517 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -91,7 +91,7 @@ G.state = GRAB_NECK G.hud.icon_state = "kill" G.hud.name = "kill" - M.silent += 1 + M.AdjustSilence(1) garrote_time = world.time + 10 processing_objects.Add(src) @@ -152,11 +152,11 @@ return - strangling.silent = max(strangling.silent, 3) // Non-improvised effects + strangling.Silence(3) // Non-improvised effects strangling.apply_damage(4, OXY, "head") /obj/item/weapon/twohanded/garrote/suicide_act(mob/user) user.visible_message("[user] is wrapping the [src] around \his neck and pulling the handles! It looks like \he's trying to commit suicide.") playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1) - return (OXYLOSS) \ No newline at end of file + return (OXYLOSS) diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 9562f9442c7..4241c9c5c0c 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -51,12 +51,13 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) + M.EarDeaf(15) + M.AdjustEarDamage(rand(0, 5)) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 10 + 5)) + if(prob(M.ear_damage - 5)) to_chat(M, "You can't hear anything!") - M.disabilities |= DEAF + M.BecomeDeaf() else if(M.ear_damage >= 5) to_chat(M, "Your ears start to ring!") diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 600ff934a8f..be74349f8ca 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -285,7 +285,7 @@ /obj/item/weapon/nullrod/whip/afterattack(atom/movable/AM, mob/user, proximity) if(!proximity) return - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(is_shadow(H)) var/phrase = pick("Die monster! You don't belong in this world!!!", "You steal men's souls and make them your slaves!!!", "Your words are as empty as your soul!!!", "Mankind ill needs a savior such as you!!!") @@ -399,7 +399,7 @@ /obj/item/weapon/nullrod/rosary/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - if(!istype(M)) + if(!iscarbon(M)) return ..() if(!user.mind || user.mind.assigned_role != "Chaplain") @@ -414,7 +414,7 @@ praying = 1 if(do_after(user, 150, target = M)) - if(istype(M, /mob/living/carbon/human)) // This probably should not work on vulps. They're unholy abominations. + if(ishuman(M)) // This probably should not work on vulps. They're unholy abominations. var/mob/living/carbon/human/target = M if(target.mind) @@ -443,15 +443,15 @@ praying = 0 /obj/item/weapon/nullrod/rosary/process() - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/holder = loc if(src == holder.l_hand || src == holder.r_hand) // Holding this in your hand will - for(var/mob/living/carbon/human/M in range(5)) - if(M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full)) - M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2) + for(var/mob/living/carbon/human/H in range(5)) + if(H.mind.vampire && !H.mind.vampire.get_ability(/datum/vampire_passive/full)) + H.mind.vampire.nullified = max(5, H.mind.vampire.nullified + 2) if(prob(10)) - to_chat(M, "Being in the presence of [holder]'s [src] is interfering with your powers!") + to_chat(H, "Being in the presence of [holder]'s [src] is interfering with your powers!") /obj/item/weapon/nullrod/missionary_staff name = "holy staff" @@ -503,7 +503,7 @@ return 0 /obj/item/weapon/nullrod/missionary_staff/afterattack(mob/living/carbon/human/target, mob/living/carbon/human/missionary, flag, params) - if(!istype(target) || !istype(missionary)) //ishuman checks effectively + if(!ishuman(target) || !ishuman(missionary)) //ishuman checks return if(target == missionary) //you can't convert yourself, that would raise too many questions about your own dedication to the cause return @@ -533,7 +533,7 @@ /obj/item/weapon/nullrod/missionary_staff/proc/do_convert(mob/living/carbon/human/target, mob/living/carbon/human/missionary) var/convert_duration = 6000 //10 min - if(!target || !istype(target) || !missionary || !istype(missionary)) + if(!target || !ishuman(target) || !missionary || !ishuman(missionary)) return if(ismindslave(target) || target.mind.zealot_master) //mindslaves and zealots override the staff because the staff is just a temporary mindslave to_chat(missionary, "Your faith is strong, but their mind is already slaved to someone else's ideals. Perhaps an inquisition would reveal more...") diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index 05a50200e7d..e966f5500e5 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -115,7 +115,7 @@ if(do_after(user, 50, target = H)) playsound(loc, "sound/weapons/bladeslice.ogg", 50, 1, -1) user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!") //Just a little off the top. - H.losebreath += 10 //30 Oxy damage over time + H.AdjustLoseBreath(10) //30 Oxy damage over time H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors") var/turf/location = get_turf(H) if(istype(location, /turf/simulated)) diff --git a/code/game/objects/items/weapons/storage/artistic_toolbox.dm b/code/game/objects/items/weapons/storage/artistic_toolbox.dm index 81ba661115a..470c273bd69 100644 --- a/code/game/objects/items/weapons/storage/artistic_toolbox.dm +++ b/code/game/objects/items/weapons/storage/artistic_toolbox.dm @@ -138,8 +138,8 @@ affected_mob.setStaminaLoss(0) var/status = CANSTUN | CANWEAKEN | CANPARALYSE affected_mob.status_flags &= ~status - affected_mob.dizziness = max(0, affected_mob.dizziness-10) - affected_mob.drowsyness = max(0, affected_mob.drowsyness-10) + affected_mob.AdjustDizzy(-10) + affected_mob.AdjustDrowsy(-10) affected_mob.SetSleeping(0) stage = 1 switch(progenitor.hunger) @@ -181,4 +181,4 @@ affected_mob.adjustBruteLoss(5) if(ismob(progenitor.loc)) - progenitor.hunger++ \ No newline at end of file + progenitor.hunger++ diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 937cc3214a3..ef0cdfc329b 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -116,7 +116,7 @@ if(H.get_item_by_slot(slot_head) == src) if(H.internal) return - H.losebreath += 1 + H.AdjustLoseBreath(1) else storage_slots = 7 processing_objects.Remove(src) diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index 7cc71918905..448395df3e4 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -16,41 +16,41 @@ var/icon_closed = "lockbox" var/icon_broken = "lockbox+b" - - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/weapon/card/id)) - if(src.broken) - to_chat(user, "It appears to be broken.") - return - if(src.allowed(user)) - src.locked = !( src.locked ) - if(src.locked) - src.icon_state = src.icon_locked - to_chat(user, "You lock the [src.name]!") - return - else - src.icon_state = src.icon_closed - to_chat(user, "You unlock the [src.name]!") - origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D. - return - else - to_chat(user, "Access Denied") - else if((istype(W, /obj/item/weapon/card/emag) || istype(W, /obj/item/weapon/melee/energy/blade)) && !broken) - emag_act(user) +/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)) + if(broken) + to_chat(user, "It appears to be broken.") return - if(!locked) - ..() + if(check_access(W)) + locked = !locked + if(locked) + icon_state = icon_locked + to_chat(user, "You lock \the [src]!") + return + else + icon_state = icon_closed + to_chat(user, "You unlock \the [src]!") + origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D. + return else - to_chat(user, "It's locked!") + to_chat(user, "Access denied.") + return + else if((istype(W, /obj/item/weapon/card/emag) || (istype(W, /obj/item/weapon/melee/energy/blade)) && !broken)) + emag_act(user) return + if(!locked) + ..() + else + to_chat(user, "It's locked!") + return - show_to(mob/user as mob) - if(locked) - to_chat(user, "It's locked!") - else - ..() - return +/obj/item/weapon/storage/lockbox/show_to(mob/user as mob) + if(locked) + to_chat(user, "It's locked!") + else + ..() + return /obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W as obj, stop_messages = 0) if(!locked) @@ -64,7 +64,7 @@ broken = 1 locked = 0 desc = "It appears to be broken." - icon_state = src.icon_broken + icon_state = icon_broken to_chat(user, "You unlock \the [src].") origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D. return @@ -84,23 +84,21 @@ name = "Lockbox (Mindshield Implants)" req_access = list(access_security) - New() - ..() - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implantcase/loyalty(src) - new /obj/item/weapon/implanter/loyalty(src) - +/obj/item/weapon/storage/lockbox/loyalty/New() + ..() + new /obj/item/weapon/implantcase/loyalty(src) + new /obj/item/weapon/implantcase/loyalty(src) + new /obj/item/weapon/implantcase/loyalty(src) + new /obj/item/weapon/implanter/loyalty(src) /obj/item/weapon/storage/lockbox/clusterbang name = "lockbox (clusterbang)" desc = "You have a bad feeling about opening this." req_access = list(access_security) - New() - ..() - new /obj/item/weapon/grenade/clusterbuster(src) - +/obj/item/weapon/storage/lockbox/clusterbang/New() + ..() + new /obj/item/weapon/grenade/clusterbuster(src) /obj/item/weapon/storage/lockbox/medal name = "medal box" @@ -116,14 +114,14 @@ icon_closed = "medalbox" icon_broken = "medalbox+b" - New() - ..() - new /obj/item/clothing/accessory/medal/gold/heroism(src) - new /obj/item/clothing/accessory/medal/silver/security(src) - new /obj/item/clothing/accessory/medal/silver/valor(src) - new /obj/item/clothing/accessory/medal/nobel_science(src) - new /obj/item/clothing/accessory/medal/bronze_heart(src) - new /obj/item/clothing/accessory/medal/conduct(src) - new /obj/item/clothing/accessory/medal/conduct(src) - new /obj/item/clothing/accessory/medal/conduct(src) - new /obj/item/clothing/accessory/medal/gold/captain(src) +/obj/item/weapon/storage/lockbox/medal/New() + ..() + new /obj/item/clothing/accessory/medal/gold/heroism(src) + new /obj/item/clothing/accessory/medal/silver/security(src) + new /obj/item/clothing/accessory/medal/silver/valor(src) + new /obj/item/clothing/accessory/medal/nobel_science(src) + new /obj/item/clothing/accessory/medal/bronze_heart(src) + new /obj/item/clothing/accessory/medal/conduct(src) + new /obj/item/clothing/accessory/medal/conduct(src) + new /obj/item/clothing/accessory/medal/conduct(src) + new /obj/item/clothing/accessory/medal/gold/captain(src) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 460498a874b..e848eec1aca 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -27,131 +27,132 @@ max_w_class = 2 max_combined_w_class = 14 - examine(mob/user) - if(..(user, 1)) - to_chat(user, text("The service panel is [src.open ? "open" : "closed"].")) +/obj/item/weapon/storage/secure/examine(mob/user) + if(..(user, 1)) + to_chat(user, text("The service panel is [open ? "open" : "closed"].")) - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(locked) - if((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged)) - emag_act(user, W) +/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + if(locked) + if((istype(W, /obj/item/weapon/melee/energy/blade)) && (!emagged)) + emag_act(user, W) - if(istype(W, /obj/item/weapon/screwdriver)) - if(do_after(user, 20, target = src)) - src.open =! src.open - user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close"))) - return - if((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking)) - user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1) - src.l_hacking = 1 - if(do_after(usr, 100, target = src)) - if(prob(40)) - src.l_setshort = 1 - src.l_set = 0 - user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1) - sleep(80) - src.l_setshort = 0 - src.l_hacking = 0 - else - user.show_message(text("\red Unable to reset internal memory."), 1) - src.l_hacking = 0 - else src.l_hacking = 0 - return - //At this point you have exhausted all the special things to do when locked - // ... but it's still locked. + if(istype(W, /obj/item/weapon/screwdriver)) + if(do_after(user, 20, target = src)) + open = !open + user.show_message("You [open ? "open" : "close"] the service panel.", 1) return - // -> storage/attackby() what with handle insertion, etc - ..() - - emag_act(user as mob, weapon as obj) - if(!emagged) - emagged = 1 - src.overlays += image('icons/obj/storage.dmi', icon_sparking) - sleep(6) - src.overlays = null - overlays += image('icons/obj/storage.dmi', icon_locking) - locked = 0 - if(istype(weapon, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - to_chat(user, "You slice through the lock on [src].") - else - to_chat(user, "You short out the lock on [src].") - return - - - MouseDrop(over_object, src_location, over_location) - if(locked) - src.add_fingerprint(usr) - return - ..() - - - attack_self(mob/user as mob) - user.set_machine(src) - var/dat = text("[]
\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED")) - var/message = "Code" - if((src.l_set == 0) && (!src.emagged) && (!src.l_setshort)) - dat += text("

\n5-DIGIT PASSCODE NOT SET.
ENTER NEW PASSCODE.
") - if(src.emagged) - dat += text("

\nLOCKING SYSTEM ERROR - 1701") - if(src.l_setshort) - dat += text("

\nALERT: MEMORY SYSTEM ERROR - 6040 201") - message = text("[]", src.code) - if(!src.locked) - message = "*****" - dat += {"


\n>[message]
\n - 1- - 2- - 3
\n - 4- - 5- - 6
\n - 7- - 8- - 9
\n - R- - 0- - E
\n
"} - user << browse(dat, "window=caselock;size=300x280") - - Topic(href, href_list) - ..() - if((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1)) - return - if(href_list["type"]) - if(href_list["type"] == "E") - if((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR")) - src.l_code = src.code - src.l_set = 1 - else if((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1)) - src.locked = 0 - src.overlays = null - overlays += image('icons/obj/storage.dmi', icon_opened) - src.code = null + if((istype(W, /obj/item/device/multitool)) && (open == 1) && (!l_hacking)) + user.show_message("Now attempting to reset internal memory, please hold.", 1) + l_hacking = 1 + if(do_after(usr, 100, target = src)) + if(prob(40)) + l_setshort = 1 + l_set = 0 + user.show_message("Internal memory reset. Please give it a few seconds to reinitialize.", 1) + sleep(80) + l_setshort = 0 + l_hacking = 0 else - src.code = "ERROR" - else - if((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort)) - src.locked = 1 - src.overlays = null - src.code = null - src.close(usr) - else - src.code += text("[]", href_list["type"]) - if(length(src.code) > 5) - src.code = "ERROR" - src.add_fingerprint(usr) - for(var/mob/M in viewers(1, src.loc)) - if((M.client && M.machine == src)) - src.attack_self(M) - return + user.show_message("Unable to reset internal memory.", 1) + l_hacking = 0 + else + l_hacking = 0 + return + //At this point you have exhausted all the special things to do when locked + // ... but it's still locked. return + return ..() + +/obj/item/weapon/storage/secure/emag_act(user as mob, weapon as obj) + if(!emagged) + emagged = 1 + overlays += image('icons/obj/storage.dmi', icon_sparking) + sleep(6) + overlays = null + overlays += image('icons/obj/storage.dmi', icon_locking) + locked = 0 + if(istype(weapon, /obj/item/weapon/melee/energy/blade)) + var/datum/effect/system/spark_spread/spark_system = new /datum/effect/system/spark_spread() + spark_system.set_up(5, 0, src.loc) + spark_system.start() + playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) + playsound(loc, "sparks", 50, 1) + to_chat(user, "You slice through the lock on [src].") + else + to_chat(user, "You short out the lock on [src].") + return + + +/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location) + if(locked) + add_fingerprint(usr) + to_chat(usr, "It's locked!") + return 0 + ..() + +/obj/item/weapon/storage/secure/attack_self(mob/user as mob) + user.set_machine(src) + var/dat = text("[]
\n\nLock Status: []", src, (locked ? "LOCKED" : "UNLOCKED")) + var/message = "Code" + if((l_set == 0) && (!emagged) && (!l_setshort)) + dat += text("

\n5-DIGIT PASSCODE NOT SET.
ENTER NEW PASSCODE.
") + if(emagged) + dat += text("

\nLOCKING SYSTEM ERROR - 1701") + if(l_setshort) + dat += text("

\nALERT: MEMORY SYSTEM ERROR - 6040 201") + message = text("[]", code) + if(!locked) + message = "*****" + dat += {"


\n>[message]
\n + 1- + 2- + 3
\n + 4- + 5- + 6
\n + 7- + 8- + 9
\n + R- + 0- + E
\n
"} + user << browse(dat, "window=caselock;size=300x280") + +/obj/item/weapon/storage/secure/Topic(href, href_list) + ..() + if(usr.incapacitated() || (get_dist(src, usr) > 1)) + return + if(href_list["type"]) + if(href_list["type"] == "E") + if((l_set == 0) && (length(code) == 5) && (!l_setshort) && (code != "ERROR")) + l_code = code + l_set = 1 + else if((code == l_code) && (emagged == 0) && (l_set == 1)) + locked = 0 + overlays = null + overlays += image('icons/obj/storage.dmi', icon_opened) + code = null + else + code = "ERROR" + else + if((href_list["type"] == "R") && (emagged == 0) && (!l_setshort)) + locked = 1 + overlays = null + code = null + close(usr) + else + code += text("[]", href_list["type"]) + if(length(code) > 5) + code = "ERROR" + add_fingerprint(usr) + for(var/mob/M in viewers(1, loc)) + if((M.client && M.machine == src)) + attack_self(M) + return + return + /obj/item/weapon/storage/secure/can_be_inserted(obj/item/W as obj, stop_messages = 0) if(!locked) return ..() @@ -160,8 +161,10 @@ return 0 /obj/item/weapon/storage/secure/hear_talk(mob/living/M as mob, msg) + return /obj/item/weapon/storage/secure/hear_message(mob/living/M as mob, msg) + return // ----------------------------- // Secure Briefcase @@ -174,7 +177,7 @@ item_state = "sec-case" flags = CONDUCT hitsound = "swing_hit" - force = 8.0 + force = 8 throw_speed = 2 throw_range = 4 w_class = 4 @@ -182,36 +185,36 @@ max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") - New() - ..() - new /obj/item/weapon/paper(src) - new /obj/item/weapon/pen(src) +/obj/item/weapon/storage/secure/briefcase/New() + ..() + handle_item_insertion(new /obj/item/weapon/paper, 1) + handle_item_insertion(new /obj/item/weapon/pen, 1) - attack_hand(mob/user as mob) - if((src.loc == user) && (src.locked == 1)) - to_chat(usr, "\red [src] is locked and cannot be opened!") - else if((src.loc == user) && (!src.locked)) - playsound(src.loc, "rustle", 50, 1, -5) - if(user.s_active) - user.s_active.close(user) //Close and re-open - src.show_to(user) - else - ..() - for(var/mob/M in range(1)) - if(M.s_active == src) - src.close(M) - src.orient2hud(user) - src.add_fingerprint(user) - return +/obj/item/weapon/storage/secure/briefcase/attack_hand(mob/user as mob) + if((loc == user) && (locked == 1)) + to_chat(usr, "[src] is locked and cannot be opened!") + else if((loc == user) && !locked) + playsound(loc, "rustle", 50, 1, -5) + if(user.s_active) + user.s_active.close(user) //Close and re-open + show_to(user) + else + ..() + for(var/mob/M in range(1)) + if(M.s_active == src) + close(M) + orient2hud(user) + add_fingerprint(user) + return //Syndie variant of Secure Briefcase. Contains space cash, slightly more robust. /obj/item/weapon/storage/secure/briefcase/syndie - force = 15.0 + force = 15 /obj/item/weapon/storage/secure/briefcase/syndie/New() + ..() for(var/i = 0, i < storage_slots - 2, i++) - new /obj/item/weapon/spacecash/c1000(src) - return ..() + handle_item_insertion(new /obj/item/weapon/spacecash/c1000, 1) // ----------------------------- // Secure Safe @@ -224,30 +227,17 @@ icon_opened = "safe0" icon_locking = "safeb" icon_sparking = "safespark" - force = 8.0 + force = 8 w_class = 5 max_w_class = 8 - anchored = 1.0 + anchored = 1 density = 0 cant_hold = list("/obj/item/weapon/storage/secure/briefcase") - New() - ..() - new /obj/item/weapon/paper(src) - new /obj/item/weapon/pen(src) - - attack_hand(mob/user as mob) - return attack_self(user) - -// Clown planet WMD storage -/obj/item/weapon/storage/secure/safe/clown - name="WMD Storage" - -/obj/item/weapon/storage/secure/safe/clown/New() - for(var/i=0;i<10;i++) - new /obj/item/weapon/reagent_containers/food/snacks/pie(src) - - -/obj/item/weapon/storage/secure/safe/HoS/New() +/obj/item/weapon/storage/secure/safe/New() ..() - //new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool) \ No newline at end of file + handle_item_insertion(new /obj/item/weapon/paper, 1) + handle_item_insertion(new /obj/item/weapon/pen, 1) + +/obj/item/weapon/storage/secure/safe/attack_hand(mob/user as mob) + return attack_self(user) diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index f1eca747755..cc09bfb1f8a 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -18,20 +18,37 @@ return switch(choice) if("Underwear") - var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_list - if(new_undies) - H.underwear = new_undies + var/list/valid_underwear = list() + for(var/underwear in underwear_list) + var/datum/sprite_accessory/S = underwear_list[underwear] + if(!(H.species.name in S.species_allowed)) + continue + valid_underwear[underwear] = underwear_list[underwear] + var/new_underwear = input(user, "Choose your underwear:", "Changing") as null|anything in valid_underwear + if(new_underwear) + H.underwear = new_underwear if("Undershirt") - var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in undershirt_list + var/list/valid_undershirts = list() + for(var/undershirt in undershirt_list) + var/datum/sprite_accessory/S = undershirt_list[undershirt] + if(!(H.species.name in S.species_allowed)) + continue + valid_undershirts[undershirt] = undershirt_list[undershirt] + var/new_undershirt = input(user, "Choose your undershirt:", "Changing") as null|anything in valid_undershirts if(new_undershirt) H.undershirt = new_undershirt if("Socks") - var/new_socks = input(user, "Select your socks", "Changing") as null|anything in socks_list + var/list/valid_sockstyles = list() + for(var/sockstyle in socks_list) + var/datum/sprite_accessory/S = socks_list[sockstyle] + if(!(H.species.name in S.species_allowed)) + continue + valid_sockstyles[sockstyle] = socks_list[sockstyle] + var/new_socks = input(user, "Choose your socks:", "Changing") as null|anything in valid_sockstyles if(new_socks) - H.socks= new_socks - + H.socks = new_socks add_fingerprint(H) H.update_body() \ No newline at end of file diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index b27d3f6e4f8..bbbecf6695d 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -420,8 +420,7 @@ H.lip_style = null //Washes off lipstick H.lip_color = initial(H.lip_color) H.regenerate_icons() - user.drowsyness -= rand(2,3) //Washing your face wakes you up if you're falling asleep - user.drowsyness = Clamp(user.drowsyness, 0, INFINITY) + user.AdjustDrowsy(-rand(2,3)) //Washing your face wakes you up if you're falling asleep else user.clean_blood() @@ -459,4 +458,3 @@ icon_state = "puddle-splash" ..() icon_state = "puddle" - diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 81e800a2b00..a4ca220e5dd 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -73,7 +73,6 @@ var/ert_request_answered = 0 return 0 /mob/dead/observer/proc/JoinResponseTeam() - if(!send_emergency_team) to_chat(src, "No emergency response team is currently being sent.") return 0 @@ -82,35 +81,23 @@ var/ert_request_answered = 0 to_chat(src, "You are jobbanned from the emergency reponse team!") return 0 - var/player_age_check = check_client_age(src.client, responseteam_age) + var/player_age_check = check_client_age(client, responseteam_age) if(player_age_check && config.use_age_restriction_for_antags) to_chat(src, "This role is not yet available to you. You need to wait another [player_age_check] days.") return 0 - if(src.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(has_enabled_antagHUD == 1 && config.antag_hud_restricted) to_chat(src, "Upon using the antagHUD you forfeited the ability to join the round.") return 0 if(response_team_members.len > 6) to_chat(src, "The emergency response team is already full!") return 0 - - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name == "Response Team") - L.name = null - if(!src.client) - return - spawn(-1) - var/client/C = src.client - var/mob/living/carbon/human/new_commando = C.create_response_team(L.loc) - qdel(L) - new_commando.mind.key = src.key - new_commando.key = src.key - new_commando.update_icons() - return 1 + + return 1 /proc/trigger_armed_response_team(var/datum/response_team/response_team_type) - + response_team_members = list() active_team = response_team_type send_emergency_team = 1 @@ -118,24 +105,41 @@ var/ert_request_answered = 0 if(!ert_candidates.len) active_team.cannot_send_team() send_emergency_team = 0 - return - var/teamsize = 0 + return 0 + // Respawnable players get first dibs - for(var/mob/dead/observer/M in (ert_candidates & respawnable_list)) - teamsize += M.JoinResponseTeam() + for(var/mob/dead/observer/M in ert_candidates) + if((M in respawnable_list) && M.JoinResponseTeam()) + response_team_members |= M // If there's still open slots, non-respawnable players can fill them for(var/mob/dead/observer/M in (ert_candidates - respawnable_list)) - teamsize += M.JoinResponseTeam() - send_emergency_team = 0 - if (!teamsize) + if(M.JoinResponseTeam()) + response_team_members |= M + + if(!response_team_members.len) active_team.cannot_send_team() - return - active_team.announce_team() + send_emergency_team = 0 + return 0 -/client/proc/create_response_team(obj/spawn_location) + var/index = 1 + for(var/mob/M in response_team_members) + if(index > emergencyresponseteamspawn.len) + index = 1 + + var/client/C = M.client + var/mob/living/carbon/human/new_commando = C.create_response_team(emergencyresponseteamspawn[index]) + new_commando.mind.key = M.key + new_commando.key = M.key + new_commando.update_icons() + index++ + + send_emergency_team = 0 + active_team.announce_team() + return 1 + +/client/proc/create_response_team(var/turf/spawn_location) var/mob/living/carbon/human/M = new(null) var/obj/item/organ/external/head/head_organ = M.get_organ("head") - response_team_members |= M var/new_gender = alert(src, "Please select your gender.", "ERT Character Generation", "Male", "Female") @@ -157,33 +161,23 @@ var/ert_request_answered = 0 var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue var/skin_tone = pick(-50, -30, -10, 0, 0, 0, 10) // Caucasian/black - var/hair_style = "Bald" - var/facial_hair_style = "Shaved" - if(M.gender == MALE) - hair_style = pick(hair_styles_male_list) - facial_hair_style = pick(facial_hair_styles_list) - else - hair_style = pick(hair_styles_female_list) - if(prob(5)) - facial_hair_style = pick(facial_hair_styles_list) - head_organ.r_facial = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_facial = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_facial = hex2num(copytext(hair_c, 6, 8)) - head_organ.r_hair = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_hair = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_hair = hex2num(copytext(hair_c, 6, 8)) - var/eyes_red = hex2num(copytext(eye_c, 2, 4)) - var/eyes_green = hex2num(copytext(eye_c, 4, 6)) - var/eyes_blue = hex2num(copytext(eye_c, 6, 8)) - M.change_eye_color(eyes_red, eyes_green, eyes_blue) + head_organ.r_facial = color2R(hair_c) + head_organ.g_facial = color2G(hair_c) + head_organ.b_facial = color2B(hair_c) + head_organ.r_hair = color2R(hair_c) + head_organ.g_hair = color2G(hair_c) + head_organ.b_hair = color2B(hair_c) + M.change_eye_color(color2R(eye_c), color2G(eye_c), color2B(eye_c)) M.s_tone = skin_tone - head_organ.h_style = hair_style - head_organ.f_style = facial_hair_style + head_organ.h_style = random_hair_style(M.gender, head_organ.species.name) + head_organ.f_style = random_facial_hair_style(M.gender, head_organ.species.name) M.real_name = "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(last_names)]" M.name = M.real_name M.age = rand(23,35) + M.regenerate_icons() + M.update_body() //Creates mind stuff. M.mind = new @@ -193,7 +187,7 @@ var/ert_request_answered = 0 M.mind.special_role = SPECIAL_ROLE_ERT if(!(M.mind in ticker.minds)) ticker.minds += M.mind //Adds them to regular mind list. - M.loc = spawn_location + M.forceMove(spawn_location) active_team.equip_officer(class, M) diff --git a/code/game/sound.dm b/code/game/sound.dm index fe5e361f16a..ed5f0d15b4c 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -40,7 +40,7 @@ var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effect M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, S) /mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, sound/S) - if(!src.client || ear_deaf > 0) + if(!src.client || !can_hear()) return if(!S) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 37ff565f4a3..862eed1b986 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -934,11 +934,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that for(var/obj/item/briefcase_item in sec_briefcase) qdel(briefcase_item) for(var/i=3, i>0, i--) - sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000 - sec_briefcase.contents += new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow - sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba - sec_briefcase.contents += new /obj/item/ammo_box/a357 - sec_briefcase.contents += new /obj/item/weapon/grenade/plastic/c4 + sec_briefcase.handle_item_insertion(new /obj/item/weapon/spacecash/c1000, 1) + sec_briefcase.handle_item_insertion(new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, 1) + sec_briefcase.handle_item_insertion(new /obj/item/weapon/gun/projectile/revolver/mateba, 1) + sec_briefcase.handle_item_insertion(new /obj/item/ammo_box/a357, 1) + sec_briefcase.handle_item_insertion(new /obj/item/weapon/grenade/plastic/c4, 1) // briefcase must be unlocked by setting the code. M.equip_to_slot_or_del(sec_briefcase, slot_l_hand) var/obj/item/weapon/implant/dust/DUST = new /obj/item/weapon/implant/dust(M) diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm index fb93cd3512d..920b24297ad 100644 --- a/code/modules/admin/verbs/freeze.dm +++ b/code/modules/admin/verbs/freeze.dm @@ -36,7 +36,7 @@ var/global/list/frozen_mob_list = list() anchored = 1 frozen = AO admin_prev_sleeping = sleeping - sleeping += 20000 + AdjustSleeping(20000) if(!(src in frozen_mob_list)) frozen_mob_list += src @@ -49,7 +49,7 @@ var/global/list/frozen_mob_list = list() anchored = 0 overlays -= frozen frozen = null - sleeping = admin_prev_sleeping + SetSleeping(admin_prev_sleeping) admin_prev_sleeping = null if(src in frozen_mob_list) frozen_mob_list -= src diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 82f76a04824..72ec8f101d2 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -108,18 +108,30 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/r_headacc = 0 //Head accessory colour var/g_headacc = 0 //Head accessory colour var/b_headacc = 0 //Head accessory colour - var/m_style = "None" //Marking style - var/r_markings = 0 //Marking colour - var/g_markings = 0 //Marking colour - var/b_markings = 0 //Marking colour + var/list/m_styles = list( + "head" = "None", + "body" = "None", + "tail" = "None" + ) //Marking styles. + var/list/m_colours = list( + "head" = "#000000", + "body" = "#000000", + "tail" = "#000000" + ) //Marking colours. var/h_style = "Bald" //Hair type var/r_hair = 0 //Hair color var/g_hair = 0 //Hair color var/b_hair = 0 //Hair color - var/f_style = "Shaved" //Face hair type - var/r_facial = 0 //Face hair color - var/g_facial = 0 //Face hair color - var/b_facial = 0 //Face hair color + var/r_hair_sec = 0 //Secondary hair color + var/g_hair_sec = 0 //Secondary hair color + var/b_hair_sec = 0 //Secondary hair color + var/f_style = "Shaved" //Facial hair type + var/r_facial = 0 //Facial hair color + var/g_facial = 0 //Facial hair color + var/b_facial = 0 //Facial hair color + var/r_facial_sec = 0 //Secondary facial hair color + var/g_facial_sec = 0 //Secondary facial hair color + var/b_facial_sec = 0 //Secondary facial hair color var/s_tone = 0 //Skin tone var/r_skin = 0 //Skin color var/g_skin = 0 //Skin color @@ -127,6 +139,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/r_eyes = 0 //Eye color var/g_eyes = 0 //Eye color var/b_eyes = 0 //Eye color + var/alt_head = "None" //Alt head style. var/species = "Human" var/language = "None" //Secondary language @@ -284,18 +297,35 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "[ha_style] " dat += "Color [color_square(r_headacc, g_headacc, b_headacc)]
" - if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have body markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + dat += "Head Markings: " + dat += "[m_styles["head"]]" + dat += "Color [color_square(color2R(m_colours["head"]), color2G(m_colours["head"]), color2B(m_colours["head"]))]
" + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. dat += "Body Markings: " - dat += "[m_style]" - dat += "Color [color_square(r_markings, g_markings, b_markings)]
" + dat += "[m_styles["body"]]" + dat += "Color [color_square(color2R(m_colours["body"]), color2G(m_colours["body"]), color2B(m_colours["body"]))]
" + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + dat += "Tail Markings: " + dat += "[m_styles["tail"]]" + dat += "Color [color_square(color2R(m_colours["tail"]), color2G(m_colours["tail"]), color2B(m_colours["tail"]))]
" dat += "Hair: " dat += "[h_style]" - dat += "Color [color_square(r_hair, g_hair, b_hair)]
" + dat += "Color [color_square(r_hair, g_hair, b_hair)]" + var/datum/sprite_accessory/temp_hair_style = hair_styles_list[h_style] + if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour) + dat += " Color #2 [color_square(r_hair_sec, g_hair_sec, b_hair_sec)]" + dat += "
" dat += "Facial Hair: " dat += "[f_style ? "[f_style]" : "Shaved"]" - dat += "Color [color_square(r_facial, g_facial, b_facial)]
" + dat += "Color [color_square(r_facial, g_facial, b_facial)]" + var/datum/sprite_accessory/temp_facial_hair_style = facial_hair_styles_list[f_style] + if(temp_facial_hair_style && temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour) + dat += " Color #2 [color_square(r_facial_sec, g_facial_sec, b_facial_sec)]" + dat += "
" + if(species != "Machine") dat += "Eyes: " @@ -318,6 +348,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Character Records
" dat += "

Limbs

" + if(species in list("Unathi")) //Species with alt heads. + dat += "Alternate Head: " + dat += "[alt_head]
" dat += "Limbs and Parts: Adjust
" if(species != "Slime People" && species != "Machine") dat += "Internal Organs: Adjust
" @@ -1097,6 +1130,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts switch(href_list["task"]) if("random") + var/datum/robolimb/robohead + if(species == "Machine") + var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]" + robohead = all_robolimbs[head_model] switch(href_list["preference"]) if("name") real_name = random_name(gender,species) @@ -1107,23 +1144,59 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts r_hair = rand(0,255) g_hair = rand(0,255) b_hair = rand(0,255) + if("secondary_hair") + if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Wryn", "Vulpkanin", "Vox")) + r_hair_sec = rand(0,255) + g_hair_sec = rand(0,255) + b_hair_sec = rand(0,255) if("h_style") - h_style = random_hair_style(gender, species) + h_style = random_hair_style(gender, species, robohead) if("facial") if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Wryn", "Vulpkanin", "Vox")) r_facial = rand(0,255) g_facial = rand(0,255) b_facial = rand(0,255) + if("secondary_facial") + if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Wryn", "Vulpkanin", "Vox")) + r_facial_sec = rand(0,255) + g_facial_sec = rand(0,255) + b_facial_sec = rand(0,255) if("f_style") - f_style = random_facial_hair_style(gender, species) + f_style = random_facial_hair_style(gender, species, robohead) + if("headaccessory") + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories. + r_headacc = rand(0,255) + g_headacc = rand(0,255) + b_headacc = rand(0,255) + if("ha_style") + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories. + ha_style = random_head_accessory(species) + if("m_style_head") + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head) + if("m_head_colour") + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + m_colours["head"] = rgb(rand(0,255), rand(0,255), rand(0,255)) + if("m_style_body") + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings. + m_styles["body"] = random_marking_style("body", species) + if("m_body_colour") + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings. + m_colours["body"] = rgb(rand(0,255), rand(0,255), rand(0,255)) + if("m_style_tail") + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + m_styles["tail"] = random_marking_style("tail", species, null, body_accessory) + if("m_tail_colour") + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + m_colours["tail"] = rgb(rand(0,255), rand(0,255), rand(0,255)) if("underwear") - underwear = random_underwear(gender) + underwear = random_underwear(gender, species) ShowChoices(user) if("undershirt") - undershirt = random_undershirt(gender) + undershirt = random_undershirt(gender, species) ShowChoices(user) if("socks") - socks = random_socks(gender) + socks = random_socks(gender, species) ShowChoices(user) if("eyes") r_eyes = rand(0,255) @@ -1159,7 +1232,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(new_age) age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) if("species") - var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin") var/prev_species = species // var/whitelisted = 0 @@ -1177,43 +1249,41 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts species = input("Please select a species", "Character Generation", null) in new_species if(prev_species != species) + var/datum/robolimb/robohead + if(species == "Machine") + var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]" + robohead = all_robolimbs[head_model] //grab one of the valid hair styles for the newly chosen species - var/list/valid_hairstyles = list() - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if(!(species in S.species_allowed)) - continue - - valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] - - if(valid_hairstyles.len) - h_style = pick(valid_hairstyles) - else - //this shouldn't happen - h_style = hair_styles_list["Bald"] + h_style = random_hair_style(gender, species, robohead) //grab one of the valid facial hair styles for the newly chosen species - var/list/valid_facialhairstyles = list() - for(var/facialhairstyle in facial_hair_styles_list) - var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if(!(species in S.species_allowed)) - continue + f_style = random_facial_hair_style(gender, species, robohead) - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] - - if(valid_facialhairstyles.len) - f_style = pick(valid_facialhairstyles) + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories. + ha_style = random_head_accessory(species) else - //this shouldn't happen - f_style = facial_hair_styles_list["Shaved"] + ha_style = "None" // No Vulp ears on Unathi + r_headacc = 0 + g_headacc = 0 + b_headacc = 0 + + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head) + else + m_styles["head"] = "None" + m_colours["head"] = "#000000" + + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + m_styles["body"] = random_marking_style("body", species) + else + m_styles["body"] = "None" + m_colours["body"] = "#000000" + + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + m_styles["tail"] = random_marking_style("tail", species, null, body_accessory) + else + m_styles["tail"] = "None" + m_colours["tail"] = "#000000" // Don't wear another species' underwear! var/datum/sprite_accessory/S = underwear_list[underwear] @@ -1228,20 +1298,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(!S || !(species in S.species_allowed)) socks = random_socks(gender, species) - //reset hair colour and skin colour - r_hair = 0//hex2num(copytext(new_hair, 2, 4)) - g_hair = 0//hex2num(copytext(new_hair, 4, 6)) - b_hair = 0//hex2num(copytext(new_hair, 6, 8)) - - s_tone = 0 + //reset skin tone and colour + if(species in list("Human", "Drask", "Vox")) + random_skin_tone(species) + else + s_tone = 0 if(!(species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine"))) r_skin = 0 g_skin = 0 b_skin = 0 - ha_style = "None" // No Vulp ears on Unathi - m_style = "None" // No Unathi markings on Tajara + alt_head = "None" //No alt heads on species that don't have them. body_accessory = null //no vulptail on humans damnit @@ -1288,39 +1356,44 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/input = "Choose your character's hair colour:" var/new_hair = input(user, input, "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null if(new_hair) - r_hair = hex2num(copytext(new_hair, 2, 4)) - g_hair = hex2num(copytext(new_hair, 4, 6)) - b_hair = hex2num(copytext(new_hair, 6, 8)) + r_hair = color2R(new_hair) + g_hair = color2G(new_hair) + b_hair = color2B(new_hair) + + if("secondary_hair") + if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) + var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] + if(hair_style.secondary_theme && !hair_style.no_sec_colour) + var/new_hair = input(user, "Choose your character's secondary hair colour:", "Character Preference", rgb(r_hair_sec, g_hair_sec, b_hair_sec)) as color|null + if(new_hair) + r_hair_sec = color2R(new_hair) + g_hair_sec = color2G(new_hair) + b_hair_sec = color2B(new_hair) if("h_style") var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(species == "Machine") //Species that can use prosthetic heads. - var/obj/item/organ/external/head/H = new() - if(S.name == "Bald") - valid_hairstyles[hairstyle] = S - if(!rlimb_data["head"]) //Handle situations where the head is default. - H.model = "Morpheus Cyberkinetics" - else - H.model = rlimb_data["head"] - var/datum/robolimb/robohead = all_robolimbs[H.model] - if(species in S.species_allowed) - if(robohead.is_monitor && (robohead.company in S.models_allowed)) //If the Machine character has the default Morpheus screen head or another screen head - //and said head is in the hair style's allowed models list... - valid_hairstyles[hairstyle] = S //Allow them to select the hairstyle. - continue - else - if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human hairstyles). - continue - else if(!robohead.is_monitor && ("Human" in S.species_allowed)) - valid_hairstyles[hairstyle] = S - continue - else - if(!(species in S.species_allowed)) - continue - valid_hairstyles[hairstyle] = S + if(hairstyle == "Bald") //Just in case. + valid_hairstyles += hairstyle + continue + if(species == "Machine") //Species that can use prosthetic heads. + var/head_model + if(!rlimb_data["head"]) //Handle situations where the head is default. + head_model = "Morpheus Cyberkinetics" + else + head_model = rlimb_data["head"] + var/datum/robolimb/robohead = all_robolimbs[head_model] + if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_hairstyles += hairstyle //Give them their hairstyles if they do. + else + if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */ + valid_hairstyles += hairstyle + else //If the user is not a species who can have robotic heads, use the default handling. + if(species in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list. + valid_hairstyles += hairstyle var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in valid_hairstyles if(new_h_style) @@ -1331,9 +1404,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/input = "Choose the colour of your your character's head accessory:" var/new_head_accessory = input(user, input, "Character Preference", rgb(r_headacc, g_headacc, b_headacc)) as color|null if(new_head_accessory) - r_headacc = hex2num(copytext(new_head_accessory, 2, 4)) - g_headacc = hex2num(copytext(new_head_accessory, 4, 6)) - b_headacc = hex2num(copytext(new_head_accessory, 6, 8)) + r_headacc = color2R(new_head_accessory) + g_headacc = color2G(new_head_accessory) + b_headacc = color2B(new_head_accessory) if("ha_style") if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with head accessories. @@ -1343,47 +1416,130 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(!(species in H.species_allowed)) continue - valid_head_accessory_styles[head_accessory_style] = head_accessory_styles_list[head_accessory_style] + valid_head_accessory_styles += head_accessory_style var/new_head_accessory_style = input(user, "Choose the style of your character's head accessory:", "Character Preference") as null|anything in valid_head_accessory_styles if(new_head_accessory_style) ha_style = new_head_accessory_style - if("markings") - if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings. - var/input = "Choose the colour of your your character's markings:" - var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null - if(new_markings) - r_markings = hex2num(copytext(new_markings, 2, 4)) - g_markings = hex2num(copytext(new_markings, 4, 6)) - b_markings = hex2num(copytext(new_markings, 6, 8)) - - if("m_style") - if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings. - var/list/valid_markings = list() - for(var/markingstyle in marking_styles_list) - var/datum/sprite_accessory/M = marking_styles_list[markingstyle] - if(!(species in M.species_allowed)) + if("alt_head") + if(organ_data["head"] == "cyborg") + return + if(species in list("Unathi")) //Species with alt heads. + var/list/valid_alt_heads = list() + valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option + for(var/alternate_head in alt_heads_list) + var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head] + if(!(species in head.species_allowed)) continue + valid_alt_heads += alternate_head + + var/new_alt_head = input(user, "Choose your character's alternate head style:", "Character Preference") as null|anything in valid_alt_heads + if(new_alt_head) + alt_head = new_alt_head + if(m_styles["head"]) + var/head_marking = m_styles["head"] + var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking] + if(!head_marking_style.heads_allowed || (!("All" in head_marking_style.heads_allowed) && !(alt_head in head_marking_style.heads_allowed))) + m_styles["head"] = "None" + + if("m_style_head") + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + var/list/valid_markings = list() + valid_markings["None"] = marking_styles_list["None"] + for(var/markingstyle in marking_styles_list) + var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[markingstyle] + if(!(species in M.species_allowed)) + continue + if(M.marking_location != "head") + continue + if(alt_head && alt_head != "None") + if(!("All" in M.heads_allowed) && !(alt_head in M.heads_allowed)) + continue + else + if(M.heads_allowed && !("All" in M.heads_allowed)) + continue + if(species == "Machine") //Species that can use prosthetic heads. - var/obj/item/organ/external/head/H = new() + var/head_model if(!rlimb_data["head"]) //Handle situations where the head is default. - H.model = "Morpheus Cyberkinetics" + head_model = "Morpheus Cyberkinetics" else - H.model = rlimb_data["head"] - var/datum/robolimb/robohead = all_robolimbs[H.model] + head_model = rlimb_data["head"] + var/datum/robolimb/robohead = all_robolimbs[head_model] if(robohead.is_monitor && M.name != "None") //If the character can have prosthetic heads and they have the default Morpheus head (or another monitor-head), no optic markings. continue else if(!robohead.is_monitor && M.name != "None") //Otherwise, if they DON'T have the default head and the head's not a monitor but the head's not in the style's list of allowed models, skip. if(!(robohead.company in M.models_allowed)) continue - valid_markings[markingstyle] = marking_styles_list[markingstyle] + valid_markings += markingstyle - var/new_marking_style = input(user, "Choose the style of your character's markings:", "Character Preference", m_style) as null|anything in valid_markings + var/new_marking_style = input(user, "Choose the style of your character's head markings:", "Character Preference", m_styles["head"]) as null|anything in valid_markings if(new_marking_style) - m_style = new_marking_style + m_styles["head"] = new_marking_style + + if("m_head_colour") + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + var/input = "Choose the colour of your your character's head markings:" + var/new_markings = input(user, input, "Character Preference", m_colours["head"]) as color|null + if(new_markings) + m_colours["head"] = new_markings + + if("m_style_body") + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + var/list/valid_markings = list() + valid_markings["None"] = marking_styles_list["None"] + for(var/markingstyle in marking_styles_list) + var/datum/sprite_accessory/M = marking_styles_list[markingstyle] + if(!(species in M.species_allowed)) + continue + if(M.marking_location != "body") + continue + + valid_markings += markingstyle + + var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference", m_styles["body"]) as null|anything in valid_markings + if(new_marking_style) + m_styles["body"] = new_marking_style + + if("m_body_colour") + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + var/input = "Choose the colour of your your character's body markings:" + var/new_markings = input(user, input, "Character Preference", m_colours["body"]) as color|null + if(new_markings) + m_colours["body"] = new_markings + + if("m_style_tail") + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + var/list/valid_markings = list() + valid_markings["None"] = marking_styles_list["None"] + for(var/markingstyle in marking_styles_list) + var/datum/sprite_accessory/body_markings/tail/M = marking_styles_list[markingstyle] + if(M.marking_location != "tail") + continue + if(!(species in M.species_allowed)) + continue + if(!body_accessory) + if(M.tails_allowed) + continue + else + if(!M.tails_allowed || !(body_accessory in M.tails_allowed)) + continue + + valid_markings += markingstyle + + var/new_marking_style = input(user, "Choose the style of your character's tail markings:", "Character Preference", m_styles["tail"]) as null|anything in valid_markings + if(new_marking_style) + m_styles["tail"] = new_marking_style + + if("m_tail_colour") + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + var/input = "Choose the colour of your your character's tail markings:" + var/new_markings = input(user, input, "Character Preference", m_colours["tail"]) as color|null + if(new_markings) + m_colours["tail"] = new_markings if("body_accessory") var/list/possible_body_accessories = list() @@ -1400,74 +1556,90 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/new_body_accessory = input(user, "Choose your body accessory:", "Character Preference") as null|anything in possible_body_accessories if(new_body_accessory) + m_styles["tail"] = "None" body_accessory = (new_body_accessory == "None") ? null : new_body_accessory if("facial") if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", rgb(r_facial, g_facial, b_facial)) as color|null if(new_facial) - r_facial = hex2num(copytext(new_facial, 2, 4)) - g_facial = hex2num(copytext(new_facial, 4, 6)) - b_facial = hex2num(copytext(new_facial, 6, 8)) + r_facial = color2R(new_facial) + g_facial = color2G(new_facial) + b_facial = color2B(new_facial) + + if("secondary_facial") + if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) + var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] + if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour) + var/new_facial = input(user, "Choose your character's secondary facial-hair colour:", "Character Preference", rgb(r_facial_sec, g_facial_sec, b_facial_sec)) as color|null + if(new_facial) + r_facial_sec = color2R(new_facial) + g_facial_sec = color2G(new_facial) + b_facial_sec = color2B(new_facial) if("f_style") - var/list/valid_facialhairstyles = list() + var/list/valid_facial_hairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(S.name == "Shaved") - valid_facialhairstyles[facialhairstyle] = S + + if(facialhairstyle == "Shaved") //Just in case. + valid_facial_hairstyles += facialhairstyle + continue if(gender == MALE && S.gender == FEMALE) continue if(gender == FEMALE && S.gender == MALE) continue if(species == "Machine") //Species that can use prosthetic heads. - var/obj/item/organ/external/head/H = new() + var/head_model if(!rlimb_data["head"]) //Handle situations where the head is default. - H.model = "Morpheus Cyberkinetics" + head_model = "Morpheus Cyberkinetics" else - H.model = rlimb_data["head"] - var/datum/robolimb/robohead = all_robolimbs[H.model] - if(species in S.species_allowed) - if(robohead.is_monitor) //If the Machine character has the default Morpheus screen head or another screen head and they're allowed to have the style, let them have it. - valid_facialhairstyles[facialhairstyle] = S - continue + head_model = rlimb_data["head"] + var/datum/robolimb/robohead = all_robolimbs[head_model] + if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do. else - if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human facial hairstyles). - continue - else if(!robohead.is_monitor && ("Human" in S.species_allowed)) - valid_facialhairstyles[facialhairstyle] = S - continue - else - if(!(species in S.species_allowed)) - continue + if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */ + valid_facial_hairstyles += facialhairstyle + else //If the user is not a species who can have robotic heads, use the default handling. + if(species in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list. + valid_facial_hairstyles += facialhairstyle - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] - - var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facialhairstyles + var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facial_hairstyles if(new_f_style) f_style = new_f_style if("underwear") - var/list/underwear_options - if(gender == MALE) - underwear_options = underwear_m - else - underwear_options = underwear_f - - var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in underwear_options + var/list/valid_underwear = list() + for(var/underwear in underwear_list) + var/datum/sprite_accessory/S = underwear_list[underwear] + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) + continue + if(!(species in S.species_allowed)) + continue + valid_underwear[underwear] = underwear_list[underwear] + var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in valid_underwear + ShowChoices(user) if(new_underwear) underwear = new_underwear - ShowChoices(user) - if("undershirt") - var/new_undershirt - if(gender == MALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_m - else - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in undershirt_f + var/list/valid_undershirts = list() + for(var/undershirt in undershirt_list) + var/datum/sprite_accessory/S = undershirt_list[undershirt] + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) + continue + if(!(species in S.species_allowed)) + continue + valid_undershirts[undershirt] = undershirt_list[undershirt] + var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in valid_undershirts + ShowChoices(user) if(new_undershirt) undershirt = new_undershirt - ShowChoices(user) if("socks") var/list/valid_sockstyles = list() @@ -1488,9 +1660,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if("eyes") var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference", rgb(r_eyes, g_eyes, b_eyes)) as color|null if(new_eyes) - r_eyes = hex2num(copytext(new_eyes, 2, 4)) - g_eyes = hex2num(copytext(new_eyes, 4, 6)) - b_eyes = hex2num(copytext(new_eyes, 6, 8)) + r_eyes = color2R(new_eyes) + g_eyes = color2G(new_eyes) + b_eyes = color2B(new_eyes) if("s_tone") if(species == "Human" || species == "Drask") @@ -1506,9 +1678,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null if(new_skin) - r_skin = hex2num(copytext(new_skin, 2, 4)) - g_skin = hex2num(copytext(new_skin, 4, 6)) - b_skin = hex2num(copytext(new_skin, 6, 8)) + r_skin = color2R(new_skin) + g_skin = color2G(new_skin) + b_skin = color2B(new_skin) if("ooccolor") @@ -1594,8 +1766,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts switch(new_state) if("Normal") if(limb == "head") - m_style = "None" - h_style = random_hair_style(gender, species) + m_styles["head"] = "None" + h_style = hair_styles_list["Bald"] f_style = facial_hair_styles_list["Shaved"] organ_data[limb] = null rlimb_data[limb] = null @@ -1640,11 +1812,15 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts subchoice = input(user, "Which model of [choice] [limb_name] do you wish to use?") as null|anything in robolimb_models if(subchoice) choice = subchoice - if(limb == "head") - ha_style = "None" - h_style = hair_styles_list["Bald"] - f_style = facial_hair_styles_list["Shaved"] - m_style = "None" + if(limb in list("head", "chest", "groin")) + if(species != "Machine") + return + if(limb == "head") + ha_style = "None" + alt_head = null + h_style = hair_styles_list["Bald"] + f_style = facial_hair_styles_list["Shaved"] + m_styles["head"] = "None" rlimb_data[limb] = choice organ_data[limb] = "cyborg" if(second_limb) @@ -1655,7 +1831,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else rlimb_data[second_limb] = choice organ_data[second_limb] = "cyborg" - if("organs") var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes") if(!organ_name) return @@ -1847,16 +2022,27 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts //Head-specific var/obj/item/organ/external/head/H = character.get_organ("head") + H.r_hair = r_hair H.g_hair = g_hair H.b_hair = b_hair + H.r_hair_sec = r_hair_sec + H.g_hair_sec = g_hair_sec + H.b_hair_sec = b_hair_sec + H.r_facial = r_facial H.g_facial = g_facial H.b_facial = b_facial + H.r_facial_sec = r_facial_sec + H.g_facial_sec = g_facial_sec + H.b_facial_sec = b_facial_sec + H.h_style = h_style H.f_style = f_style + + H.alt_head = alt_head //End of head-specific. character.r_skin = r_skin @@ -1946,10 +2132,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts H.b_headacc = b_headacc H.ha_style = ha_style if(character.species.bodyflags & HAS_MARKINGS) - character.r_markings = r_markings - character.g_markings = g_markings - character.b_markings = b_markings - character.m_style = m_style + character.m_colours = m_colours + character.m_styles = m_styles if(body_accessory) character.body_accessory = body_accessory_by_name["[body_accessory]"] diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index 4506d510754..1425f714183 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -110,23 +110,28 @@ hair_red, hair_green, hair_blue, + secondary_hair_red, + secondary_hair_green, + secondary_hair_blue, facial_red, facial_green, facial_blue, + secondary_facial_red, + secondary_facial_green, + secondary_facial_blue, skin_tone, skin_red, skin_green, skin_blue, - markings_red, - markings_green, - markings_blue, + marking_colours, head_accessory_red, head_accessory_green, head_accessory_blue, hair_style_name, facial_style_name, - marking_style_name, + marking_styles, head_accessory_style_name, + alt_head_name, eyes_red, eyes_green, eyes_blue, @@ -181,52 +186,57 @@ r_hair = text2num(query.item[8]) g_hair = text2num(query.item[9]) b_hair = text2num(query.item[10]) - r_facial = text2num(query.item[11]) - g_facial = text2num(query.item[12]) - b_facial = text2num(query.item[13]) - s_tone = text2num(query.item[14]) - r_skin = text2num(query.item[15]) - g_skin = text2num(query.item[16]) - b_skin = text2num(query.item[17]) - r_markings = text2num(query.item[18]) - g_markings = text2num(query.item[19]) - b_markings = text2num(query.item[20]) - r_headacc = text2num(query.item[21]) - g_headacc = text2num(query.item[22]) - b_headacc = text2num(query.item[23]) - h_style = query.item[24] - f_style = query.item[25] - m_style = query.item[26] - ha_style = query.item[27] - r_eyes = text2num(query.item[28]) - g_eyes = text2num(query.item[29]) - b_eyes = text2num(query.item[30]) - underwear = query.item[31] - undershirt = query.item[32] - backbag = text2num(query.item[33]) - b_type = query.item[34] + r_hair_sec = text2num(query.item[11]) + g_hair_sec = text2num(query.item[12]) + b_hair_sec = text2num(query.item[13]) + r_facial = text2num(query.item[14]) + g_facial = text2num(query.item[15]) + b_facial = text2num(query.item[16]) + r_facial_sec = text2num(query.item[17]) + g_facial_sec = text2num(query.item[18]) + b_facial_sec = text2num(query.item[19]) + s_tone = text2num(query.item[20]) + r_skin = text2num(query.item[21]) + g_skin = text2num(query.item[22]) + b_skin = text2num(query.item[23]) + m_colours = params2list(query.item[24]) + r_headacc = text2num(query.item[25]) + g_headacc = text2num(query.item[26]) + b_headacc = text2num(query.item[27]) + h_style = query.item[28] + f_style = query.item[29] + m_styles = params2list(query.item[30]) + ha_style = query.item[31] + alt_head = query.item[32] + r_eyes = text2num(query.item[33]) + g_eyes = text2num(query.item[34]) + b_eyes = text2num(query.item[35]) + underwear = query.item[36] + undershirt = query.item[37] + backbag = text2num(query.item[38]) + b_type = query.item[39] //Jobs - alternate_option = text2num(query.item[35]) - job_support_high = text2num(query.item[36]) - job_support_med = text2num(query.item[37]) - job_support_low = text2num(query.item[38]) - job_medsci_high = text2num(query.item[39]) - job_medsci_med = text2num(query.item[40]) - job_medsci_low = text2num(query.item[41]) - job_engsec_high = text2num(query.item[42]) - job_engsec_med = text2num(query.item[43]) - job_engsec_low = text2num(query.item[44]) - job_karma_high = text2num(query.item[45]) - job_karma_med = text2num(query.item[46]) - job_karma_low = text2num(query.item[47]) + alternate_option = text2num(query.item[40]) + job_support_high = text2num(query.item[41]) + job_support_med = text2num(query.item[42]) + job_support_low = text2num(query.item[43]) + job_medsci_high = text2num(query.item[44]) + job_medsci_med = text2num(query.item[45]) + job_medsci_low = text2num(query.item[46]) + job_engsec_high = text2num(query.item[47]) + job_engsec_med = text2num(query.item[48]) + job_engsec_low = text2num(query.item[49]) + job_karma_high = text2num(query.item[50]) + job_karma_med = text2num(query.item[51]) + job_karma_low = text2num(query.item[52]) //Miscellaneous - flavor_text = query.item[48] - med_record = query.item[49] - sec_record = query.item[50] - gen_record = query.item[51] + flavor_text = query.item[53] + med_record = query.item[54] + sec_record = query.item[55] + gen_record = query.item[56] // Apparently, the preceding vars weren't always encoded properly... if(findtext(flavor_text, "<")) // ... so let's clumsily check for tags! flavor_text = html_encode(flavor_text) @@ -236,17 +246,17 @@ sec_record = html_encode(sec_record) if(findtext(gen_record, "<")) gen_record = html_encode(gen_record) - disabilities = text2num(query.item[52]) - player_alt_titles = params2list(query.item[53]) - organ_data = params2list(query.item[54]) - rlimb_data = params2list(query.item[55]) - nanotrasen_relation = query.item[56] - speciesprefs = text2num(query.item[57]) + disabilities = text2num(query.item[57]) + player_alt_titles = params2list(query.item[58]) + organ_data = params2list(query.item[59]) + rlimb_data = params2list(query.item[60]) + nanotrasen_relation = query.item[61] + speciesprefs = text2num(query.item[62]) //socks - socks = query.item[58] - body_accessory = query.item[59] - gear = params2list(query.item[60]) + socks = query.item[63] + body_accessory = query.item[64] + gear = params2list(query.item[65]) //Sanitize metadata = sanitize_text(metadata, initial(metadata)) @@ -262,23 +272,30 @@ r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair)) g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair)) b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair)) + r_hair_sec = sanitize_integer(r_hair_sec, 0, 255, initial(r_hair_sec)) + g_hair_sec = sanitize_integer(g_hair_sec, 0, 255, initial(g_hair_sec)) + b_hair_sec = sanitize_integer(b_hair_sec, 0, 255, initial(b_hair_sec)) r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial)) g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial)) b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial)) + r_facial_sec = sanitize_integer(r_facial_sec, 0, 255, initial(r_facial_sec)) + g_facial_sec = sanitize_integer(g_facial_sec, 0, 255, initial(g_facial_sec)) + b_facial_sec = sanitize_integer(b_facial_sec, 0, 255, initial(b_facial_sec)) s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone)) r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin)) g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin)) b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin)) - r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings)) - g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings)) - b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings)) + for(var/marking_location in m_colours) + m_colours[marking_location] = sanitize_hexcolor(m_colours[marking_location], DEFAULT_MARKING_COLOURS[marking_location]) r_headacc = sanitize_integer(r_headacc, 0, 255, initial(r_headacc)) g_headacc = sanitize_integer(g_headacc, 0, 255, initial(g_headacc)) b_headacc = sanitize_integer(b_headacc, 0, 255, initial(b_headacc)) h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style)) f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style)) - m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style)) + for(var/marking_location in m_styles) + m_styles[marking_location] = sanitize_inlist(m_styles[marking_location], marking_styles_list, DEFAULT_MARKING_STYLES[marking_location]) ha_style = sanitize_inlist(ha_style, head_accessory_styles_list, initial(ha_style)) + alt_head = sanitize_inlist(alt_head, alt_heads_list, initial(alt_head)) r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes)) g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes)) b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes)) @@ -318,6 +335,9 @@ var/rlimblist var/playertitlelist var/gearlist + + var/markingcolourslist = list2params(m_colours) + var/markingstyleslist = list2params(m_styles) if(!isemptylist(organ_data)) organlist = list2params(organ_data) if(!isemptylist(rlimb_data)) @@ -341,23 +361,28 @@ hair_red='[r_hair]', hair_green='[g_hair]', hair_blue='[b_hair]', + secondary_hair_red='[r_hair_sec]', + secondary_hair_green='[g_hair_sec]', + secondary_hair_blue='[b_hair_sec]', facial_red='[r_facial]', facial_green='[g_facial]', facial_blue='[b_facial]', + secondary_facial_red='[r_facial_sec]', + secondary_facial_green='[g_facial_sec]', + secondary_facial_blue='[b_facial_sec]', skin_tone='[s_tone]', skin_red='[r_skin]', skin_green='[g_skin]', skin_blue='[b_skin]', - markings_red='[r_markings]', - markings_green='[g_markings]', - markings_blue='[b_markings]', + marking_colours='[sanitizeSQL(markingcolourslist)]', head_accessory_red='[r_headacc]', head_accessory_green='[g_headacc]', head_accessory_blue='[b_headacc]', hair_style_name='[sanitizeSQL(h_style)]', facial_style_name='[sanitizeSQL(f_style)]', - marking_style_name='[sanitizeSQL(m_style)]', + marking_styles='[sanitizeSQL(markingstyleslist)]', head_accessory_style_name='[sanitizeSQL(ha_style)]', + alt_head_name='[sanitizeSQL(alt_head)]', eyes_red='[r_eyes]', eyes_green='[g_eyes]', eyes_blue='[b_eyes]', @@ -406,14 +431,17 @@ INSERT INTO [format_table_name("characters")] (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender, age, species, language, hair_red, hair_green, hair_blue, + secondary_hair_red, secondary_hair_green, secondary_hair_blue, facial_red, facial_green, facial_blue, + secondary_facial_red, secondary_facial_green, secondary_facial_blue, skin_tone, skin_red, skin_green, skin_blue, - markings_red, markings_green, markings_blue, + marking_colours, head_accessory_red, head_accessory_green, head_accessory_blue, hair_style_name, facial_style_name, - marking_style_name, + marking_styles, head_accessory_style_name, + alt_head_name, eyes_red, eyes_green, eyes_blue, underwear, undershirt, backbag, b_type, alternate_option, @@ -433,14 +461,17 @@ ('[C.ckey]', '[default_slot]', '[sanitizeSQL(metadata)]', '[sanitizeSQL(real_name)]', '[be_random_name]','[gender]', '[age]', '[sanitizeSQL(species)]', '[sanitizeSQL(language)]', '[r_hair]', '[g_hair]', '[b_hair]', + '[r_hair_sec]', '[g_hair_sec]', '[b_hair_sec]', '[r_facial]', '[g_facial]', '[b_facial]', + '[r_facial_sec]', '[g_facial_sec]', '[b_facial_sec]', '[s_tone]', '[r_skin]', '[g_skin]', '[b_skin]', - '[r_markings]', '[g_markings]', '[b_markings]', + '[sanitizeSQL(markingcolourslist)]', '[r_headacc]', '[g_headacc]', '[b_headacc]', '[sanitizeSQL(h_style)]', '[sanitizeSQL(f_style)]', - '[sanitizeSQL(m_style)]', + '[sanitizeSQL(markingstyleslist)]', '[sanitizeSQL(ha_style)]', + '[sanitizeSQL(alt_head)]', '[r_eyes]', '[g_eyes]', '[b_eyes]', '[underwear]', '[undershirt]', '[backbag]', '[b_type]', '[alternate_option]', diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 9945079b1a5..4ae3e230762 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -411,11 +411,12 @@ var/mob/living/carbon/human/M = src.loc to_chat(M, "\red The Optical Thermal Scanner overloads and blinds you!") if(M.glasses == src) - M.eye_blind = 3 - M.eye_blurry = 5 - M.disabilities |= NEARSIGHTED - spawn(100) - M.disabilities &= ~NEARSIGHTED + M.EyeBlind(3) + M.EyeBlurry(5) + if(!(M.disabilities & NEARSIGHTED)) + M.BecomeNearsighted() + spawn(100) + M.CureNearsighted() ..() /obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 6fad0961ab4..1c8bd73c47f 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -189,15 +189,11 @@ to_chat(H, "You deploy your hardsuit helmet, sealing you off from the world.") H.update_inv_head() -/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/clothing/suit/space/rig/attackby(obj/item/W, mob/user, params) if(!isliving(user)) return - if(istype(src.loc,/mob/living)) - to_chat(user, "How do you propose to modify a hardsuit while it is being worn?") - return - - if(istype(W,/obj/item/weapon/screwdriver)) + if(istype(W,/obj/item/weapon/screwdriver) && can_modify(user)) if(!helmet) to_chat(user, "\The [src] does not have a helmet installed.") else @@ -213,7 +209,7 @@ boots = null return - else if(istype(W,/obj/item/clothing/head/helmet/space)) + else if(istype(W,/obj/item/clothing/head/helmet/space) && can_modify(user)) if(!attached_helmet) to_chat(user, "\The [src] does not have a helmet mount.") return @@ -226,7 +222,7 @@ src.helmet = W return - else if(istype(W,/obj/item/clothing/shoes/magboots)) + else if(istype(W,/obj/item/clothing/shoes/magboots) && can_modify(user)) if(!attached_boots) to_chat(user, "\The [src] does not have boot mounts.") return @@ -242,6 +238,13 @@ return ..() ..() + +/obj/item/clothing/suit/space/rig/proc/can_modify(mob/living/user) + if(isliving(loc)) + to_chat(user, "You can not modify the hardsuit while it is being worn.") + return 0 + + return 1 //Engineering rig /obj/item/clothing/head/helmet/space/rig/engineering diff --git a/code/modules/computer3/computers/communications.dm b/code/modules/computer3/computers/communications.dm index 726de710a1a..a4fad8a16cb 100644 --- a/code/modules/computer3/computers/communications.dm +++ b/code/modules/computer3/computers/communications.dm @@ -66,16 +66,21 @@ if("main" in href_list) state = STATE_DEFAULT if("login" in href_list) - var/mob/M = usr - var/obj/item/I = M.get_active_hand() + if(!ishuman(usr)) + to_chat(usr, "Access denied.") + return + var/mob/living/carbon/human/H = usr + var/obj/item/I = H.get_active_hand() if(I) I = I.GetID() if(istype(I,/obj/item/weapon/card/id) && check_access(I)) authenticated = 1 if(access_captain in I.GetAccess()) authenticated = 2 - crew_announcement.announcer = GetNameAndAssignmentFromId(I) - + var/obj/item/weapon/card/id = H.get_idcard(TRUE) + if(istype(id)) + crew_announcement.announcer = GetNameAndAssignmentFromId(id) + if("logout" in href_list) authenticated = 0 crew_announcement.announcer = "" diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 35e31dc9519..18a0ffc9729 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -14,7 +14,7 @@ var/used = 0 /obj/item/device/fluff/tattoo_gun // Generic tattoo gun, make subtypes for different folks - name = "dispoable tattoo pen" + name = "disposable tattoo pen" desc = "A cheap plastic tattoo application pen." icon = 'icons/obj/custom_items.dmi' icon_state = "tatgun" @@ -22,7 +22,7 @@ throwforce = 0 w_class = 1 var/tattoo_name = "tiger stripe tattoo" // Tat name for visible messages - var/tattoo_icon = "Tiger Body" // body_accessory.dmi, new icons defined in sprite_accessories.dm + var/tattoo_icon = "Tiger-stripe Tattoo" // body_accessory.dmi, new icons defined in sprite_accessories.dm var/tattoo_r = 1 // RGB values for the body markings var/tattoo_g = 1 var/tattoo_b = 1 @@ -47,10 +47,15 @@ to_chat(user, "[target] has no skin, how do you expect to tattoo them?") return - if(target.m_style != "None") + if(target.m_styles["body"] != "None") to_chat(user, "[target] already has body markings, any more would look silly!") return + var/datum/sprite_accessory/body_markings/tattoo/temp_tatt = marking_styles_list[tattoo_icon] + if(!(target.species.name in temp_tatt.species_allowed)) + to_chat(user, "You can't think of a way to make the [tattoo_name] design work on [target == user ? "your" : "[target]'s"] body type.") + return + if(target == user) to_chat(user, "You use the [src] to apply a [tattoo_name] to yourself!") @@ -61,12 +66,8 @@ user.visible_message("[user] finishes the [tattoo_name] on [target].", "You finish the [tattoo_name].") if(!used) // No exploiting do_after to tattoo multiple folks. - target.m_style = tattoo_icon - target.r_markings = tattoo_r - target.g_markings = tattoo_g - target.b_markings = tattoo_b - - target.update_markings() + target.change_markings(tattoo_icon, "body") + target.change_marking_color(rgb(tattoo_r, tattoo_g, tattoo_b), "body") playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1) used = 1 @@ -98,9 +99,9 @@ if(!used) var/ink_color = input("Please select an ink color.", "Tattoo Ink Color", rgb(tattoo_r, tattoo_g, tattoo_b)) as color|null if(ink_color && !(user.incapacitated() || used) ) - tattoo_r = hex2num(copytext(ink_color, 2, 4)) - tattoo_g = hex2num(copytext(ink_color, 4, 6)) - tattoo_b = hex2num(copytext(ink_color, 6, 8)) + tattoo_r = color2R(ink_color) + tattoo_g = color2G(ink_color) + tattoo_b = color2B(ink_color) to_chat(user, "You change the color setting on the [src].") @@ -335,7 +336,7 @@ if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.head == src) - H.slurring = max(3, H.slurring) //always slur + H.Slur(3) //always slur /obj/item/clothing/head/beret/fluff/linda //Epic_Charger: Linda Clark name = "Green beret" @@ -432,6 +433,15 @@ item_state = "castile_dress" item_color = "castile_dress" +/obj/item/clothing/under/fluff/elishirt // FlattestGuitar9: Eli Randolph + name = "casual dress shirt" + desc = "A soft, white dress shirt paired up with black suit pants. The set looks comfortable." + icon = 'icons/obj/custom_items.dmi' + icon_state = "elishirt" + item_state = "elishirt" + item_color = "elishirt" + displays_id = 0 + /obj/item/clothing/under/psysuit/fluff/isaca_sirius_1 // Xilia: Isaca Sirius name = "Isaca's suit" desc = "Black, comfortable and nicely fitting suit. Made not to hinder the wearer in any way. Made of some exotic fabric. And some strange glowing jewel at the waist. Name labels says; Property of Isaca Sirius; The Seeder." diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm index d7877676b21..a3f302cff9f 100644 --- a/code/modules/events/mass_hallucination.dm +++ b/code/modules/events/mass_hallucination.dm @@ -6,7 +6,7 @@ var/armor = H.getarmor(type = "rad") if((H.species.flags & RADIMMUNE) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected continue - H.hallucination += rand(50, 100) + H.AdjustHallucinate(rand(50, 100)) /datum/event/mass_hallucination/announce() - command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") \ No newline at end of file + command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage") diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index ffc4882a055..4c120db79e0 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -279,11 +279,11 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/simple/singularity/proc/Eat(atom/OldLoc, Dir) var/target_dist = get_dist(src,target) if(target_dist<=3) //"Eaten" - target.sleeping = 20 + target.Sleeping(20) target.hal_crit = 1 target.hal_screwyhud = 1 spawn(rand(50,100)) - target.sleeping = 0 + target.SetSleeping(0) target.hal_crit = 0 target.hal_screwyhud = 0 @@ -480,7 +480,7 @@ Gunshots/explosions/opening doors/less rare audio (done) my_target.show_message("[src.name] has attacked [my_target] with [weapon_name]!", 1) my_target.staminaloss += 30 if(prob(20)) - my_target.eye_blurry += 3 + my_target.AdjustEyeBlurry(3) if(prob(33)) if(!locate(/obj/effect/overlay) in my_target.loc) fake_blood(my_target) @@ -752,11 +752,11 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite halimage = null if("death") //Fake death - src.sleeping = 20 + Sleeping(20) hal_crit = 1 hal_screwyhud = 1 spawn(rand(50,100)) - src.sleeping = 0 + SetSleeping(0) hal_crit = 0 hal_screwyhud = 0 if("husks") diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 15ce27b7d5c..0814bf988f4 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -81,7 +81,7 @@ refill = reagents.get_master_reagent_id() refillName = reagents.get_master_reagent_name() - var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + var/trans = reagents.trans_to(target, amount_per_transfer_from_this) to_chat(user, " You transfer [trans] units of the solution to [target].") if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell @@ -102,22 +102,22 @@ if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird return if(is_hot(I)) - if(src.reagents) - src.reagents.chem_temp += 15 + if(reagents) + reagents.chem_temp += 15 to_chat(user, "You heat [src] with [I].") - src.reagents.handle_reactions() + reagents.handle_reactions() /obj/item/weapon/reagent_containers/food/drinks/examine(mob/user) if(!..(user, 1)) return - if(!reagents || reagents.total_volume==0) + if(!reagents || reagents.total_volume == 0) to_chat(user, " \The [src] is empty!") - else if(reagents.total_volume<=src.volume/4) + else if(reagents.total_volume <= volume/4) to_chat(user, " \The [src] is almost empty!") - else if(reagents.total_volume<=src.volume*0.66) + else if(reagents.total_volume <= volume*0.66) to_chat(user, " \The [src] is half full!")// We're all optimistic, right?! - else if(reagents.total_volume<=src.volume*0.90) + else if(reagents.total_volume <= volume*0.90) to_chat(user, " \The [src] is almost full!") else to_chat(user, " \The [src] is full!") diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 8928c5e8c57..7ee7509d8f1 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -22,9 +22,9 @@ else user.drop_item() user.put_in_active_hand(B) - B.icon_state = src.icon_state + B.icon_state = icon_state - var/icon/I = new('icons/obj/drinks.dmi', src.icon_state) + var/icon/I = new('icons/obj/drinks.dmi', icon_state) I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1) I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0)) B.icon = I @@ -99,11 +99,11 @@ //Display an attack message. if(target != user) - target.visible_message("[user] has hit [target][head_attack_message] with a bottle of [src.name]!", \ - "[user] has hit [target][head_attack_message] with a bottle of [src.name]!") + target.visible_message("[user] has hit [target][head_attack_message] with a bottle of [name]!", \ + "[user] has hit [target][head_attack_message] with a bottle of [name]!") else - user.visible_message("[target] hits \himself with a bottle of [src.name][head_attack_message]!", \ - "[target] hits \himself with a bottle of [src.name][head_attack_message]!") + user.visible_message("[target] hits \himself with a bottle of [name][head_attack_message]!", \ + "[target] hits \himself with a bottle of [name][head_attack_message]!") //Attack logs add_logs(user, target, "attacked", src) diff --git a/code/modules/food_and_drinks/drinks/drinks/cans.dm b/code/modules/food_and_drinks/drinks/drinks/cans.dm index 6d72ec2221c..89deed5dedd 100644 --- a/code/modules/food_and_drinks/drinks/drinks/cans.dm +++ b/code/modules/food_and_drinks/drinks/drinks/cans.dm @@ -9,7 +9,7 @@ /obj/item/weapon/reagent_containers/food/drinks/cans/attack_self(mob/user) if(canopened == 0) - playsound(src.loc,'sound/effects/canopen.ogg', rand(10,50), 1) + playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1) to_chat(user, "You open the drink with an audible pop!") canopened = 1 flags |= OPENCONTAINER @@ -32,7 +32,7 @@ if(canopened == 0) to_chat(user, "You need to open the drink!") return - else if(M == user && !src.reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head") + else if(M == user && !reagents.total_volume && user.a_intent == "harm" && user.zone_sel.selecting == "head") user.visible_message("[user] crushes ["\the [src]"] on \his forehead!", "You crush \the [src] on your forehead.") crush(user) return diff --git a/code/modules/food_and_drinks/food/candy.dm b/code/modules/food_and_drinks/food/candy.dm index d13eb7ec145..32a4a584a88 100644 --- a/code/modules/food_and_drinks/food/candy.dm +++ b/code/modules/food_and_drinks/food/candy.dm @@ -13,9 +13,6 @@ icon = 'icons/obj/food/candy.dmi' icon_state = "candy" -/obj/item/weapon/reagent_containers/food/snacks/candy/New() - ..() - // *********************************************************** // Candy Ingredients / Flavorings / Byproduct // *********************************************************** @@ -25,76 +22,53 @@ desc = "Such sweet, fattening food." icon_state = "chocolatebar" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/chocolatebar/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",4) bitesize = 2 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/candy/caramel name = "Caramel" desc = "Chewy and dense, yet it practically melts in your mouth!" icon_state = "caramel" filling_color = "#DB944D" - -/obj/item/weapon/reagent_containers/food/snacks/candy/caramel/New() - ..() - reagents.add_reagent("cream", 2) - reagents.add_reagent("sugar", 2) bitesize = 2 + list_reagents = list("cream" = 2, "sugar" = 2) + /obj/item/weapon/reagent_containers/food/snacks/candy/toffee name = "Toffee" desc = "A hard, brittle candy with a distinctive taste." icon_state = "toffee" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/toffee/New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 3) bitesize = 2 + list_reagents = list("nutriment" = 3, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/nougat name = "Nougat" desc = "A soft, chewy candy commonly found in candybars." icon_state = "nougat" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/nougat/New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 3) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() bitesize = 2 + list_reagents = list("nutriment" = 3, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/taffy name = "Saltwater Taffy" desc = "Old fashioned saltwater taffy. Chewy!" icon_state = "candy1" filling_color = "#7D5F46" + bitesize = 2 + list_reagents = list("nutriment" = 3, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/taffy/New() ..() icon_state = pick("candy1", "candy2", "candy3", "candy4", "candy5") - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sugar", 3) - bitesize = 2 /obj/item/weapon/reagent_containers/food/snacks/candy/fudge name = "Fudge" desc = "Chocolate fudge, a timeless classic treat." icon_state = "fudge" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/fudge/New() - ..() - reagents.add_reagent("cream", 3) - reagents.add_reagent("chocolate",6) bitesize = 3 + list_reagents = list("cream" = 3, "chocolate" = 6) /obj/item/weapon/reagent_containers/food/snacks/candy/fudge/peanut name = "Peanut Fudge" @@ -113,10 +87,7 @@ desc = "An extra creamy fudge with bits of real chocolate cookie mixed in. Crunchy!" icon_state = "fudge_cookies_n_cream" filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/fudge/cookies_n_cream/New() - ..() - reagents.add_reagent("cream", 3) + list_reagents = list("cream" = 6, "chocolate" = 6) /obj/item/weapon/reagent_containers/food/snacks/candy/fudge/turtle name = "Turtle Fudge" @@ -132,24 +103,16 @@ name = "Donor Candy" desc = "A little treat for blood donors." trash = /obj/item/trash/candy - -/obj/item/weapon/reagent_containers/food/snacks/candy/donor/New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("sugar", 3) bitesize = 5 + list_reagents = list("nutriment" = 10, "sugar" = 3) /obj/item/weapon/reagent_containers/food/snacks/candy/candy_corn name = "candy corn" desc = "It's a handful of candy corn. Cannot be stored in a detective's hat, alas." icon_state = "candycorn" filling_color = "#FFFCB0" - -/obj/item/weapon/reagent_containers/food/snacks/candy/candy_corn/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sugar", 2) bitesize = 2 + list_reagents = list("nutriment" = 4, "sugar" = 2) // *********************************************************** // Candy Products (plain / unflavored) @@ -161,11 +124,8 @@ icon_state = "cottoncandy_plain" trash = /obj/item/weapon/c_tube filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/New() - ..() - reagents.add_reagent("sugar", 15) - bitesize = 3 + bitesize = 4 + list_reagents = list("sugar" = 15) /obj/item/weapon/reagent_containers/food/snacks/candy/candybar name = "candy" @@ -173,92 +133,64 @@ icon_state = "candy" trash = /obj/item/trash/candy filling_color = "#7D5F46" - -/obj/item/weapon/reagent_containers/food/snacks/candy/candybar/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",5) bitesize = 3 + list_reagents = list("nutriment" = 2, "chocolate" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/candycane name = "candy cane" desc = "A festive mint candy cane." icon_state = "candycane" filling_color = "#F2F2F2" - -/obj/item/weapon/reagent_containers/food/snacks/candy/candycane/New() - ..() - reagents.add_reagent("minttoxin", 1) - reagents.add_reagent("sugar", 5) bitesize = 2 + list_reagents = list("minttoxin" = 1, "sugar" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear name = "gummy bear" desc = "A small edible bear. It's squishy and chewy!" icon_state = "gbear" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 3 + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm name = "gummy worm" desc = "An edible worm, made from gelatin." icon_state = "gworm" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 3 + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas." icon_state = "jbean" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 3 + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/jawbreaker name = "jawbreaker" desc = "An unbelievably hard candy. The name is fitting." icon_state = "jawbreaker" filling_color = "#ED0758" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jawbreaker/New() - ..() - reagents.add_reagent("sugar", 10) bitesize = 0.1 //this is gonna take a while, you'll be working at this all shift. + list_reagents = list("sugar" = 10) /obj/item/weapon/reagent_containers/food/snacks/candy/cash name = "candy cash" desc = "Not legal tender. Tasty though." icon_state = "candy_cash" filling_color = "#302000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cash/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate", 4) bitesize = 2 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/candy/coin name = "chocolate coin" desc = "Probably won't work in the vending machines." icon_state = "choc_coin" filling_color = "#302000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/coin/New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",4) bitesize = 3 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/candy/gum name = "bubblegum" @@ -266,22 +198,15 @@ icon_state = "bubblegum" trash = /obj/item/trash/gum filling_color = "#FF7495" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gum/New() - ..() - reagents.add_reagent("sugar", 5) bitesize = 0.2 + list_reagents = list("sugar" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/sucker name = "sucker" desc = "For being such a good sport!" icon_state = "sucker" filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/candy/sucker/New() - ..() - reagents.add_reagent("sugar", 10) - bitesize = 1 + list_reagents = list("sugar" = 10) // *********************************************************** // Gummy Bear Flavors @@ -292,91 +217,56 @@ desc = "A small edible bear. It's red!" icon_state = "gbear_red" filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/red/New() - ..() - reagents.add_reagent("cherryjelly", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cherryjelly" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/blue name = "gummy bear" desc = "A small edible bear. It's blue!" icon_state = "gbear_blue" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/blue/New() - ..() - reagents.add_reagent("berryjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "berryjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/poison name = "gummy bear" desc = "A small edible bear. It's blue!" icon_state = "gbear_blue" filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 12) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 3 + list_reagents = list("poisonberryjuice" = 12) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/green name = "gummy bear" desc = "A small edible bear. It's green!" icon_state = "gbear_green" filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/green/New() - ..() - reagents.add_reagent("limejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "limejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/yellow name = "gummy bear" desc = "A small edible bear. It's yellow!" icon_state = "gbear_yellow" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "lemonjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/orange name = "gummy bear" desc = "A small edible bear. It's orange!" icon_state = "gbear_orange" filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/orange/New() - ..() - reagents.add_reagent("orangejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "orangejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/purple name = "gummy bear" desc = "A small edible bear. It's purple!" icon_state = "gbear_purple" filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/purple/New() - ..() - reagents.add_reagent("grapejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "grapejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/wtf name = "gummy bear" desc = "A small bear. Wait... what?" icon_state = "gbear_wtf" filling_color = "#60A584" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummybear/wtf/New() - ..() - reagents.add_reagent("space_drugs", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "space_drugs" = 2) // *********************************************************** // Gummy Worm Flavors @@ -387,91 +277,56 @@ desc = "An edible worm, made from gelatin. It's red!" icon_state = "gworm_red" filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/red/New() - ..() - reagents.add_reagent("cherryjelly", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cherryjelly" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/blue name = "gummy worm" desc = "An edible worm, made from gelatin. It's blue!" icon_state = "gworm_blue" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/blue/New() - ..() - reagents.add_reagent("berryjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "berryjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/poison name = "gummy worm" desc = "An edible worm, made from gelatin. It's blue!" icon_state = "gworm_blue" filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 12) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 3 + list_reagents = list("poisonberryjuice" = 12) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/green name = "gummy worm" desc = "An edible worm, made from gelatin. It's green!" icon_state = "gworm_green" filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/green/New() - ..() - reagents.add_reagent("limejuice", 10) - bitesize = 3 + list_reagents = list("sugar" = 10, "limejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/yellow name = "gummy worm" desc = "An edible worm, made from gelatin. It's yellow!" icon_state = "gworm_yellow" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "lemonjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/orange name = "gummy worm" desc = "An edible worm, made from gelatin. It's orange!" icon_state = "gworm_orange" filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/orange/New() - ..() - reagents.add_reagent("orangejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "orangejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/purple name = "gummy worm" desc = "An edible worm, made from gelatin. It's purple!" icon_state = "gworm_purple" filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/purple/New() - ..() - reagents.add_reagent("grapejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "grapejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/wtf name = "gummy worm" desc = "An edible worm. Did it just move?" icon_state = "gworm_wtf" filling_color = "#60A584" - -/obj/item/weapon/reagent_containers/food/snacks/candy/gummyworm/wtf/New() - ..() - reagents.add_reagent("space_drugs", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "space_drugs" = 2) // *********************************************************** // Jelly Bean Flavors @@ -482,146 +337,91 @@ desc = "A candy bean, guarenteed to not give you gas. It's red!" icon_state = "jbean_red" filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/red/New() - ..() - reagents.add_reagent("cherryjelly", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cherryjelly" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/blue name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's blue!" icon_state = "jbean_blue" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/blue/New() - ..() - reagents.add_reagent("berryjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "berryjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/poison name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's blue!" icon_state = "jbean_blue" filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 12) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 3 + list_reagents = list("poisonberryjuice" = 12) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/green name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's green!" icon_state = "jbean_green" filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/green/New() - ..() - reagents.add_reagent("limejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "limejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/yellow name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's yellow!" icon_state = "jbean_yellow" filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "lemonjuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/orange name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's orange!" icon_state = "jbean_orange" filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/orange/New() - ..() - reagents.add_reagent("orangejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "orangejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/purple name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's purple!" icon_state = "jbean_purple" filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/purple/New() - ..() - reagents.add_reagent("grapejuice", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "grapejuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/chocolate name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's chocolate!" icon_state = "jbean_choc" filling_color = "#302000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/chocolate/New() - ..() - reagents.add_reagent("chocolate",2) - bitesize = 3 + list_reagents = list("sugar" = 10, "chocolate" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/popcorn name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's popcorn flavored!" icon_state = "jbean_popcorn" filling_color = "#664330" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/popcorn/New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/cola name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's Cola flavored!" icon_state = "jbean_cola" filling_color = "#102000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/cola/New() - ..() - reagents.add_reagent("cola", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "cola" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/drgibb name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's Dr. Gibb flavored!" icon_state = "jbean_cola" filling_color = "#102000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/drgibb/New() - ..() - reagents.add_reagent("dr_gibb", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "dr_gibb" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/coffee name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. It's Coffee flavored!" icon_state = "jbean_choc" filling_color = "#482000" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/coffee/New() - ..() - reagents.add_reagent("coffee", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "coffee" = 2) /obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/wtf name = "jelly bean" desc = "A candy bean, guarenteed to not give you gas. You aren't sure what color it is." icon_state = "jbean_wtf" filling_color = "#60A584" - -/obj/item/weapon/reagent_containers/food/snacks/candy/jellybean/wtf/New() - ..() - reagents.add_reagent("space_drugs", 2) - bitesize = 3 + list_reagents = list("sugar" = 10, "space_drugs" = 2) // *********************************************************** // Cotton Candy Flavors @@ -633,11 +433,7 @@ icon_state = "cottoncandy_red" trash = /obj/item/weapon/c_tube filling_color = "#801E28" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/red/New() - ..() - reagents.add_reagent("cherryjelly", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/blue name = "cotton candy" @@ -645,11 +441,7 @@ icon_state = "cottoncandy_blue" trash = /obj/item/weapon/c_tube filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/blue/New() - ..() - reagents.add_reagent("berryjuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "berryjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/poison name = "cotton candy" @@ -657,14 +449,7 @@ icon_state = "cottoncandy_blue" trash = /obj/item/weapon/c_tube filling_color = "#863353" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/poison/New() - ..() - reagents.add_reagent("poisonberryjuice", 20) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 4 + list_reagents = list("poisonberryjuice" = 20) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/green name = "cotton candy" @@ -672,11 +457,7 @@ icon_state = "cottoncandy_green" trash = /obj/item/weapon/c_tube filling_color = "#365E30" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/green/New() - ..() - reagents.add_reagent("limejuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "limejuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/yellow name = "cotton candy" @@ -684,11 +465,7 @@ icon_state = "cottoncandy_yellow" trash = /obj/item/weapon/c_tube filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/yellow/New() - ..() - reagents.add_reagent("lemonjuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "lemonjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/orange name = "cotton candy" @@ -696,11 +473,7 @@ icon_state = "cottoncandy_orange" trash = /obj/item/weapon/c_tube filling_color = "#E78108" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/orange/New() - ..() - reagents.add_reagent("orangejuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "orangejuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/purple name = "cotton candy" @@ -708,11 +481,7 @@ icon_state = "cottoncandy_purple" trash = /obj/item/weapon/c_tube filling_color = "#993399" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/purple/New() - ..() - reagents.add_reagent("grapejuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "grapejuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/pink name = "cotton candy" @@ -720,11 +489,7 @@ icon_state = "cottoncandy_pink" trash = /obj/item/weapon/c_tube filling_color = "#863333" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/pink/New() - ..() - reagents.add_reagent("watermelonjuice", 5) - bitesize = 4 + list_reagents = list("sugar" = 15, "watermelonjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/rainbow name = "cotton candy" @@ -732,14 +497,7 @@ icon_state = "cottoncandy_rainbow" trash = /obj/item/weapon/c_tube filling_color = "#C8A5DC" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/rainbow/New() - ..() - reagents.add_reagent("omnizine", 20) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 4 + list_reagents = list("omnizine" = 20) /obj/item/weapon/reagent_containers/food/snacks/candy/cotton/bad_rainbow name = "cotton candy" @@ -747,14 +505,7 @@ icon_state = "cottoncandy_rainbow" trash = /obj/item/weapon/c_tube filling_color = "#32127A" - -/obj/item/weapon/reagent_containers/food/snacks/candy/cotton/bad_rainbow/New() - ..() - reagents.add_reagent("sulfonal", 20) - spawn(1) - reagents.del_reagent("sugar") - reagents.update_total() - bitesize = 4 + list_reagents = list("sulfonal" = 20) // *********************************************************** // Candybar Flavors diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index 931e84b892b..d7ffca96843 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -82,7 +82,7 @@ if(target.reagents.total_volume >= target.reagents.maximum_volume) to_chat(user, "you can't add anymore to [target]!") return - var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + var/trans = reagents.trans_to(target, amount_per_transfer_from_this) to_chat(user, "You transfer [trans] units of the condiment to [target].") /obj/item/weapon/reagent_containers/food/condiment/on_reagent_change() @@ -223,7 +223,7 @@ return else to_chat(user, "You tear open [src] above [target] and the condiments drip onto it.") - src.reagents.trans_to(target, amount_per_transfer_from_this) + reagents.trans_to(target, amount_per_transfer_from_this) qdel(src) /obj/item/weapon/reagent_containers/food/condiment/pack/on_reagent_change() diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 78651f97b0c..77e3f22a1e8 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -1,4 +1,4 @@ -/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/breadslice/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich/S = new(get_turf(user)) S.attackby(W,user, params) @@ -6,13 +6,13 @@ else ..() -/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/burger/S = new(get_turf(user)) S.attackby(W,user, params) qdel(src) -/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/pizza/S = new(get_turf(user)) S.attackby(W,user, params) @@ -21,7 +21,7 @@ ..() -/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/pasta/S = new(get_turf(user)) S.attackby(W,user, params) @@ -30,7 +30,7 @@ ..() -/obj/item/trash/plate/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/trash/plate/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/fullycustom/S = new(get_turf(user)) S.attackby(W,user, params) @@ -44,7 +44,7 @@ icon = 'icons/obj/food/food.dmi' icon_state = "soup" -/obj/item/trash/bowl/attackby(obj/item/W as obj, mob/user as mob, params) +/obj/item/trash/bowl/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/weapon/reagent_containers/food/snacks) && !(W.flags & NODROP)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/soup/S = new(get_turf(user)) @@ -54,7 +54,6 @@ ..() /obj/item/weapon/reagent_containers/food/snacks/customizable/sandwich - /obj/item/weapon/reagent_containers/food/snacks/customizable name = "sandwich" desc = "A sandwich! A timeless classic." icon_state = "breadslice" @@ -79,12 +78,7 @@ trash = /obj/item/trash/plate bitesize = 2 var/list/ingredients = list() - - New() - ..() - - reagents.add_reagent("nutriment", 8) - + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/customizable/pizza name = "personal pizza" @@ -323,7 +317,7 @@ toptype = new /obj/item/weapon/reagent_containers/food/snacks/bun() /obj/item/weapon/reagent_containers/food/snacks/customizable/attackby(obj/item/I, mob/user, params) - if(src.contents.len > sandwich_limit) + if(contents.len > sandwich_limit) to_chat(user, "If you put anything else in or on [src] it's going to make a mess.") return if(!istype(I, /obj/item/weapon/reagent_containers/food/snacks)) @@ -351,7 +345,7 @@ for(var/obj/item/O in ingredients) i++ if(!fullycustom) - var/image/I = new(src.icon, "[baseicon]_filling") + var/image/I = new(icon, "[baseicon]_filling") if(istype(O, /obj/item/weapon/reagent_containers/food/snacks)) var/obj/item/weapon/reagent_containers/food/snacks/food = O if(!food.filling_color == "#FFFFFF") @@ -372,7 +366,7 @@ overlays += O.overlays if(top) - var/image/T = new(src.icon, "[baseicon]_top") + var/image/T = new(icon, "[baseicon]_top") T.pixel_x = pick(list(-1,0,1)) T.pixel_y = (ingredients.len * 2)+1 overlays += T @@ -388,24 +382,6 @@ to_chat(user, " You think you can see [whatsinside] in there.") -/* -/obj/item/weapon/reagent_containers/food/snacks/customizable/attack(mob/M as mob, mob/user as mob, def_zone) //SNOOOOOOOWFLAAAAAAAAAAAAAAAAAKES - - var/obj/item/shard - for(var/obj/item/O in contents) - if(istype(O,/obj/item/weapon/shard)) - shard = O - break - - var/mob/living/H - if(istype(M,/mob/living)) - H = M - - if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable. - to_chat(H, "\red You lacerate your mouth on a [shard.name] in the sandwich!") - H.adjustBruteLoss(5) //TODO: Target head if human. - ..() -*/ /obj/item/weapon/reagent_containers/food/snacks/customizable/proc/newname() var/unsorteditems[0] @@ -487,7 +463,7 @@ sendback = "[pick(list("absurd","colossal","enormous","ridiculous","massive","oversized","cardiac-arresting","pipe-clogging","edible but sickening","sickening","gargantuan","mega","belly-burster","chest-burster"))] [basename]" return sendback -/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/sortlist(var/list/unsorted, var/highest) +/obj/item/weapon/reagent_containers/food/snacks/customizable/proc/sortlist(list/unsorted, highest) var/sorted[0] for(var/i = 1, i<= highest, i++) for(var/it in unsorted) diff --git a/code/modules/food_and_drinks/food/meat.dm b/code/modules/food_and_drinks/food/meat.dm index 76de76530ea..4635f6eb9b1 100644 --- a/code/modules/food_and_drinks/food/meat.dm +++ b/code/modules/food_and_drinks/food/meat.dm @@ -4,16 +4,11 @@ icon_state = "meat" health = 180 filling_color = "#FF1C1C" - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) -/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if( \ - istype(W, /obj/item/weapon/kitchen/knife) || \ - istype(W, /obj/item/weapon/scalpel) \ - ) +/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/weapon/kitchen/knife) || istype(W, /obj/item/weapon/scalpel)) new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) @@ -49,6 +44,4 @@ /obj/item/weapon/reagent_containers/food/snacks/meat/ham name = "Ham" desc = "Taste like bacon." - New() - ..() - reagents.add_reagent("porktonium", 10) + list_reagents = list("protein" = 3, "porktonium" = 10) \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/seafood.dm b/code/modules/food_and_drinks/food/seafood.dm index 410c225247c..c0a95d39315 100644 --- a/code/modules/food_and_drinks/food/seafood.dm +++ b/code/modules/food_and_drinks/food/seafood.dm @@ -5,12 +5,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfillet" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carpotoxin", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("protein" = 3, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/salmonmeat name = "raw salmon" @@ -18,11 +14,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfillet" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/salmonsteak name = "Salmon steak" @@ -31,14 +24,8 @@ icon_state = "salmonsteak" trash = /obj/item/trash/plate filling_color = "#7A3D11" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 3 - + bitesize = 3 + list_reagents = list("nutriment" = 4, "sodiumchloride" = 1, "blackpepper" = 1) /obj/item/weapon/reagent_containers/food/snacks/catfishmeat name = "raw catfish" @@ -46,11 +33,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfillet" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/fishfingers name = "Fish Fingers" @@ -58,15 +42,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishfingers" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("carpotoxin", 3) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/fishburger name = "Fillet -o- Carp Sandwich" @@ -74,12 +51,8 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishburger" filling_color = "#FFDEFE" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/cubancarp name = "Cuban Carp" @@ -88,13 +61,8 @@ icon_state = "cubancarp" trash = /obj/item/trash/plate filling_color = "#E9ADFF" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carpotoxin", 3) - reagents.add_reagent("capsaicin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "carpotoxin" = 3, "capsaicin" = 3) /obj/item/weapon/reagent_containers/food/snacks/fishandchips name = "Fish and Chips" @@ -102,168 +70,117 @@ icon = 'icons/obj/food/seafood.dmi' icon_state = "fishandchips" filling_color = "#E3D796" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "carpotoxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/sashimi name = "carp sashimi" desc = "Celebrate surviving attack from hostile alien lifeforms by hospitalising yourself." icon = 'icons/obj/food/seafood.dmi' icon_state = "sashimi" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("toxin", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "toxin" = 5) /obj/item/weapon/reagent_containers/food/snacks/fried_shrimp name = "fried shrimp" desc = "Just one of the many things you can do with shrimp!" icon = 'icons/obj/food/seafood.dmi' icon_state = "shrimp_fried" - - New() - ..() - reagents.add_reagent("nutriment", 2) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/boiled_shrimp name = "boiled shrimp" desc = "Just one of the many things you can do with shrimp!" icon = 'icons/obj/food/seafood.dmi' icon_state = "shrimp_cooked" - - New() - ..() - reagents.add_reagent("nutriment", 2) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Ebi name = "Ebi Sushi" desc = "A simple sushi consisting of cooked shrimp and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Ebi" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Ikura name = "Ikura Sushi" desc = "A simple sushi consisting of salmon roe." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Ikura" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_Sake name = "Sake Sushi" desc = "A simple sushi consisting of raw salmon and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Sake" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_SmokedSalmon name = "Smoked Salmon Sushi" desc = "A simple sushi consisting of cooked salmon and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_SmokedSalmon" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Tamago name = "Tamago Sushi" desc = "A simple sushi consisting of egg and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Tamago" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Inari name = "Inari Sushi" desc = "A piece of fried tofu stuffed with rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Inari" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Masago name = "Masago Sushi" desc = "A simple sushi consisting of goldfish roe." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Masago" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_Tobiko name = "Tobiko Sushi" desc = "A simple sushi consisting of shark roe." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Masago" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_TobikoEgg name = "Tobiko and Egg Sushi" desc = "A sushi consisting of shark roe and an egg." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_TobikoEgg" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2, "protein" = 1) /obj/item/weapon/reagent_containers/food/snacks/sushi_Tai name = "Tai Sushi" desc = "A simple sushi consisting of catfish and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Tai" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/sushi_Unagi name = "Unagi Sushi" desc = "A simple sushi consisting of eel and rice." icon = 'icons/obj/food/seafood.dmi' icon_state = "sushi_Hokki" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 \ No newline at end of file + bitesize = 3 + list_reagents = list("nutriment" = 2) \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index d403b4aae4b..49cd0c1fa3b 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -4,7 +4,6 @@ desc = "yummy" icon = 'icons/obj/food/food.dmi' icon_state = null - bitesize = 1 var/bitecount = 0 var/trash = null var/slice_path @@ -38,10 +37,10 @@ /obj/item/weapon/reagent_containers/food/snacks/proc/Post_Consume(mob/living/M) return -/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob) +/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user) return -/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) +/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M, mob/user, def_zone) if(reagents && !reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it. to_chat(user, "None of [src] left, oh no!") M.unEquip(src) //so icons update :[ @@ -64,11 +63,11 @@ if(bitecount==0) return else if(bitecount==1) - to_chat(user, "\blue \The [src] was bitten by someone!") + to_chat(user, "[src] was bitten by someone!") else if(bitecount<=3) - to_chat(user, "\blue \The [src] was bitten [bitecount] times!") + to_chat(user, "[src] was bitten [bitecount] times!") else - to_chat(user, "\blue \The [src] was bitten multiple times!") + to_chat(user, "[src] was bitten multiple times!") /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user, params) @@ -93,10 +92,10 @@ "You scoop up some [src] with \the [U]!" \ ) - src.bitecount++ + bitecount++ U.overlays.Cut() var/image/I = new(U.icon, "loadedfood") - I.color = src.filling_color + I.color = filling_color U.overlays += I var/obj/item/weapon/reagent_containers/food/snacks/collected = new type @@ -136,7 +135,7 @@ else if(W.w_class <= 2 && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) if(!iscarbon(user)) return 1 - to_chat(user, "\red You slip [W] inside [src].") + to_chat(user, "You slip [W] inside [src].") user.unEquip(W) if((user.client && user.s_active != src)) user.client.screen -= W @@ -147,28 +146,28 @@ else return 1 if( \ - !isturf(src.loc) || \ - !(locate(/obj/structure/table) in src.loc) && \ - !(locate(/obj/machinery/optable) in src.loc) && \ - !(locate(/obj/item/weapon/storage/bag/tray) in src.loc) \ + !isturf(loc) || \ + !(locate(/obj/structure/table) in loc) && \ + !(locate(/obj/machinery/optable) in loc) && \ + !(locate(/obj/item/weapon/storage/bag/tray) in loc) \ ) - to_chat(user, "\red You cannot slice [src] here! You need a table or at least a tray to do it.") + to_chat(user, "You cannot slice [src] here! You need a table or at least a tray to do it.") return 1 var/slices_lost = 0 if(!inaccurate) user.visible_message( \ - "\blue [user] slices \the [src]!", \ - "\blue You slice \the [src]!" \ + "[user] slices [src]!", \ + "You slice [src]!" \ ) else user.visible_message( \ - "\blue [user] crudely slices \the [src] with [W]!", \ - "\blue You crudely slice \the [src] with your [W]!" \ + "[user] crudely slices [src] with [W]!", \ + "You crudely slice [src] with your [W]!" \ ) slices_lost = rand(1,min(1,round(slices_num/2))) var/reagents_per_slice = reagents.total_volume/slices_num for(var/i=1 to (slices_num-slices_lost)) - var/obj/slice = new slice_path (src.loc) + var/obj/slice = new slice_path (loc) reagents.trans_to(slice,reagents_per_slice) qdel(src) @@ -185,19 +184,19 @@ M.changeNext_move(CLICK_CD_MELEE) if(iscorgi(M)) if(bitecount >= 4) - M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].","You swallow up the last part of \the [src].") - playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where [src] was")].","You swallow up the last part of [src].") + playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1) var/mob/living/simple_animal/pet/corgi/C = M C.adjustBruteLoss(-5) C.adjustFireLoss(-5) qdel(src) else - M.visible_message("[M] takes a bite of \the [src].","You take a bite of \the [src].") - playsound(src.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + M.visible_message("[M] takes a bite of [src].","You take a bite of [src].") + playsound(loc,'sound/items/eatfood.ogg', rand(10,50), 1) bitecount++ else if(ismouse(M)) var/mob/living/simple_animal/mouse/N = M - to_chat(N, text("\blue You nibble away at [src].")) + to_chat(N, text("You nibble away at [src].")) if(prob(50)) N.visible_message("[N] nibbles away at [src].", "") //N.emote("nibbles away at the [src]") @@ -255,49 +254,8 @@ icon_state = "aesirsalad" trash = /obj/item/trash/snack_bowl filling_color = "#468C00" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 8) - bitesize = 3 - -/* -/obj/item/weapon/reagent_containers/food/snacks/candy - name = "candy" - desc = "Nougat, love it or hate it." - icon_state = "candy" - trash = /obj/item/trash/candy - filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("sugar", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/candy/donor - name = "Donor Candy" - desc = "A little treat for blood donors." - trash = /obj/item/trash/candy - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("sugar", 3) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/candy_corn - name = "candy corn" - desc = "It's a handful of candy corn. Cannot be stored in a detective's hat, alas." - icon_state = "candy_corn" - filling_color = "#FFFCB0" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sugar", 2) - bitesize = 2 -*/ + bitesize = 3 + list_reagents = list("nutriment" = 8, "omnizine" = 8) /obj/item/weapon/reagent_containers/food/snacks/chips name = "chips" @@ -305,12 +263,7 @@ icon_state = "chips" trash = /obj/item/trash/chips filling_color = "#E8C31E" - - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 1 + list_reagents = list("nutriment" = 3, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/cornchips name = "corn chips" @@ -318,123 +271,79 @@ icon_state = "chips" trash = /obj/item/trash/chips filling_color = "#E8C31E" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/cookie name = "cookie" desc = "COOKIE!!!" icon_state = "COOKIE!!!" filling_color = "#DBC94F" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 1 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/chocolatebar name = "Chocolate Bar" desc = "Such sweet, fattening food." icon_state = "chocolatebar" filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("chocolate",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/choc_pile //for reagent chocolate being spilled on turfs name = "Pile of Chocolate" desc = "A pile of pure chocolate pieces." icon_state = "cocoa" filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("chocolate",5) //no longer can be used to generate the reagent infinitely - bitesize = 2 + bitesize = 2 + list_reagents = list("chocolate" = 5) /obj/item/weapon/reagent_containers/food/snacks/chocolateegg name = "Chocolate Egg" desc = "Such sweet, fattening food." icon_state = "chocolateegg" filling_color = "#7D5F46" - - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("chocolate",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 3, "chocolate" = 4) /obj/item/weapon/reagent_containers/food/snacks/donut name = "donut" desc = "Goes great with Robust Coffee." icon_state = "donut1" filling_color = "#D9C386" + bitesize = 3 /obj/item/weapon/reagent_containers/food/snacks/donut/normal name = "donut" desc = "Goes great with Robust Coffee." icon_state = "donut1" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - src.bitesize = 3 - if(prob(30)) - src.icon_state = "donut2" - src.name = "frosted donut" - reagents.add_reagent("sprinkles", 2) + list_reagents = list("nutriment" = 3, "sprinkles" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/donut/normal/New() + ..() + if(prob(30)) + icon_state = "donut2" + name = "frosted donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/sprinkles name = "frosted donut" icon_state = "donut2" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 3) + list_reagents = list("nutriment" = 3, "sprinkles" = 3) /obj/item/weapon/reagent_containers/food/snacks/donut/chaos name = "Chaos Donut" desc = "Like life, it never quite tastes the same." icon_state = "donut1" filling_color = "#ED11E6" + bitesize = 10 - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sprinkles", 1) - bitesize = 10 - var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(chaosselect) - if(1) - reagents.add_reagent("nutriment", 3) - if(2) - reagents.add_reagent("capsaicin", 3) - if(3) - reagents.add_reagent("frostoil", 3) - if(4) - reagents.add_reagent("sprinkles", 3) - if(5) - reagents.add_reagent("plasma", 3) - if(6) - reagents.add_reagent("chocolate", 3) - if(7) - reagents.add_reagent("slimejelly", 3) - if(8) - reagents.add_reagent("banana", 3) - if(9) - reagents.add_reagent("berryjuice", 3) - if(10) - reagents.add_reagent("omnizine", 3) - if(prob(30)) - src.icon_state = "donut2" - src.name = "Frosted Chaos Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/chaos/New() + ..() + var/extra_reagent = pick("nutriment", "capsaicin", "frostoil", "sprinkles", "plasma", "chocolate", "slimejelly", "banana", "berryjuice", "omnizine") + reagents.add_reagent("[extra_reagent]", 3) + if(prob(30)) + icon_state = "donut2" + name = "Frosted Chaos Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/jelly @@ -442,85 +351,75 @@ desc = "You jelly?" icon_state = "jdonut1" filling_color = "#ED1169" + bitesize = 5 + list_reagents = list("nutriment" = 3, "sprinkles" = 1, "berryjuice" = 5) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("berryjuice", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/jelly/New() + ..() + if(prob(30)) + icon_state = "jdonut2" + name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly name = "Jelly Donut" desc = "You jelly?" icon_state = "jdonut1" filling_color = "#ED1169" + bitesize = 5 + list_reagents = list("nutriment" = 3, "sprinkles" = 1, "slimejelly" = 5) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("slimejelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly/New() + ..() + if(prob(30)) + icon_state = "jdonut2" + name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly name = "Jelly Donut" desc = "You jelly?" icon_state = "jdonut1" filling_color = "#ED1169" + bitesize = 5 + list_reagents = list("nutriment" = 3, "sprinkles" = 1, "cherryjelly" = 5) - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("cherryjelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) +/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly/New() + ..() + if(prob(30)) + icon_state = "jdonut2" + name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) /obj/item/weapon/reagent_containers/food/snacks/egg name = "egg" desc = "An egg!" icon_state = "egg" filling_color = "#FDFFD1" + list_reagents = list("protein" = 1, "egg" = 5) - New() +/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom) + ..() + var/turf/T = get_turf(hit_atom) + new/obj/effect/decal/cleanable/egg_smudge(T) + if(reagents) + reagents.reaction(hit_atom, TOUCH) + qdel(src) + +/obj/item/weapon/reagent_containers/food/snacks/egg/attackby(obj/item/weapon/W, mob/user, params) + if(istype( W, /obj/item/toy/crayon )) + var/obj/item/toy/crayon/C = W + var/clr = C.colourName + + if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) + to_chat(usr, "The egg refuses to take on this color!") + return + + to_chat(usr, "You color \the [src] [clr]") + icon_state = "egg-[clr]" + item_color = clr + else ..() - reagents.add_reagent("protein", 1) - reagents.add_reagent("egg", 5) - - throw_impact(atom/hit_atom) - ..() - var/turf/T = get_turf(hit_atom) - new/obj/effect/decal/cleanable/egg_smudge(T) - if(reagents) - reagents.reaction(hit_atom, TOUCH) - qdel(src) - - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype( W, /obj/item/toy/crayon )) - var/obj/item/toy/crayon/C = W - var/clr = C.colourName - - if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) - to_chat(usr, "\blue The egg refuses to take on this color!") - return - - to_chat(usr, "\blue You color \the [src] [clr]") - icon_state = "egg-[clr]" - item_color = clr - else - ..() /obj/item/weapon/reagent_containers/food/snacks/egg/blue icon_state = "egg-blue" @@ -559,25 +458,14 @@ desc = "A fried egg, with a touch of salt and pepper." icon_state = "friedegg" filling_color = "#FFDF78" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("egg", 5) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 1 + list_reagents = list("nutriment" = 2, "egg" = 5, "sodiumchloride" = 1, "blackpepper" = 1) /obj/item/weapon/reagent_containers/food/snacks/boiledegg name = "Boiled egg" desc = "A hard boiled egg." icon_state = "egg" filling_color = "#FFFFFF" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("egg", 5) + list_reagents = list("nutriment" = 2, "egg" = 5) /obj/item/weapon/reagent_containers/food/snacks/organ @@ -586,11 +474,8 @@ icon = 'icons/obj/surgery.dmi' icon_state = "appendix" filling_color = "#E00D34" - - New() - ..() - reagents.add_reagent("protein", 4) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 4) /obj/item/weapon/reagent_containers/food/snacks/appendix //yes, this is the same as meat. I might do something different in future @@ -599,11 +484,8 @@ icon = 'icons/obj/surgery.dmi' icon_state = "appendix" filling_color = "#E00D34" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed name = "inflamed appendix" @@ -616,179 +498,125 @@ icon_state = "tofu" desc = "We all love tofu." filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("plantmatter", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("plantmatter" = 3) /obj/item/weapon/reagent_containers/food/snacks/fried_tofu name = "Fried Tofu" icon_state = "tofu" desc = "Proof that even vegetarians crave unhealthy foods." filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 3) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/tofurkey name = "Tofurkey" desc = "A fake turkey made from tofu." icon_state = "tofurkey" filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 12) - reagents.add_reagent("ether", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 12, "ether" = 3) /obj/item/weapon/reagent_containers/food/snacks/stuffing name = "Stuffing" desc = "Moist, peppery breadcrumbs for filling the body cavities of dead birds. Dig in!" icon_state = "stuffing" filling_color = "#C9AC83" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice name = "huge mushroom slice" desc = "A slice from a huge mushroom." icon_state = "hugemushroomslice" filling_color = "#E0D7C5" - - New() - ..() - reagents.add_reagent("plantmatter", 3) - reagents.add_reagent("psilocybin", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("plantmatter" = 3, "psilocybin" = 3) /obj/item/weapon/reagent_containers/food/snacks/tomatomeat name = "tomato slice" desc = "A slice from a huge tomato" icon_state = "tomatomeat" filling_color = "#DB0000" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/bearmeat name = "bear meat" desc = "A very manly slab of meat." icon_state = "bearmeat" filling_color = "#DB0000" - - New() - ..() - reagents.add_reagent("protein", 12) - reagents.add_reagent("methamphetamine", 5) - src.bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 12, "methamphetamine" = 5) /obj/item/weapon/reagent_containers/food/snacks/xenomeat name = "meat" desc = "A slab of meat" icon_state = "xenomeat" filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("protein", 3) - src.bitesize = 6 + bitesize = 6 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/spidermeat name = "spider meat" desc = "A slab of spider meat." icon_state = "spidermeat" - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("toxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/lizardmeat name = "mutant lizard meat" desc = "Seems to be a slab of meat from some mutant lizard thing?" icon_state = "xenomeat" filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("toxin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("protein" = 3, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/spiderleg name = "spider leg" desc = "A still twitching leg of a giant spider... you don't really want to eat this, do you?" icon_state = "spiderleg" - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("toxin", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 2, "toxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/meatball name = "Meatball" desc = "A great meal all round." icon_state = "meatball" filling_color = "#DB0000" - New() - ..() - reagents.add_reagent("protein", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 3) /obj/item/weapon/reagent_containers/food/snacks/sausage name = "Sausage" desc = "A piece of mixed, long meat." icon_state = "sausage" filling_color = "#DB0000" - - New() - ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("porktonium", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 6, "porktonium" = 10) /obj/item/weapon/reagent_containers/food/snacks/donkpocket name = "Donk-pocket" desc = "The food of choice for the seasoned traitor." icon_state = "donkpocket" filling_color = "#DEDEAB" - - New() - ..() - reagents.add_reagent("nutriment", 4) + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket name = "Warm Donk-pocket" desc = "The food of choice for the seasoned traitor." icon_state = "donkpocket" filling_color = "#DEDEAB" + list_reagents = list("nutriment" = 4) - New() - ..() - reagents.add_reagent("nutriment", 4) - - Post_Consume(mob/living/M) - M.reagents.add_reagent("omnizine", 15) +/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket/Post_Consume(mob/living/M) + M.reagents.add_reagent("omnizine", 15) /obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak name = "Lightly Warm Donk-pocket" desc = "The food of choice for the seasoned traitor. This one is lukewarm." icon_state = "donkpocket" filling_color = "#DEDEAB" - -/obj/item/weapon/reagent_containers/food/snacks/warmdonkpocket_weak/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("weak_omnizine", 3) + list_reagents = list("nutriment" = 4, "weak_omnizine" = 3) /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket name = "Donk-pocket" @@ -796,42 +624,31 @@ icon_state = "donkpocket" filling_color = "#DEDEAB" bitesize = 100 //nom the whole thing at once. + list_reagents = list("nutriment" = 1) - New() - ..() - reagents.add_reagent("nutriment", 1) - - Post_Consume(mob/living/M) - M.reagents.add_reagent("omnizine", 15) - M.reagents.add_reagent("teporone", 15) - M.reagents.add_reagent("synaptizine", 15) - M.reagents.add_reagent("salglu_solution", 15) - M.reagents.add_reagent("salbutamol", 15) - M.reagents.add_reagent("methamphetamine", 15) +/obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket/Post_Consume(mob/living/M) + M.reagents.add_reagent("omnizine", 15) + M.reagents.add_reagent("teporone", 15) + M.reagents.add_reagent("synaptizine", 15) + M.reagents.add_reagent("salglu_solution", 15) + M.reagents.add_reagent("salbutamol", 15) + M.reagents.add_reagent("methamphetamine", 15) /obj/item/weapon/reagent_containers/food/snacks/brainburger name = "brainburger" desc = "A strange looking burger. It looks almost sentient." icon_state = "brainburger" filling_color = "#F2B6EA" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("prions", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "prions" = 10) /obj/item/weapon/reagent_containers/food/snacks/ghostburger name = "Ghost Burger" desc = "Spooky! It doesn't look very filling." icon_state = "ghostburger" filling_color = "#FFF2FF" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 - + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/human var/hname = "" @@ -842,52 +659,38 @@ name = "-burger" desc = "A bloody burger." icon_state = "hburger" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/cheeseburger name = "cheeseburger" desc = "The cheese adds a good flavor." icon_state = "cheeseburger" - New() - ..() - reagents.add_reagent("nutriment", 2) + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/monkeyburger name = "burger" desc = "The cornerstone of every nutritious breakfast." icon_state = "hburger" filling_color = "#D63C3C" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/tofuburger name = "Tofu Burger" desc = "What.. is that meat?" icon_state = "tofuburger" filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/roburger name = "roburger" desc = "The lettuce is the only organic component. Beep." icon_state = "roburger" filling_color = "#CCCCCC" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("nanomachines", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "nanomachines" = 10) /obj/item/weapon/reagent_containers/food/snacks/roburgerbig name = "roburger" @@ -895,49 +698,32 @@ icon_state = "roburger" filling_color = "#CCCCCC" volume = 100 - - New() - ..() - reagents.add_reagent("nanomachines", 100) - bitesize = 0.1 + bitesize = 0.1 + list_reagents = list("nanomachines" = 100) /obj/item/weapon/reagent_containers/food/snacks/xenoburger name = "xenoburger" desc = "Smells caustic. Tastes like heresy." icon_state = "xburger" filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/clownburger name = "Clown Burger" desc = "This tastes funny..." icon_state = "clownburger" filling_color = "#FF00FF" - - New() - ..() -/* - var/datum/disease/F = new /datum/disease/pierrot_throat(0) - var/list/data = list("viruses"= list(F)) - reagents.add_reagent("blood", 4, data) -*/ - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/mimeburger name = "Mime Burger" desc = "Its taste defies language." icon_state = "mimeburger" filling_color = "#FFFFFF" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/omelette name = "Omelette Du Fromage" @@ -945,23 +731,15 @@ icon_state = "omelette" trash = /obj/item/trash/plate filling_color = "#FFF9A8" - - //var/herp = 0 - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 1 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/muffin name = "Muffin" desc = "A delicious and spongy little cake" icon_state = "muffin" filling_color = "#E0CF9B" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/pie name = "Banana Cream Pie" @@ -969,17 +747,13 @@ icon_state = "pie" trash = /obj/item/trash/plate filling_color = "#FBFFB8" - -/obj/item/weapon/reagent_containers/food/snacks/pie/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("banana",5) bitesize = 3 + list_reagents = list("nutriment" = 4, "banana" = 5) /obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom) ..() - new/obj/effect/decal/cleanable/pie_smudge(src.loc) - src.visible_message("\red [src.name] splats.","\red You hear a splat.") + new/obj/effect/decal/cleanable/pie_smudge(loc) + visible_message("[src] splats.","You hear a splat.") qdel(src) /obj/item/weapon/reagent_containers/food/snacks/berryclafoutis @@ -987,11 +761,8 @@ desc = "No black birds, this is a good sign." icon_state = "berryclafoutis" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("berryjuice", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "berryjuice" = 5) /obj/item/weapon/reagent_containers/food/snacks/waffles name = "waffles" @@ -999,11 +770,8 @@ icon_state = "waffles" trash = /obj/item/trash/waffles filling_color = "#E6DEB5" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/eggplantparm name = "Eggplant Parmigiana" @@ -1011,11 +779,8 @@ icon_state = "eggplantparm" trash = /obj/item/trash/plate filling_color = "#4D2F5E" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/soylentgreen name = "Soylent Green" @@ -1023,11 +788,8 @@ icon_state = "soylent_green" trash = /obj/item/trash/waffles filling_color = "#B8E6B5" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/soylenviridians name = "Soylen Virdians" @@ -1035,12 +797,8 @@ icon_state = "soylent_yellow" trash = /obj/item/trash/waffles filling_color = "#E6FA61" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 - + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/meatpie name = "Meat-pie" @@ -1048,11 +806,8 @@ desc = "An old barber recipe, very delicious!" trash = /obj/item/trash/plate filling_color = "#948051" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/tofupie name = "Tofu-pie" @@ -1060,42 +815,31 @@ desc = "A delicious tofu pie." trash = /obj/item/trash/plate filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/amanita_pie name = "amanita pie" desc = "Sweet and tasty poison pie." icon_state = "amanita_pie" filling_color = "#FFCCCC" - - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("amanitin", 3) - reagents.add_reagent("psilocybin", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 5, "amanitin" = 3, "psilocybin" = 1) /obj/item/weapon/reagent_containers/food/snacks/plump_pie name = "plump pie" desc = "I bet you love stuff made out of plump helmets!" icon_state = "plump_pie" filling_color = "#B8279B" + bitesize = 2 + list_reagents = list("nutriment" = 8) - New() - ..() - if(prob(10)) - name = "exceptional plump pie" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 5) - bitesize = 2 - else - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/plump_pie/New() + ..() + if(prob(10)) + name = "exceptional plump pie" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" // What + reagents.add_reagent("omnizine", 5) /obj/item/weapon/reagent_containers/food/snacks/xemeatpie name = "Xeno-pie" @@ -1103,11 +847,8 @@ desc = "A delicious meatpie. Probably heretical." trash = /obj/item/trash/plate filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/wingfangchu name = "Wing Fang Chu" @@ -1115,12 +856,8 @@ icon_state = "wingfangchu" trash = /obj/item/trash/snack_bowl filling_color = "#43DE18" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 - + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/human/kabob name = "-kabob" @@ -1128,11 +865,8 @@ desc = "A human meat, on a stick." trash = /obj/item/stack/rods filling_color = "#A85340" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/monkeykabob name = "Meat-kabob" @@ -1140,11 +874,8 @@ desc = "Delicious meat, on a stick." trash = /obj/item/stack/rods filling_color = "#A85340" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/tofukabob name = "Tofu-kabob" @@ -1152,11 +883,8 @@ desc = "Vegan meat, on a stick." trash = /obj/item/stack/rods filling_color = "#FFFEE0" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/popcorn name = "Popcorn" @@ -1165,18 +893,18 @@ trash = /obj/item/trash/popcorn var/unpopped = 0 filling_color = "#FFFAD4" + bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 + list_reagents = list("nutriment" = 2) - New() - ..() - unpopped = rand(1,10) - reagents.add_reagent("nutriment", 2) - bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 - On_Consume(mob/M, mob/user) - if(prob(unpopped)) //lol ...what's the point? - to_chat(user, "\red You bite down on an un-popped kernel!") - unpopped = max(0, unpopped-1) - ..() +/obj/item/weapon/reagent_containers/food/snacks/popcorn/New() + ..() + unpopped = rand(1,10) +/obj/item/weapon/reagent_containers/food/snacks/popcorn/On_Consume(mob/M, mob/user) + if(prob(unpopped)) //lol ...what's the point? + to_chat(user, "You bite down on an un-popped kernel!") + unpopped = max(0, unpopped-1) + ..() /obj/item/weapon/reagent_containers/food/snacks/sosjerky name = "Scaredy's Private Reserve Beef Jerky" @@ -1184,11 +912,8 @@ desc = "Beef jerky made from the finest space cows." trash = /obj/item/trash/sosjerky filling_color = "#631212" - - New() - ..() - reagents.add_reagent("protein", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 4) /obj/item/weapon/reagent_containers/food/snacks/pistachios name = "Pistachios" @@ -1196,11 +921,7 @@ desc = "A snack of deliciously salted pistachios. A perfectly valid choice..." trash = /obj/item/trash/pistachios filling_color = "#BAD145" - - New() - ..() - reagents.add_reagent("plantmatter", 6) - reagents.add_reagent("sodiumchloride", 1) + list_reagents = list("plantmatter" = 6, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/no_raisin name = "4no Raisins" @@ -1208,21 +929,15 @@ desc = "Best raisins in the universe. Not sure why." trash = /obj/item/trash/raisins filling_color = "#343834" - - New() - ..() - reagents.add_reagent("plantmatter", 6) + list_reagents = list("plantmatter" = 6) /obj/item/weapon/reagent_containers/food/snacks/spacetwinkie name = "Space Twinkie" icon_state = "space_twinkie" desc = "Guaranteed to survive longer then you will." filling_color = "#FFE591" - - New() - ..() - reagents.add_reagent("sugar", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("sugar" = 4) /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers name = "Cheesie Honkers" @@ -1230,79 +945,53 @@ desc = "Bite sized cheesie snacks that will honk all over your mouth" trash = /obj/item/trash/cheesie filling_color = "#FFA305" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("fake_cheese", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4, "fake_cheese" = 2) /obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein name = "chow mein" desc = "What is in this anyways?" icon_state = "chinese1" - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("beans", 3) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "beans" = 3, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/chinese/tao name = "Admiral Yamamoto carp" desc = "Tastes like chicken." icon_state = "chinese2" - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("protein", 2) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4, "protein" = 2, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles name = "chinese newdles" desc = "Made fresh, weekly!" icon_state = "chinese3" - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/chinese/rice name = "fried rice" desc = "A timeless classic." icon_state = "chinese4" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("rice", 3) - reagents.add_reagent("msg",4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 3, "rice" = 3, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/syndicake name = "Syndi-Cakes" icon_state = "syndi_cakes" desc = "An extremely moist snack cake that tastes just as good after being nuked." filling_color = "#FF5D05" - trash = /obj/item/trash/syndi_cakes - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("salglu_solution", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "salglu_solution" = 5) /obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato name = "Loaded Baked Potato" desc = "Totally baked." icon_state = "loadedbakedpotato" filling_color = "#9C7A68" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/fries name = "Space Fries" @@ -1310,11 +999,8 @@ icon_state = "fries" trash = /obj/item/trash/plate filling_color = "#EDDD00" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/soydope name = "Soy Dope" @@ -1322,22 +1008,15 @@ icon_state = "soydope" trash = /obj/item/trash/plate filling_color = "#C4BF76" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/spagetti name = "Spagetti" desc = "A bundle of raw spaghetti." icon_state = "spagetti" filling_color = "#EDDD00" - - New() - ..() - reagents.add_reagent("nutriment", 1) - bitesize = 1 + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/cheesyfries name = "Cheesy Fries" @@ -1345,38 +1024,30 @@ icon_state = "cheesyfries" trash = /obj/item/trash/plate filling_color = "#EDDD00" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/fortunecookie name = "Fortune cookie" desc = "A true prophecy in each cookie!" icon_state = "fortune_cookie" filling_color = "#E8E79E" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/badrecipe name = "Burned mess" desc = "Someone should be demoted from chef for this." icon_state = "badrecipe" filling_color = "#211F02" + bitesize = 2 + list_reagents = list("????" = 5, "carbon" = 3) - New() - ..() - reagents.add_reagent("????", 5) - reagents.add_reagent("carbon", 3) - bitesize = 2 - - // it's burned! it should start off being classed as any cooktype that burns - cooktype["grilled"] = 1 - cooktype["deep fried"] = 1 +/obj/item/weapon/reagent_containers/food/snacks/badrecipe/New() + ..() + // it's burned! it should start off being classed as any cooktype that burns + cooktype["grilled"] = 1 + cooktype["deep fried"] = 1 /obj/item/weapon/reagent_containers/food/snacks/meatsteak name = "Meat steak" @@ -1384,13 +1055,8 @@ icon_state = "meatstake" trash = /obj/item/trash/plate filling_color = "#7A3D11" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4, "sodiumchloride" = 1, "blackpepper" = 1) /obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff name = "Spacy Liberty Duff" @@ -1398,12 +1064,8 @@ icon_state = "spacylibertyduff" trash = /obj/item/trash/snack_bowl filling_color = "#42B873" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("psilocybin", 6) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "psilocybin" = 6) /obj/item/weapon/reagent_containers/food/snacks/amanitajelly name = "Amanita Jelly" @@ -1411,13 +1073,8 @@ icon_state = "amanitajelly" trash = /obj/item/trash/snack_bowl filling_color = "#ED0758" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("amanitin", 6) - reagents.add_reagent("psilocybin", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "amanitin" = 6, "psilocybin" = 3) /obj/item/weapon/reagent_containers/food/snacks/poppypretzel name = "Poppy pretzel" @@ -1425,12 +1082,7 @@ icon_state = "poppypretzel" bitesize = 2 filling_color = "#916E36" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 - + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/meatballsoup name = "Meatball soup" @@ -1438,50 +1090,32 @@ icon_state = "meatballsoup" trash = /obj/item/trash/snack_bowl filling_color = "#785210" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 8, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/slimesoup name = "slime soup" desc = "If no water is available, you may substitute tears." icon_state = "slimesoup" filling_color = "#C4DBA0" - - New() - ..() - reagents.add_reagent("slimejelly", 5) - reagents.add_reagent("water", 10) - bitesize = 5 + bitesize = 5 + list_reagents = list("slimejelly" = 5, "water" = 10) /obj/item/weapon/reagent_containers/food/snacks/bloodsoup name = "Tomato soup" desc = "Smells like copper" icon_state = "tomatosoup" filling_color = "#FF0000" - - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("blood", 10) - reagents.add_reagent("water", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 2, "blood" = 10, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/clownstears name = "Clown's Tears" desc = "Not very funny." icon_state = "clownstears" filling_color = "#C4FBFF" - - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("banana", 5) - reagents.add_reagent("water", 10) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 4, "banana" = 5, "water" = 10) /obj/item/weapon/reagent_containers/food/snacks/vegetablesoup name = "Vegetable soup" @@ -1489,12 +1123,8 @@ icon_state = "vegetablesoup" trash = /obj/item/trash/snack_bowl filling_color = "#AFC4B5" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 8, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/nettlesoup name = "Nettle soup" @@ -1502,13 +1132,8 @@ icon_state = "nettlesoup" trash = /obj/item/trash/snack_bowl filling_color = "#AFC4B5" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - reagents.add_reagent("omnizine", 5) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 8, "water" = 5, "omnizine" = 5) /obj/item/weapon/reagent_containers/food/snacks/mysterysoup name = "Mystery soup" @@ -1516,46 +1141,46 @@ icon_state = "mysterysoup" trash = /obj/item/trash/snack_bowl filling_color = "#F082FF" + bitesize = 5 - New() - ..() - var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(mysteryselect) - if(1) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - if(2) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - if(3) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 5) - reagents.add_reagent("omnizine", 5) - if(4) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 10) - if(5) - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("banana", 10) - if(6) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blood", 10) - if(7) - reagents.add_reagent("slimejelly", 10) - reagents.add_reagent("water", 10) - if(8) - reagents.add_reagent("carbon", 10) - reagents.add_reagent("toxin", 10) - if(9) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - if(10) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("oculine", 5) - bitesize = 5 +/obj/item/weapon/reagent_containers/food/snacks/mysterysoup/New() + ..() + var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(mysteryselect) + if(1) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + if(2) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + if(3) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 5) + reagents.add_reagent("omnizine", 5) + if(4) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 10) + if(5) + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("banana", 10) + if(6) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blood", 10) + if(7) + reagents.add_reagent("slimejelly", 10) + reagents.add_reagent("water", 10) + if(8) + reagents.add_reagent("carbon", 10) + reagents.add_reagent("toxin", 10) + if(9) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + if(10) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("oculine", 5) /obj/item/weapon/reagent_containers/food/snacks/wishsoup name = "Wish Soup" @@ -1563,14 +1188,14 @@ icon_state = "wishsoup" trash = /obj/item/trash/snack_bowl filling_color = "#D1F4FF" + bitesize = 5 + list_reagents = list("water" = 10) - New() - ..() - reagents.add_reagent("water", 10) - bitesize = 5 - if(prob(25)) - src.desc = "A wish come true!" - reagents.add_reagent("nutriment", 8) +/obj/item/weapon/reagent_containers/food/snacks/wishsoup/New() + ..() + if(prob(25)) + desc = "A wish come true!" // hue + reagents.add_reagent("nutriment", 8) /obj/item/weapon/reagent_containers/food/snacks/hotchili name = "Hot Chili" @@ -1578,50 +1203,31 @@ icon_state = "hotchili" trash = /obj/item/trash/snack_bowl filling_color = "#FF3C00" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 - + bitesize = 5 + list_reagents = list("nutriment" = 6, "capsaicin" = 3, "tomatojuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/coldchili name = "Cold Chili" desc = "This slush is barely a liquid!" icon_state = "coldchili" filling_color = "#2B00FF" - trash = /obj/item/trash/snack_bowl - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 + bitesize = 5 + list_reagents = list("nutriment" = 6, "frostoil" = 3, "tomatojuice" = 2) /obj/item/weapon/reagent_containers/food/snacks/raw_bacon name = "raw bacon" desc = "It's fleshy and pink!" icon_state = "raw_bacon" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("porktonium", 10) + list_reagents = list("nutriment" = 1, "porktonium" = 10) /obj/item/weapon/reagent_containers/food/snacks/bacon name = "bacon" desc = "It looks juicy and tastes amazing!" icon_state = "bacon2" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("porktonium", 10) - reagents.add_reagent("msg", 4) - + list_reagents = list("nutriment" = 4, "porktonium" = 10, "msg" = 4) /obj/item/weapon/reagent_containers/food/snacks/telebacon name = "Tele Bacon" @@ -1629,15 +1235,16 @@ icon_state = "bacon" var/obj/item/device/radio/beacon/bacon/baconbeacon bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("porktonium", 10) - baconbeacon = new /obj/item/device/radio/beacon/bacon(src) - On_Consume(mob/M, mob/user) - if(!reagents.total_volume) - baconbeacon.loc = user - baconbeacon.digest_delay() + list_reagents = list("nutriment" = 4, "porktonium" = 10) + +/obj/item/weapon/reagent_containers/food/snacks/telebacon/New() + ..() + baconbeacon = new /obj/item/device/radio/beacon/bacon(src) + +/obj/item/weapon/reagent_containers/food/snacks/telebacon/On_Consume(mob/M, mob/user) + if(!reagents.total_volume) + baconbeacon.loc = user + baconbeacon.digest_delay() /obj/item/weapon/reagent_containers/food/snacks/monkeycube @@ -1647,13 +1254,11 @@ bitesize = 12 filling_color = "#ADAC7F" var/monkey_type = "Monkey" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/New() - ..() - reagents.add_reagent("protein",10) + list_reagents = list("protein" = 10) /obj/item/weapon/reagent_containers/food/snacks/monkeycube/afterattack(obj/O, mob/user, proximity) - if(!proximity) return + if(!proximity) + return if(istype(O,/obj/structure/sink) && !wrapped) to_chat(user, "You place [src] under a stream of water...") user.drop_item() @@ -1737,22 +1342,16 @@ desc = "This is absolutely Ei Nath." icon_state = "spellburger" filling_color = "#D505FF" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/bigbiteburger name = "Big Bite Burger" desc = "Forget the Big Mac. THIS is the future!" icon_state = "bigbiteburger" filling_color = "#E3D681" - - New() - ..() - reagents.add_reagent("nutriment", 14) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 14) /obj/item/weapon/reagent_containers/food/snacks/enchiladas name = "Enchiladas" @@ -1760,12 +1359,8 @@ icon_state = "enchiladas" trash = /obj/item/trash/tray filling_color = "#A36A1F" - - New() - ..() - reagents.add_reagent("nutriment",8) - reagents.add_reagent("capsaicin", 6) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 8, "capsaicin" = 6) /obj/item/weapon/reagent_containers/food/snacks/burrito name = "Burrito" @@ -1773,10 +1368,7 @@ icon_state = "burrito" trash = /obj/item/trash/plate filling_color = "#A36A1F" - -/obj/item/weapon/reagent_containers/food/snacks/burrito/New() - ..() - reagents.add_reagent("nutriment", 5) + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/chimichanga name = "Chimichanga" @@ -1784,11 +1376,7 @@ icon_state = "chimichanga" trash = /obj/item/trash/plate filling_color = "#A36A1F" - -/obj/item/weapon/reagent_containers/food/snacks/chimichanga/New() - ..() - reagents.add_reagent("omnizine", 4) //Deadpool reference. Deal with it. - reagents.add_reagent("cheese", 2) + list_reagents = list("omnizine" = 4, "cheese" = 2) //Deadpool reference. Deal with it. /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight name = "monkey's Delight" @@ -1796,27 +1384,16 @@ icon_state = "monkeysdelight" trash = /obj/item/trash/tray filling_color = "#5C3C11" - - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("banana", 5) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 6 + bitesize = 6 + list_reagents = list("nutriment" = 10, "banana" = 5, "blackpepper" = 1, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/baguette name = "Baguette" desc = "Bon appetit!" icon_state = "baguette" filling_color = "#E3D796" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 6, "blackpepper" = 1, "sodiumchloride" = 1) /obj/item/weapon/reagent_containers/food/snacks/sandwich name = "Sandwich" @@ -1824,11 +1401,8 @@ icon_state = "sandwich" trash = /obj/item/trash/plate filling_color = "#D9BE29" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/toastedsandwich name = "Toasted Sandwich" @@ -1836,12 +1410,8 @@ icon_state = "toastedsandwich" trash = /obj/item/trash/plate filling_color = "#D9BE29" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("carbon", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6, "carbon" = 2) /obj/item/weapon/reagent_containers/food/snacks/grilledcheese name = "Grilled Cheese Sandwich" @@ -1849,11 +1419,8 @@ icon_state = "toastedsandwich" trash = /obj/item/trash/plate filling_color = "#D9BE29" - - New() - ..() - reagents.add_reagent("nutriment", 7) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 7) //why make a regualr sandwhich when you can make grilled cheese, with this nutriment value? /obj/item/weapon/reagent_containers/food/snacks/tomatosoup name = "Tomato Soup" @@ -1861,12 +1428,8 @@ icon_state = "tomatosoup" trash = /obj/item/trash/snack_bowl filling_color = "#D92929" - - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 5, "tomatojuice" = 10) /obj/item/weapon/reagent_containers/food/snacks/rofflewaffles name = "Roffle Waffles" @@ -1874,26 +1437,16 @@ icon_state = "rofflewaffles" trash = /obj/item/trash/waffles filling_color = "#FF00F7" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("psilocybin", 8) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 8, "psilocybin" = 8) /obj/item/weapon/reagent_containers/food/snacks/stew name = "Stew" desc = "A nice and warm stew. Healthy and strong." icon_state = "stew" filling_color = "#9E673A" - - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("oculine", 5) - reagents.add_reagent("water", 5) - bitesize = 10 + bitesize = 10 + list_reagents = list("nutriment" = 10, "tomatojuice" = 5, "oculine" = 5, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast name = "Jellied Toast" @@ -1901,63 +1454,44 @@ icon_state = "jellytoast" trash = /obj/item/trash/plate filling_color = "#B572AB" - - New() - ..() - reagents.add_reagent("nutriment", 1) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) + list_reagents = list("nutriment" = 1, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) + list_reagents = list("nutriment" = 1, "slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger name = "Jelly Burger" desc = "Culinary delight..?" icon_state = "jellyburger" filling_color = "#B572AB" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) + list_reagents = list("nutriment" = 5, "slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) + list_reagents = list("nutriment" = 5, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/milosoup name = "Milosoup" desc = "The universes best soup! Yum!!!" icon_state = "milosoup" trash = /obj/item/trash/snack_bowl - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("water", 5) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 8, "water" = 5) /obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat name = "Stewed Soy Meat" desc = "Even non-vegetarians will LOVE this!" icon_state = "stewedsoymeat" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/boiledspagetti name = "Boiled Spagetti" @@ -1965,11 +1499,8 @@ icon_state = "spagettiboiled" trash = /obj/item/trash/plate filling_color = "#FCEE81" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/boiledrice name = "Boiled Rice" @@ -1977,11 +1508,8 @@ icon_state = "boiledrice" trash = /obj/item/trash/snack_bowl filling_color = "#FFFBDB" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/ricepudding name = "Rice Pudding" @@ -1989,11 +1517,8 @@ icon_state = "rpudding" trash = /obj/item/trash/snack_bowl filling_color = "#FFFBDB" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/pastatomato name = "Spagetti" @@ -2001,12 +1526,8 @@ icon_state = "pastatomato" trash = /obj/item/trash/plate filling_color = "#DE4545" - - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 10) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 6, "tomatojuice" = 10) /obj/item/weapon/reagent_containers/food/snacks/meatballspagetti name = "Spagetti & Meatballs" @@ -2014,35 +1535,24 @@ icon_state = "meatballspagetti" trash = /obj/item/trash/plate filling_color = "#DE4545" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("synaptizine", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8, "synaptizine" = 5) /obj/item/weapon/reagent_containers/food/snacks/spesslaw name = "Spesslaw" desc = "A lawyers favourite" icon_state = "spesslaw" filling_color = "#DE4545" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("synaptizine", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 8, "synaptizine" = 10) /obj/item/weapon/reagent_containers/food/snacks/poppypretzel name = "Poppy Pretzel" desc = "A large soft pretzel full of POP!" icon_state = "poppypretzel" filling_color = "#AB7D2E" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/carrotfries name = "Carrot Fries" @@ -2050,68 +1560,48 @@ icon_state = "carrotfries" trash = /obj/item/trash/plate filling_color = "#FAA005" - - New() - ..() - reagents.add_reagent("plantmatter", 3) - reagents.add_reagent("oculine", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 3, "oculine" = 3) /obj/item/weapon/reagent_containers/food/snacks/superbiteburger name = "Super Bite Burger" desc = "This is a mountain of a burger. FOOD!" icon_state = "superbiteburger" filling_color = "#CCA26A" - - New() - ..() - reagents.add_reagent("nutriment", 50) - bitesize = 10 + bitesize = 10 + list_reagents = list("nutriment" = 50) /obj/item/weapon/reagent_containers/food/snacks/candiedapple name = "Candied Apple" desc = "An apple coated in sugary sweetness." icon_state = "candiedapple" filling_color = "#F21873" - - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3) // A candy apple without sugar... /obj/item/weapon/reagent_containers/food/snacks/applepie name = "Apple Pie" desc = "A pie containing sweet sweet love... or apple." icon_state = "applepie" filling_color = "#E0EDC5" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 - + bitesize = 3 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/cherrypie name = "Cherry Pie" desc = "Taste so good, make a grown man cry." icon_state = "cherrypie" filling_color = "#FF525A" - - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/twobread name = "Two Bread" desc = "It is very bitter and winy." icon_state = "twobread" filling_color = "#DBCC9A" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/jellysandwich name = "Jelly Sandwich" @@ -2119,41 +1609,28 @@ icon_state = "jellysandwich" trash = /obj/item/trash/plate filling_color = "#9E3A78" - - New() - ..() - reagents.add_reagent("nutriment", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 2) /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime - New() - ..() - reagents.add_reagent("slimejelly", 5) + list_reagents = list("nutriment" = 2, "slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry - New() - ..() - reagents.add_reagent("cherryjelly", 5) + list_reagents = list("nutriment" = 2, "cherryjelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/boiledslimecore name = "Boiled Slime Core" desc = "A boiled red thing." icon_state = "boiledrorocore" - New() - ..() - reagents.add_reagent("slimejelly", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("slimejelly" = 5) /obj/item/weapon/reagent_containers/food/snacks/mint name = "mint" desc = "it is only wafer thin." icon_state = "mint" filling_color = "#F2F2F2" - - New() - ..() - reagents.add_reagent("minttoxin", 1) - bitesize = 1 + list_reagents = list("minttoxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/mushroomsoup name = "chantrelle soup" @@ -2161,29 +1638,24 @@ icon_state = "mushroomsoup" trash = /obj/item/trash/snack_bowl filling_color = "#E386BF" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit name = "plump helmet biscuit" desc = "This is a finely-prepared plump helmet biscuit. The ingredients are exceptionally minced plump helmet, and well-minced dwarven wheat flour." icon_state = "phelmbiscuit" filling_color = "#CFB4C4" + bitesize = 2 + list_reagents = list("nutriment" = 5) - New() - ..() - if(prob(10)) - name = "exceptional plump helmet biscuit" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 5) - bitesize = 2 - else - reagents.add_reagent("nutriment", 5) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit/New() + ..() + if(prob(10)) + name = "exceptional plump helmet biscuit" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" // Is this a reference? + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("omnizine", 5) /obj/item/weapon/reagent_containers/food/snacks/chawanmushi name = "chawanmushi" @@ -2191,11 +1663,7 @@ icon_state = "chawanmushi" trash = /obj/item/trash/snack_bowl filling_color = "#F0F2E4" - - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 1 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/beetsoup name = "beet soup" @@ -2203,24 +1671,24 @@ icon_state = "beetsoup" trash = /obj/item/trash/snack_bowl filling_color = "#FAC9FF" + bitesize = 2 + list_reagents = list("nutriment" = 8) - New() - ..() - switch(rand(1,6)) - if(1) - name = "borsch" - if(2) - name = "bortsch" - if(3) - name = "borstch" - if(4) - name = "borsh" - if(5) - name = "borshch" - if(6) - name = "borscht" - reagents.add_reagent("nutriment", 8) - bitesize = 2 +/obj/item/weapon/reagent_containers/food/snacks/beetsoup/New() + ..() + switch(rand(1,6)) + if(1) + name = "borsch" + if(2) + name = "bortsch" + if(3) + name = "borstch" + if(4) + name = "borsh" + if(5) + name = "borshch" + if(6) + name = "borscht" /obj/item/weapon/reagent_containers/food/snacks/herbsalad name = "herb salad" @@ -2228,11 +1696,8 @@ icon_state = "herbsalad" trash = /obj/item/trash/snack_bowl filling_color = "#76B87F" - - New() - ..() - reagents.add_reagent("nutriment", 8) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8) /obj/item/weapon/reagent_containers/food/snacks/validsalad name = "valid salad" @@ -2240,12 +1705,8 @@ icon_state = "validsalad" trash = /obj/item/trash/snack_bowl filling_color = "#76B87F" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("omnizine", 5) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8, "omnizine" = 5) /obj/item/weapon/reagent_containers/food/snacks/appletart name = "golden apple streusel tart" @@ -2253,33 +1714,24 @@ icon_state = "gappletart" trash = /obj/item/trash/plate filling_color = "#FFFF00" - - New() - ..() - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("gold", 5) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 8, "gold" = 5) /obj/item/weapon/reagent_containers/food/snacks/dough_ball name = "ball of raw dough" desc = "A ball of raw dough, ready to be molded into new recipes." icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "dough" - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype(W,/obj/item/weapon/kitchen/rollingpin)) - user.visible_message( \ - "[user] flattens the dough with the rolling pin!", \ - "\blue You flatten the dough with your rolling pin!" \ - ) - new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(src.loc) - qdel(src) + list_reagents = list("nutriment" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/dough_ball/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W,/obj/item/weapon/kitchen/rollingpin)) + user.visible_message( \ + "[user] flattens the dough with the rolling pin!", \ + "You flatten the dough with your rolling pin!" \ + ) + new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(loc) + qdel(src) /////////////////////////////////////////////////Sliceable//////////////////////////////////////// // All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels @@ -2293,10 +1745,7 @@ icon_state = "flatdough" slice_path = /obj/item/weapon/reagent_containers/food/snacks/doughslice slices_num = 3 - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/doughslice name = "slice of dough" @@ -2312,11 +1761,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice slices_num = 5 filling_color = "#FF7575" - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 20, "nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/meatbreadslice name = "meatbread slice" @@ -2333,11 +1779,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice slices_num = 5 filling_color = "#8AFF75" - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 20, "nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/xenomeatbreadslice name = "xenomeatbread slice" @@ -2353,12 +1796,8 @@ icon_state = "spidermeatbread" slice_path = /obj/item/weapon/reagent_containers/food/snacks/spidermeatbreadslice slices_num = 5 - New() - ..() - reagents.add_reagent("protein", 20) - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("toxin", 15) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 20, "nutriment" = 10, "toxin" = 15) /obj/item/weapon/reagent_containers/food/snacks/spidermeatbreadslice name = "spider meat bread slice" @@ -2366,9 +1805,7 @@ icon_state = "xenobreadslice" trash = /obj/item/trash/plate bitesize = 2 - New() - ..() - reagents.add_reagent("toxin", 2) + list_reagents = list("toxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread name = "Banana-nut bread" @@ -2377,11 +1814,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice slices_num = 5 filling_color = "#EDE5AD" - New() - ..() - reagents.add_reagent("banana", 20) - reagents.add_reagent("nutriment", 20) - bitesize = 2 + bitesize = 2 + list_reagents = list("banana" = 20, "nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/bananabreadslice name = "Banana-nut bread slice" @@ -2398,10 +1832,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice slices_num = 5 filling_color = "#F7FFE0" - New() - ..() - reagents.add_reagent("nutriment", 30) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 30) /obj/item/weapon/reagent_containers/food/snacks/tofubreadslice name = "Tofubread slice" @@ -2411,7 +1843,6 @@ filling_color = "#F7FFE0" bitesize = 2 - /obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake name = "Carrot Cake" desc = "A favorite desert of a certain wascally wabbit. Not a lie." @@ -2419,11 +1850,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice slices_num = 5 filling_color = "#FFD675" - New() - ..() - reagents.add_reagent("nutriment", 25) - reagents.add_reagent("oculine", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 25, "oculine" = 10) /obj/item/weapon/reagent_containers/food/snacks/carrotcakeslice name = "Carrot Cake slice" @@ -2440,12 +1868,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/braincakeslice slices_num = 5 filling_color = "#E6AEDB" - New() - ..() - reagents.add_reagent("protein", 15) - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("mannitol", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 15, "nutriment" = 10, "mannitol" = 10) /obj/item/weapon/reagent_containers/food/snacks/braincakeslice name = "Brain Cake slice" @@ -2462,10 +1886,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice slices_num = 5 filling_color = "#FAF7AF" - New() - ..() - reagents.add_reagent("nutriment", 25) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 25) /obj/item/weapon/reagent_containers/food/snacks/cheesecakeslice name = "Cheese Cake slice" @@ -2482,9 +1904,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice slices_num = 5 filling_color = "#F7EDD5" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/plaincakeslice name = "Vanilla Cake slice" @@ -2501,9 +1921,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice slices_num = 5 filling_color = "#FADA8E" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/orangecakeslice name = "Orange Cake slice" @@ -2520,9 +1938,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/limecakeslice slices_num = 5 filling_color = "#CBFA8E" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/limecakeslice name = "Lime Cake slice" @@ -2539,9 +1955,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice slices_num = 5 filling_color = "#FAFA8E" - New() - ..() - reagents.add_reagent("nutriment", 20) + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/lemoncakeslice name = "Lemon Cake slice" @@ -2558,10 +1972,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice slices_num = 5 filling_color = "#805930" - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("chocolate",20) + list_reagents = list("nutriment" = 20, "chocolate" = 20) /obj/item/weapon/reagent_containers/food/snacks/chocolatecakeslice name = "Chocolate Cake slice" @@ -2578,11 +1989,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesewedge slices_num = 5 filling_color = "#FFF700" - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("cheese", 20) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 20, "cheese" = 20) /obj/item/weapon/reagent_containers/food/snacks/cheesewedge name = "Cheese wedge" @@ -2597,12 +2005,7 @@ icon_state = "weirdcheesewedge" filling_color = "#00FF33" bitesize = 2 - New() - ..() - reagents.add_reagent("mercury", 5) - reagents.add_reagent("lsd", 5) - reagents.add_reagent("ethanol", 5) - reagents.add_reagent("weird_cheese", 5) + list_reagents = list("mercury" = 5, "lsd" = 5, "ethanol" = 5, "weird_cheese" = 5) /obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake name = "Birthday Cake" @@ -2611,11 +2014,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice slices_num = 5 filling_color = "#FFD6D6" - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("sprinkles", 10) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 20, "sprinkles" = 10) /obj/item/weapon/reagent_containers/food/snacks/birthdaycakeslice name = "Birthday Cake slice" @@ -2632,14 +2032,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/breadslice slices_num = 6 filling_color = "#FFE396" - - New() - ..() - reagents.add_reagent("nutriment", 6) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/breadslice name = "Bread slice" @@ -2648,10 +2042,7 @@ trash = /obj/item/trash/plate filling_color = "#D27332" bitesize = 2 - - New() - ..() - reagents.add_reagent("bread", 5) + list_reagents = list("bread" = 5) /obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread name = "Cream Cheese Bread" @@ -2660,10 +2051,8 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice slices_num = 5 filling_color = "#FFF896" - New() - ..() - reagents.add_reagent("nutriment", 20) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 20) /obj/item/weapon/reagent_containers/food/snacks/creamcheesebreadslice name = "Cream Cheese Bread slice" @@ -2673,7 +2062,6 @@ filling_color = "#FFF896" bitesize = 2 - /obj/item/weapon/reagent_containers/food/snacks/watermelonslice name = "Watermelon Slice" desc = "A slice of watery goodness." @@ -2681,7 +2069,6 @@ filling_color = "#FF3867" bitesize = 2 - /obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake name = "Apple Cake" desc = "A cake centred with Apple" @@ -2689,9 +2076,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/applecakeslice slices_num = 5 filling_color = "#EBF5B8" - New() - ..() - reagents.add_reagent("nutriment", 15) + list_reagents = list("nutriment" = 15) /obj/item/weapon/reagent_containers/food/snacks/applecakeslice name = "Apple Cake slice" @@ -2708,10 +2093,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice slices_num = 5 filling_color = "#F5B951" - - New() - ..() - reagents.add_reagent("nutriment", 15) + list_reagents = list("nutriment" = 15) /obj/item/weapon/reagent_containers/food/snacks/pumpkinpieslice name = "Pumpkin Pie slice" @@ -2726,10 +2108,7 @@ desc = "It's a salted cracker." icon_state = "cracker" filling_color = "#F5DEB8" - - New() - ..() - reagents.add_reagent("nutriment", 1) + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/rawcutlet name = "raw cutlet" @@ -2737,17 +2116,16 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "rawcutlet" bitesize = 1 - New() - ..() - reagents.add_reagent("protein", 1) - attackby(obj/item/weapon/W, mob/user, params) - if(istype(W,/obj/item/weapon/kitchen/knife)) - user.visible_message( \ - "[user] cuts the raw cutlet with the knife!", \ - "You cut the raw cutlet with your knife!" \ - ) - new /obj/item/weapon/reagent_containers/food/snacks/raw_bacon(src.loc) - qdel(src) + list_reagents = list("protein" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W,/obj/item/weapon/kitchen/knife)) + user.visible_message( \ + "[user] cuts the raw cutlet with the knife!", \ + "You cut the raw cutlet with your knife!" \ + ) + new /obj/item/weapon/reagent_containers/food/snacks/raw_bacon(loc) + qdel(src) /////////////////////////////////////////////////PIZZA//////////////////////////////////////// @@ -2762,11 +2140,8 @@ icon_state = "pizzamargherita" slice_path = /obj/item/weapon/reagent_containers/food/snacks/margheritaslice slices_num = 6 - New() - ..() - reagents.add_reagent("nutriment", 40) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 40, "tomatojuice" = 6) /obj/item/weapon/reagent_containers/food/snacks/margheritaslice name = "Margherita slice" @@ -2781,12 +2156,8 @@ icon_state = "meatpizza" slice_path = /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice slices_num = 6 - New() - ..() - reagents.add_reagent("protein", 30) - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 30, "nutriment" = 20, "tomatojuice" = 6) /obj/item/weapon/reagent_containers/food/snacks/meatpizzaslice name = "Meatpizza slice" @@ -2801,11 +2172,8 @@ icon_state = "mushroompizza" slice_path = /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice slices_num = 6 - New() - ..() - reagents.add_reagent("plantmatter", 25) - reagents.add_reagent("nutriment", 10) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 25, "nutriment" = 10) /obj/item/weapon/reagent_containers/food/snacks/mushroompizzaslice name = "Mushroompizza slice" @@ -2820,13 +2188,8 @@ icon_state = "vegetablepizza" slice_path = /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice slices_num = 6 - New() - ..() - reagents.add_reagent("plantmatter", 20) - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("tomatojuice", 6) - reagents.add_reagent("oculine", 12) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 20, "nutriment" = 10, "tomatojuice" = 6, "oculine" = 12) /obj/item/weapon/reagent_containers/food/snacks/vegetablepizzaslice name = "Vegetable pizza slice" @@ -2898,18 +2261,16 @@ icon_state = "pizzabox[boxes.len+1]" -/obj/item/pizzabox/attack_hand( mob/user as mob ) - - if( open && pizza ) - user.put_in_hands( pizza ) - - to_chat(user, "\red You take the [src.pizza] out of the [src].") - src.pizza = null +/obj/item/pizzabox/attack_hand(mob/user) + if(open && pizza) + user.put_in_hands(pizza) + to_chat(user, "You take the [pizza] out of the [src].") + pizza = null update_icon() return - if( boxes.len > 0 ) - if( user.get_inactive_hand() != src ) + if(boxes.len > 0) + if(user.get_inactive_hand() != src) ..() return @@ -2917,15 +2278,14 @@ boxes -= box user.put_in_hands( box ) - to_chat(user, "\red You remove the topmost [src] from your hand.") + to_chat(user, "You remove the topmost [src] from your hand.") box.update_icon() update_icon() return ..() -/obj/item/pizzabox/attack_self( mob/user as mob ) - - if( boxes.len > 0 ) +/obj/item/pizzabox/attack_self(mob/user) + if(boxes.len > 0) return open = !open @@ -2935,11 +2295,11 @@ update_icon() -/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob , params) - if( istype(I, /obj/item/pizzabox/) ) +/obj/item/pizzabox/attackby( obj/item/I, mob/user, params) + if(istype(I, /obj/item/pizzabox/)) var/obj/item/pizzabox/box = I - if( !box.open && !src.open ) + if(!box.open && !open) // Make a list of all boxes to be added var/list/boxestoadd = list() boxestoadd += box @@ -2951,36 +2311,36 @@ box.loc = src box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit - src.boxes.Add( boxestoadd ) + boxes.Add( boxestoadd ) box.update_icon() update_icon() - to_chat(user, "\red You put the [box] ontop of the [src]!") + to_chat(user, "You put the [box] ontop of the [src]!") else - to_chat(user, "\red The stack is too high!") + to_chat(user, "The stack is too high!") else - to_chat(user, "\red Close the [box] first!") + to_chat(user, "Close the [box] first!") return - if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name + if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/)) // Long ass fucking object name - if( src.open ) + if(open) user.drop_item() I.loc = src - src.pizza = I + pizza = I update_icon() - to_chat(user, "\red You put the [I] in the [src]!") + to_chat(user, "You put the [I] in the [src]!") else - to_chat(user, "\red You try to push the [I] through the lid but it doesn't work!") + to_chat(user, "You try to push the [I] through the lid but it doesn't work!") return - if( istype(I, /obj/item/weapon/pen/) ) + if(istype(I, /obj/item/weapon/pen/)) - if( src.open ) + if(open) return var/t = input("Enter what you want to add to the tag:", "Write", null, null) as text @@ -3017,110 +2377,63 @@ name = "egg wrap" desc = "The precursor to Pigs in a Blanket." icon_state = "wrap" - New() - ..() - reagents.add_reagent("nutriment", 5) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 5) /obj/item/weapon/reagent_containers/food/snacks/beans name = "tin of beans" desc = "Musical fruit in a slightly less musical container." icon_state = "beans" - New() - ..() - reagents.add_reagent("nutriment", 10) - reagents.add_reagent("beans",10) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 10, "beans" = 10) /obj/item/weapon/reagent_containers/food/snacks/benedict name = "eggs benedict" desc = "There is only one egg on this, how rude." icon_state = "benedict" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("egg", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3, "egg" = 3) /obj/item/weapon/reagent_containers/food/snacks/hotdog name = "hotdog" desc = "Fresh footlong ready to go down on." icon_state = "hotdog" - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("ketchup", 3) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3, "ketchup" = 3) /obj/item/weapon/reagent_containers/food/snacks/meatbun name = "meat bun" desc = "Has the potential to not be Dog." icon_state = "meatbun" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 6 + bitesize = 6 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/icecreamsandwich name = "icecream sandwich" desc = "Portable Ice-cream in it's own packaging." icon_state = "icecreamsandwich" - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("ice", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "ice" = 2) /obj/item/weapon/reagent_containers/food/snacks/notasandwich name = "not-a-sandwich" desc = "Something seems to be wrong with this, you can't quite figure what. Maybe it's his moustache." icon_state = "notasandwich" - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) /obj/item/weapon/reagent_containers/food/snacks/sugarcookie name = "sugar cookie" desc = "Just like your little sister used to make." icon_state = "sugarcookie" - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sugar", 5) - spawn(1) - reagents.del_reagent("egg") - reagents.update_total() - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 2, "sugar" = 5) /obj/item/weapon/reagent_containers/food/snacks/friedbanana name = "Fried Banana" desc = "Goreng Pisang, also known as fried bananas." icon_state = "friedbanana" - New() - ..() - reagents.add_reagent("sugar", 5) - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("cornoil", 4) - -/obj/item/weapon/reagent_containers/food/snacks/tofurkey - name = "Tofurkey" - desc = "A fake turkey made from tofu." - icon_state = "tofurkey" - New() - ..() - reagents.add_reagent("nutriment", 12) - reagents.add_reagent("ether", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/stuffing - name = "Stuffing" - desc = "Moist, peppery breadcrumbs for filling the body cavities of dead birds. Dig in!" - icon_state = "stuffing" - New() - ..() - reagents.add_reagent("nutriment", 3) - bitesize = 1 + list_reagents = list("sugar" = 5, "nutriment" = 8, "cornoil" = 4) /obj/item/weapon/reagent_containers/food/snacks/dionaroast name = "roast diona" @@ -3128,46 +2441,31 @@ icon_state = "dionaroast" trash = /obj/item/trash/plate filling_color = "#75754B" - - New() - ..() - reagents.add_reagent("plantmatter", 4) - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("radium", 2) - bitesize = 2 + bitesize = 2 + list_reagents = list("plantmatter" = 4, "nutriment" = 2, "radium" = 2) /obj/item/weapon/reagent_containers/food/snacks/boiledspiderleg name = "boiled spider leg" desc = "A giant spider's leg that's still twitching after being cooked. Gross!" icon_state = "spiderlegcooked" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("toxin", 2) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 3, "toxin" = 2) /obj/item/weapon/reagent_containers/food/snacks/spidereggs name = "spider eggs" desc = "A cluster of juicy spider eggs. A great side dish for when you care not for your health." icon_state = "spidereggs" - New() - ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("toxin", 3) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 2, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/spidereggsham name = "green eggs and ham" desc = "Would you eat them on a train? Would you eat them on a plane? Would you eat them on a state of the art corporate deathtrap floating through space?" icon_state = "spidereggsham" trash = /obj/item/trash/plate - New() - ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("toxin", 3) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 6, "sodiumchloride" = 1, "toxin" = 3) /obj/item/weapon/reagent_containers/food/snacks/sliceable/turkey name = "Turkey" @@ -3175,11 +2473,8 @@ icon_state = "turkey" slice_path = /obj/item/weapon/reagent_containers/food/snacks/turkeyslice slices_num = 6 - New() - ..() - reagents.add_reagent("protein", 24) - reagents.add_reagent("nutriment", 18) - bitesize = 2 + bitesize = 2 + list_reagents = list("protein" = 24, "nutriment" = 18) /obj/item/weapon/reagent_containers/food/snacks/turkeyslice name = "turkey serving" @@ -3196,56 +2491,41 @@ trash = /obj/item/trash/plate filling_color = "#D6D9C1" bitesize = 2 - - New() - ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("gravy", 5) - reagents.add_reagent("mashedpotatoes", 10) - bitesize = 2 + list_reagents = list("nutriment" = 5, "gravy" = 5, "mashedpotatoes" = 10) ////////////////////////////////ICE CREAM/////////////////////////////////// /obj/item/weapon/reagent_containers/food/snacks/icecream - name = "ice cream" - desc = "Delicious ice cream." - icon = 'icons/obj/kitchen.dmi' - icon_state = "icecream_cone" - New() - ..() - reagents.add_reagent("nutriment", 1) - reagents.add_reagent("sugar",1) - bitesize = 1 - update_icon() + name = "ice cream" + desc = "Delicious ice cream." + icon = 'icons/obj/kitchen.dmi' + icon_state = "icecream_cone" + list_reagents = list("nutriment" = 1, "sugar" = 1) - update_icon() - overlays.Cut() - var/image/filling = image('icons/obj/kitchen.dmi', src, "icecream_color") - filling.icon += mix_color_from_reagents(reagents.reagent_list) - overlays += filling +/obj/item/weapon/reagent_containers/food/snacks/icecream/New() + ..() + update_icon() + +/obj/item/weapon/reagent_containers/food/snacks/icecream/update_icon() + overlays.Cut() + var/image/filling = image('icons/obj/kitchen.dmi', src, "icecream_color") + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling /obj/item/weapon/reagent_containers/food/snacks/icecream/icecreamcone - name = "ice cream cone" - desc = "Delicious ice cream." - icon_state = "icecream_cone" - volume = 50 - New() - ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("sugar",6) - reagents.add_reagent("ice",2) - bitesize = 3 + name = "ice cream cone" + desc = "Delicious ice cream." + icon_state = "icecream_cone" + volume = 50 + bitesize = 3 + list_reagents = list("nutriment" = 3, "sugar" = 7, "ice" = 2) /obj/item/weapon/reagent_containers/food/snacks/icecream/icecreamcup - name = "chocolate ice cream cone" - desc = "Delicious ice cream." - icon_state = "icecream_cup" - volume = 50 - New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("chocolate",8) - reagents.add_reagent("ice",2) - bitesize = 6 + name = "chocolate ice cream cone" + desc = "Delicious ice cream." + icon_state = "icecream_cup" + volume = 50 + bitesize = 6 + list_reagents = list("nutriment" = 5, "chocolate" = 8, "ice" = 2) /obj/item/weapon/reagent_containers/food/snacks/cereal name = "box of cereal" @@ -3253,18 +2533,15 @@ icon = 'icons/obj/food/food.dmi' icon_state = "cereal_box" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) + /obj/item/weapon/reagent_containers/food/snacks/deepfryholder name = "Deep Fried Foods Holder Obj" desc = "If you can see this description the code for the deep fryer fucked up." icon = 'icons/obj/food/food.dmi' icon_state = "deepfried_holder_icon" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/dough name = "dough" @@ -3272,9 +2549,7 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "dough" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) // Dough + rolling pin = flat dough /obj/item/weapon/reagent_containers/food/snacks/dough/attackby(obj/item/I, mob/user, params) @@ -3296,9 +2571,7 @@ icon_state = "flat dough" slice_path = /obj/item/weapon/reagent_containers/food/snacks/doughslice slices_num = 3 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/doughslice name = "dough slice" @@ -3306,29 +2579,22 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "doughslice" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 1) + list_reagents = list("nutriment" = 1) /obj/item/weapon/reagent_containers/food/snacks/bun name = "bun" desc = "The base for any self-respecting burger." icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "bun" - bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 4) - bitesize = 3 + bitesize = 3 + list_reagents = list("nutriment" = 4) /obj/item/weapon/reagent_containers/food/snacks/taco name = "taco" desc = "Take a bite!" icon_state = "taco" bitesize = 3 - New() - ..() - reagents.add_reagent("nutriment", 7) + list_reagents = list("nutriment" = 7) /obj/item/weapon/reagent_containers/food/snacks/cutlet name = "cutlet" @@ -3336,9 +2602,7 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "cutlet" bitesize = 2 - New() - ..() - reagents.add_reagent("protein", 2) + list_reagents = list("protein" = 2) /obj/item/weapon/reagent_containers/food/snacks/rawmeatball name = "raw meatball" @@ -3346,18 +2610,14 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "rawmeatball" bitesize = 2 - New() - ..() - reagents.add_reagent("protein", 2) + list_reagents = list("protein" = 2) /obj/item/weapon/reagent_containers/food/snacks/hotdog name = "hotdog" desc = "Unrelated to dogs, maybe." icon_state = "hotdog" bitesize = 2 - New() - ..() - reagents.add_reagent("protein", 6) + list_reagents = list("protein" = 6) /obj/item/weapon/reagent_containers/food/snacks/flatbread name = "flatbread" @@ -3365,9 +2625,7 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "flatbread" bitesize = 2 - New() - ..() - reagents.add_reagent("nutriment", 3) + list_reagents = list("nutriment" = 3) /obj/item/weapon/reagent_containers/food/snacks/rawsticks name = "raw potato sticks" @@ -3375,18 +2633,14 @@ icon = 'icons/obj/food/food_ingredients.dmi' icon_state = "rawsticks" bitesize = 2 - New() - ..() - reagents.add_reagent("plantmatter", 3) + list_reagents = list("plantmatter" = 3) /obj/item/weapon/reagent_containers/food/snacks/ectoplasm name = "ectoplasm" desc = "A luminescent blob of what scientists refer to as 'ghost goo'." icon = 'icons/obj/wizard.dmi' icon_state = "ectoplasm" - New() - ..() - reagents.add_reagent("ectoplasm", 10) + list_reagents = list("ectoplasm" = 10) /obj/item/weapon/reagent_containers/food/snacks/liquidfood name = "\improper LiquidFood Ration" @@ -3394,12 +2648,8 @@ icon_state = "liquidfood" trash = /obj/item/trash/liquidfood filling_color = "#A8A8A8" - - New() - ..() - reagents.add_reagent("nutriment", 20) - reagents.add_reagent("iron", 3) - bitesize = 4 + bitesize = 4 + list_reagents = list("nutriment" = 20, "iron" = 3) /obj/item/weapon/reagent_containers/food/snacks/tastybread @@ -3408,8 +2658,5 @@ icon_state = "tastybread" trash = /obj/item/trash/tastybread filling_color = "#A66829" - - New() - ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 + bitesize = 2 + list_reagents = list("nutriment" = 6) \ No newline at end of file diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index b71bb0be2d4..fafa983cf1d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -52,13 +52,13 @@ else overlays += image('icons/obj/kitchen.dmi', "gridle") -/obj/machinery/gibber/relaymove(mob/user as mob) +/obj/machinery/gibber/relaymove(mob/user) if(locked) return go_out() -/obj/machinery/gibber/attack_hand(mob/user as mob) +/obj/machinery/gibber/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return @@ -73,7 +73,7 @@ else startgibbing(user) -/obj/machinery/gibber/attackby(obj/item/P as obj, mob/user as mob, params) +/obj/machinery/gibber/attackby(obj/item/P, mob/user, params) if(istype(P, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = P if(G.state < 2) @@ -126,7 +126,7 @@ return user.visible_message("[user] starts to put [victim] into the gibber!") - src.add_fingerprint(user) + add_fingerprint(user) if(do_after(user, 30, target = victim) && user.Adjacent(src) && victim.Adjacent(user) && !occupant) user.visible_message("[user] stuffs [victim] into the gibber!") @@ -155,7 +155,7 @@ return for(var/obj/O in src) - O.loc = src.loc + O.loc = loc occupant.forceMove(get_turf(src)) occupant = null @@ -212,11 +212,11 @@ /obj/machinery/gibber/proc/startgibbing(var/mob/user, var/UserOverride=0) if(!istype(user) && !UserOverride) - log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (JMP)") + log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (JMP)") return if(UserOverride) - msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (JMP)") + msg_admin_attack("[key_name_admin(occupant)] was gibbed by an autogibber (\the [src]) (JMP)") if(operating) return @@ -236,7 +236,7 @@ var/slab_name = occupant.name var/slab_count = 3 var/slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human //gibber can only gib humans on paracode, no need to check meat type - var/slab_nutrition = src.occupant.nutrition / 15 + var/slab_nutrition = occupant.nutrition / 15 slab_nutrition /= slab_count @@ -352,7 +352,7 @@ feedinTopanim() return 1 -/obj/machinery/gibber/autogibber/proc/ejectclothes(var/mob/living/carbon/human/H) +/obj/machinery/gibber/autogibber/proc/ejectclothes(mob/living/carbon/human/H) if(!istype(H)) return 0 if(H != occupant) return 0 //only using H as a shortcut to typecast for(var/obj/O in H) @@ -367,7 +367,7 @@ if(O.flags & NODROP) qdel(O) //they are already dead by now H.unEquip(O) - O.loc = src.loc + O.loc = loc O.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15) sleep(1) @@ -375,7 +375,7 @@ if(C.flags & NODROP) qdel(C) H.unEquip(C) - C.loc = src.loc + C.loc = loc C.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15) sleep(1) @@ -385,7 +385,7 @@ var/spats = 0 //keeps track of how many items get spit out. Don't show a message if none are found. for(var/obj/O in src) if(istype(O)) - O.loc = src.loc + O.loc = loc O.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(1,5),15) spats++ sleep(1) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm index f0fb01efad2..19da4fb85ac 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm @@ -63,11 +63,11 @@ var/list/ingredients_source = list( while(ingredients.len < 11) ingredients.Add(5) -/obj/machinery/icecream_vat/attack_hand(mob/user as mob) +/obj/machinery/icecream_vat/attack_hand(mob/user) user.set_machine(src) interact(user) -/obj/machinery/icecream_vat/interact(mob/user as mob) +/obj/machinery/icecream_vat/interact(mob/user) var/dat dat += "Dispense vanilla icecream There is [ingredients[ICECREAM_VANILLA]] scoops of vanilla icecream left (made from milk and ice).
" dat += "Dispense strawberry icecream There is [ingredients[FLAVOUR_STRAWBERRY]] dollops of strawberry flavouring left (obtained from berry juice.
" @@ -91,7 +91,7 @@ var/list/ingredients_source = list( popup.set_content(dat) popup.open(0) -/obj/machinery/icecream_vat/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/icecream_vat/attackby(obj/item/O, mob/user, params) if(istype(O, /obj/item/weapon/reagent_containers)) if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/icecream)) var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = O @@ -99,7 +99,7 @@ var/list/ingredients_source = list( if(ingredients[ICECREAM_VANILLA] > 0) var/flavour_name = get_icecream_flavour_string(dispense_flavour) if(dispense_flavour < 11 && ingredients[dispense_flavour] > 0) - src.visible_message("[bicon(src)] [user] scoops delicious [flavour_name] flavoured icecream into [I].") + visible_message("[bicon(src)] [user] scoops delicious [flavour_name] flavoured icecream into [I].") ingredients[dispense_flavour] -= 1 ingredients[ICECREAM_VANILLA] -= 1 @@ -127,7 +127,7 @@ var/list/ingredients_source = list( else var/obj/item/weapon/reagent_containers/R = O if(R.reagents) - src.visible_message("[user] has emptied all of [R] into [src].") + visible_message("[user] has emptied all of [R] into [src].") for(var/datum/reagent/current_reagent in R.reagents.reagent_list) if(ingredients_source[current_reagent.id]) add(ingredients_source[current_reagent.id], current_reagent.volume / 2) @@ -151,7 +151,7 @@ var/list/ingredients_source = list( ingredients[INGR_FLOUR] -= amount ingredients[INGR_SUGAR] -= amount ingredients[CONE_WAFFLE] += amount - src.visible_message("[user] cooks up some waffle cones.") + visible_message("[user] cooks up some waffle cones.") else to_chat(user, "You require sugar and flour to make waffle cones.") if(CONE_CHOC) @@ -160,7 +160,7 @@ var/list/ingredients_source = list( ingredients[CONE_WAFFLE] -= amount ingredients[FLAVOUR_CHOCOLATE] -= amount ingredients[CONE_CHOC] += amount - src.visible_message("[user] cooks up some chocolate cones.") + visible_message("[user] cooks up some chocolate cones.") else to_chat(user, "You require waffle cones and chocolate flavouring to make chocolate cones.") if(ICECREAM_VANILLA) @@ -169,7 +169,7 @@ var/list/ingredients_source = list( ingredients[INGR_ICE] -= amount ingredients[INGR_MILK] -= amount ingredients[ICECREAM_VANILLA] += amount - src.visible_message("[user] whips up some vanilla icecream.") + visible_message("[user] whips up some vanilla icecream.") else to_chat(user, "You require milk and ice to make vanilla icecream.") updateDialog() @@ -179,7 +179,7 @@ var/list/ingredients_source = list( return if(href_list["dispense"]) dispense_flavour = text2num(href_list["dispense"]) - src.visible_message("\blue[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.") + visible_message("\blue[usr] sets [src] to dispense [get_icecream_flavour_string(dispense_flavour)] flavoured icecream.") if(href_list["cone"]) var/dispense_cone = text2num(href_list["cone"]) @@ -187,11 +187,11 @@ var/list/ingredients_source = list( var/cone_name = get_icecream_flavour_string(dispense_cone) if(ingredients[dispense_cone] >= 1) ingredients[dispense_cone] -= 1 - var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = new(src.loc) + var/obj/item/weapon/reagent_containers/food/snacks/icecream/I = new(loc) I.cone_type = cone_name I.icon_state = "icecream_cone_[cone_name]" I.desc = "Delicious [cone_name] cone, but no ice cream." - src.visible_message("[usr] dispenses a crunchy [cone_name] cone from [src].") + visible_message("[usr] dispenses a crunchy [cone_name] cone from [src].") else to_chat(usr, "There are no [cone_name] cones left!") updateDialog() @@ -202,7 +202,7 @@ var/list/ingredients_source = list( if(href_list["eject"]) if(held_container) - held_container.forceMove(src.loc) + held_container.forceMove(loc) held_container = null updateDialog() @@ -231,7 +231,7 @@ var/list/ingredients_source = list( /obj/item/weapon/reagent_containers/food/snacks/icecream/proc/add_ice_cream(var/flavour) var/flavour_name = get_icecream_flavour_string(flavour) name = "[flavour_name] icecream" - src.overlays += "icecream_[flavour_name]" + overlays += "icecream_[flavour_name]" desc = "Delicious [cone_type] cone with a dollop of [flavour_name] ice cream." ice_creamed = 1 diff --git a/code/modules/food_and_drinks/kitchen_machinery/juicer.dm b/code/modules/food_and_drinks/kitchen_machinery/juicer.dm index e1cb054690f..03ceb5c0034 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/juicer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/juicer.dm @@ -35,7 +35,7 @@ return -/obj/machinery/juicer/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/juicer/attackby(obj/item/O, mob/user, params) if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ istype(O,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass)) if(beaker) @@ -46,9 +46,9 @@ return 0 O.forceMove(src) beaker = O - src.verbs += /obj/machinery/juicer/verb/detach + verbs += /obj/machinery/juicer/verb/detach update_icon() - src.updateUsrDialog() + updateUsrDialog() return 0 if(!is_type_in_list(O, allowed_items)) to_chat(user, "It doesn't look like that contains any juice.") @@ -57,24 +57,24 @@ to_chat(user, "\the [O] is stuck to your hand, you cannot put it in \the [src]") return 0 O.forceMove(src) - src.updateUsrDialog() + updateUsrDialog() return 0 -/obj/machinery/juicer/attack_ai(mob/user as mob) +/obj/machinery/juicer/attack_ai(mob/user) return 0 -/obj/machinery/juicer/attack_hand(mob/user as mob) +/obj/machinery/juicer/attack_hand(mob/user) user.set_machine(src) interact(user) -/obj/machinery/juicer/interact(mob/user as mob) // The microwave Menu +/obj/machinery/juicer/interact(mob/user) // The microwave Menu var/is_chamber_empty = 0 var/is_beaker_ready = 0 var/processing_chamber = "" var/beaker_contents = "" for(var/i in allowed_items) - for(var/obj/item/O in src.contents) + for(var/obj/item/O in contents) if(!istype(O,i)) continue processing_chamber+= "some [O]
" @@ -119,7 +119,7 @@ if("detach") detach() - src.updateUsrDialog() + updateUsrDialog() return /obj/machinery/juicer/verb/detach() @@ -130,8 +130,8 @@ return if(!beaker) return - src.verbs -= /obj/machinery/juicer/verb/detach - beaker.forceMove(src.loc) + verbs -= /obj/machinery/juicer/verb/detach + beaker.forceMove(loc) beaker = null update_icon() @@ -159,8 +159,8 @@ return if(!beaker || beaker.reagents.total_volume >= beaker.reagents.maximum_volume) return - playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) - for(var/obj/item/weapon/reagent_containers/food/snacks/O in src.contents) + playsound(loc, 'sound/machines/juicer.ogg', 50, 1) + for(var/obj/item/weapon/reagent_containers/food/snacks/O in contents) var/r_id = get_juice_id(O) beaker.reagents.add_reagent(r_id,get_juice_amount(O)) qdel(O) diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 648f228bb54..15458648513 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -56,7 +56,7 @@ * Item Adding ********************/ -/obj/machinery/kitchen_machine/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/kitchen_machine/attackby(obj/item/O, mob/user, params) if(operating) return if(!broken && dirty < 100) @@ -77,8 +77,8 @@ default_deconstruction_crowbar(O) - if(src.broken > 0) - if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver + if(broken > 0) + if(broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver user.visible_message( \ "[user] starts to fix part of \the [src].", \ "You start to fix part of \the [src]." \ @@ -88,8 +88,8 @@ "[user] fixes part of \the [src].", \ "You have fixed part of \the [src]." \ ) - src.broken = 1 // Fix it a bit - else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench + broken = 1 // Fix it a bit + else if(broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench user.visible_message( \ "[user] starts to fix part of \the [src].", \ "You start to fix part of \the [src]." \ @@ -99,14 +99,14 @@ "[user] fixes \the [src].", \ "You have fixed \the [src]." \ ) - src.icon_state = off_icon - src.broken = 0 // Fix it! - src.dirty = 0 // just to be sure - src.flags = OPENCONTAINER + icon_state = off_icon + broken = 0 // Fix it! + dirty = 0 // just to be sure + flags = OPENCONTAINER else to_chat(user, "It's broken!") return 1 - else if(src.dirty==100) // The machine is all dirty so can't be used! + else if(dirty==100) // The machine is all dirty so can't be used! if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them user.visible_message( \ "[user] starts to clean \the [src].", \ @@ -117,10 +117,10 @@ "[user] has cleaned \the [src].", \ "You have cleaned \the [src]." \ ) - src.dirty = 0 // It's clean! - src.broken = 0 // just to be sure - src.icon_state = off_icon - src.flags = OPENCONTAINER + dirty = 0 // It's clean! + broken = 0 // just to be sure + icon_state = off_icon + flags = OPENCONTAINER else //Otherwise bad luck!! to_chat(user, "It's dirty!") return 1 @@ -161,12 +161,12 @@ else to_chat(user, "You have no idea what you can cook with this [O].") return 1 - src.updateUsrDialog() + updateUsrDialog() -/obj/machinery/kitchen_machine/attack_ai(mob/user as mob) +/obj/machinery/kitchen_machine/attack_ai(mob/user) return 0 -/obj/machinery/kitchen_machine/attack_hand(mob/user as mob) +/obj/machinery/kitchen_machine/attack_hand(mob/user) user.set_machine(src) interact(user) @@ -174,15 +174,15 @@ * Machine Menu * ********************/ -/obj/machinery/kitchen_machine/interact(mob/user as mob) // The microwave Menu +/obj/machinery/kitchen_machine/interact(mob/user) // The microwave Menu if(panel_open || !anchored) return var/dat = "" - if(src.broken > 0) + if(broken > 0) dat = {"Bzzzzttttt"} - else if(src.operating) - dat = {"[pick(src.cook_verbs)] in progress!
Please wait...!
"} - else if(src.dirty==100) + else if(operating) + dat = {"[pick(cook_verbs)] in progress!
Please wait...!
"} + else if(dirty==100) dat = {"This [src] is dirty!
Please clean it before use!
"} else var/list/items_counts = new @@ -237,7 +237,7 @@ var/datum/browser/popup = new(user, name, name, 400, 400) popup.set_content(dat) popup.open(0) - onclose(user, "[src.name]") + onclose(user, "[name]") return @@ -298,14 +298,14 @@ byproduct = recipe.get_byproduct() stop() if(cooked) - cooked.forceMove(src.loc) + cooked.forceMove(loc) for(var/i=1,i\The [src] turns on.
", "You hear \a [src].") - src.operating = 1 - src.icon_state = on_icon - src.updateUsrDialog() + visible_message("\The [src] turns on.", "You hear \a [src].") + operating = 1 + icon_state = on_icon + updateUsrDialog() /obj/machinery/kitchen_machine/proc/abort() - src.operating = 0 // Turn it off again aferwards - src.icon_state = off_icon - src.updateUsrDialog() + operating = 0 // Turn it off again aferwards + icon_state = off_icon + updateUsrDialog() /obj/machinery/kitchen_machine/proc/stop() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.operating = 0 // Turn it off again aferwards - src.icon_state = off_icon - src.updateUsrDialog() + playsound(loc, 'sound/machines/ding.ogg', 50, 1) + operating = 0 // Turn it off again aferwards + icon_state = off_icon + updateUsrDialog() /obj/machinery/kitchen_machine/proc/dispose() for(var/obj/O in contents) - O.forceMove(src.loc) - if(src.reagents.total_volume) - src.dirty++ - src.reagents.clear_reagents() + O.forceMove(loc) + if(reagents.total_volume) + dirty++ + reagents.clear_reagents() to_chat(usr, "You dispose of \the [src]'s contents.") - src.updateUsrDialog() + updateUsrDialog() /obj/machinery/kitchen_machine/proc/muck_start() - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound - src.icon_state = dirty_icon // Make it look dirty!! + playsound(loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound + icon_state = dirty_icon // Make it look dirty!! /obj/machinery/kitchen_machine/proc/muck_finish() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.visible_message("\The [src] gets covered in muck!") - src.dirty = 100 // Make it dirty so it can't be used util cleaned - src.flags = null //So you can't add condiments - src.icon_state = dirty_icon // Make it look dirty too - src.operating = 0 // Turn it off again aferwards - src.updateUsrDialog() + playsound(loc, 'sound/machines/ding.ogg', 50, 1) + visible_message("\The [src] gets covered in muck!") + dirty = 100 // Make it dirty so it can't be used util cleaned + flags = null //So you can't add condiments + icon_state = dirty_icon // Make it look dirty too + operating = 0 // Turn it off again aferwards + updateUsrDialog() /obj/machinery/kitchen_machine/proc/broke() var/datum/effect/system/spark_spread/s = new s.set_up(2, 1, src) s.start() - src.icon_state = broken_icon // Make it look all busted up and shit - src.visible_message("The [src] breaks!") //Let them know they're stupid - src.broken = 2 // Make it broken so it can't be used util fixed - src.flags = null //So you can't add condiments - src.operating = 0 // Turn it off again aferwards - src.updateUsrDialog() + icon_state = broken_icon // Make it look all busted up and shit + visible_message("The [src] breaks!") //Let them know they're stupid + broken = 2 // Make it broken so it can't be used util fixed + flags = null //So you can't add condiments + operating = 0 // Turn it off again aferwards + updateUsrDialog() /obj/machinery/kitchen_machine/proc/fail() var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) @@ -382,7 +382,7 @@ if(id) amount+=O.reagents.get_reagent_amount(id) qdel(O) - src.reagents.clear_reagents() + reagents.clear_reagents() ffuu.reagents.add_reagent("carbon", amount) ffuu.reagents.add_reagent("????", amount/10) ffuu.forceMove(get_turf(src)) @@ -392,8 +392,8 @@ return usr.set_machine(src) - if(src.operating) - src.updateUsrDialog() + if(operating) + updateUsrDialog() return switch(href_list["action"]) diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index dc283e65d6c..e70ac59209e 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -33,7 +33,7 @@ cube_production = cubes_made required_grind = req_grind -/obj/machinery/monkey_recycler/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/monkey_recycler/attackby(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O)) return @@ -62,7 +62,7 @@ cycle_through = 0 to_chat(user, "You change the monkeycube type to [initial(cube_type.name)].") - if(src.stat != 0) //NOPOWER etc + if(stat != 0) //NOPOWER etc return if(istype(O, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = O @@ -76,11 +76,11 @@ user.drop_item() qdel(target) to_chat(user, "You stuff the monkey in the machine.") - playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) + playsound(loc, 'sound/machines/juicer.ogg', 50, 1) var/offset = prob(50) ? -2 : 2 animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 200) //start shaking use_power(500) - src.grinded++ + grinded++ sleep(50) pixel_x = initial(pixel_x) to_chat(user, "The machine now has [grinded] monkey\s worth of material stored.") @@ -90,15 +90,15 @@ to_chat(user, "The machine only accepts monkeys!") return -/obj/machinery/monkey_recycler/attack_hand(var/mob/user as mob) - if(src.stat != 0) //NOPOWER etc +/obj/machinery/monkey_recycler/attack_hand(mob/user) + if(stat != 0) //NOPOWER etc return if(grinded >= required_grind) to_chat(user, "The machine hisses loudly as it condenses the grinded monkey meat. After a moment, it dispenses a brand new monkey cube.") - playsound(src.loc, 'sound/machines/hiss.ogg', 50, 1) + playsound(loc, 'sound/machines/hiss.ogg', 50, 1) grinded -= required_grind for(var/i = 0, i < cube_production, i++) // Forgot to fix this bit the first time through - new cube_type(src.loc) + new cube_type(loc) to_chat(user, "The machine's display flashes that it has [grinded] monkey\s worth of material left.") else // I'm not sure if the \s macro works with a word in between; I'll play it safe to_chat(user, "The machine needs at least [required_grind] monkey\s worth of material to compress [cube_production] monkey\s. It only has [grinded].") diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven.dm b/code/modules/food_and_drinks/kitchen_machinery/oven.dm index 796e8c4bd4b..6a47eb94ff5 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven.dm @@ -60,7 +60,7 @@ food_choices.Remove(U) for(var/U in subtypesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/cook)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/cook/V = new U - src.food_choices += V + food_choices += V return /obj/machinery/cooking/candy @@ -75,5 +75,5 @@ food_choices.Remove(U) for(var/U in subtypesof(/obj/item/weapon/reagent_containers/food/snacks/customizable/candy)) var/obj/item/weapon/reagent_containers/food/snacks/customizable/candy/V = new U - src.food_choices += V + food_choices += V return diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index d2b810dc7bb..5183fe6a4fa 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -58,9 +58,9 @@ var/time = 40 /datum/food_processor_process/proc/process_food(loc, what, obj/machinery/processor/processor) - if(src.output && loc && processor) + if(output && loc && processor) for(var/i = 0, i < processor.rating_amount, i++) - new src.output(loc) + new output(loc) if(what) qdel(what) @@ -154,9 +154,9 @@ return P return 0 -/obj/machinery/processor/attackby(var/obj/item/O as obj, var/mob/user as mob, params) +/obj/machinery/processor/attackby(obj/item/O, mob/user, params) - if(src.processing) + if(processing) to_chat(user, "\the [src] is already processing something!") return 1 @@ -191,25 +191,25 @@ what.loc = src return -/obj/machinery/processor/attack_hand(var/mob/user as mob) +/obj/machinery/processor/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) //no power or broken return - if(src.processing) + if(processing) to_chat(user, "\the [src] is already processing something!") return 1 - if(src.contents.len == 0) + if(contents.len == 0) to_chat(user, "\the [src] is empty.") return 1 - src.processing = 1 + processing = 1 user.visible_message("[user] turns on [src].", \ "You turn on [src].", \ "You hear a food processor.") - playsound(src.loc, 'sound/machines/blender.ogg', 50, 1) + playsound(loc, 'sound/machines/blender.ogg', 50, 1) use_power(500) var/total_time = 0 - for(var/O in src.contents) + for(var/O in contents) var/datum/food_processor_process/P = select_recipe(O) if(!P) log_debug("The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.") @@ -217,14 +217,14 @@ total_time += P.time sleep(total_time / rating_speed) - for(var/O in src.contents) + for(var/O in contents) var/datum/food_processor_process/P = select_recipe(O) if(!P) log_debug("The [O] in processor([src]) does not have a suitable recipe, but it was somehow put inside of the processor anyways.") continue - P.process_food(src.loc, O, src) - src.processing = 0 + P.process_food(loc, O, src) + processing = 0 - src.visible_message("\the [src] has finished processing.", \ + visible_message("\the [src] has finished processing.", \ "\the [src] has finished processing.", \ "You hear a food processor stopping.") diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index c6f7e54a003..2446b74ad22 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -53,7 +53,7 @@ A.forceMove(loc) return ..() -/obj/machinery/smartfridge/proc/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/proc/accept_check(obj/item/O) if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown/) || istype(O,/obj/item/seeds/)) return 1 return 0 @@ -66,7 +66,7 @@ icon_on = "seeds" icon_off = "seeds-off" -/obj/machinery/smartfridge/seeds/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/seeds/accept_check(obj/item/O) if(istype(O,/obj/item/seeds/)) return 1 return 0 @@ -77,7 +77,7 @@ icon_state = "smartfridge" //To fix the icon in the map editor. icon_on = "smartfridge_chem" -/obj/machinery/smartfridge/medbay/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/medbay/accept_check(obj/item/O) if(istype(O,/obj/item/weapon/reagent_containers/glass/)) return 1 if(istype(O,/obj/item/weapon/storage/pill_bottle/)) @@ -91,7 +91,7 @@ desc = "A refrigerated storage unit for slime extracts" req_access_txt = "47" -/obj/machinery/smartfridge/secure/extract/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/secure/extract/accept_check(obj/item/O) if(istype(O,/obj/item/slime_extract)) return 1 return 0 @@ -103,7 +103,7 @@ icon_on = "smartfridge_chem" req_one_access_txt = "5;33" -/obj/machinery/smartfridge/secure/medbay/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/secure/medbay/accept_check(obj/item/O) if(istype(O,/obj/item/weapon/reagent_containers/glass/)) return 1 if(istype(O,/obj/item/weapon/storage/pill_bottle/)) @@ -134,7 +134,7 @@ nanomanager.update_uis(src) amount-- -/obj/machinery/smartfridge/chemistry/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/chemistry/accept_check(obj/item/O) if(istype(O,/obj/item/weapon/storage/pill_bottle) || istype(O,/obj/item/weapon/reagent_containers)) return 1 return 0 @@ -154,7 +154,7 @@ /obj/item/weapon/reagent_containers/glass/bottle/plasma = 1, /obj/item/weapon/reagent_containers/glass/bottle/diphenhydramine = 1) -/obj/machinery/smartfridge/secure/chemistry/virology/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/secure/chemistry/virology/accept_check(obj/item/O) if(istype(O, /obj/item/weapon/reagent_containers/syringe) || istype(O, /obj/item/weapon/reagent_containers/glass/bottle) || istype(O, /obj/item/weapon/reagent_containers/glass/beaker)) return 1 return 0 @@ -163,17 +163,17 @@ name = "\improper Drink Showcase" desc = "A refrigerated storage unit for tasty tasty alcohol." -/obj/machinery/smartfridge/drinks/accept_check(var/obj/item/O as obj) +/obj/machinery/smartfridge/drinks/accept_check(obj/item/O) if(istype(O,/obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/food/drinks) || istype(O,/obj/item/weapon/reagent_containers/food/condiment)) return 1 /obj/machinery/smartfridge/process() if(stat & (BROKEN|NOPOWER)) return - if(src.seconds_electrified > 0) - src.seconds_electrified-- - if(src.shoot_inventory && prob(2)) - src.throw_item() + if(seconds_electrified > 0) + seconds_electrified-- + if(shoot_inventory && prob(2)) + throw_item() /obj/machinery/smartfridge/power_change() var/old_stat = stat @@ -192,9 +192,9 @@ * Item Adding ********************/ -/obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob) +/obj/machinery/smartfridge/attackby(obj/item/O, mob/user) if(istype(O, /obj/item/weapon/screwdriver) && anchored) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) + playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1) panel_open = !panel_open to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") overlays.Cut() @@ -271,20 +271,20 @@ return 1 return 0 -/obj/machinery/smartfridge/attack_ai(mob/user as mob) +/obj/machinery/smartfridge/attack_ai(mob/user) return 0 -/obj/machinery/smartfridge/attack_ghost(mob/user as mob) - return src.attack_hand(user) +/obj/machinery/smartfridge/attack_ghost(mob/user) + return attack_hand(user) -/obj/machinery/smartfridge/attack_hand(mob/user as mob) +/obj/machinery/smartfridge/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return wires.Interact(user) ui_interact(user) //Drag pill bottle to fridge to empty it into the fridge -/obj/machinery/smartfridge/MouseDrop_T(obj/over_object as obj, mob/user as mob) +/obj/machinery/smartfridge/MouseDrop_T(obj/over_object, mob/user) if(!istype(over_object, /obj/item/weapon/storage/pill_bottle)) //Only pill bottles, please return @@ -305,7 +305,7 @@ to_chat(user, "Some items are refused.") nanomanager.update_uis(src) -/obj/machinery/smartfridge/secure/emag_act(user as mob) +/obj/machinery/smartfridge/secure/emag_act(user) emagged = 1 locked = -1 to_chat(user, "You short out the product lock on [src].") @@ -314,7 +314,7 @@ * SmartFridge Menu ********************/ -/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) +/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) user.set_machine(src) var/data[0] @@ -336,7 +336,7 @@ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) - ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500) + ui = new(user, src, ui_key, "smartfridge.tmpl", name, 400, 500) ui.set_initial_data(data) ui.open() @@ -346,7 +346,7 @@ var/mob/user = usr var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main") - src.add_fingerprint(user) + add_fingerprint(user) if(href_list["close"]) user.unset_machine() @@ -387,7 +387,7 @@ item_quants[O]-- for(var/obj/T in contents) if(T.name == O) - T.forceMove(src.loc) + T.forceMove(loc) throw_item = T break break @@ -395,7 +395,7 @@ return 0 spawn(0) throw_item.throw_at(target,16,3,src) - src.visible_message("[src] launches [throw_item.name] at [target.name]!") + visible_message("[src] launches [throw_item.name] at [target.name]!") return 1 /************************ diff --git a/code/modules/food_and_drinks/recipes/recipes_candy.dm b/code/modules/food_and_drinks/recipes/recipes_candy.dm index 2ab54fc0e27..98f969a17ec 100644 --- a/code/modules/food_and_drinks/recipes/recipes_candy.dm +++ b/code/modules/food_and_drinks/recipes/recipes_candy.dm @@ -78,6 +78,11 @@ items = list(/obj/item/weapon/reagent_containers/food/snacks/egg) result = /obj/item/weapon/reagent_containers/food/snacks/candy/nougat +/datum/recipe/candy/nougat/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/candy/nougat/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + // *********************************************************** // Base Candy Recipes (unflavored / plain) // *********************************************************** diff --git a/code/modules/food_and_drinks/recipes/recipes_grill.dm b/code/modules/food_and_drinks/recipes/recipes_grill.dm index 4c459b737ff..5845e860c9d 100644 --- a/code/modules/food_and_drinks/recipes/recipes_grill.dm +++ b/code/modules/food_and_drinks/recipes/recipes_grill.dm @@ -89,6 +89,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/fishfingers +/datum/recipe/grill/fishfingers/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/fishfingers/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/grill/cutlet items = list( /obj/item/weapon/reagent_containers/food/snacks/rawcutlet diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 0f58955a2bf..5903e191b4e 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -205,10 +205,11 @@ reagents = list("water" = 5, "vodka" = 5) fruit = list("amanita" = 3) result = /obj/item/weapon/reagent_containers/food/snacks/amanitajelly - make_food(var/obj/container as obj) - var/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/being_cooked = ..(container) - being_cooked.reagents.del_reagent("amanitin") - return being_cooked + +/datum/recipe/microwave/amanitajelly/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/being_cooked = ..() + being_cooked.reagents.del_reagent("amanitin") + return being_cooked /datum/recipe/microwave/meatballsoup reagents = list("water" = 10) @@ -538,10 +539,11 @@ datum/recipe/microwave/slimesandwich /datum/recipe/microwave/herbsalad fruit = list("ambrosia" = 3, "apple" = 1) result = /obj/item/weapon/reagent_containers/food/snacks/herbsalad - make_food(var/obj/container as obj) - var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..(container) - being_cooked.reagents.del_reagent("toxin") - return being_cooked + +/datum/recipe/microwave/herbsalad/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..() + being_cooked.reagents.del_reagent("toxin") + return being_cooked /datum/recipe/microwave/aesirsalad fruit = list("ambrosiadeus" = 3, "goldapple" = 1) @@ -553,10 +555,11 @@ datum/recipe/microwave/slimesandwich /obj/item/weapon/reagent_containers/food/snacks/meatball, ) result = /obj/item/weapon/reagent_containers/food/snacks/validsalad - make_food(var/obj/container as obj) - var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..(container) - being_cooked.reagents.del_reagent("toxin") - return being_cooked + +/datum/recipe/microwave/validsalad/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..() + being_cooked.reagents.del_reagent("toxin") + return being_cooked ////////////////////////////FOOD ADDITTIONS/////////////////////////////// diff --git a/code/modules/food_and_drinks/recipes/recipes_oven.dm b/code/modules/food_and_drinks/recipes/recipes_oven.dm index 9ee3ff3343e..d20c06e260f 100644 --- a/code/modules/food_and_drinks/recipes/recipes_oven.dm +++ b/code/modules/food_and_drinks/recipes/recipes_oven.dm @@ -176,20 +176,22 @@ /obj/item/weapon/paper, ) result = /obj/item/weapon/reagent_containers/food/snacks/fortunecookie - make_food(var/obj/container as obj) + +/datum/recipe/oven/fortunecookie/make_food(obj/container) + var/obj/item/weapon/paper/paper = locate() in container + paper.loc = null //prevent deletion + var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..() + paper.loc = being_cooked + being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn + return being_cooked + +/datum/recipe/oven/fortunecookie/check_items(obj/container) + . = ..() + if(.) var/obj/item/weapon/paper/paper = locate() in container - paper.loc = null //prevent deletion - var/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/being_cooked = ..(container) - paper.loc = being_cooked - being_cooked.trash = paper //so the paper is left behind as trash without special-snowflake(TM Nodrak) code ~carn - return being_cooked - check_items(var/obj/container as obj) - . = ..() - if(.) - var/obj/item/weapon/paper/paper = locate() in container - if(!paper || !paper.info) - return -1 - return . + if(!paper || !paper.info) + return -1 + return . /datum/recipe/oven/pizzamargherita fruit = list("tomato" = 1) @@ -293,6 +295,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bread +/datum/recipe/oven/bread/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/oven/applepie fruit = list("apple" = 1) items = list( @@ -377,6 +384,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/appletart +/datum/recipe/oven/appletart/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/appletart/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/oven/cracker reagents = list("sodiumchloride" = 1) items = list( @@ -392,6 +404,11 @@ ) result = /obj/item/weapon/reagent_containers/food/snacks/sugarcookie +/datum/recipe/oven/sugarcookie/make_food(obj/container) + var/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/being_cooked = ..() + being_cooked.reagents.del_reagent("egg") + return being_cooked + /datum/recipe/oven/flatbread items = list( /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index bc6692d72b1..0e557ea1d31 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -98,7 +98,7 @@ to_chat(M, "You are stunned by the powerful acid of the Deathnettle!") add_logs(user, M, "attacked", src) - M.eye_blurry += force/7 + M.AdjustEyeBlurry(force/7) if(prob(20)) M.Paralyse(force / 6) M.Weaken(force / 15) diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index 2f41c6cdb5c..4086403c6e0 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -13,19 +13,23 @@ origin_tech = "magnets=1;biotech=1" var/form_title var/last_data + var/print_cooldown = 0 + var/cooldown_length = 50 // Five seconds /obj/item/device/analyzer/plant_analyzer/proc/print_report_verb() set name = "Print Plant Report" set category = "Object" set src = usr - if(usr.stat || usr.restrained() || usr.lying) + if(usr.incapacitated()) return + print_report(usr) /obj/item/device/analyzer/plant_analyzer/Topic(href, href_list) if(..()) - return + return 1 + if(href_list["print"]) print_report(usr) @@ -33,6 +37,11 @@ if(!last_data) to_chat(user, "There is no scan data to print.") return + if(print_cooldown > world.time) + to_chat(user, "The printer is still cooling down.") + return + print_cooldown = world.time + cooldown_length + playsound(loc, "sound/goonstation/machines/printer_thermal.ogg", 50, 1) var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src)) P.name = "paper - [form_title]" diff --git a/code/modules/lighting/light_source.dm b/code/modules/lighting/light_source.dm index da60e939987..fd92e6675f1 100644 --- a/code/modules/lighting/light_source.dm +++ b/code/modules/lighting/light_source.dm @@ -114,9 +114,9 @@ /datum/light_source/proc/parse_light_color() if(light_color) - lum_r = GetRedPart(light_color) / 255 - lum_g = GetGreenPart(light_color) / 255 - lum_b = GetBluePart(light_color) / 255 + lum_r = color2R(light_color) / 255 + lum_g = color2G(light_color) / 255 + lum_b = color2B(light_color) / 255 else lum_r = 1 lum_g = 1 @@ -195,7 +195,7 @@ effect_str.Cut() effect_turf.Cut() - + /datum/light_source/proc/forget_turf(turf/T) var/idx = effect_turf.Find(T) effect_turf.Cut(idx, idx + 1) diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index 9b589878475..e1a577e24fa 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -88,7 +88,7 @@ D.visible_message("[A] pounds [D] on the chest!", \ "[A] slams your chest! You can't breathe!") playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1) - D.losebreath += 5 + D.AdjustLoseBreath(5) D.adjustOxyLoss(10) return 1 @@ -97,7 +97,7 @@ "[A] karate chops your neck, rendering you unable to speak for a short time!") playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1) D.apply_damage(5, BRUTE) - D.silent += 10 + D.AdjustSilence(10) return 1 datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D) @@ -170,4 +170,4 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi name = "krav maga gloves" desc = "These gloves can teach you to perform Krav Maga using nanochips." icon_state = "fightgloves" - item_state = "fightgloves" \ No newline at end of file + item_state = "fightgloves" diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm index bc4e15eb598..960844a063a 100644 --- a/code/modules/martial_arts/sleeping_carp.dm +++ b/code/modules/martial_arts/sleeping_carp.dm @@ -66,7 +66,7 @@ D.visible_message("[A] knees [D] in the stomach!", \ "[A] winds you with a knee in the stomach!") D.audible_message("[D] gags!") - D.losebreath += 3 + D.AdjustLoseBreath(3) D.Stun(2) playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1) if(prob(80)) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 50a9527326a..3a813b0a557 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -28,7 +28,7 @@ //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if(language && (language.flags & NONVERBAL)) - if(disabilities & BLIND || blinded) //blind people can't see dumbass + if(!can_see()) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -65,7 +65,7 @@ if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src)) message = "[message]" - if(disabilities & DEAF || ear_deaf) + if(!can_hear()) if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set if(speaker == src) to_chat(src, "You cannot hear yourself speak!") @@ -95,7 +95,7 @@ //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if(language && (language.flags & NONVERBAL)) - if(disabilities & BLIND || blinded) //blind people can't see dumbass + if(!can_see()) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -182,7 +182,7 @@ formatted = language.format_message_radio(message, verb) else formatted = "[verb], \"[message]\"" - if(disabilities & DEAF || ear_deaf) + if(!can_hear()) if(prob(20)) to_chat(src, "You feel your headset vibrate but can hear nothing from it!") else if(track) diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 81b54bcc3a6..c9e410d9e9b 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -605,7 +605,7 @@ return ..() // Can we speak this language, as opposed to just understanding it? -/mob/proc/can_speak(datum/language/speaking) +/mob/proc/can_speak_language(datum/language/speaking) return (universal_speak || (speaking && speaking.flags & INNATE) || speaking in src.languages) diff --git a/code/modules/mob/living/carbon/alien/alien_defenses.dm b/code/modules/mob/living/carbon/alien/alien_defenses.dm index 3949948b0f3..c6e2bcc510d 100644 --- a/code/modules/mob/living/carbon/alien/alien_defenses.dm +++ b/code/modules/mob/living/carbon/alien/alien_defenses.dm @@ -16,7 +16,7 @@ In all, this is a lot like the monkey code. /N switch(M.a_intent) if(I_HELP) - sleeping = max(0,sleeping-5) + AdjustSleeping(-5) resting = 0 AdjustParalysis(-3) AdjustStunned(-3) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 876cae4b312..c5cee9d3db4 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -96,13 +96,15 @@ f_loss += 60 - adjustEarDamage(30, 120) + AdjustEarDamage(30) + AdjustEarDeaf(120) if(3.0) b_loss += 30 if(prob(50) && !shielded) Paralyse(1) - adjustEarDamage(15,60) + AdjustEarDamage(15) + AdjustEarDeaf(60) adjustBruteLoss(b_loss) adjustFireLoss(f_loss) @@ -298,4 +300,4 @@ return initial(pixel_x) /mob/living/carbon/alien/humanoid/get_permeability_protection() - return 0.8 \ No newline at end of file + return 0.8 diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 4cccb6e57ed..da93e43c13f 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -57,13 +57,12 @@ if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 - silent = 0 + SetSilence(0) else //ALIVE. LIGHTS ARE ON if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 - stat = DEAD - silent = 0 + SetSilence(0) return 1 //UNCONSCIOUS. NO-ONE IS HOME @@ -80,7 +79,7 @@ blinded = 1 stat = UNCONSCIOUS else if(sleeping) - sleeping = max(sleeping-1, 0) + AdjustSleeping(-1) blinded = 1 stat = UNCONSCIOUS if( prob(10) && health ) @@ -98,18 +97,18 @@ if(disabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) blinded = 1 else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else if(ear_deaf) //deafness, heals slowly over time - adjustEarDamage(0,-1) + AdjustEarDeaf(-1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - adjustEarDamage(-0.05, 0) + AdjustEarDamage(-0.05) //Other if(stunned) @@ -123,11 +122,11 @@ update_icons() if(stuttering) - stuttering = max(stuttering-1, 0) + AdjustStuttering(-1) if(silent) - silent = max(silent-1, 0) + AdjustSilence(-1) if(druggy) - druggy = max(druggy-1, 0) - return 1 \ No newline at end of file + AdjustDruggy(-1) + return 1 diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 8e9e0dea576..04a460ec710 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -88,13 +88,15 @@ f_loss += 60 - adjustEarDamage(30,120) + AdjustEarDamage(30) + AdjustEarDeaf(120) if(3.0) b_loss += 30 if(prob(50)) Paralyse(1) - adjustEarDamage(15,60) + AdjustEarDamage(15) + AdjustEarDeaf(60) adjustBruteLoss(b_loss) adjustFireLoss(f_loss) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 76ceef6ad2e..03cb2096963 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -17,12 +17,12 @@ if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP blinded = 1 - silent = 0 + SetSilence(0) else //ALIVE. LIGHTS ARE ON if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 - silent = 0 + SetSilence(0) return 1 //UNCONSCIOUS. NO-ONE IS HOME @@ -39,7 +39,7 @@ blinded = 1 stat = UNCONSCIOUS else if(sleeping) - sleeping = max(sleeping-1, 0) + AdjustSleeping(-1) blinded = 1 stat = UNCONSCIOUS if( prob(10) && health ) @@ -57,32 +57,32 @@ if(disabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) blinded = 1 else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else if(ear_deaf) //deafness, heals slowly over time - adjustEarDamage(0,-1) + AdjustEarDeaf(-1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. - adjustEarDamage(-0.05,0) + AdjustEarDamage(-0.05) //Other if(stunned) AdjustStunned(-1) if(weakened) - weakened = max(weakened-1,0) + AdjustWeakened(-1) if(stuttering) - stuttering = max(stuttering-1, 0) + AdjustStuttering(-1) if(silent) - silent = max(silent-1, 0) + AdjustSilence(-1) if(druggy) - druggy = max(druggy-1, 0) - return 1 \ No newline at end of file + AdjustDruggy(-1) + return 1 diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 996687ee4b0..7809e1fb947 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -100,8 +100,8 @@ I'm using this for Stat to give it a more nifty interface to work with /mob/living/carbon/brain/can_safely_leave_loc() return 0 //You're not supposed to be ethereal jaunting, brains -/mob/living/carbon/brain/adjustEarDamage() +/mob/living/carbon/brain/SetEarDamage() // no ears to damage or heal return -/mob/living/carbon/brain/setEarDamage() // no ears to damage or heal - return \ No newline at end of file +/mob/living/carbon/brain/SetEarDeaf() + return diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index fa466759bcc..e3ffe2074a7 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -21,7 +21,8 @@ /obj/item/organ/internal/brain/surgeryize() if(!owner) return - owner.setEarDamage(0,0) //Yeah, didn't you...hear? The ears are totally inside the brain. + owner.SetEarDeaf(0) + owner.SetEarDamage(0) //Yeah, didn't you...hear? The ears are totally inside the brain. /obj/item/organ/internal/brain/xeno name = "xenomorph brain" diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 40273bf66ad..74d096d9518 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -52,12 +52,12 @@ if(stat == DEAD) blinded = 1 - silent = 0 + SetSilence(0) else if(!container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life))) death() - blinded =1 - silent = 0 + blinded = 1 + SetSilence(0) return 1 . = 1 diff --git a/code/modules/mob/living/carbon/brain/login.dm b/code/modules/mob/living/carbon/brain/login.dm index e90297dfe5b..622ae74656a 100644 --- a/code/modules/mob/living/carbon/brain/login.dm +++ b/code/modules/mob/living/carbon/brain/login.dm @@ -1,3 +1,3 @@ /mob/living/carbon/brain/Login() ..() - sleeping = 0 \ No newline at end of file + SetSleeping(0) diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 4f76dce16bd..3b5b415964d 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -185,7 +185,7 @@ src.brainmob.loc = src src.brainmob.container = src src.brainmob.stat = 0 - src.brainmob.silent = 0 + src.brainmob.SetSilence(0) dead_mob_list -= src.brainmob ..() diff --git a/code/modules/mob/living/carbon/brain/update_status.dm b/code/modules/mob/living/carbon/brain/update_status.dm new file mode 100644 index 00000000000..2532edfe37d --- /dev/null +++ b/code/modules/mob/living/carbon/brain/update_status.dm @@ -0,0 +1,8 @@ +/mob/living/carbon/brain/update_stat() + if(status_flags & GODMODE) + return + // if(health <= min_health) + if(health <= config.health_threshold_dead) + if(stat != DEAD) + death() + // Put brain(organ) damaging code here diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 688508c4bf3..256aa562f72 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -158,13 +158,13 @@ "You feel a powerful shock coursing through your body!", \ "You hear a heavy electrical crack." \ ) - jitteriness += 1000 //High numbers for violent convulsions + AdjustJitter(1000) //High numbers for violent convulsions do_jitter_animation(jitteriness) - stuttering += 2 + AdjustStuttering(2) if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) Stun(2) spawn(20) - jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less + AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) Stun(3) Weaken(3) @@ -268,7 +268,7 @@ if(istype(src,/mob/living/carbon/human) && src:w_uniform) var/mob/living/carbon/human/H = src H.w_uniform.add_fingerprint(M) - src.sleeping = max(0,src.sleeping-5) + AdjustSleeping(-5) if(src.sleeping == 0) src.resting = 0 AdjustParalysis(-3) @@ -327,8 +327,8 @@ E.damage += rand(12, 16) if(E.damage > E.min_bruised_damage) - eye_blind += damage - eye_blurry += damage * rand(3, 6) + AdjustEyeBlind(damage) + AdjustEyeBlurry(damage * rand(3, 6)) if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2) if(!(E.status & ORGAN_ROBOT)) diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index b0ccdc8381d..f8a9b38d098 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -1,9 +1,9 @@ /mob/living/carbon/death(gibbed) - losebreath = 0 + SetLoseBreath(0) med_hud_set_health() med_hud_set_status() if(reagents) reagents.death_metabolize(src) - ..(gibbed) \ No newline at end of file + ..(gibbed) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 7802cfd53c6..eb58d39ea7c 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -4,32 +4,29 @@ AC.ui_interact(user, state = state) /mob/living/carbon/human/proc/change_species(var/new_species) - if(!new_species) + if(!new_species || species == new_species || !(new_species in all_species)) return - if(species == new_species) - return - - if(!(new_species in all_species)) - return - - set_species(new_species) + set_species(new_species, null, 1) reset_hair() + if(species.bodyflags & HAS_MARKINGS) + reset_markings() + return 1 -/mob/living/carbon/human/proc/change_gender(var/gender, var/update_dna = 1) +/mob/living/carbon/human/proc/change_gender(var/new_gender, var/update_dna = 1) var/obj/item/organ/external/head/H = organs_by_name["head"] - if(src.gender == gender) + if(gender == new_gender) return - src.gender = gender + gender = new_gender var/datum/sprite_accessory/hair/current_hair = hair_styles_list[H.h_style] - if(current_hair.gender != NEUTER && current_hair.gender != src.gender) + if(current_hair.gender != NEUTER && current_hair.gender != gender) reset_head_hair() var/datum/sprite_accessory/hair/current_fhair = facial_hair_styles_list[H.f_style] - if(current_fhair.gender != NEUTER && current_fhair.gender != src.gender) + if(current_fhair.gender != NEUTER && current_fhair.gender != gender) reset_facial_hair() if(update_dna) @@ -40,13 +37,7 @@ /mob/living/carbon/human/proc/change_hair(var/hair_style) var/obj/item/organ/external/head/H = get_organ("head") - if(!hair_style) - return - - if(H.h_style == hair_style) - return - - if(!(hair_style in hair_styles_list)) + if(!hair_style || !H || H.h_style == hair_style || !(hair_style in hair_styles_list)) return H.h_style = hair_style @@ -56,13 +47,7 @@ /mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style) var/obj/item/organ/external/head/H = get_organ("head") - if(!facial_hair_style) - return - - if(H.f_style == facial_hair_style) - return - - if(!(facial_hair_style in facial_hair_styles_list)) + if(!facial_hair_style || !H || H.f_style == facial_hair_style || !(facial_hair_style in facial_hair_styles_list)) return H.f_style = facial_hair_style @@ -72,13 +57,7 @@ /mob/living/carbon/human/proc/change_head_accessory(var/head_accessory_style) var/obj/item/organ/external/head/H = get_organ("head") - if(!head_accessory_style) - return - - if(H.ha_style == head_accessory_style) - return - - if(!(head_accessory_style in head_accessory_styles_list)) + if(!head_accessory_style || !H || H.ha_style == head_accessory_style || !(head_accessory_style in head_accessory_styles_list)) return H.ha_style = head_accessory_style @@ -86,52 +65,95 @@ update_head_accessory() return 1 -/mob/living/carbon/human/proc/change_markings(var/marking_style) - if(!marking_style) +/mob/living/carbon/human/proc/change_markings(var/marking_style, var/location = "body") + if(!marking_style || m_styles[location] == marking_style || !(marking_style in marking_styles_list)) return - if(src.m_style == marking_style) + var/datum/sprite_accessory/body_markings/marking = marking_styles_list[marking_style] + if(marking.name != "None" && marking.marking_location != location) return - if(!(marking_style in marking_styles_list)) - return + var/obj/item/organ/external/head/head_organ = get_organ("head") + if(location == "head") + if(!head_organ) + return - src.m_style = marking_style + if(head_organ.alt_head && head_organ.alt_head != "None") + var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style] + if(marking.name != "None" && (!H.heads_allowed || (!("All" in H.heads_allowed) && !(head_organ.alt_head in H.heads_allowed)))) + return + else + if(!head_organ.alt_head || head_organ.alt_head == "None") + head_organ.alt_head = "None" + var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style] + if(H.heads_allowed && !("All" in H.heads_allowed)) + return - update_markings() + if(location == "tail" && marking.name != "None") + var/datum/sprite_accessory/body_markings/tail/tail_marking = marking_styles_list[marking_style] + if(!body_accessory) + if(tail_marking.tails_allowed) + return + else + if(!tail_marking.tails_allowed || !(body_accessory.name in tail_marking.tails_allowed)) + return + + m_styles[location] = marking_style + + if(location == "tail") + stop_tail_wagging() + else + update_markings() return 1 /mob/living/carbon/human/proc/change_body_accessory(var/body_accessory_style) var/found - if(!body_accessory_style) + if(!body_accessory_style || (body_accessory && body_accessory.name == body_accessory_style)) return - if(src.body_accessory) - if(src.body_accessory.name == body_accessory_style) - return - for(var/B in body_accessory_by_name) if(B == body_accessory_style) - src.body_accessory = body_accessory_by_name[body_accessory_style] + body_accessory = body_accessory_by_name[body_accessory_style] found = 1 if(!found) return + m_styles["tail"] = "None" update_tail_layer() return 1 +/mob/living/carbon/human/proc/change_alt_head(var/alternate_head) + var/obj/item/organ/external/head/H = get_organ("head") + if(!H || H.alt_head == alternate_head || (H.status & ORGAN_ROBOT) || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list)) + return + + H.alt_head = alternate_head + + //Handle head markings if they're incompatible with the new alt head. + if(m_styles["head"]) + var/head_marking = m_styles["head"] + var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking] + if(!head_marking_style.heads_allowed || (!("All" in head_marking_style.heads_allowed) && !(H.alt_head in head_marking_style.heads_allowed))) + m_styles["head"] = "None" + update_markings() + + update_body(1, 1) //Update the body and force limb icon regeneration to update the head with the new icon. + if(wear_mask) + update_inv_wear_mask() + return 1 + /mob/living/carbon/human/proc/reset_hair() reset_head_hair() reset_facial_hair() reset_head_accessory() - if(m_style && m_style != "None") //Resets the markings if they were head markings. - var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] - if(marking_style && marking_style.marking_location == "head") - reset_markings() + if(m_styles["head"] && m_styles["head"] != "None") //Resets head markings. + reset_markings("head") /mob/living/carbon/human/proc/reset_head_hair() var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return var/list/valid_hairstyles = generate_valid_hairstyles() if(valid_hairstyles.len) H.h_style = pick(valid_hairstyles) @@ -143,6 +165,8 @@ /mob/living/carbon/human/proc/reset_facial_hair() var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return var/list/valid_facial_hairstyles = generate_valid_facial_hairstyles() if(valid_facial_hairstyles.len) H.f_style = pick(valid_facial_hairstyles) @@ -151,17 +175,32 @@ H.f_style = "Shaved" update_fhair() -/mob/living/carbon/human/proc/reset_markings() - var/list/valid_markings = generate_valid_markings() - if(valid_markings.len) - m_style = pick(valid_markings) +/mob/living/carbon/human/proc/reset_markings(var/location) + var/list/valid_markings + + if(location) + valid_markings = generate_valid_markings(location) + if(valid_markings.len) + m_styles[location] = pick(valid_markings) + else + //this shouldn't happen + m_styles[location] = "None" else - //this shouldn't happen - m_style = "None" + for(var/m_location in list("head", "body", "tail")) + valid_markings = generate_valid_markings(m_location) + if(valid_markings.len) + m_styles[m_location] = pick(valid_markings) + else + //this shouldn't happen + m_styles[m_location] = "None" + update_markings() + stop_tail_wagging() /mob/living/carbon/human/proc/reset_head_accessory() var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return var/list/valid_head_accessories = generate_valid_head_accessories() if(valid_head_accessories.len) H.ha_style = pick(valid_head_accessories) @@ -193,32 +232,57 @@ update_body() return 1 -/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue) +/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue, var/secondary) var/obj/item/organ/external/head/H = get_organ("head") - if(red == H.r_hair && green == H.g_hair && blue == H.b_hair) + if(!H) return - H.r_hair = red - H.g_hair = green - H.b_hair = blue + if(!secondary) + if(red == H.r_hair && green == H.g_hair && blue == H.b_hair) + return + + H.r_hair = red + H.g_hair = green + H.b_hair = blue + else + if(red == H.r_hair_sec && green == H.g_hair_sec && blue == H.b_hair_sec) + return + + H.r_hair_sec = red + H.g_hair_sec = green + H.b_hair_sec = blue update_hair() return 1 -/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue) +/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue, var/secondary) var/obj/item/organ/external/head/H = get_organ("head") - if(red == H.r_facial && green == H.g_facial && blue == H.b_facial) + if(!H) return - H.r_facial = red - H.g_facial = green - H.b_facial = blue + if(!secondary) + if(red == H.r_facial && green == H.g_facial && blue == H.b_facial) + return + + H.r_facial = red + H.g_facial = green + H.b_facial = blue + else + if(red == H.r_facial_sec && green == H.g_facial_sec && blue == H.b_facial_sec) + return + + H.r_facial_sec = red + H.g_facial_sec = green + H.b_facial_sec = blue update_fhair() return 1 /mob/living/carbon/human/proc/change_head_accessory_color(var/red, var/green, var/blue) var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return + if(red == H.r_headacc && green == H.g_headacc && blue == H.b_headacc) return @@ -229,15 +293,16 @@ update_head_accessory() return 1 -/mob/living/carbon/human/proc/change_marking_color(var/red, var/green, var/blue) - if(red == r_markings && green == g_markings && blue == b_markings) +/mob/living/carbon/human/proc/change_marking_color(var/colour, var/location = "body") + if(colour == m_colours[location]) return - r_markings = red - g_markings = green - b_markings = blue + m_colours[location] = colour - update_markings() + if(location == "tail") + update_tail_layer() + else + update_markings() return 1 @@ -287,75 +352,66 @@ /mob/living/carbon/human/proc/generate_valid_hairstyles() var/list/valid_hairstyles = new() var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return //No head, no hair. + for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) + if(hairstyle == "Bald") //Just in case. + valid_hairstyles += hairstyle continue - if(gender == FEMALE && S.gender == MALE) + if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE)) continue if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head... var/datum/robolimb/robohead = all_robolimbs[H.model] - if(!H) - return - if(H.species.name in S.species_allowed) //If this is a hairstyle native to the user's species... - if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. - valid_hairstyles += hairstyle //Give them their hairstyles if they do. - continue - else //If they don't have the default head, they shouldn't be getting any hairstyles they wouldn't normally. - continue + if((H.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_hairstyles += hairstyle //Give them their hairstyles if they do. else - if(robohead.is_monitor) //If the hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. - continue - else - if("Human" in S.species_allowed) //If the user has a robotic head and the hairstyle can fit humans, let them use it as a wig for their humanoid robot head. - valid_hairstyles += hairstyle - continue + if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */ + valid_hairstyles += hairstyle else //If the user is not a species who can have robotic heads, use the default handling. - if(!(H.species.name in S.species_allowed)) //If the user's head is not of a species the hair style allows, skip it. Otherwise, add it to the list. - continue - valid_hairstyles += hairstyle + if(H.species.name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list. + valid_hairstyles += hairstyle return valid_hairstyles /mob/living/carbon/human/proc/generate_valid_facial_hairstyles() var/list/valid_facial_hairstyles = new() var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return //No head, no hair. + for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) + if(facialhairstyle == "Shaved") //Just in case. + valid_facial_hairstyles += facialhairstyle continue - if(gender == FEMALE && S.gender == MALE) + if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE)) continue if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head... var/datum/robolimb/robohead = all_robolimbs[H.model] - if(!H) - continue // No head, no hair if(H.species.name in S.species_allowed) //If this is a facial hair style native to the user's species... - if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. - valid_facial_hairstyles += facialhairstyle //Give them their facial hair styles if they do. - continue - else //If they don't have the default head, they shouldn't be getting any facial hair styles they wouldn't normally. - continue + if((H.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do. else - - if(robohead.is_monitor) //If the facial hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. - continue - else - if("Human" in S.species_allowed) //If the user has a robotic head and the facial hair style can fit humans, let them use it as a postiche for their humanoid robot head. - valid_facial_hairstyles += facialhairstyle - continue + if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */ + valid_facial_hairstyles += facialhairstyle else //If the user is not a species who can have robotic heads, use the default handling. - if(!(H.species.name in S.species_allowed)) //If the user's head is not of a species the facial hair style allows, skip it. Otherwise, add it to the list. - continue - valid_facial_hairstyles += facialhairstyle + if(H.species.name in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list. + valid_facial_hairstyles += facialhairstyle return valid_facial_hairstyles /mob/living/carbon/human/proc/generate_valid_head_accessories() var/list/valid_head_accessories = new() var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return //No head, no head accessory. + for(var/head_accessory in head_accessory_styles_list) var/datum/sprite_accessory/S = head_accessory_styles_list[head_accessory] @@ -365,18 +421,40 @@ return valid_head_accessories -/mob/living/carbon/human/proc/generate_valid_markings() +/mob/living/carbon/human/proc/generate_valid_markings(var/location = "body") var/list/valid_markings = new() var/obj/item/organ/external/head/H = get_organ("head") - for(var/marking in marking_styles_list) - var/datum/sprite_accessory/S = marking_styles_list[marking] + if(!H && location == "head") + return //No head, no head markings. - if(!(species.name in S.species_allowed)) //If the user's head is not of a species the marking style allows, skip it. Otherwise, add it to the list. + for(var/marking in marking_styles_list) + var/datum/sprite_accessory/body_markings/S = marking_styles_list[marking] + if(S.name == "None") + valid_markings += marking continue - if(H.species.flags & ALL_RPARTS) //If the user is a species that can have a robotic head... - var/datum/robolimb/robohead = all_robolimbs[H.model] - if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head. - continue + if(S.marking_location != location) //If the marking isn't for the location we desire, skip. + continue + if(!(species.name in S.species_allowed)) //If the user is not of a species the marking style allows, skip it. Otherwise, add it to the list. + continue + if(location == "tail") + if(!body_accessory) + if(S.tails_allowed) + continue + else + if(!S.tails_allowed || !(body_accessory.name in S.tails_allowed)) + continue + if(location == "head") + var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name] + if(H.species.flags & ALL_RPARTS)//If the user is a species that can have a robotic head... + var/datum/robolimb/robohead = all_robolimbs[H.model] + if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head. + continue + else if(H.alt_head && H.alt_head != "None") //If the user's got an alt head, validate markings for that head. + if(!M.heads_allowed || (!("All" in M.heads_allowed) && !(H.alt_head in M.heads_allowed))) + continue + else + if(M.heads_allowed && !("All" in M.heads_allowed)) + continue valid_markings += marking return valid_markings @@ -389,10 +467,24 @@ valid_body_accessories = body_accessory_by_name.Copy() else if(!istype(A)) - valid_body_accessories += "None" //The only null entry should be the "None" option. + valid_body_accessories["None"] = "None" //The only null entry should be the "None" option. continue - if(!(species.name in A.allowed_species)) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list. - continue - valid_body_accessories += B + if(species.name in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list. + valid_body_accessories += B return valid_body_accessories + +/mob/living/carbon/human/proc/generate_valid_alt_heads() + var/list/valid_alt_heads = list() + var/obj/item/organ/external/head/H = get_organ("head") + if(!H) + return //No head, no alt heads. + valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option, and there should always be a "None" option. + for(var/alternate_head in alt_heads_list) + var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head] + if(!(H.species.name in head.species_allowed)) + continue + + valid_alt_heads += alternate_head + + return valid_alt_heads \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/body_accessories.dm b/code/modules/mob/living/carbon/human/body_accessories.dm index f4b95eec4d4..8744a09ea4d 100644 --- a/code/modules/mob/living/carbon/human/body_accessories.dm +++ b/code/modules/mob/living/carbon/human/body_accessories.dm @@ -112,36 +112,30 @@ var/global/list/body_accessory_by_species = list("None" = null) //Vulpkanin /datum/body_accessory/tail/vulpkanin_2 name = "Vulpkanin Alt 1 (Bushy)" - icon_state = "vulptail2" animated_icon_state = "vulptail2_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_3 name = "Vulpkanin Alt 2 (Straight)" - icon_state = "vulptail3" animated_icon_state = "vulptail3_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_4 name = "Vulpkanin Alt 3 (Tiny)" - icon_state = "vulptail4" animated_icon_state = "vulptail4_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_5 name = "Vulpkanin Alt 4 (Short)" - icon_state = "vulptail5" animated_icon_state = "vulptail5_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_6 name = "Vulpkanin Alt 5 (Straight Bushy)" - icon_state = "vulptail6" animated_icon_state = "vulptail6_a" allowed_species = list("Vulpkanin") - diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index df78c286254..89c35870cad 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -97,8 +97,8 @@ emote("deathgasp") //let the world KNOW WE ARE DEAD stat = DEAD - dizziness = 0 - jitteriness = 0 + SetDizzy(0) + SetJitter(0) heart_attack = 0 //Handle species-specific deaths. @@ -155,11 +155,19 @@ if(istype(H)) if(H.f_style) - H.f_style = "Shaved" + H.f_style = initial(H.f_style) if(H.h_style) - H.h_style = "Bald" + H.h_style = initial(H.h_style) + if(H.ha_style) + H.ha_style = initial(H.ha_style) + if(H.alt_head) + H.alt_head = initial(H.alt_head) + H.handle_alt_icon() + m_styles = DEFAULT_MARKING_STYLES update_fhair(0) update_hair(0) + update_head_accessory(0) + update_markings(0) mutations.Add(SKELETON) mutations.Add(NOCLONE) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 0746cb30b2c..bd0c3538462 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -10,7 +10,7 @@ act = copytext(act, 1, t1) var/muzzled = is_muzzled() - if(disabilities & MUTE || silent) + if(!can_speak()) muzzled = 1 //var/m_type = 1 @@ -313,7 +313,7 @@ M = null if(M) - if(lying || weakened) + if(lying) message = "[src] flops and flails around on the floor." else message = "[src] flips in [M]'s general direction." @@ -378,7 +378,7 @@ message = "[src] faints." if(src.sleeping) return //Can't faint while asleep - src.sleeping += 1 + AdjustSleeping(1) m_type = 1 if("cough", "coughs") diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ed48c229b89..0bf23e3cae6 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -352,7 +352,8 @@ else valid_limbs -= processing_dismember if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) - adjustEarDamage(30, 120) + AdjustEarDamage(30) + AdjustEarDeaf(120) if(prob(70) && !shielded) Paralyse(10) @@ -376,7 +377,8 @@ else valid_limbs -= processing_dismember if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) - adjustEarDamage(15,60) + AdjustEarDamage(15) + AdjustEarDeaf(60) if(prob(50) && !shielded) Paralyse(10) @@ -491,8 +493,7 @@ O.show_message(text("The [M.name] has shocked []!", src), 1) Weaken(power) - if(stuttering < power) - stuttering = power + Stuttering(power) Stun(power) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread @@ -709,12 +710,19 @@ if(!.) . = if_no_id //to prevent null-names making the mob unclickable return -//gets ID card object from special clothes slot or null. -/mob/living/carbon/human/proc/get_idcard() +//gets ID card object from special clothes slot or, if applicable, hands as well +/mob/living/carbon/human/proc/get_idcard(var/check_hands = FALSE) var/obj/item/weapon/card/id/id = wear_id var/obj/item/device/pda/pda = wear_id if(istype(pda) && pda.id) id = pda.id + + if(check_hands) + if(istype(get_active_hand(), /obj/item/weapon/card/id)) + id = get_active_hand() + else if(istype(get_inactive_hand(), /obj/item/weapon/card/id)) + id = get_inactive_hand() + if(istype(id)) return id @@ -1472,7 +1480,6 @@ to_chat(usr, "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].") /mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour, var/delay_icon_update = 0) - var/datum/species/oldspecies = species if(!dna) if(!new_species) @@ -1525,9 +1532,9 @@ if(species.base_color && default_colour) //Apply colour. - r_skin = hex2num(copytext(species.base_color, 2, 4)) - g_skin = hex2num(copytext(species.base_color, 4, 6)) - b_skin = hex2num(copytext(species.base_color, 6, 8)) + r_skin = color2R(species.base_color) + g_skin = color2G(species.base_color) + b_skin = color2B(species.base_color) else r_skin = 0 g_skin = 0 @@ -1542,37 +1549,47 @@ var/obj/item/organ/external/head/H = get_organ("head") if(species.default_hair) H.h_style = species.default_hair + else + H.h_style = "Bald" if(species.default_fhair) H.f_style = species.default_fhair + else + H.f_style = "Shaved" if(species.default_headacc) H.ha_style = species.default_headacc + else + H.ha_style = "None" if(species.default_hair_colour) //Apply colour. - H.r_hair = hex2num(copytext(species.default_hair_colour, 2, 4)) - H.g_hair = hex2num(copytext(species.default_hair_colour, 4, 6)) - H.b_hair = hex2num(copytext(species.default_hair_colour, 6, 8)) + H.r_hair = color2R(species.default_hair_colour) + H.g_hair = color2G(species.default_hair_colour) + H.b_hair = color2B(species.default_hair_colour) else H.r_hair = 0 H.g_hair = 0 H.b_hair = 0 if(species.default_fhair_colour) - H.r_facial = hex2num(copytext(species.default_fhair_colour, 2, 4)) - H.g_facial = hex2num(copytext(species.default_fhair_colour, 4, 6)) - H.b_facial = hex2num(copytext(species.default_fhair_colour, 6, 8)) + H.r_facial = color2R(species.default_fhair_colour) + H.g_facial = color2G(species.default_fhair_colour) + H.b_facial = color2B(species.default_fhair_colour) else H.r_facial = 0 H.g_facial = 0 H.b_facial = 0 if(species.default_headacc_colour) - H.r_headacc = hex2num(copytext(species.default_headacc_colour, 2, 4)) - H.g_headacc = hex2num(copytext(species.default_headacc_colour, 4, 6)) - H.b_headacc = hex2num(copytext(species.default_headacc_colour, 6, 8)) + H.r_headacc = color2R(species.default_headacc_colour) + H.g_headacc = color2G(species.default_headacc_colour) + H.b_headacc = color2B(species.default_headacc_colour) else H.r_headacc = 0 H.g_headacc = 0 H.b_headacc = 0 + m_styles = DEFAULT_MARKING_STYLES //Wipes out markings, setting them all to "None". + m_colours = DEFAULT_MARKING_COLOURS //Defaults colour to #00000 for all markings. + body_accessory = null + if(!dna) dna = new /datum/dna(null) dna.species = species.name @@ -1673,16 +1690,13 @@ if(!head_organ) return if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics! - var/optic_colour = input(src, "Select optic colour", rgb(r_markings, g_markings, b_markings)) as color|null + var/optic_colour = input(src, "Select optic colour", m_colours["head"]) as color|null if(incapacitated()) to_chat(src, "You were interrupted while changing the colour of your optics.") return if(optic_colour) - r_markings = hex2num(copytext(optic_colour, 2, 4)) - g_markings = hex2num(copytext(optic_colour, 4, 6)) - b_markings = hex2num(copytext(optic_colour, 6, 8)) + change_markings(optic_colour, "head") - update_markings() else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize. var/list/hair = list() for(var/i in hair_styles_list) @@ -1690,14 +1704,12 @@ if((head_organ.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use. hair += i - var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair + var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair if(incapacitated()) to_chat(src, "You were interrupted while changing your monitor display.") return if(new_style) - head_organ.h_style = new_style - - update_hair() + change_hair(new_style) //Putting a couple of procs here that I don't know where else to dump. //Mostly going to be used for Vox and Vox Armalis, but other human mobs might like them (for adminbuse). @@ -1728,7 +1740,7 @@ if(last_special > world.time) return - if(stat || paralysis || stunned || weakened || lying || restrained() || buckled) + if(!canmove) to_chat(src, "You cannot leap in your current state.") return @@ -1782,7 +1794,7 @@ if(last_special > world.time) return - if(stat || paralysis || stunned || weakened || lying) + if(!canmove) to_chat(src, "\red You cannot do that in your current state.") return @@ -1977,6 +1989,12 @@ var/obj/item/weapon/card/id/id = wear_id if(istype(id) && id.is_untrackable()) return 0 + if(wear_pda) + var/obj/item/device/pda/pda = wear_pda + if(istype(pda)) + var/obj/item/weapon/card/id/id = pda.id + if(istype(id) && id.is_untrackable()) + return 0 if(istype(head, /obj/item/clothing/head)) var/obj/item/clothing/head/hat = head if(hat.blockTracking) @@ -1992,6 +2010,8 @@ if(wear_id) . |= wear_id.GetAccess() + if(wear_pda) + . |= wear_pda.GetAccess() if(istype(w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = w_uniform if(U.accessories) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 16d940dd439..0ceabc84bfe 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -254,7 +254,7 @@ emp_act visible_message("[src] has been knocked down!", \ "[src] has been knocked down!") apply_effect(5, WEAKEN, armor) - confused += 15 + AdjustConfused(15) if(prob(I.force + ((100 - health)/2)) && src != user && I.damtype == BRUTE) ticker.mode.remove_revolutionary(mind) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 272cb65e33a..0d30c5c8265 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -4,10 +4,8 @@ var/global/default_martial_art = new/datum/martial_art hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD) //Marking colour and style - var/r_markings = 0 - var/g_markings = 0 - var/b_markings = 0 - var/m_style = "None" + var/list/m_colours = DEFAULT_MARKING_COLOURS //All colours set to #000000. + var/list/m_styles = DEFAULT_MARKING_STYLES //All markings set to None. var/s_tone = 0 //Skin tone diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 8288c2dbd8b..50f1e7cd342 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -152,7 +152,7 @@ mutations.Remove(FAT) update_mutantrace(0) update_mutations(0) - update_body(0) + update_body(0, 1) update_inv_w_uniform(0) update_inv_wear_suit() @@ -167,7 +167,7 @@ mutations.Add(FAT) update_mutantrace(0) update_mutations(0) - update_body(0) + update_body(0, 1) update_inv_w_uniform(0) update_inv_wear_suit() diff --git a/code/modules/mob/living/carbon/human/interactive/interactive.dm b/code/modules/mob/living/carbon/human/interactive/interactive.dm index 1862062e4cf..2dfc4f8d24e 100644 --- a/code/modules/mob/living/carbon/human/interactive/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive/interactive.dm @@ -167,7 +167,7 @@ /client/proc/customiseSNPC(mob/living/carbon/human/interactive/T in npc_master.botPool_l) set name = "Customize SNPC" - set desc = "Customise the SNPC" + set desc = "Customize the SNPC" set category = "Debug" if(!holder) @@ -403,7 +403,7 @@ if(!hud_used) hud_used = new /datum/hud/human(src) -/mob/living/carbon/human/interactive/New() +/mob/living/carbon/human/interactive/New(var/new_loc, var/new_species = null) ..() snpc_list += src @@ -916,7 +916,7 @@ TARGET = null return 1 - if(!(get_turf(src) in validHome)) + if(!(get_turf(src) in validHome) && validHome.len) tryWalk(pick(get_area_turfs(job2area(myjob)))) return 1 return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 78e9098f434..471cb6bbf69 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -86,8 +86,8 @@ // If we have the gene for being crazy, have random events. if(dna.GetSEState(HALLUCINATIONBLOCK)) - if(prob(1) && hallucination < 1) - hallucination += 20 + if(prob(1)) + Hallucinate(20) if(disabilities & COUGHING) if((prob(5) && paralysis <= 1)) @@ -111,9 +111,9 @@ if(disabilities & NERVOUS) speech_problem_flag = 1 if(prob(10)) - stuttering = max(10, stuttering) + Stuttering(10) - if(getBrainLoss() >= 60 && stat != 2) + if(getBrainLoss() >= 60 && stat != DEAD) speech_problem_flag = 1 if(prob(3)) var/list/s1 = list("IM A PONY NEEEEEEIIIIIIIIIGH", @@ -152,8 +152,8 @@ if(getBrainLoss() >= 100 && stat != 2) //you lapse into a coma and die without immediate aid; RIP. -Fox Weaken(20) - losebreath += 10 - silent += 2 + AdjustLoseBreath(10) + AdjustSilence(2) if(getBrainLoss() >= 120 && stat != 2) //they died from stupidity--literally. -Fox visible_message("[src] goes limp, their facial expression utterly blank.") @@ -281,10 +281,10 @@ var/datum/gas_mixture/breath if(health <= config.health_threshold_crit) - losebreath++ + AdjustLoseBreath(1) if(losebreath > 0) - losebreath-- + AdjustLoseBreath(-1) if(prob(10)) spawn emote("gasp") if(istype(loc, /obj/)) @@ -696,20 +696,20 @@ overeatduration -= 2 if(drowsyness) - drowsyness-- - eye_blurry = max(2, eye_blurry) + AdjustDrowsy(-1) + EyeBlurry(2) if(prob(5)) - sleeping += 1 + AdjustSleeping(1) Paralyse(5) - confused = max(0, confused - 1) + AdjustConfused(-1) // decrement dizziness counter, clamped to 0 if(resting) - dizziness = max(0, dizziness - 15) - jitteriness = max(0, jitteriness - 15) + AdjustDizzy(-15) + AdjustJitter(-15) else - dizziness = max(0, dizziness - 3) - jitteriness = max(0, jitteriness - 3) + AdjustDizzy(-3) + AdjustJitter(-3) if(species && species.flags & NO_INTORGANS) return @@ -744,8 +744,7 @@ alcohol_strength *= 5 if(alcohol_strength >= slur_start) //slurring - if(!slurring) slurring = 1 - slurring = drunk + Slur(drunk) if(alcohol_strength >= brawl_start) //the drunken martial art if(!istype(martial_art, /datum/martial_art/drunk_brawling)) var/datum/martial_art/drunk_brawling/F = new @@ -754,18 +753,17 @@ if(istype(martial_art, /datum/martial_art/drunk_brawling)) martial_art.remove(src) if(alcohol_strength >= confused_start && prob(33)) //confused walking - if(!confused) confused = 1 - confused = max(confused+(3/sober_str),0) + if(!confused) Confused(1) + AdjustConfused(3/sober_str) if(alcohol_strength >= blur_start) //blurry eyes - eye_blurry = max(eye_blurry, 10/sober_str) - drowsyness = max(drowsyness, 0) + EyeBlurry(10/sober_str) if(!isSynthetic()) //stuff only for non-synthetics if(alcohol_strength >= vomit_start) //vomiting if(prob(8)) fakevomit() if(alcohol_strength >= pass_out) - Paralyse(5 / sober_str) - drowsyness = max(drowsyness, 30/sober_str) + Paralyse(5/sober_str) + Drowsy(30/sober_str) if(L) L.take_damage(0.1, 1) adjustToxLoss(0.1) @@ -837,14 +835,14 @@ vision = get_int_organ(species.vision_organ) if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means. - eye_blind = 0 + SetEyeBlind(0) blinded = 0 - eye_blurry = 0 + SetEyeBlurry(0) else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind. - eye_blind = 1 + EyeBlind(1) blinded = 1 - eye_blurry = 1 + EyeBlurry(1) else //blindness @@ -852,34 +850,34 @@ blinded = 1 else if(eye_blind) // Blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) blinded = 1 else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster - eye_blurry = max(eye_blurry-3, 0) + AdjustEyeBlurry(-3) blinded = 1 //blurry sight if(vision.is_bruised()) // Vision organs impaired? Permablurry. - eye_blurry = 1 + EyeBlurry(1) if(eye_blurry) // Blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else if(ear_deaf) //deafness, heals slowly over time - adjustEarDamage(0,-1) + AdjustEarDeaf(-1) else if(istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster - adjustEarDamage(-0.15,0) - setEarDamage(-1, max(ear_deaf, 1)) + AdjustEarDamage(-0.15) + EarDeaf(1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - adjustEarDamage(-0.05,0) + AdjustEarDamage(-0.05) if(flying) animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) @@ -896,7 +894,7 @@ else //dead blinded = 1 - silent = 0 + SetSilence(0) /mob/living/carbon/human/handle_vision() @@ -995,8 +993,8 @@ if(shock_stage >= 30) if(shock_stage == 30) custom_emote(1,"is having trouble keeping their eyes open.") - eye_blurry = max(2, eye_blurry) - stuttering = max(stuttering, 5) + EyeBlurry(2) + Stuttering(5) if(shock_stage == 40) to_chat(src, ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!")) @@ -1183,8 +1181,7 @@ if(!heart_attack) return else - if(losebreath < 3) - losebreath += 2 + AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) adjustOxyLoss(5) adjustBruteLoss(1) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 72e6ff63314..26ca4af83e8 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -142,7 +142,7 @@ message = uppertext(message) verb = "yells loudly" - if(locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs) + if((COMIC in mutations) || (locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs)) message = "[message]" returns[1] = message diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index d8434a87223..49d6d7fe245 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -189,7 +189,7 @@ if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit H.Paralyse(3) // 3 gives them one second to wake up and run away a bit! if(SA_pp > SA_sleep_min) // Enough to make us sleep as well - H.sleeping = min(H.sleeping+2, 10) + H.AdjustSleeping(2, bound_lower = 0, bound_upper = 10) else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning if(prob(20)) spawn(0) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 33aa58b94d4..7b91d51261c 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -120,11 +120,11 @@ var/female_scream_sound = 'sound/goonstation/voice/female_scream.ogg' //Default hair/headacc style vars. - var/default_hair = "Bald" //Default hair style for newly created humans unless otherwise set. + var/default_hair //Default hair style for newly created humans unless otherwise set. var/default_hair_colour - var/default_fhair = "Shaved" //Default facial hair style for newly created humans unless otherwise set. + var/default_fhair //Default facial hair style for newly created humans unless otherwise set. var/default_fhair_colour - var/default_headacc = "None" //Default head accessory style for newly created humans unless otherwise set. + var/default_headacc //Default head accessory style for newly created humans unless otherwise set. var/default_headacc_colour //Defining lists of icon skin tones for species that have them. @@ -332,7 +332,7 @@ if(SA_pp > atmos_requirements["sa_para"]) // Enough to make us paralysed for a bit H.Paralyse(3) // 3 gives them one second to wake up and run away a bit! if(SA_pp > atmos_requirements["sa_sleep"]) // Enough to make us sleep as well - H.sleeping = max(H.sleeping + 2, 10) + H.AdjustSleeping(2, bound_lower = 0, bound_upper = 10) else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning if(prob(20)) spawn(0) @@ -509,7 +509,7 @@ if(tinted_weldhelh) H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2) if(H.tinttotal >= TINT_BLIND) - H.eye_blind = max(H.eye_blind, 1) + H.EyeBlind(1) else H.clear_fullscreen("tint") diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 924a7c03bf4..1a6c8254a3e 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -8,7 +8,7 @@ language = "Sol Common" flags = HAS_LIPS | CAN_BE_FAT clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_SKIN_TONE + bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS dietflags = DIET_OMNI unarmed_type = /datum/unarmed_attack/punch blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \ @@ -40,7 +40,7 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING + bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_BODY_MARKINGS | HAS_HEAD_MARKINGS | HAS_SKIN_COLOR | HAS_ALT_HEADS | TAIL_WAGGING dietflags = DIET_CARN cold_level_1 = 280 //Default 260 - Lower is better @@ -112,13 +112,11 @@ flags = HAS_LIPS | CAN_BE_FAT clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR + bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR dietflags = DIET_OMNI reagent_tag = PROCESS_ORG flesh_color = "#AFA59E" - base_color = "#333333" - //Default styles for created mobs. - default_headacc = "Tajaran Ears" + base_color = "#424242" butt_sprite = "tajaran" has_organ = list( @@ -164,11 +162,11 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR + bodyflags = FEET_PADDED | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | HAS_FUR dietflags = DIET_OMNI reagent_tag = PROCESS_ORG flesh_color = "#966464" - base_color = "#B43214" + base_color = "#CF4D2F" butt_sprite = "vulp" has_organ = list( @@ -212,7 +210,7 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_SKIN_COLOR + bodyflags = HAS_SKIN_COLOR | HAS_BODY_MARKINGS dietflags = DIET_HERB flesh_color = "#8CD7A3" blood_color = "#1D2CBF" @@ -287,7 +285,7 @@ flags = NO_SCAN | IS_WHITELISTED clothing_flags = HAS_SOCKS dietflags = DIET_OMNI - bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED + bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS blood_color = "#2299FC" flesh_color = "#808D11" @@ -705,6 +703,7 @@ flags = IS_WHITELISTED | HAS_LIPS | CAN_BE_FAT clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS + bodyflags = HAS_BODY_MARKINGS dietflags = DIET_HERB reagent_tag = PROCESS_ORG blood_color = "#A200FF" @@ -855,7 +854,7 @@ flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA | NO_POISON | RADIMMUNE | ALL_RPARTS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_SKIN_COLOR | HAS_MARKINGS | HAS_HEAD_ACCESSORY + bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY dietflags = 0 //IPCs can't eat, so no diet blood_color = "#1F181F" flesh_color = "#AAAAAA" @@ -946,7 +945,7 @@ flags = IS_WHITELISTED | HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT - bodyflags = FEET_CLAWS | HAS_SKIN_TONE + bodyflags = FEET_CLAWS | HAS_SKIN_TONE | HAS_BODY_MARKINGS dietflags = DIET_OMNI cold_level_1 = -1 //Default 260 - Lower is better diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 8f7ed81a5fa..037e5234d27 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -212,15 +212,15 @@ var/global/list/damage_icon_parts = list() if(update_icons) update_icons() //BASE MOB SPRITE -/mob/living/carbon/human/proc/update_body(var/update_icons=1) +/mob/living/carbon/human/proc/update_body(var/update_icons=1, var/rebuild_base=0) var/husk_color_mod = rgb(96,88,80) var/hulk_color_mod = rgb(48,224,40) - var/husk = (HUSK in src.mutations) - var/fat = (FAT in src.mutations) - var/hulk = (HULK in src.mutations) - var/skeleton = (SKELETON in src.mutations) + var/husk = (HUSK in mutations) + var/fat = (FAT in mutations) + var/hulk = (HULK in mutations) + var/skeleton = (SKELETON in mutations) if(species && species.bodyflags & HAS_ICON_SKIN_TONE) species.updatespeciescolor(src) @@ -262,7 +262,7 @@ var/global/list/damage_icon_parts = list() icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]" var/icon/base_icon - if(human_icon_cache[icon_key]) + if(human_icon_cache[icon_key] && !rebuild_base) base_icon = human_icon_cache[icon_key] else //BEGIN CACHED ICON GENERATION. @@ -309,7 +309,7 @@ var/global/list/damage_icon_parts = list() //END CACHED ICON GENERATION. stand_icon.Blend(base_icon,ICON_OVERLAY) - if(src.species.bodyflags & TAIL_OVERLAPPED) // If the user's species is flagged to have a tail that needs to be overlapped by limbs... + if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the user's species is flagged to have a tail that needs to be overlapped by limbs... (having a non-tail body accessory like the snake body will override this) overlays_standing[LIMBS_LAYER] = image(stand_icon) // Diverts limbs to their own layer so they can overlay things (i.e. tails). else overlays_standing[LIMBS_LAYER] = null // So we don't get the old species' sprite splatted on top of the new one's @@ -360,29 +360,32 @@ var/global/list/damage_icon_parts = list() //MARKINGS OVERLAY /mob/living/carbon/human/proc/update_markings(var/update_icons=1) - //Reset our markings + //Reset our markings. overlays_standing[MARKINGS_LAYER] = null + //Base icon. + var/icon/markings_standing = new/icon('icons/mob/body_accessory.dmi',"accessory_none_s") + + //Body markings. var/obj/item/organ/external/chest/chest_organ = get_organ("chest") - if(!chest_organ || chest_organ.is_stump() || (chest_organ.status & ORGAN_DESTROYED) ) - if(update_icons) update_icons() - return - - //base icons - var/icon/markings_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - - if(m_style && m_style != "None") - var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] - if(marking_style) - var/obj/item/organ/external/head/head_organ = get_organ("head") - if((!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) && marking_style.marking_location == "head") - return //If the head is destroyed and it is the organ the marking is located on, get us out of here. This prevents floating optical markings on decapitated IPCs, for example. - var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") - if(marking_style.do_colouration) - markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD) - markings_standing.Blend(markings_s, ICON_OVERLAY) - else - //warning("Invalid m_style for [species.name]: [m_style]") + if(chest_organ && !chest_organ.is_stump() && !(chest_organ.status & ORGAN_DESTROYED) && m_styles["body"]) + var/body_marking = m_styles["body"] + var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking] + if(body_marking_style && body_marking_style.species_allowed && (species.name in body_marking_style.species_allowed)) + var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") + if(body_marking_style.do_colouration) + b_marking_s.Blend(m_colours["body"], ICON_ADD) + markings_standing.Blend(b_marking_s, ICON_OVERLAY) + //Head markings. + var/obj/item/organ/external/head/head_organ = get_organ("head") + if(head_organ && !head_organ.is_stump() && !(head_organ.status & ORGAN_DESTROYED) && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example. + var/head_marking = m_styles["head"] + var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] + if(head_marking_style && head_marking_style.species_allowed && (head_organ.species.name in head_marking_style.species_allowed)) + var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") + if(head_marking_style.do_colouration) + h_marking_s.Blend(m_colours["head"], ICON_ADD) + markings_standing.Blend(h_marking_s, ICON_OVERLAY) overlays_standing[MARKINGS_LAYER] = image(markings_standing) @@ -399,7 +402,7 @@ var/global/list/damage_icon_parts = list() return //masks and helmets can obscure our head accessory - if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) + if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) if(update_icons) update_icons() return @@ -426,15 +429,15 @@ var/global/list/damage_icon_parts = list() //HAIR OVERLAY /mob/living/carbon/human/proc/update_hair(var/update_icons=1) //Reset our hair - overlays_standing[HAIR_LAYER] = null + overlays_standing[HAIR_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") - if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) ) + if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) if(update_icons) update_icons() return //masks and helmets can obscure our hair, unless we're a synthetic - if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) + if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) if(update_icons) update_icons() return @@ -454,13 +457,19 @@ var/global/list/damage_icon_parts = list() else if(hair_style.do_colouration) hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD) + if(hair_style.secondary_theme) + var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") + if(!hair_style.no_sec_colour) + hair_secondary_s.Blend(rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec), ICON_ADD) + hair_s.Blend(hair_secondary_s, ICON_OVERLAY) + hair_standing = hair_s //hair_standing.Blend(hair_s, ICON_OVERLAY) //Having it this way preserves animations. Useful for IPC screens. else //warning("Invalid h_style for [species.name]: [h_style]") //hair_standing.Blend(debrained_s, ICON_OVERLAY)//how does i overlay for fish? - overlays_standing[HAIR_LAYER] = image(hair_standing) + overlays_standing[HAIR_LAYER] = image(hair_standing) if(update_icons) update_icons() @@ -468,15 +477,15 @@ var/global/list/damage_icon_parts = list() //FACIAL HAIR OVERLAY /mob/living/carbon/human/proc/update_fhair(var/update_icons=1) //Reset our facial hair - overlays_standing[FHAIR_LAYER] = null + overlays_standing[FHAIR_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") - if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) ) + if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) if(update_icons) update_icons() return //masks and helmets can obscure our facial hair, unless we're a synthetic - if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) + if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) if(update_icons) update_icons() return @@ -492,11 +501,18 @@ var/global/list/damage_icon_parts = list() facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_AND) else if(facial_hair_style.do_colouration) facial_s.Blend(rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial), ICON_ADD) + + if(facial_hair_style.secondary_theme) + var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") + if(!facial_hair_style.no_sec_colour) + facial_secondary_s.Blend(rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec), ICON_ADD) + facial_s.Blend(facial_secondary_s, ICON_OVERLAY) + face_standing.Blend(facial_s, ICON_OVERLAY) else //warning("Invalid f_style for [species.name]: [f_style]") - overlays_standing[FHAIR_LAYER] = image(face_standing) + overlays_standing[FHAIR_LAYER] = image(face_standing) if(update_icons) update_icons() @@ -536,7 +552,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1) //BS12 EDIT - var/skel = (SKELETON in src.mutations) + var/skel = (SKELETON in mutations) if(skel) skeleton = 'icons/mob/human_races/r_skeleton.dmi' else @@ -562,7 +578,7 @@ var/global/list/damage_icon_parts = list() ..() if(notransform) return update_mutations(0) - update_body(0) + update_body(0, 1) //Update the body and force limb icon regeneration. update_hair(0) update_head_accessory(0) update_fhair(0) @@ -997,13 +1013,21 @@ var/global/list/damage_icon_parts = list() if(inv) inv.update_icon() if(wear_mask && (istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory))) + var/obj/item/organ/external/head/head_organ = get_organ("head") + var/datum/sprite_accessory/alt_heads/alternate_head + if(head_organ.alt_head && head_organ.alt_head != "None") + alternate_head = alt_heads_list[head_organ.alt_head] + var/image/standing + var/icon/mask_icon = new(wear_mask.icon) if(wear_mask.icon_override) - standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state]") + mask_icon = new(wear_mask.icon_override) + standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state][(alternate_head && ("[wear_mask.icon_state]_[alternate_head.suffix]" in mask_icon.IconStates())) ? "_[alternate_head.suffix]" : ""]") else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.name]) - standing = image("icon" = wear_mask.sprite_sheets[species.name], "icon_state" = "[wear_mask.icon_state]") + mask_icon = new(wear_mask.sprite_sheets[species.name]) + standing = image("icon" = wear_mask.sprite_sheets[species.name], "icon_state" = "[wear_mask.icon_state][(alternate_head && ("[wear_mask.icon_state]_[alternate_head.suffix]" in mask_icon.IconStates())) ? "_[alternate_head.suffix]" : ""]") else - standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]") + standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state][(alternate_head && ("[wear_mask.icon_state]_[alternate_head.suffix]" in mask_icon.IconStates())) ? "_[alternate_head.suffix]" : ""]") if(!istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA) var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "maskblood") @@ -1053,7 +1077,7 @@ var/global/list/damage_icon_parts = list() clear_alert("legcuffed") if(legcuffed) overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1") - throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = src.legcuffed) + throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed) if(m_intent != "walk") m_intent = "walk" if(hud_used && hud_used.move_intent) @@ -1121,71 +1145,66 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/update_tail_layer(var/update_icons=1) overlays_standing[TAIL_UNDERLIMBS_LAYER] = null // SEW direction icons, overlayed by LIMBS_LAYER. - overlays_standing[TAIL_LAYER] = null // This will be one of two things: - // If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such. - // Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. + overlays_standing[TAIL_LAYER] = null /* This will be one of two things: + If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such. + Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */ + + var/icon/tail_marking_icon + var/datum/sprite_accessory/body_markings/tail/tail_marking_style + if(m_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS)) + var/tail_marking = m_styles["tail"] + tail_marking_style = marking_styles_list[tail_marking] + tail_marking_icon = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s") + tail_marking_icon.Blend(m_colours["tail"], ICON_ADD) if(body_accessory) if(body_accessory.try_restrictions(src)) var/icon/accessory_s = new/icon("icon" = body_accessory.icon, "icon_state" = body_accessory.icon_state) if(species.bodyflags & HAS_SKIN_COLOR) accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode) - - if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... + if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed)) + accessory_s.Blend(tail_marking_icon, ICON_OVERLAY) + if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/temp1 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(species.name in body_accessory.allowed_species) - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") - temp1 = temp - else - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") - temp1 = temp + var/icon/under = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "accessory_none_s") + under.Insert(new/icon(accessory_s, dir=SOUTH), dir=SOUTH) + under.Insert(new/icon(accessory_s, dir=EAST), dir=EAST) + under.Insert(new/icon(accessory_s, dir=WEST), dir=WEST) - temp1.Insert(new/icon(accessory_s,dir=SOUTH),dir=SOUTH) - temp1.Insert(new/icon(accessory_s,dir=EAST),dir=EAST) - temp1.Insert(new/icon(accessory_s,dir=WEST),dir=WEST) - - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) // Creates a blank icon, and copies accessory_s' north direction sprite into it // before passing that to the tail layer that overlays uniforms and such. - var/icon/temp2 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(species.name in body_accessory.allowed_species) - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") - temp2 = temp - else - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") - temp2 = temp + var/icon/over = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "accessory_none_s") + over.Insert(new/icon(accessory_s, dir=NORTH), dir=NORTH) - temp2.Insert(new/icon(accessory_s,dir=NORTH),dir=NORTH) - - overlays_standing[TAIL_LAYER] = image(temp2, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_LAYER] = image(over, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else if(species.tail && species.bodyflags & HAS_TAIL) //no tailless tajaran if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space)) var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s") if(species.bodyflags & HAS_SKIN_COLOR) tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) - - if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... + if(tail_marking_icon) + tail_s.Blend(tail_marking_icon, ICON_OVERLAY) + if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/temp1 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") - temp1.Insert(new/icon(tail_s,dir=SOUTH),dir=SOUTH) - temp1.Insert(new/icon(tail_s,dir=EAST),dir=EAST) - temp1.Insert(new/icon(tail_s,dir=WEST),dir=WEST) + var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "blank") + under.Insert(new/icon(tail_s, dir=SOUTH), dir=SOUTH) + under.Insert(new/icon(tail_s, dir=EAST), dir=EAST) + under.Insert(new/icon(tail_s, dir=WEST), dir=WEST) - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under) - // Creates a blank icon, and copies accessory_s' north direction sprite into it - // before passing that to the tail layer that overlays uniforms and such. - var/icon/temp2 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") - temp2.Insert(new/icon(tail_s,dir=NORTH),dir=NORTH) + // Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such. + var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "blank") + over.Insert(new/icon(tail_s, dir=NORTH), dir=NORTH) - overlays_standing[TAIL_LAYER] = image(temp2) + overlays_standing[TAIL_LAYER] = image(over) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(tail_s) + overlays_standing[TAIL_LAYER] = image(tail_s) if(update_icons) update_icons() @@ -1193,70 +1212,67 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/start_tail_wagging(var/update_icons=1) overlays_standing[TAIL_UNDERLIMBS_LAYER] = null // SEW direction icons, overlayed by LIMBS_LAYER. - overlays_standing[TAIL_LAYER] = null // This will be one of two things: - // If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such. - // Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. + overlays_standing[TAIL_LAYER] = null /* This will be one of two things: + If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such. + Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */ + + var/icon/tail_marking_icon + var/datum/sprite_accessory/body_markings/tail/tail_marking_style + if(m_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS)) + var/tail_marking = m_styles["tail"] + tail_marking_style = marking_styles_list[tail_marking] + tail_marking_icon = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]w_s") + tail_marking_icon.Blend(m_colours["tail"], ICON_ADD) if(body_accessory) var/icon/accessory_s = new/icon("icon" = body_accessory.get_animated_icon(), "icon_state" = body_accessory.get_animated_icon_state()) if(species.bodyflags & HAS_SKIN_COLOR) accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode) - - if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... + if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed)) + accessory_s.Blend(tail_marking_icon, ICON_OVERLAY) + if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/temp1 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(body_accessory.allowed_species) - if(species.name in body_accessory.allowed_species) - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") - temp1 = temp - else - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") - temp1 = temp + var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "Vulpkanin_tail_delay") + if(body_accessory.allowed_species && (species.name in body_accessory.allowed_species)) + under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") + under.Insert(new/icon(accessory_s, dir=SOUTH), dir=SOUTH) + under.Insert(new/icon(accessory_s, dir=EAST), dir=EAST) + under.Insert(new/icon(accessory_s, dir=WEST), dir=WEST) - temp1.Insert(accessory_s,dir=SOUTH) - temp1.Insert(accessory_s,dir=EAST) - temp1.Insert(accessory_s,dir=WEST) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + // Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such. + var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "Vulpkanin_tail_delay") + if(body_accessory.allowed_species && (species.name in body_accessory.allowed_species)) // If the user's species is in the list of allowed species for the currently selected body accessory, use the appropriate animation timing blank + over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") + over.Insert(new/icon(accessory_s, dir=NORTH), dir=NORTH) - // Creates a blank icon, and copies accessory_s' north direction sprite into it - // before passing that to the tail layer that overlays uniforms and such. - var/icon/temp2 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(species.name in body_accessory.allowed_species) // If the user's species is in the list of allowed species for the currently selected body accessory, use the appropriate animation timing blank - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") - temp2 = temp - else // Else if the user's species is not in the list of allowed species for the currently selected body accessory, this point must have been reached by admin-override. Use vulpkanin timings as default. - var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") - temp2 = temp - - temp2.Insert(accessory_s,dir=NORTH) - - overlays_standing[TAIL_LAYER] = image(temp2, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_LAYER] = image(over, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else if(species.tail && species.bodyflags & HAS_TAIL) var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]w_s") if(species.bodyflags & HAS_SKIN_COLOR) tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) - - if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... + if(tail_marking_icon) + tailw_s.Blend(tail_marking_icon, ICON_OVERLAY) + if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/temp1 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") - temp1.Insert(tailw_s,dir=SOUTH) - temp1.Insert(tailw_s,dir=EAST) - temp1.Insert(tailw_s,dir=WEST) + var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") + under.Insert(new/icon(tailw_s, dir=SOUTH), dir=SOUTH) + under.Insert(new/icon(tailw_s, dir=EAST), dir=EAST) + under.Insert(new/icon(tailw_s, dir=WEST), dir=WEST) - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under) - // Creates a blank icon, and copies accessory_s' north direction sprite into it - // before passing that to the tail layer that overlays uniforms and such. - var/icon/temp2 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") - temp2.Insert(tailw_s,dir=NORTH) + // Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such. + var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") + over.Insert(new/icon(tailw_s, dir=NORTH), dir=NORTH) - overlays_standing[TAIL_LAYER] = image(temp2) + overlays_standing[TAIL_LAYER] = image(over) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(tailw_s) + overlays_standing[TAIL_LAYER] = image(tailw_s) if(update_icons) update_icons() @@ -1282,17 +1298,17 @@ var/global/list/damage_icon_parts = list() if(wear_suit.icon_override) var/icon_path = "[wear_suit.icon_override]" icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty). - var/icon/icon_file if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime. - icon_file = new(icon_path) - standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") + var/icon/icon_file = new(icon_path) + if(wear_suit.icon_state in icon_file.IconStates()) + standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name]) var/icon_path = "[wear_suit.sprite_sheets[species.name]]" icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty). - var/icon/icon_file if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime. - icon_file = new(icon_path) - standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") + var/icon/icon_file = new(icon_path) + if(wear_suit.icon_state in icon_file.IconStates()) + standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") else if(wear_suit.icon_state in C.IconStates()) standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]") diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 985047a8284..5e0841168e0 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -49,10 +49,10 @@ var/datum/gas_mixture/breath if(health <= config.health_threshold_crit) - losebreath++ + AdjustLoseBreath(1) if(losebreath > 0) - losebreath-- + AdjustLoseBreath(-1) if(prob(10)) spawn emote("gasp") if(istype(loc, /obj/)) @@ -165,7 +165,7 @@ if(SA_partialpressure > SA_para_min) Paralyse(3) if(SA_partialpressure > SA_sleep_min) - sleeping = max(sleeping+2, 10) + AdjustSleeping(2, bound_lower = 0, bound_upper = 10) else if(SA_partialpressure > 0.01) if(prob(20)) spawn(0) emote(pick("giggle","laugh")) @@ -319,30 +319,27 @@ C.pixel_x -= pixel_x_diff C.pixel_y -= pixel_y_diff src = oldsrc - dizziness = max(dizziness - restingpwr, 0) + AdjustDizzy(-restingpwr) if(drowsyness) - drowsyness = max(drowsyness - restingpwr, 0) - eye_blurry = max(2, eye_blurry) + AdjustDrowsy(-restingpwr) + EyeBlurry(2) if(prob(5)) - sleeping += 1 + AdjustSleeping(1) Paralyse(5) if(confused) - confused = max(0, confused - 1) + AdjustConfused(-1) //Jitteryness if(jitteriness) do_jitter_animation(jitteriness) - jitteriness = max(jitteriness - restingpwr, 0) + AdjustJitter(-restingpwr) if(hallucination) spawn handle_hallucinations() - if(hallucination<=2) - hallucination = 0 - else - hallucination -= 2 + AdjustHallucinate(-2) /mob/living/carbon/handle_sleeping() if(..()) @@ -352,8 +349,8 @@ spawn(0) emote("snore") // Keep SSD people asleep - if(player_logged && sleeping < 2) - sleeping = 2 + if(player_logged) + Sleeping(2) return sleeping diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index b51e0084ee3..6e3221c19fa 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -208,25 +208,25 @@ if(src.stuttering) src.stuttering = 0 if(src.eye_blind) - src.eye_blind = 0 + src.SetEyeBlind(0) src.blinded = 1 - if(src.ear_deaf > 0) src.ear_deaf = 0 + if(src.ear_deaf > 0) SetEarDeaf(0) if(src.ear_damage < 25) - src.ear_damage = 0 + SetEarDamage(0) src.density = !( src.lying ) if(src.disabilities & BLIND) src.blinded = 1 if(src.disabilities & DEAF) - src.ear_deaf = 1 + EarDeaf(1) if(src.eye_blurry > 0) - src.eye_blurry = 0 + SetEyeBlurry(0) if(src.druggy > 0) - src.druggy = 0 + SetDruggy(0) return 1 diff --git a/code/modules/mob/living/carbon/update_status.dm b/code/modules/mob/living/carbon/update_status.dm new file mode 100644 index 00000000000..3b0d3a045fc --- /dev/null +++ b/code/modules/mob/living/carbon/update_status.dm @@ -0,0 +1,17 @@ +/mob/living/carbon/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) +// if(health <= min_health) + if(health <= config.health_threshold_dead) + death() + return +// if(paralysis || sleeping || getOxyLoss() > low_oxy_ko || (status_flags & FAKEDEATH) || health <= crit_health) + if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit) + if(stat == CONSCIOUS) + KnockOut() + else + if(stat == UNCONSCIOUS) + // updating=FALSE because `WakeUp` will handle canmove up for us + StopResting(updating=FALSE) + WakeUp() diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 921080c989a..ffd1fb9cd60 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -57,17 +57,16 @@ rad_damage = max(effect * ((100-run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm."))/100),0) radiation += rad_damage if(SLUR) - slurring = max(slurring,(effect * blocked)) + Slur(effect * blocked) if(STUTTER) - if(status_flags & CANSTUN) // stun is usually associated with stutter - stuttering = max(stuttering,(effect * blocked)) + Stuttering(effect * blocked) if(EYE_BLUR) - eye_blurry = max(eye_blurry,(effect * blocked)) + EyeBlurry(effect * blocked) if(DROWSY) - drowsyness = max(drowsyness,(effect * blocked)) + Drowsy(effect * blocked) if(JITTER) if(status_flags & CANSTUN) - jitteriness = max(jitteriness,(effect * blocked)) + Jitter(effect * blocked) updatehealth() return 1 diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index a151a062bce..308025e0204 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -136,17 +136,17 @@ /mob/living/proc/handle_silent() if(silent) - silent = max(silent-1, 0) + AdjustSilence(-1) return silent /mob/living/proc/handle_drugged() if(druggy) - druggy = max(druggy-1, 0) + AdjustDruggy(-1) return druggy /mob/living/proc/handle_slurring() if(slurring) - slurring = max(slurring-1, 0) + AdjustSlur(-1) return slurring /mob/living/proc/handle_paralysed() @@ -164,7 +164,7 @@ /mob/living/proc/handle_slowed() if(slowed) - slowed = max(slowed-1, 0) + AdjustSlowed(-1) return slowed /mob/living/proc/handle_drunk() @@ -175,19 +175,20 @@ /mob/living/proc/handle_disabilities() //Eyes if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own - eye_blind = max(eye_blind, 1) + EyeBlind(1) else if(eye_blind) //blindness, heals slowly over time - eye_blind = max(eye_blind-1,0) + AdjustEyeBlind(-1) else if(eye_blurry) //blurry eyes heal slowly - eye_blurry = max(eye_blurry-1, 0) + AdjustEyeBlurry(-1) //Ears if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own - setEarDamage(-1, max(ear_deaf, 1)) + EarDeaf(1) else // deafness heals slowly over time, unless ear_damage is over 100 if(ear_damage < 100) - adjustEarDamage(-0.05,-1) + AdjustEarDamage(-0.05) + AdjustEarDeaf(-1) //this handles hud updates. Calls update_vision() and handle_hud_icons() /mob/living/proc/handle_regular_hud_updates() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 72cc4789779..dd9e9f7cbd6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -261,19 +261,6 @@ var/obj/item/organ/external/def_zone = ran_zone(t) return def_zone - -//damage/heal the mob ears and adjust the deaf amount -/mob/living/adjustEarDamage(damage, deaf) - ear_damage = max(0, ear_damage + damage) - ear_deaf = max(0, ear_deaf + deaf) - -//pass a negative argument to skip one of the variable -/mob/living/setEarDamage(damage, deaf) - if(damage >= 0) - ear_damage = damage - if(deaf >= 0) - ear_deaf = deaf - // heal ONE external organ, organ gets randomly selected from damaged ones. /mob/living/proc/heal_organ_damage(var/brute, var/burn) adjustBruteLoss(-brute) @@ -323,14 +310,6 @@ C.reagents.clear_reagents() C.reagents.addiction_list.Cut() -/mob/living/proc/update_revive() // handles revival through other means than cloning or adminbus (defib, IPC repair) - stat = CONSCIOUS - dead_mob_list -= src - living_mob_list |= src - mob_list |= src - setEarDamage(-1,0) - timeofdeath = 0 - /mob/living/proc/rejuvenate() var/mob/living/carbon/human/human_mob = null //Get this declared for use later. @@ -344,22 +323,30 @@ SetParalysis(0) SetStunned(0) SetWeakened(0) - slowed = 0 - losebreath = 0 - dizziness = 0 - jitteriness = 0 - confused = 0 - drowsyness = 0 + SetSlowed(0) + SetLoseBreath(0) + SetDizzy(0) + SetJitter(0) + SetConfused(0) + SetDrowsy(0) radiation = 0 - druggy = 0 - hallucination = 0 + SetDruggy(0) + SetHallucinate(0) + blinded = 0 nutrition = 400 bodytemperature = 310 - disabilities = 0 - blinded = 0 - eye_blind = 0 - eye_blurry = 0 - setEarDamage(0,0) + CureBlind() + CureNearsighted() + CureMute() + CureDeaf() + CureTourettes() + CureEpilepsy() + CureCoughing() + CureNervous() + SetEyeBlind(0) + SetEyeBlurry(0) + SetEarDamage(0) + SetEarDeaf(0) heal_overall_damage(1000, 1000) ExtinguishMob() fire_stacks = 0 diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index c142c8d28d1..c3dab651906 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -15,8 +15,6 @@ var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot. var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this. - var/hallucination = 0 //Directly affects how long a mob will hallucinate for - var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out. @@ -32,7 +30,6 @@ var/update_slimes = 1 var/implanting = 0 //Used for the mind-slave implant - var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU. var/floating = 0 var/mob_size = MOB_SIZE_HUMAN var/nightvision = 0 diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm index 71e26e60858..10ba19b4302 100644 --- a/code/modules/mob/living/logout.dm +++ b/code/modules/mob/living/logout.dm @@ -4,6 +4,6 @@ if(!key) //key and mind have become seperated. I believe this is for when a staff member aghosts. mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. //This causes instant sleep and tags a player as SSD. See life.dm for furthering SSD. - if(sleeping < 2 && mind.active) - sleeping = 2 - player_logged = 1 \ No newline at end of file + if(mind.active) + Sleeping(2) + player_logged = 1 diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 2f44caf161a..3987b709e3e 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -80,9 +80,6 @@ proc/get_radio_key_from_channel(var/channel) verb = "stammers" speech_problem_flag = 1 - if(COMIC in mutations) - message = "[message]" - if(!IsVocal()) message = "" speech_problem_flag = 1 diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 8cf6863eafb..2a3b39c1c9b 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -82,7 +82,7 @@ var/const/VOX_PATH = "sound/vox_fem/" for(var/mob/M in player_list) if(M.client) var/turf/T = get_turf(M) - if(T && T.z == z_level && !isdeaf(M)) + if(T && T.z == z_level && M.can_hear()) M << voice else only_listener << voice diff --git a/code/modules/mob/living/silicon/ai/update_status.dm b/code/modules/mob/living/silicon/ai/update_status.dm new file mode 100644 index 00000000000..4fa060abf39 --- /dev/null +++ b/code/modules/mob/living/silicon/ai/update_status.dm @@ -0,0 +1,10 @@ +/mob/living/silicon/ai/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) + if(health <= config.health_threshold_dead) + death() + return + else if(stat == UNCONSCIOUS) + WakeUp() + //diag_hud_set_status() diff --git a/code/modules/mob/living/silicon/login.dm b/code/modules/mob/living/silicon/login.dm index bd93fd6c3c4..01240adf942 100644 --- a/code/modules/mob/living/silicon/login.dm +++ b/code/modules/mob/living/silicon/login.dm @@ -1,5 +1,5 @@ /mob/living/silicon/Login() - sleeping = 0 + SetSleeping(0) if(mind && ticker && ticker.mode) ticker.mode.remove_revolutionary(mind, 1) ticker.mode.remove_cultist(mind, 1) @@ -9,4 +9,4 @@ ticker.mode.remove_thrall(mind, 0) ticker.mode.remove_shadowling(mind) ticker.mode.remove_abductor(mind) - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index dfa79a0d0d1..104c2746d16 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -547,8 +547,7 @@ else var/datum/gas_mixture/env = T.return_air() data["reading"] = 1 - var/pres = env.return_pressure() * 10 - data["pressure"] = "[round(pres/10)].[pres%10]" + data["pressure"] = env.return_pressure() data["temperature"] = round(env.temperature) data["temperatureC"] = round(env.temperature-T0C) diff --git a/code/modules/mob/living/silicon/pai/update_status.dm b/code/modules/mob/living/silicon/pai/update_status.dm new file mode 100644 index 00000000000..155ecc84a28 --- /dev/null +++ b/code/modules/mob/living/silicon/pai/update_status.dm @@ -0,0 +1,3 @@ +/mob/living/silicon/pai/update_stat() + if(health <= 0) + death(gibbed = 0) diff --git a/code/modules/mob/living/silicon/robot/drone/update_status.dm b/code/modules/mob/living/silicon/robot/drone/update_status.dm new file mode 100644 index 00000000000..97d2214c2e2 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/drone/update_status.dm @@ -0,0 +1,10 @@ +//Easiest to check this here, then check again in the robot proc. +//Standard robots use config for crit, which is somewhat excessive for these guys. +//Drones killed by damage will gib. +/mob/living/silicon/robot/drone/update_stat() + if(status_flags & GODMODE) + return + if(health <= -35 && stat != DEAD) + gib() + return + return ..() diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index b2c8857f040..ca480d987f8 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -62,7 +62,7 @@ if(sleeping) Paralyse(3) - sleeping-- + AdjustSleeping(-1) if(resting) Weaken(5) @@ -90,7 +90,7 @@ stat = UNCONSCIOUS if(!paralysis > 0) - eye_blind = 0 + SetEyeBlind(0) else stat = CONSCIOUS @@ -98,7 +98,7 @@ diag_hud_set_health() diag_hud_set_status() else //dead - eye_blind = 1 + SetEyeBlind(0) //update the state of modules and components here if(stat != CONSCIOUS) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 7e771b2f372..335ecbcd1f6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -730,18 +730,18 @@ var/list/robot_verbs_default = list( else to_chat(user, "Unable to locate a radio.") - else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card + else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card if(emagged)//still allow them to open the cover - to_chat(user, "The interface seems slightly damaged") + to_chat(user, "The interface seems slightly damaged.") if(opened) to_chat(user, "You must close the cover to swipe an ID card.") else - if(allowed(usr)) + if(allowed(W)) locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] [src]'s interface.") update_icons() else - to_chat(user, "\red Access denied.") + to_chat(user, "Access denied.") else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W @@ -957,29 +957,15 @@ var/list/robot_verbs_default = list( user.visible_message("[user] pets [src]!", \ "You pet [src]!") -/mob/living/silicon/robot/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(check_access(null)) +/mob/living/silicon/robot/proc/allowed(obj/item/I) + var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob + dummy.req_access = req_access + + if(dummy.check_access(I)) + qdel(dummy) return 1 - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - //if they are holding or wearing a card that has access, that works - if(check_access(H.get_active_hand()) || check_access(H.wear_id)) - return 1 - return 0 - -/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I) - if(!istype(req_access, /list)) //something's very wrong - return 1 - - var/list/L = req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in req_access) - if(req in I.access) //have one of the required accesses - return 1 + + qdel(dummy) return 0 /mob/living/silicon/robot/update_icons() diff --git a/code/modules/mob/living/silicon/robot/update_status.dm b/code/modules/mob/living/silicon/robot/update_status.dm new file mode 100644 index 00000000000..a28aae28278 --- /dev/null +++ b/code/modules/mob/living/silicon/robot/update_status.dm @@ -0,0 +1,21 @@ +// No args for restraints because robots don't have those +/mob/living/silicon/robot/incapacitated() + if(stat || lockcharge || weakened || stunned || paralysis || !is_component_functioning("actuator")) + return 1 + +/mob/living/silicon/robot/update_stat() + if(status_flags & GODMODE) + return + if(stat != DEAD) + if(health <= -maxHealth) //die only once + death() + return + if(!is_component_functioning("actuator") || paralysis || sleeping || stunned || weakened || getOxyLoss() > maxHealth * 0.5) + if(stat == CONSCIOUS) + KnockOut() + else + if(stat == UNCONSCIOUS) + WakeUp() + // diag_hud_set_status() + // diag_hud_set_health() + // update_health_hud() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 75bbec89a1b..469b6e86574 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -152,7 +152,7 @@ //Silicon mob language procs -/mob/living/silicon/can_speak(datum/language/speaking) +/mob/living/silicon/can_speak_language(datum/language/speaking) return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language /mob/living/silicon/add_language(var/language, var/can_speak=1) @@ -355,8 +355,8 @@ /////////////////////////////////// EAR DAMAGE //////////////////////////////////// -/mob/living/silicon/adjustEarDamage() +/mob/living/silicon/SetEarDamage() return -/mob/living/silicon/setEarDamage() - return \ No newline at end of file +/mob/living/silicon/SetEarDeaf() + return diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 4c974c46c16..47c243e970e 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -466,6 +466,9 @@ return if(istype(target, /obj/mecha/working/ripley)) var/obj/mecha/D = target + if(D.icon_state != "ripley-open") + to_chat(user, "You can't add armour onto the mech while someone is inside!") + return var/list/damage_absorption = D.damage_absorption if(damage_absorption["brute"] > 0.3) damage_absorption["brute"] = max(damage_absorption["brute"] - 0.1, 0.3) @@ -474,17 +477,11 @@ damage_absorption["laser"] = damage_absorption["laser"] - 0.025 to_chat(user, "You strengthen [target], improving its resistance against melee attacks.") qdel(src) - if(D.icon_state == "ripley-open") - D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open") - D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." - else - to_chat(user, "You can't add armour onto the mech while someone is inside!") + D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-open") + D.desc = "Autonomous Power Loader Unit. Its armour is enhanced with some goliath hide plates." if(damage_absorption.["brute"] == 0.3) - if(D.icon_state == "ripley-open") - D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open") - D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter." - else - to_chat(user, "You can't add armour onto the mech while someone is inside!") + D.overlays += image("icon"="mecha.dmi", "icon_state"="ripley-g-full-open") + D.desc = "Autonomous Power Loader Unit. It's wearing a fearsome carapace entirely composed of goliath hide plates - the pilot must be an experienced monster hunter." else to_chat(user, "You can't improve [D] any further!") return diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index cb48c63b66f..d0e8e0e4bad 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -118,11 +118,11 @@ for(var/atom/check in check_list) for(var/mob/living/M in viewers(world.view + 1, check) - src) if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege) - if(!M.eye_blind) + if(M.can_see()) return M for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you if(M.occupant && M.occupant.client) - if(!M.occupant.eye_blind) + if(M.occupant.can_see()) return M.occupant return null @@ -185,7 +185,7 @@ continue var/turf/T = get_turf(L.loc) if(T && T in targets) - L.eye_blind = max(L.eye_blind, 4) + L.EyeBlind(4) return //Toggle Night Vision diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 06160dca1fd..cc5b319c84f 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -706,8 +706,8 @@ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion return -/mob/living/simple_animal/adjustEarDamage() +/mob/living/simple_animal/SetEarDamage() return -/mob/living/simple_animal/setEarDamage() - return \ No newline at end of file +/mob/living/simple_animal/SetEarDeaf() + return diff --git a/code/modules/mob/living/stat_states.dm b/code/modules/mob/living/stat_states.dm new file mode 100644 index 00000000000..49c91a10d99 --- /dev/null +++ b/code/modules/mob/living/stat_states.dm @@ -0,0 +1,50 @@ +// There, now `stat` is a proper state-machine + +/mob/living/proc/KnockOut(updating = 1) + if(stat == DEAD) + log_runtime(EXCEPTION("KnockOut called on a dead mob."), src) + return 0 + else if(stat == UNCONSCIOUS) + return 0 + add_logs(src, null, "fallen unconscious at [atom_loc_line(get_turf(src))]", admin=0) + stat = UNCONSCIOUS + if(updating) + // update_blind_effects() + update_canmove() + return 1 + +/mob/living/proc/WakeUp(updating = 1) + if(stat == DEAD) + log_runtime(EXCEPTION("WakeUp called on a dead mob."), src) + return 0 + else if(stat == CONSCIOUS) + return 0 + add_logs(src, null, "woken up at [atom_loc_line(get_turf(src))]", admin=0) + stat = CONSCIOUS + if(updating) + // update_blind_effects() + update_canmove() + return 1 + +/mob/living/proc/can_be_revived() + . = TRUE + // if(health <= min_health) + if(health <= config.health_threshold_dead) + return FALSE + +// death() is used to make a mob die + +// handles revival through other means than cloning or adminbus (defib, IPC repair) +/mob/living/proc/update_revive() + if(stat != DEAD) + return + if(!can_be_revived()) + return + add_logs(src, null, "came back to life at [atom_loc_line(get_turf(src))]", admin=0) + stat = CONSCIOUS + dead_mob_list -= src + living_mob_list += src + timeofdeath = null + update_canmove() + // update_blind_effects() + updatehealth() diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm new file mode 100644 index 00000000000..bc12dfdeb87 --- /dev/null +++ b/code/modules/mob/living/status_procs.dm @@ -0,0 +1,513 @@ +//Here are the procs used to modify status effects of a mob. + +// We use these to automatically apply their effects when they are changed, as +// opposed to setting them manually and having to either wait for the next `Life` +// or update by hand + +// The `updating` argument is only available on effects that cause a visual/physical effect on the mob itself +// when applied, such as Stun, Weaken, and Jitter - stuff like Blindness, which has a client-side effect, +// lacks this argument. + +// Ideally, code should only read the vars in this file, and not ever directly +// modify them + +// If you want a mob type to ignore a given status effect, just override the corresponding +// `SetSTATE` proc - since all of the other procs are wrappers around that, +// calling them will have no effect + +// BOOLEAN STATES + +/* + * EyesBlocked + Your eyes are covered somehow + * EarsBlocked + Your ears are covered somehow + * Resting + You are lying down of your own volition + * Flying + For some reason or another you can move while not touching the ground +*/ + + +// STATUS EFFECTS +// All of these decrement over time - at a rate of 1 per life cycle unless otherwise noted +// Status effects sorted alphabetically: +/* + * Confused * + Movement is scrambled + * Dizzy * + The screen goes all warped + * Drowsy + You begin to yawn, and have a chance of incrementing "Paralysis" + * Druggy * + A trippy overlay appears. + * Drunk * + Essentially what your "BAC" is - the higher it is, the more alcohol you have in you + * EarDamage * + Doesn't do much, but if it's 25+, you go deaf. Heals much slower than other statuses - 0.05 normally + * EarDeaf * + You cannot hear. Prevents EarDamage from healing naturally. + * EyeBlind * + You cannot see. Prevents EyeBlurry from healing naturally. + * EyeBlurry * + A hazy overlay appears on your screen. + * Hallucination * + Your character will imagine various effects happening to them, vividly. + * Jitter * + Your character will visibly twitch. Higher values amplify the effect. + * LoseBreath * + Your character is unable to breathe. + * Paralysis * + Your character is knocked out. + * Silent * + Your character is unable to speak. + * Sleeping * + Your character is asleep. + * Slowed * + Your character moves slower. + * Slurring * + Your character cannot enunciate clearly. + * Stunned * + Your character is unable to move, and drops stuff in their hands. They keep standing, though. + * Stuttering * + Your character stutters parts of their messages. + * Weakened * + Your character collapses, but is still conscious. +*/ + +// DISABILITIES +// These are more permanent than the above. +// Disabilities sorted alphabetically +/* + * Blind (32) + Can't see. EyeBlind does not heal when this is active. + * Coughing (4) + Cough occasionally, causing you to drop your items + * Deaf (128) + Can't hear. EarDeaf does not heal when this is active + * Epilepsy (2) + Occasionally go "Epileptic", causing you to become very twitchy, drop all items, and fall to the floor + * Mute (64) + Cannot talk. + * Nearsighted (1) + My glasses! I can't see without my glasses! (Nearsighted overlay when not wearing prescription eyewear) + * Nervous (16) + Occasionally begin to stutter. + * Tourettes (8) + SHIT (say bad words, and drop stuff occasionally) +*/ + +/mob/living + + // Booleans + var/resting = FALSE + + /* + STATUS EFFECTS + */ + +/mob // On `/mob` for now, to support legacy code + var/confused = 0 + var/dizziness = 0 + var/drowsyness = 0 + var/druggy = 0 + var/drunk = 0 + var/ear_damage = 0 + var/ear_deaf = 0 + var/eye_blind = 0 + var/eye_blurry = 0 + var/hallucination = 0 + var/jitteriness = 0 + var/losebreath = 0 + var/paralysis = 0 + var/silent = 0 + var/sleeping = 0 + var/slowed = 0 + var/slurring = 0 + var/stunned = 0 + var/stuttering = 0 + var/weakened = 0 + +/mob/living + // Bitfields + var/disabilities = 0 + +// RESTING + +/mob/living/proc/StartResting(updating = 1) + var/val_change = !resting + resting = TRUE + if(updating && val_change) + update_canmove() + +/mob/living/proc/StopResting(updating = 1) + var/val_change = !!resting + resting = FALSE + if(updating && val_change) + update_canmove() + +/mob/living/proc/StartFlying() + var/val_change = !flying + flying = TRUE + if(val_change) + update_animations() + +/mob/living/proc/StopFlying() + var/val_change = !!flying + flying = FALSE + if(val_change) + update_animations() + + +// SCALAR STATUS EFFECTS + +// CONFUSED + +/mob/living/Confused(amount) + SetConfused(max(confused, amount)) + +/mob/living/SetConfused(amount) + confused = max(amount, 0) + +/mob/living/AdjustConfused(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(confused, amount, bound_lower, bound_upper) + SetConfused(new_value) + +// DIZZY + +/mob/living/Dizzy(amount) + SetDizzy(max(dizziness, amount)) + +/mob/living/SetDizzy(amount) + dizziness = max(amount, 0) + +/mob/living/AdjustDizzy(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(dizziness, amount, bound_lower, bound_upper) + SetDizzy(new_value) + +// DROWSY + +/mob/living/Drowsy(amount) + SetDrowsy(max(drowsyness, amount)) + +/mob/living/SetDrowsy(amount) + drowsyness = max(amount, 0) + +/mob/living/AdjustDrowsy(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(drowsyness, amount, bound_lower, bound_upper) + SetDrowsy(new_value) + +// DRUNK + +/mob/living/Drunk(amount) + SetDrunk(max(drunk, amount)) + +/mob/living/SetDrunk(amount) + drunk = max(amount, 0) + +/mob/living/AdjustDrunk(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(drunk, amount, bound_lower, bound_upper) + SetDrunk(new_value) + +// DRUGGY + +/mob/living/Druggy(amount) + SetDruggy(max(druggy, amount)) + +/mob/living/SetDruggy(amount) + var/old_val = druggy + druggy = max(amount, 0) + // We transitioned to/from 0, so update the druggy overlays + if((old_val == 0 || druggy == 0) && (old_val != druggy)) + update_druggy_effects() + +/mob/living/AdjustDruggy(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(druggy, amount, bound_lower, bound_upper) + SetDruggy(new_value) + +// EAR_DAMAGE + +/mob/living/EarDamage(amount) + SetEarDamage(max(ear_damage, amount)) + +/mob/living/SetEarDamage(amount) + ear_damage = max(amount, 0) + +/mob/living/AdjustEarDamage(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(ear_damage, amount, bound_lower, bound_upper) + SetEarDamage(new_value) + +// EAR_DEAF + +/mob/living/EarDeaf(amount) + SetEarDeaf(max(ear_deaf, amount)) + +/mob/living/SetEarDeaf(amount) + ear_deaf = max(amount, 0) + +/mob/living/AdjustEarDeaf(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(ear_deaf, amount, bound_lower, bound_upper) + SetEarDeaf(new_value) + +// EYE_BLIND + +/mob/living/EyeBlind(amount) + SetEyeBlind(max(eye_blind, amount)) + +/mob/living/SetEyeBlind(amount) + var/old_val = eye_blind + eye_blind = max(amount, 0) + // We transitioned to/from 0, so update the eye blind overlays + if((old_val == 0 || eye_blind == 0) && (old_val != eye_blind)) + update_blind_effects() + +/mob/living/AdjustEyeBlind(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(eye_blind, amount, bound_lower, bound_upper) + SetEyeBlind(new_value) + +// EYE_BLURRY + +/mob/living/EyeBlurry(amount) + SetEyeBlurry(max(eye_blurry, amount)) + +/mob/living/SetEyeBlurry(amount) + var/old_val = eye_blurry + eye_blurry = max(amount, 0) + // We transitioned to/from 0, so update the eye blur overlays + if((old_val == 0 || eye_blurry == 0) && (old_val != eye_blurry)) + update_blurry_effects() + +/mob/living/AdjustEyeBlurry(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(eye_blurry, amount, bound_lower, bound_upper) + SetEyeBlurry(new_value) + +// HALLUCINATION + +/mob/living/Hallucinate(amount) + SetHallucinate(max(hallucination, amount)) + +/mob/living/SetHallucinate(amount) + hallucination = max(amount, 0) + +/mob/living/AdjustHallucinate(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(hallucination, amount, bound_lower, bound_upper) + SetHallucinate(new_value) + +// JITTER + +/mob/living/Jitter(amount, force = 0) + SetJitter(max(jitteriness, amount), force) + +/mob/living/SetJitter(amount, force = 0) + // Jitter is also associated with stun + if(status_flags & CANSTUN || force) + jitteriness = max(amount, 0) + +/mob/living/AdjustJitter(amount, bound_lower = 0, bound_upper = INFINITY, force = 0) + var/new_value = directional_bounded_sum(jitteriness, amount, bound_lower, bound_upper) + SetJitter(new_value, force) + +// LOSE_BREATH + +/mob/living/LoseBreath(amount) + SetLoseBreath(max(losebreath, amount)) + +/mob/living/SetLoseBreath(amount) + losebreath = max(amount, 0) + +/mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(losebreath, amount, bound_lower, bound_upper) + SetLoseBreath(new_value) + +// PARALYSE + +/mob/living/Paralyse(amount, updating = 1, force = 0) + SetParalysis(max(paralysis, amount), updating, force) + +/mob/living/SetParalysis(amount, updating = 1, force = 0) + if(status_flags & CANPARALYSE || force) + paralysis = max(amount, 0) + if(updating) + update_canmove() + update_stat() + +/mob/living/AdjustParalysis(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) + var/new_value = directional_bounded_sum(paralysis, amount, bound_lower, bound_upper) + SetParalysis(new_value, updating, force) + +// SILENT + +/mob/living/Silence(amount) + SetSilence(max(silent, amount)) + +/mob/living/SetSilence(amount) + silent = max(amount, 0) + +/mob/living/AdjustSilence(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(silent, amount, bound_lower, bound_upper) + SetSilence(new_value) + +// SLEEPING + +/mob/living/Sleeping(amount, updating = 1) + SetSleeping(max(sleeping, amount), updating) + +/mob/living/SetSleeping(amount, updating = 1) + sleeping = max(amount, 0) + update_sleeping_effects() + if(updating) + update_stat() + update_canmove() + +/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1) + var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper) + SetSleeping(new_value, updating) + +// SLOWED + +/mob/living/Slowed(amount, updating = 1) + SetSlowed(max(slowed, amount), updating) + +/mob/living/SetSlowed(amount, updating = 1) + slowed = max(amount, 0) + +/mob/living/AdjustSlowed(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1) + var/new_value = directional_bounded_sum(slowed, amount, bound_lower, bound_upper) + SetSlowed(new_value, updating) + +// SLURRING + +/mob/living/Slur(amount) + SetSlur(max(slurring, amount)) + +/mob/living/SetSlur(amount) + slurring = max(amount, 0) + +/mob/living/AdjustSlur(amount, bound_lower = 0, bound_upper = INFINITY) + var/new_value = directional_bounded_sum(slurring, amount, bound_lower, bound_upper) + SetSlur(new_value) + +// STUN + +/mob/living/Stun(amount, updating = 1, force = 0) + SetStunned(max(stunned, amount), updating, force) + +/mob/living/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" + if(status_flags & CANSTUN || force) + stunned = max(amount, 0) + if(updating) + update_canmove() + +/mob/living/AdjustStunned(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) + var/new_value = directional_bounded_sum(stunned, amount, bound_lower, bound_upper) + SetStunned(new_value, updating, force) + +// STUTTERING + + +/mob/living/Stuttering(amount, force = 0) + SetStuttering(max(stuttering, amount), force) + +/mob/living/SetStuttering(amount, force = 0) + //From mob/living/apply_effect: "Stuttering is often associated with Stun" + if(status_flags & CANSTUN || force) + stuttering = max(stuttering, 0) + +/mob/living/AdjustStuttering(amount, bound_lower = 0, bound_upper = INFINITY, force = 0) + var/new_value = directional_bounded_sum(stuttering, amount, bound_lower, bound_upper) + SetStuttering(new_value, force) + +// WEAKEN + +/mob/living/Weaken(amount, updating = 1, force = 0) + SetWeakened(max(weakened, amount), updating, force) + +/mob/living/SetWeakened(amount, updating = 1, force = 0) + if(status_flags & CANWEAKEN || force) + weakened = max(amount, 0) + if(updating) + update_canmove() //updates lying, canmove and icons + +/mob/living/AdjustWeakened(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0) + var/new_value = directional_bounded_sum(weakened, amount, bound_lower, bound_upper) + SetWeakened(new_value, updating, force) + +// +// DISABILITIES +// + +// Blind + +/mob/living/proc/BecomeBlind() + var/val_change = !(disabilities & BLIND) + disabilities |= BLIND + if(val_change) + update_blind_effects() + +/mob/living/proc/CureBlind() + var/val_change = !!(disabilities & BLIND) + disabilities &= ~BLIND + if(val_change) + update_blind_effects() + +// Coughing + +/mob/living/proc/BecomeCoughing() + disabilities |= COUGHING + +/mob/living/proc/CureCoughing() + disabilities &= ~COUGHING + +// Deaf + +/mob/living/proc/BecomeDeaf() + disabilities |= DEAF + +/mob/living/proc/CureDeaf() + disabilities &= ~DEAF + +// Epilepsy + +/mob/living/proc/BecomeEpilepsy() + disabilities |= EPILEPSY + +/mob/living/proc/CureEpilepsy() + disabilities &= ~EPILEPSY + +// Mute + +/mob/living/proc/BecomeMute() + disabilities |= MUTE + +/mob/living/proc/CureMute() + disabilities &= ~MUTE + +// Nearsighted + +/mob/living/proc/BecomeNearsighted() + var/val_change = !(disabilities & NEARSIGHTED) + disabilities |= NEARSIGHTED + if(val_change) + update_nearsighted_effects() + +/mob/living/proc/CureNearsighted() + var/val_change = !!(disabilities & NEARSIGHTED) + disabilities &= ~NEARSIGHTED + if(val_change) + update_nearsighted_effects() + +// Nervous + +/mob/living/proc/BecomeNervous() + disabilities |= NERVOUS + +/mob/living/proc/CureNervous() + disabilities &= ~NERVOUS + +// Tourettes + +/mob/living/proc/BecomeTourettes() + disabilities |= TOURETTES + +/mob/living/proc/CureTourettes() + disabilities &= ~TOURETTES diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm new file mode 100644 index 00000000000..5cbf7cae450 --- /dev/null +++ b/code/modules/mob/living/update_status.dm @@ -0,0 +1,97 @@ +/mob/living/update_blind_effects() + if(!can_see()) + overlay_fullscreen("blind", /obj/screen/fullscreen/blind) + throw_alert("blind", /obj/screen/alert/blind) + return 1 + else + clear_fullscreen("blind") + clear_alert("blind") + return 0 + +/mob/living/update_blurry_effects() + if(eyes_blurred()) + overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry) + return 1 + else + clear_fullscreen("blurry") + return 0 + +/mob/living/update_druggy_effects() + if(druggy) + overlay_fullscreen("high", /obj/screen/fullscreen/high) + throw_alert("high", /obj/screen/alert/high) + else + clear_fullscreen("high") + clear_alert("high") + +/mob/living/update_nearsighted_effects() + if(disabilities & NEARSIGHTED) + overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) + else + clear_fullscreen("nearsighted") + +/mob/living/update_sleeping_effects() + if(sleeping) + throw_alert("asleep", /obj/screen/alert/asleep) + else + clear_alert("asleep") + +// Querying status of the mob + +// Whether the mob can hear things +/mob/living/can_hear() + return !(ear_deaf || (disabilities & DEAF)) + +// Whether the mob is able to see +/mob/living/can_see() + return !(eye_blind || (disabilities & BLIND) || stat) + +// Whether the mob is capable of talking +/mob/living/can_speak() + return !(silent || (disabilities & MUTE) || is_muzzled()) + +// Whether the mob is capable of standing or not +/mob/living/proc/can_stand() + return !(weakened || paralysis || stat || (status_flags & FAKEDEATH)) + +// Whether the mob is capable of actions or not +/mob/living/incapacitated(ignore_restraints = 0, ignore_grab = 0, ignore_lying = 0) + if(stat || paralysis || stunned || (weakened && lying) || (!ignore_restraints && restrained()) || (!ignore_lying && lying)) + return 1 + +// wonderful proc names, I know - used to check whether the blur overlay +// should show or not +/mob/living/proc/eyes_blurred() + return eye_blurry + +//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. +/mob/living/update_canmove(delay_action_updates = 0) + var/fall_over = !can_stand() + var/buckle_lying = !(buckled && !buckled.buckle_lying) + if(fall_over || resting || stunned) + drop_r_hand() + drop_l_hand() + else + lying = 0 + canmove = 1 + if(buckled) + lying = 90 * buckle_lying + else if((fall_over || resting) && !lying) + fall(fall_over) + + canmove = !(fall_over || resting || stunned || buckled) + density = !lying + if(lying) + if(layer == initial(layer)) + layer = MOB_LAYER - 0.2 + else + if(layer == MOB_LAYER - 0.2) + layer = initial(layer) + + update_transform() + if(!delay_action_updates) + update_action_buttons_icon() + return canmove + +/mob/living/proc/update_stamina() + return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4a292328fb6..e312ff9556b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -62,22 +62,22 @@ if(!client) return if(type) - if(type & 1 && (disabilities & BLIND || blinded || paralysis) )//Vision related + if(type & 1 && !can_see())//Vision related if(!( alt )) return else msg = alt type = alt_type - if(type & 2 && (disabilities & DEAF || ear_deaf))//Hearing related + if(type & 2 && !can_hear())//Hearing related if(!( alt )) return else msg = alt type = alt_type - if((type & 1 && disabilities & BLIND)) + if(type & 1 && !can_see()) return // Added voice muffling for Issue 41. - if(stat == UNCONSCIOUS || (sleeping > 0 && stat != 2)) + if(stat == UNCONSCIOUS || (sleeping > 0 && stat != DEAD)) to_chat(src, "... You can almost hear someone talking ...") else to_chat(src, msg) @@ -163,13 +163,6 @@ // handle_typing_indicator() return - -/mob/proc/restrained() - return - -/mob/proc/incapacitated() - return - //This proc is called whenever someone clicks an inventory ui slot. /mob/proc/attack_ui(slot) var/obj/item/W = get_active_hand() @@ -1031,36 +1024,6 @@ var/list/slot_equipment_priority = list( \ if(restrained()) return 0 return 1 -//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. -/mob/proc/update_canmove(delay_action_updates = 0) - var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH) - var/buckle_lying = !(buckled && !buckled.buckle_lying) - if(ko || resting || stunned) - drop_r_hand() - drop_l_hand() - else - lying = 0 - canmove = 1 - if(buckled) - lying = 90 * buckle_lying - else - if((ko || resting) && !lying) - fall(ko) - - canmove = !(ko || resting || stunned || buckled) - density = !lying - if(lying) - if(layer == initial(layer)) - layer = MOB_LAYER - 0.2 - else - if(layer == MOB_LAYER - 0.2) - layer = initial(layer) - - update_transform() - if(!delay_action_updates) - update_action_buttons_icon() - return canmove - /mob/proc/fall(var/forced) drop_l_hand() drop_r_hand() @@ -1101,77 +1064,6 @@ var/list/slot_equipment_priority = list( \ /mob/proc/activate_hand(selhand) return -/mob/proc/Jitter(amount) - jitteriness = max(jitteriness, amount, 0) - -/mob/proc/Dizzy(amount) - dizziness = max(dizziness, amount, 0) - -/mob/proc/AdjustDrunk(amount) - drunk = max(drunk + amount, 0) - -/mob/proc/Stun(amount) - SetStunned(max(stunned, amount)) - -/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" - if(status_flags & CANSTUN) - stunned = max(amount, 0) - update_canmove() - else if(stunned) - stunned = 0 - update_canmove() - -/mob/proc/AdjustStunned(amount) - SetStunned(stunned + amount) - -/mob/proc/Weaken(amount) - SetWeakened(max(weakened, amount)) - -/mob/proc/SetWeakened(amount) - if(status_flags & CANWEAKEN) - weakened = max(amount, 0) - update_canmove() //updates lying, canmove and icons - else if(weakened) - weakened = 0 - update_canmove() - -/mob/proc/AdjustWeakened(amount) - SetWeakened(weakened + amount) - -/mob/proc/Paralyse(amount) - SetParalysis(max(paralysis, amount)) - -/mob/proc/SetParalysis(amount) - if(status_flags & CANPARALYSE) - paralysis = max(amount, 0) - update_canmove() - else if(paralysis) - paralysis = 0 - update_canmove() - -/mob/proc/AdjustParalysis(amount) - SetParalysis(paralysis + amount) - -/mob/proc/Sleeping(amount) - SetSleeping(max(sleeping, amount)) - -/mob/proc/SetSleeping(amount) - sleeping = max(amount, 0) - update_canmove() - -/mob/proc/AdjustSleeping(amount) - SetSleeping(sleeping + amount) - -/mob/proc/Resting(amount) - SetResting(max(resting, amount)) - -/mob/proc/SetResting(amount) - resting = max(amount, 0) - update_canmove() - -/mob/proc/AdjustResting(amount) - SetResting(resting + amount) - /mob/proc/get_species() return "" @@ -1365,13 +1257,6 @@ mob/proc/yank_out_object() location.add_vomit_floor(src, 1) playsound(location, 'sound/effects/splat.ogg', 50, 1) - -/mob/proc/adjustEarDamage() - return - -/mob/proc/setEarDamage() - return - /mob/proc/AddSpell(obj/effect/proc_holder/spell/S) mob_spell_list += S S.action.Grant(src) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f7bd04906ea..6cb582e94c1 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -33,18 +33,11 @@ var/obj/machinery/machine = null var/other_mobs = null var/memory = "" - var/disabilities = 0 //Carbon var/atom/movable/pulling = null var/next_move = null var/notransform = null //Carbon var/other = 0.0 var/hand = null - var/eye_blind = 0 //Carbon - var/eye_blurry = 0 //Carbon - var/ear_deaf = 0 //Carbon - var/ear_damage = 0 //Carbon - var/stuttering = 0 //Carbon - var/slurring = 0 //Carbon var/real_name = null var/flavor_text = "" var/med_record = "" @@ -53,11 +46,6 @@ var/blinded = null var/bhunger = 0 //Carbon var/ajourn = 0 - var/druggy = 0 //Carbon - var/confused = 0 //Carbon - var/drunk = 0 - var/sleeping = 0 //Carbon - var/resting = 0 //Carbon var/lying = 0 var/lying_prev = 0 var/canmove = 1 @@ -77,19 +65,11 @@ var/bodytemperature = 310.055 //98.7 F - var/drowsyness = 0.0//Carbon - var/dizziness = 0//Carbon - var/jitteriness = 0//Carbon var/flying = 0 var/charges = 0.0 var/nutrition = 400.0//Carbon var/overeatduration = 0 // How long this guy is overeating //Carbon - var/paralysis = 0 - var/stunned = 0 - var/weakened = 0 - var/slowed = 0 - var/losebreath = 0 //Carbon var/intent = null//Living var/shakecamera = 0 var/a_intent = I_HELP//Living diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 90f84b7fc74..a22d9bf3c6b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -175,9 +175,9 @@ if(state >= GRAB_KILL) //affecting.apply_effect(STUTTER, 5) //would do this, but affecting isn't declared as mob/living for some stupid reason. - affecting.stuttering = max(affecting.stuttering, 5) //It will hamper your voice, being choked and all. + affecting.Stuttering(5) //It will hamper your voice, being choked and all. affecting.Weaken(5) //Should keep you down unless you get help. - affecting.losebreath = max(affecting.losebreath + 2, 3) + affecting.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) adjust_position() @@ -290,7 +290,7 @@ msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]") assailant.next_move = world.time + 10 - affecting.losebreath += 1 + affecting.AdjustLoseBreath(1) affecting.set_dir(WEST) adjust_position() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index aa59991a6cb..b03b9562949 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -75,12 +75,6 @@ proc/iscuffed(A) return 1 return 0 -proc/isdeaf(A) - if(istype(A, /mob)) - var/mob/M = A - return (M.disabilities & DEAF) || M.ear_deaf - return 0 - proc/hassensorlevel(A, var/level) var/mob/living/carbon/human/H = A if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under)) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index dd48c1ce1a4..f8a73364264 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -565,3 +565,7 @@ /mob/new_player/is_ready() return ready && ..() + +// No hearing announcements +/mob/new_player/can_hear() + return 0 diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index cf8a7f05574..f0bcbfe0312 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -1,6 +1,10 @@ /datum/preferences //The mob should have a gender you want before running this proc. Will run fine without H /datum/preferences/proc/random_character(gender_override) + var/datum/robolimb/robohead + if(species == "Machine") + var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]" + robohead = all_robolimbs[head_model] if(gender_override) gender = gender_override else @@ -8,18 +12,41 @@ underwear = random_underwear(gender, species) undershirt = random_undershirt(gender, species) socks = random_socks(gender, species) - if(species in list("Human", "Drask")) - s_tone = random_skin_tone() - h_style = random_hair_style(gender, species) - f_style = random_facial_hair_style(gender, species) - if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Vulpkanin") + if(species == "Vulpkanin") + body_accessory = random_body_accessory(species) + if(body_accessory == "None") //Required to prevent a bug where the information/icons in the character preferences screen wouldn't update despite the data being changed. + body_accessory = null + if(species in list("Human", "Drask", "Vox")) + s_tone = random_skin_tone(species) + h_style = random_hair_style(gender, species, robohead) + f_style = random_facial_hair_style(gender, species, robohead) + if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) randomize_hair_color("hair") - randomize_hair_color("facial") - randomize_eyes_color() - if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Vulpkanin") + randomize_hair_color("facial") + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) + ha_style = random_head_accessory(species) + var/list/colours = randomize_skin_color(1) + r_headacc = colours["red"] + g_headacc = colours["green"] + b_headacc = colours["blue"] + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) + m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head) + var/list/colours = randomize_skin_color(1) + m_colours["head"] = rgb(colours["red"], colours["green"], colours["blue"]) + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) + m_styles["body"] = random_marking_style("body", species) + var/list/colours = randomize_skin_color(1) + m_colours["body"] = rgb(colours["red"], colours["green"], colours["blue"]) + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + m_styles["tail"] = random_marking_style("tail", species, null, body_accessory) + var/list/colours = randomize_skin_color(1) + m_colours["tail"] = rgb(colours["red"], colours["green"], colours["blue"]) + if(species != "Machine") + randomize_eyes_color() + if(species in list("Unathi", "Tajaran", "Skrell", "Vulpkanin")) randomize_skin_color() backbag = 2 - age = rand(AGE_MIN,AGE_MAX) + age = rand(AGE_MIN, AGE_MAX) /datum/preferences/proc/randomize_hair_color(var/target = "hair") @@ -130,7 +157,7 @@ g_eyes = green b_eyes = blue -/datum/preferences/proc/randomize_skin_color() +/datum/preferences/proc/randomize_skin_color(var/pass_to_list) var/red var/green var/blue @@ -174,9 +201,17 @@ green = max(min(green + rand (-25, 25), 255), 0) blue = max(min(blue + rand (-25, 25), 255), 0) - r_skin = red - g_skin = green - b_skin = blue + if(pass_to_list) + var/list/colours = list( + "red" = red, + "blue" = blue, + "green" = green + ) + return colours + else + r_skin = red + g_skin = green + b_skin = blue /datum/preferences/proc/blend_backpack(var/icon/clothes_s,var/backbag,var/satchel,var/backpack="backpack") switch(backbag) @@ -222,26 +257,12 @@ fat="_fat" preview_icon = new /icon(icobase, "torso_[g][fat]") preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY) - preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY) - - //Tail - if(current_species && (current_species.bodyflags & HAS_TAIL)) - var/tail_icon - var/tail_icon_state - - if(body_accessory) - var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory] - tail_icon = accessory.icon - tail_icon_state = accessory.icon_state - else - tail_icon = "icons/effects/species.dmi" - if(coloured_tail) - tail_icon_state = "[coloured_tail]_s" - else - tail_icon_state = "[current_species.tail]_s" - - var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state) - preview_icon.Blend(temp, ICON_OVERLAY) + var/head = "head" + if(alt_head && current_species.bodyflags & HAS_ALT_HEADS) + var/datum/sprite_accessory/alt_heads/H = alt_heads_list[alt_head] + if(H.icon_state) + head = H.icon_state + preview_icon.Blend(new /icon(icobase, "[head]_[g]"), ICON_OVERLAY) for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand")) if(organ_data[name] == "amputated") continue @@ -266,13 +287,53 @@ else preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) - //Body Markings - if(current_species && (current_species.bodyflags & HAS_MARKINGS)) - var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] - if(marking_style && marking_style.species_allowed) - var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") - markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD) - preview_icon.Blend(markings_s, ICON_OVERLAY) + //Tail + if(current_species && (current_species.bodyflags & HAS_TAIL)) + var/tail_icon + var/tail_icon_state + + if(body_accessory) + var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory] + tail_icon = accessory.icon + tail_icon_state = accessory.icon_state + else + tail_icon = "icons/effects/species.dmi" + if(coloured_tail) + tail_icon_state = "[coloured_tail]_s" + else + tail_icon_state = "[current_species.tail]_s" + + var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state) + + if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR)) + temp.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) + + if(current_species && (current_species.bodyflags & HAS_TAIL_MARKINGS)) + var/tail_marking = m_styles["tail"] + var/datum/sprite_accessory/tail_marking_style = marking_styles_list[tail_marking] + if(tail_marking_style && tail_marking_style.species_allowed) + var/icon/t_marking_s = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s") + t_marking_s.Blend(m_colours["tail"], ICON_ADD) + temp.Blend(t_marking_s, ICON_OVERLAY) + + preview_icon.Blend(temp, ICON_OVERLAY) + + //Markings + if(current_species && ((current_species.bodyflags & HAS_HEAD_MARKINGS) || (current_species.bodyflags & HAS_BODY_MARKINGS))) + if(current_species.bodyflags & HAS_BODY_MARKINGS) //Body markings. + var/body_marking = m_styles["body"] + var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking] + if(body_marking_style && body_marking_style.species_allowed) + var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") + b_marking_s.Blend(m_colours["body"], ICON_ADD) + preview_icon.Blend(b_marking_s, ICON_OVERLAY) + if(current_species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. + var/head_marking = m_styles["head"] + var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] + if(head_marking_style && head_marking_style.species_allowed) + var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") + h_marking_s.Blend(m_colours["head"], ICON_ADD) + preview_icon.Blend(h_marking_s, ICON_OVERLAY) var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s") @@ -289,6 +350,13 @@ hair_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD) else hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) + + if(hair_style.secondary_theme) + var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") + if(!hair_style.no_sec_colour) + hair_secondary_s.Blend(rgb(r_hair_sec, g_hair_sec, b_hair_sec), ICON_ADD) + hair_s.Blend(hair_secondary_s, ICON_OVERLAY) + face_s.Blend(hair_s, ICON_OVERLAY) //Head Accessory @@ -306,6 +374,13 @@ facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD) else facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) + + if(facial_hair_style.secondary_theme) + var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") + if(!facial_hair_style.no_sec_colour) + facial_secondary_s.Blend(rgb(r_facial_sec, g_facial_sec, b_facial_sec), ICON_ADD) + facial_s.Blend(facial_secondary_s, ICON_OVERLAY) + face_s.Blend(facial_s, ICON_OVERLAY) var/icon/underwear_s = null diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 3ade5970d03..0e8f3456335 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -25,14 +25,15 @@ for(var/path in subtypesof(prototype)) var/datum/sprite_accessory/D = new path() - L[D.name] = D + if(D.name) + L[D.name] = D - switch(D.gender) - if(MALE) male[D.name] = D - if(FEMALE) female[D.name] = D - else - male[D.name] = D - female[D.name] = D + switch(D.gender) + if(MALE) male[D.name] = D + if(FEMALE) female[D.name] = D + else + male[D.name] = D + female[D.name] = D return L /datum/sprite_accessory @@ -43,8 +44,12 @@ // Restrict some styles to specific species var/list/species_allowed = list("Human", "Slime People") - var/models_allowed = list() //Specifies which, if any, hairstyles can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm. + var/list/models_allowed = list() //Specifies which, if any, hairstyles or markings can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm. + var/list/heads_allowed = null //Specifies which, if any, alt heads a head marking, hairstyle or facial hair style is compatible with. + var/list/tails_allowed = null //Specifies which, if any, tails a tail marking is compatible with. var/marking_location //Specifies which bodypart a body marking is located on. + var/secondary_theme = null //If exists, there's a secondary colour to that hair style and the secondary theme's icon state's suffix is equal to this. + var/no_sec_colour = null //If exists, prohibit the colouration of the secondary theme. // Whether or not the accessory can be affected by colouration var/do_colouration = 1 @@ -61,492 +66,762 @@ /datum/sprite_accessory/hair icon = 'icons/mob/human_face.dmi' // default icon for all hairs - bald - name = "Bald" - icon_state = "bald" - gender = MALE - species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton") +/datum/sprite_accessory/hair/bald + name = "Bald" + icon_state = "bald" + species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton", "Vulpkanin", "Tajaran") - short - name = "Short Hair" // try to capatilize the names please~ - icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you +/datum/sprite_accessory/hair/short + name = "Short Hair" // try to capatilize the names please~ + icon_state = "hair_a" // you do not need to define _s or _l sub-states, game automatically does this for you - cut - name = "Cut Hair" - icon_state = "hair_c" +/datum/sprite_accessory/hair/cut + name = "Cut Hair" + icon_state = "hair_c" - long - name = "Shoulder-length Hair" - icon_state = "hair_b" +/datum/sprite_accessory/hair/long + name = "Shoulder-length Hair" + icon_state = "hair_b" - longalt - name = "Shoulder-length Hair Alt" - icon_state = "hair_longfringe" +/datum/sprite_accessory/hair/longalt + name = "Shoulder-length Hair Alt" + icon_state = "hair_longfringe" - /*longish - name = "Longer Hair" - icon_state = "hair_b2"*/ +/*/datum/sprite_accessory/hair/longish + name = "Longer Hair" + icon_state = "hair_b2"*/ - longer - name = "Long Hair" - icon_state = "hair_vlong" +/datum/sprite_accessory/hair/longer + name = "Long Hair" + icon_state = "hair_vlong" - longeralt - name = "Long Hair Alt" - icon_state = "hair_vlongfringe" +/datum/sprite_accessory/hair/longeralt + name = "Long Hair Alt" + icon_state = "hair_vlongfringe" - longest - name = "Very Long Hair" - icon_state = "hair_longest" +/datum/sprite_accessory/hair/longest + name = "Very Long Hair" + icon_state = "hair_longest" - longfringe - name = "Long Fringe" - icon_state = "hair_longfringe" +/datum/sprite_accessory/hair/longfringe + name = "Long Fringe" + icon_state = "hair_longfringe" - longestalt - name = "Longer Fringe" - icon_state = "hair_vlongfringe" +/datum/sprite_accessory/hair/longestalt + name = "Longer Fringe" + icon_state = "hair_vlongfringe" - halfbang - name = "Half-banged Hair" - icon_state = "hair_halfbang" +/datum/sprite_accessory/hair/halfbang + name = "Half-banged Hair" + icon_state = "hair_halfbang" - halfbangalt - name = "Half-banged Hair Alt" - icon_state = "hair_halfbang_alt" +/datum/sprite_accessory/hair/halfbangalt + name = "Half-banged Hair Alt" + icon_state = "hair_halfbang_alt" - ponytail1 - name = "Ponytail male" - icon_state = "hair_ponytailm" - gender = MALE +/datum/sprite_accessory/hair/ponytail1 + name = "Ponytail male" + icon_state = "hair_ponytailm" + gender = MALE - ponytail2 - name = "Ponytail female" - icon_state = "hair_ponytailf" - gender = FEMALE +/datum/sprite_accessory/hair/ponytail2 + name = "Ponytail female" + icon_state = "hair_ponytailf" + gender = FEMALE - ponytail3 - name = "Ponytail alt" - icon_state = "hair_ponytail3" +/datum/sprite_accessory/hair/ponytail3 + name = "Ponytail alt" + icon_state = "hair_ponytail3" - sideponytail - name = "Side Ponytail" - icon_state = "hair_stail" - gender = FEMALE +/datum/sprite_accessory/hair/sideponytail + name = "Side Ponytail" + icon_state = "hair_stail" + gender = FEMALE - highponytail - name = "High Ponytail" - icon_state = "hair_highponytail" - gender = FEMALE +/datum/sprite_accessory/hair/highponytail + name = "High Ponytail" + icon_state = "hair_highponytail" + gender = FEMALE +/datum/sprite_accessory/hair/wisp + name = "Wisp" + icon_state = "hair_wisp" + gender = FEMALE - wisp - name = "Wisp" - icon_state = "hair_wisp" - gender = FEMALE +/datum/sprite_accessory/hair/parted + name = "Parted" + icon_state = "hair_parted" - parted - name = "Parted" - icon_state = "hair_parted" +/datum/sprite_accessory/hair/pompadour + name = "Pompadour" + icon_state = "hair_pompadour" + gender = MALE + species_allowed = list("Human", "Slime People", "Unathi") - pompadour - name = "Pompadour" - icon_state = "hair_pompadour" - gender = MALE - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/quiff + name = "Quiff" + icon_state = "hair_quiff" + gender = MALE - quiff - name = "Quiff" - icon_state = "hair_quiff" - gender = MALE +/datum/sprite_accessory/hair/bedhead + name = "Bedhead" + icon_state = "hair_bedhead" - bedhead - name = "Bedhead" - icon_state = "hair_bedhead" +/datum/sprite_accessory/hair/bedhead2 + name = "Bedhead 2" + icon_state = "hair_bedheadv2" - bedhead2 - name = "Bedhead 2" - icon_state = "hair_bedheadv2" +/datum/sprite_accessory/hair/bedhead3 + name = "Bedhead 3" + icon_state = "hair_bedheadv3" - bedhead3 - name = "Bedhead 3" - icon_state = "hair_bedheadv3" +/datum/sprite_accessory/hair/beehive + name = "Beehive" + icon_state = "hair_beehive" + gender = FEMALE + species_allowed = list("Human", "Slime People", "Unathi") - beehive - name = "Beehive" - icon_state = "hair_beehive" - gender = FEMALE - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/bobcurl + name = "Bobcurl" + icon_state = "hair_bobcurl" + gender = FEMALE + species_allowed = list("Human", "Slime People", "Unathi") - bobcurl - name = "Bobcurl" - icon_state = "hair_bobcurl" - gender = FEMALE - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/bob + name = "Bob" + icon_state = "hair_bobcut" + gender = FEMALE + species_allowed = list("Human", "Slime People", "Unathi") - bob - name = "Bob" - icon_state = "hair_bobcut" - gender = FEMALE - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/bowl + name = "Bowl" + icon_state = "hair_bowlcut" + gender = MALE - bowl - name = "Bowl" - icon_state = "hair_bowlcut" - gender = MALE +/datum/sprite_accessory/hair/braid2 + name = "Long Braid" + icon_state = "hair_hbraid" + gender = FEMALE - braid2 - name = "Long Braid" - icon_state = "hair_hbraid" - gender = FEMALE +/datum/sprite_accessory/hair/braid_hip + name = "Hippie Braid" + icon_state = "hair_hipbraid" + secondary_theme = "beads" - buzz - name = "Buzzcut" - icon_state = "hair_buzzcut" - gender = MALE - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/braid_hip_una + name = "Unathi Hippie Braid" + icon_state = "hair_ubraid" + species_allowed = list("Unathi") + secondary_theme = "beads" - crew - name = "Crewcut" - icon_state = "hair_crewcut" - gender = MALE +/datum/sprite_accessory/hair/buzz + name = "Buzzcut" + icon_state = "hair_buzzcut" + gender = MALE + species_allowed = list("Human", "Slime People", "Unathi") - combover - name = "Combover" - icon_state = "hair_combover" - gender = MALE +/datum/sprite_accessory/hair/crew + name = "Crewcut" + icon_state = "hair_crewcut" + gender = MALE - devillock - name = "Devil Lock" - icon_state = "hair_devilock" +/datum/sprite_accessory/hair/combover + name = "Combover" + icon_state = "hair_combover" + gender = MALE - dreadlocks - name = "Dreadlocks" - icon_state = "hair_dreads" +/datum/sprite_accessory/hair/devillock + name = "Devil Lock" + icon_state = "hair_devilock" - curls - name = "Curls" - icon_state = "hair_curls" +/datum/sprite_accessory/hair/dreadlocks + name = "Dreadlocks" + icon_state = "hair_dreads" - afro - name = "Afro" - icon_state = "hair_afro" +/datum/sprite_accessory/hair/curls + name = "Curls" + icon_state = "hair_curls" - afro2 - name = "Afro 2" - icon_state = "hair_afro2" +/datum/sprite_accessory/hair/afro + name = "Afro" + icon_state = "hair_afro" - afro_large - name = "Big Afro" - icon_state = "hair_bigafro" - gender = MALE +/datum/sprite_accessory/hair/afro2 + name = "Afro 2" + icon_state = "hair_afro2" - sargeant - name = "Flat Top" - icon_state = "hair_sargeant" - gender = MALE +/datum/sprite_accessory/hair/afro_large + name = "Big Afro" + icon_state = "hair_bigafro" + gender = MALE - emo - name = "Emo" - icon_state = "hair_emo" +/datum/sprite_accessory/hair/sergeant + name = "Flat Top" + icon_state = "hair_sergeant" + gender = MALE - fag - name = "Flow Hair" - icon_state = "hair_f" +/datum/sprite_accessory/hair/emo + name = "Emo" + icon_state = "hair_emo" - feather - name = "Feather" - icon_state = "hair_feather" +/datum/sprite_accessory/hair/fag + name = "Flow Hair" + icon_state = "hair_f" - hitop - name = "Hitop" - icon_state = "hair_hitop" - gender = MALE +/datum/sprite_accessory/hair/feather + name = "Feather" + icon_state = "hair_feather" - mohawk - name = "Mohawk" - icon_state = "hair_d" - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/hitop + name = "Hitop" + icon_state = "hair_hitop" + gender = MALE - jensen - name = "Adam Jensen Hair" - icon_state = "hair_jensen" - gender = MALE +/datum/sprite_accessory/hair/mohawk + name = "Mohawk" + icon_state = "hair_d" + species_allowed = list("Human", "Slime People", "Unathi") - cia - name = "CIA" - icon_state = "hair_cia" - gender = MALE +/datum/sprite_accessory/hair/jensen + name = "Adam Jensen Hair" + icon_state = "hair_jensen" + gender = MALE - mulder - name = "Mulder" - icon_state = "hair_mulder" - gender = MALE +/datum/sprite_accessory/hair/cia + name = "CIA" + icon_state = "hair_cia" + gender = MALE - gelled - name = "Gelled Back" - icon_state = "hair_gelled" - gender = FEMALE +/datum/sprite_accessory/hair/mulder + name = "Mulder" + icon_state = "hair_mulder" + gender = MALE - gentle - name = "Gentle" - icon_state = "hair_gentle" - gender = FEMALE +/datum/sprite_accessory/hair/gelled + name = "Gelled Back" + icon_state = "hair_gelled" + gender = FEMALE - spiky - name = "Spiky" - icon_state = "hair_spikey" - species_allowed = list("Human", "Unathi") +/datum/sprite_accessory/hair/gentle + name = "Gentle" + icon_state = "hair_gentle" + gender = FEMALE - kusangi - name = "Kusanagi Hair" - icon_state = "hair_kusanagi" +/datum/sprite_accessory/hair/spiky + name = "Spiky" + icon_state = "hair_spikey" + species_allowed = list("Human", "Slime People", "Unathi") - kagami - name = "Pigtails" - icon_state = "hair_kagami" - gender = FEMALE +/datum/sprite_accessory/hair/kusanagi + name = "Kusanagi Hair" + icon_state = "hair_kusanagi" - himecut - name = "Hime Cut" - icon_state = "hair_himecut" - gender = FEMALE +/datum/sprite_accessory/hair/kagami + name = "Pigtails" + icon_state = "hair_kagami" + gender = FEMALE - braid - name = "Floorlength Braid" - icon_state = "hair_braid" - gender = FEMALE +/datum/sprite_accessory/hair/himecut + name = "Hime Cut" + icon_state = "hair_himecut" + gender = FEMALE - odango - name = "Odango" - icon_state = "hair_odango" - gender = FEMALE +/datum/sprite_accessory/hair/braid + name = "Floorlength Braid" + icon_state = "hair_braid" + gender = FEMALE - ombre - name = "Ombre" - icon_state = "hair_ombre" - gender = FEMALE +/datum/sprite_accessory/hair/odango + name = "Odango" + icon_state = "hair_odango" + gender = FEMALE - updo - name = "Updo" - icon_state = "hair_updo" - gender = FEMALE +/datum/sprite_accessory/hair/ombre + name = "Ombre" + icon_state = "hair_ombre" + gender = FEMALE - skinhead - name = "Skinhead" - icon_state = "hair_skinhead" +/datum/sprite_accessory/hair/updo + name = "Updo" + icon_state = "hair_updo" + gender = FEMALE - balding - name = "Balding Hair" - icon_state = "hair_e" - gender = MALE // turnoff! +/datum/sprite_accessory/hair/skinhead + name = "Skinhead" + icon_state = "hair_skinhead" - longemo - name = "Long Emo" - icon_state = "hair_emolong" - gender = FEMALE +/datum/sprite_accessory/hair/balding + name = "Balding Hair" + icon_state = "hair_e" + gender = MALE // turnoff! + +/datum/sprite_accessory/hair/longemo + name = "Long Emo" + icon_state = "hair_emolong" + gender = FEMALE ////////////////////////////// //////START VG HAIRSTYLES///// ////////////////////////////// - birdnest - name = "Bird Nest" - icon_state = "hair_birdnest" +/datum/sprite_accessory/hair/birdnest + name = "Bird Nest" + icon_state = "hair_birdnest" - unkept - name = "Unkempt" - icon_state = "hair_unkept" +/datum/sprite_accessory/hair/unkept + name = "Unkempt" + icon_state = "hair_unkept" - duelist - name = "Duelist" - icon_state = "hair_duelist" - gender = MALE +/datum/sprite_accessory/hair/duelist + name = "Duelist" + icon_state = "hair_duelist" + gender = MALE - modern - name = "Modern" - icon_state = "hair_modern" - gender = FEMALE +/datum/sprite_accessory/hair/modern + name = "Modern" + icon_state = "hair_modern" + gender = FEMALE - unshavenmohawk - name = "Unshaven Mohawk" - icon_state = "hair_unshavenmohawk" - gender = MALE +/datum/sprite_accessory/hair/unshavenmohawk + name = "Unshaven Mohawk" + icon_state = "hair_unshavenmohawk" + gender = MALE - drills - name = "Twincurls" - icon_state = "hair_twincurl" - gender = FEMALE +/datum/sprite_accessory/hair/drills + name = "Twincurls" + icon_state = "hair_twincurl" + gender = FEMALE - minidrills - name = "Twincurls 2" - icon_state = "hair_twincurl2" - gender = FEMALE +/datum/sprite_accessory/hair/minidrills + name = "Twincurls 2" + icon_state = "hair_twincurl2" + gender = FEMALE ////////////////////////////// //////END VG HAIRSTYLES/////// ////////////////////////////// +/datum/sprite_accessory/hair/ipc + species_allowed = list("Machine") - ipc_screen_pink - name = "Pink IPC Screen" - icon_state = "ipc_pink" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_pink + name = "Pink IPC Screen" + icon_state = "ipc_pink" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_red - name = "Red IPC Screen" - icon_state = "ipc_red" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_red + name = "Red IPC Screen" + icon_state = "ipc_red" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_green - name = "Green IPC Screen" - icon_state = "ipc_green" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_green + name = "Green IPC Screen" + icon_state = "ipc_green" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_blue - name = "Blue IPC Screen" - icon_state = "ipc_blue" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_blue + name = "Blue IPC Screen" + icon_state = "ipc_blue" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_breakout - name = "Breakout IPC Screen" - icon_state = "ipc_breakout" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_breakout + name = "Breakout IPC Screen" + icon_state = "ipc_breakout" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_eight - name = "Eight IPC Screen" - icon_state = "ipc_eight" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_eight + name = "Eight IPC Screen" + icon_state = "ipc_eight" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_rainbow - name = "Rainbow IPC Screen" - icon_state = "ipc_rainbow" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_rainbow + name = "Rainbow IPC Screen" + icon_state = "ipc_rainbow" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_goggles - name = "Goggles IPC Screen" - icon_state = "ipc_goggles" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_goggles + name = "Goggles IPC Screen" + icon_state = "ipc_goggles" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_heart - name = "Heart IPC Screen" - icon_state = "ipc_heart" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_heart + name = "Heart IPC Screen" + icon_state = "ipc_heart" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_monoeye - name = "Monoeye IPC Screen" - icon_state = "ipc_monoeye" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_monoeye + name = "Monoeye IPC Screen" + icon_state = "ipc_monoeye" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_nature - name = "Nature IPC Screen" - icon_state = "ipc_nature" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_nature + name = "Nature IPC Screen" + icon_state = "ipc_nature" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_orange - name = "Orange IPC Screen" - icon_state = "ipc_orange" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_orange + name = "Orange IPC Screen" + icon_state = "ipc_orange" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_purple - name = "Purple IPC Screen" - icon_state = "ipc_purple" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_purple + name = "Purple IPC Screen" + icon_state = "ipc_purple" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_shower - name = "Shower IPC Screen" - icon_state = "ipc_shower" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_shower + name = "Shower IPC Screen" + icon_state = "ipc_shower" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_static - name = "Static IPC Screen" - icon_state = "ipc_static" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_static + name = "Static IPC Screen" + icon_state = "ipc_static" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_yellow - name = "Yellow IPC Screen" - icon_state = "ipc_yellow" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_yellow + name = "Yellow IPC Screen" + icon_state = "ipc_yellow" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_scrolling - name = "Scanline IPC Screen" - icon_state = "ipc_scroll" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_scrolling + name = "Scanline IPC Screen" + icon_state = "ipc_scroll" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_console - name = "Console IPC Screen" - icon_state = "ipc_console" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_console + name = "Console IPC Screen" + icon_state = "ipc_console" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_rgb - name = "RGB IPC Screen" - icon_state = "ipc_rgb" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_rgb + name = "RGB IPC Screen" + icon_state = "ipc_rgb" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - ipc_screen_glider - name = "Glider IPC Screen" - icon_state = "ipc_gol_glider" - species_allowed = list("Machine") - models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") +/datum/sprite_accessory/hair/ipc/ipc_screen_glider + name = "Glider IPC Screen" + icon_state = "ipc_gol_glider" + models_allowed = list("Bishop Cybernetics mtr.", "Hesphiastos Industries mtr.", "Morpheus Cyberkinetics", "Ward-Takahashi mtr.", "Xion Manufacturing Group mtr.") - hesphiastos_alt_off - name = "Dark Hesphiastos Screen" - icon_state = "hesphiastos_alt_off" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_off + name = "Dark Hesphiastos Screen" + icon_state = "hesphiastos_alt_off" + models_allowed = list("Hesphiastos Industries alt.") - hesphiastos_alt_pink - name = "Pink Hesphiastos Screen" - icon_state = "hesphiastos_alt_pink" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_pink + name = "Pink Hesphiastos Screen" + icon_state = "hesphiastos_alt_pink" + models_allowed = list("Hesphiastos Industries alt.") - hesphiastos_alt_orange - name = "Orange Hesphiastos Screen" - icon_state = "hesphiastos_alt_orange" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_orange + name = "Orange Hesphiastos Screen" + icon_state = "hesphiastos_alt_orange" + models_allowed = list("Hesphiastos Industries alt.") - hesphiastos_alt_goggle - name = "Goggles Hesphiastos Screen" - icon_state = "hesphiastos_alt_goggles" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_goggle + name = "Goggles Hesphiastos Screen" + icon_state = "hesphiastos_alt_goggles" + models_allowed = list("Hesphiastos Industries alt.") - hesphiastos_alt_scroll - name = "Scrolling Hesphiastos Screen" - icon_state = "hesphiastos_alt_scroll" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_scroll + name = "Scrolling Hesphiastos Screen" + icon_state = "hesphiastos_alt_scroll" + models_allowed = list("Hesphiastos Industries alt.") - hesphiastos_alt_rgb - name = "RGB Hesphiastos Screen" - icon_state = "hesphiastos_alt_rgb" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_rgb + name = "RGB Hesphiastos Screen" + icon_state = "hesphiastos_alt_rgb" + models_allowed = list("Hesphiastos Industries alt.") - hesphiastos_alt_rainbow - name = "Rainbow Hesphiastos Screen" - icon_state = "hesphiastos_alt_rainbow" - species_allowed = list("Machine") - models_allowed = list("Hesphiastos Industries alt.") +/datum/sprite_accessory/hair/ipc/hesphiastos_alt_rainbow + name = "Rainbow Hesphiastos Screen" + icon_state = "hesphiastos_alt_rainbow" + models_allowed = list("Hesphiastos Industries alt.") + +/* +/////////////////////////////////// +/ =---------------------------= / +/ == Alien Style Definitions == / +/ =---------------------------= / +/////////////////////////////////// +*/ + +/datum/sprite_accessory/hair/unathi + species_allowed = list("Unathi") + +/datum/sprite_accessory/hair/unathi/una_horns + name = "Unathi Horns" + icon_state = "soghun_horns" + +/datum/sprite_accessory/hair/skrell + species_allowed = list("Skrell") + +/datum/sprite_accessory/hair/skrell/skr_tentacle_m + name = "Skrell Male Tentacles" + icon_state = "skrell_hair_m" + gender = MALE + +/datum/sprite_accessory/hair/skrell/skr_tentacle_f + name = "Skrell Female Tentacles" + icon_state = "skrell_hair_f" + gender = FEMALE + +/datum/sprite_accessory/hair/skrell/skr_gold_m + name = "Gold plated Skrell Male Tentacles" + icon_state = "skrell_hair_m" + gender = MALE + secondary_theme = "gold" + no_sec_colour = 1 + +/datum/sprite_accessory/hair/skrell/skr_gold_f + name = "Gold chained Skrell Female Tentacles" + icon_state = "skrell_hair_f" + gender = FEMALE + secondary_theme = "gold" + no_sec_colour = 1 + +/datum/sprite_accessory/hair/skrell/skr_clothtentacle_m + name = "Cloth draped Skrell Male Tentacles" + icon_state = "skrell_hair_m" + gender = MALE + secondary_theme = "cloth" + +/datum/sprite_accessory/hair/skrell/skr_clothtentacle_f + name = "Cloth draped Skrell Female Tentacles" + icon_state = "skrell_hair_f" + gender = FEMALE + secondary_theme = "cloth" + +/datum/sprite_accessory/hair/tajara + species_allowed = list("Tajaran") + +/datum/sprite_accessory/hair/tajara/taj_hair_clean + name = "Tajara Clean" + icon_state = "hair_clean" + +/datum/sprite_accessory/hair/tajara/taj_hair_bangs + name = "Tajara Bangs" + icon_state = "hair_bangs" + +/datum/sprite_accessory/hair/tajara/taj_hair_braid + name = "Tajara Braid" + icon_state = "hair_tbraid" + secondary_theme = "beads" + +/datum/sprite_accessory/hair/tajara/taj_hair_shaggy + name = "Tajara Shaggy" + icon_state = "hair_shaggy" + +/datum/sprite_accessory/hair/tajara/taj_hair_mohawk + name = "Tajaran Mohawk" + icon_state = "hair_mohawk" + +/datum/sprite_accessory/hair/tajara/taj_hair_plait + name = "Tajara Plait" + icon_state = "hair_plait" + +/datum/sprite_accessory/hair/tajara/taj_hair_straight + name = "Tajara Straight" + icon_state = "hair_straight" + +/datum/sprite_accessory/hair/tajara/taj_hair_long + name = "Tajara Long" + icon_state = "hair_long" + +/datum/sprite_accessory/hair/tajara/taj_hair_rattail + name = "Tajara Rat Tail" + icon_state = "hair_rattail" + +/datum/sprite_accessory/hair/tajara/taj_hair_spiky + name = "Tajara Spikey" + icon_state = "hair_tajspikey" + +/datum/sprite_accessory/hair/tajara/taj_hair_messy + name = "Tajara Messy" + icon_state = "hair_messy" + +/datum/sprite_accessory/hair/tajara/taj_hair_curls + name = "Tajara Curly" + icon_state = "hair_curly" + +/datum/sprite_accessory/hair/tajara/taj_hair_retro + name = "Tajaran Ladies' Retro" + icon_state = "hair_ladies_retro" + +/datum/sprite_accessory/hair/tajara/taj_hair_victory + name = "Tajara Victory Curls" + icon_state = "hair_victory" + +/datum/sprite_accessory/hair/tajara/taj_hair_bob + name = "Tajara Bob" + icon_state = "hair_tbob" + +/datum/sprite_accessory/hair/tajara/taj_hair_fingercurl + name = "Tajara Finger Curls" + icon_state = "hair_fingerwave" + +/datum/sprite_accessory/hair/vulpkanin + species_allowed = list("Vulpkanin") + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_kajam + name = "Kajam" + icon_state = "kajam" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_keid + name = "Keid" + icon_state = "keid" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_adhara + name = "Adhara" + icon_state = "adhara" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_kleeia + name = "Kleeia" + icon_state = "kleeia" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_mizar + name = "Mizar" + icon_state = "mizar" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_apollo + name = "Apollo" + icon_state = "apollo" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_belle + name = "Belle" + icon_state = "belle" + secondary_theme = "bands" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_bun + name = "Bun" + icon_state = "bun" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_jagged + name = "Jagged" + icon_state = "jagged" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_curl + name = "Curl" + icon_state = "curl" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_hawk + name = "Hawk" + icon_state = "hawk" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_anita + name = "Anita" + icon_state = "anita" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_short + name = "Short" + icon_state = "short" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_spike + name = "Spike" + icon_state = "spike" + +/datum/sprite_accessory/hair/vulpkanin/vulp_hair_braided + name = "Braided" + icon_state = "braided" + secondary_theme = "beads" + +/datum/sprite_accessory/hair/vox + species_allowed = list("Vox") + +/datum/sprite_accessory/hair/vox/vox_quills_short + name = "Short Vox Quills" + icon_state = "vox_shortquills" + +/datum/sprite_accessory/hair/vox/vox_crestedquills + name = "Crested Vox Quills" + icon_state = "vox_crestedquills" + +/datum/sprite_accessory/hair/vox/vox_tielquills + name = "Vox Tiel Quills" + icon_state = "vox_tielquills" + +/datum/sprite_accessory/hair/vox/vox_emperorquills + name = "Vox Emperor Quills" + icon_state = "vox_emperorquills" + +/datum/sprite_accessory/hair/vox/vox_keelquills + name = "Vox Keel Quills" + icon_state = "vox_keelquills" + +/datum/sprite_accessory/hair/vox/vox_keetquills + name = "Vox Keet Quills" + icon_state = "vox_keetquills" + +/datum/sprite_accessory/hair/vox/vox_quills_kingly + name = "Kingly Vox Quills" + icon_state = "vox_kingly" + +/datum/sprite_accessory/hair/vox/vox_quills_fluff + name = "Fluffy Vox Quills" + icon_state = "vox_afro" + +/datum/sprite_accessory/hair/vox/vox_quills_mohawk + name = "Vox Quill Mohawk" + icon_state = "vox_mohawk" + +/datum/sprite_accessory/hair/vox/vox_quills_long + name = "Long Vox Quills" + icon_state = "vox_yasu" + +/datum/sprite_accessory/hair/vox/vox_horns + name = "Vox Spikes" + icon_state = "vox_horns" + +/datum/sprite_accessory/hair/vox/vox_nights + name = "Vox Pigtails" + icon_state = "vox_nights" + +/datum/sprite_accessory/hair/vox/vox_razor + name = "Vox Razorback" + icon_state = "vox_razor" + +/datum/sprite_accessory/hair/vox/vox_razor_clipped + name = "Clipped Vox Razorback" + icon_state = "vox_razor_clipped" + +// Apollo-specific + +/datum/sprite_accessory/hair/wryn + species_allowed = list("Wryn") + +/datum/sprite_accessory/hair/wryn/wry_antennae_default + name = "Antennae" + icon_state = "wryn_antennae" + +/datum/sprite_accessory/hair/nucleation + species_allowed = list("Nucleation") + +/datum/sprite_accessory/hair/nucleation/nuc_crystals + name = "Nucleation Crystals" + icon_state = "nuc_crystal" + +/datum/sprite_accessory/hair/nucleation/nuc_betaburns + name = "Nucleation Beta Burns" + icon_state = "nuc_betaburns" + +/datum/sprite_accessory/hair/nucleation/nuc_fallout + name = "Nucleation Fallout" + icon_state = "nuc_fallout" + +/datum/sprite_accessory/hair/nucleation/nuc_frission + name = "Nucleation Frission" + icon_state = "nuc_frission" + +/datum/sprite_accessory/hair/nucleation/nuc_radical + name = "Nucleation Free Radical" + icon_state = "nuc_radical" + +/datum/sprite_accessory/hair/nucleation/nuc_gammaray + name = "Nucleation Gamma Ray" + icon_state = "nuc_gammaray" + +/datum/sprite_accessory/hair/nucleation/nuc_neutron + name = "Nucleation Neutron Bomb" + icon_state = "nuc_neutron" /* @@ -558,559 +833,232 @@ */ /datum/sprite_accessory/facial_hair - icon = 'icons/mob/human_face.dmi' gender = MALE // barf (unless you're a dorf, dorfs dig chix /w beards :P) - shaved - name = "Shaved" - icon_state = "bald" - gender = NEUTER - species_allowed = list("Human", "Unathi", "Tajaran", "Skrell", "Vox", "Diona", "Kidan", "Greys", "Vulpkanin", "Slime People") +/datum/sprite_accessory/facial_hair/shaved + name = "Shaved" + icon_state = "bald" + gender = NEUTER + species_allowed = list("Human", "Unathi", "Tajaran", "Skrell", "Vox", "Diona", "Kidan", "Greys", "Vulpkanin", "Slime People") - watson - name = "Watson Mustache" - icon_state = "facial_watson" +/datum/sprite_accessory/facial_hair/watson + name = "Watson Mustache" + icon_state = "facial_watson" - hogan - name = "Hulk Hogan Mustache" - icon_state = "facial_hogan" //-Neek +/datum/sprite_accessory/facial_hair/hogan + name = "Hulk Hogan Mustache" + icon_state = "facial_hogan" //-Neek - vandyke - name = "Van Dyke Mustache" - icon_state = "facial_vandyke" +/datum/sprite_accessory/facial_hair/vandyke + name = "Van Dyke Mustache" + icon_state = "facial_vandyke" - chaplin - name = "Square Mustache" - icon_state = "facial_chaplin" +/datum/sprite_accessory/facial_hair/chaplin + name = "Square Mustache" + icon_state = "facial_chaplin" - selleck - name = "Selleck Mustache" - icon_state = "facial_selleck" +/datum/sprite_accessory/facial_hair/selleck + name = "Selleck Mustache" + icon_state = "facial_selleck" - neckbeard - name = "Neckbeard" - icon_state = "facial_neckbeard" +/datum/sprite_accessory/facial_hair/neckbeard + name = "Neckbeard" + icon_state = "facial_neckbeard" - fullbeard - name = "Full Beard" - icon_state = "facial_fullbeard" +/datum/sprite_accessory/facial_hair/fullbeard + name = "Full Beard" + icon_state = "facial_fullbeard" - longbeard - name = "Long Beard" - icon_state = "facial_longbeard" +/datum/sprite_accessory/facial_hair/longbeard + name = "Long Beard" + icon_state = "facial_longbeard" - vlongbeard - name = "Very Long Beard" - icon_state = "facial_wise" +/datum/sprite_accessory/facial_hair/vlongbeard + name = "Very Long Beard" + icon_state = "facial_wise" - elvis - name = "Elvis Sideburns" - icon_state = "facial_elvis" - species_allowed = list("Human","Unathi") +/datum/sprite_accessory/facial_hair/elvis + name = "Elvis Sideburns" + icon_state = "facial_elvis" + species_allowed = list("Human", "Slime People", "Unathi") - abe - name = "Abraham Lincoln Beard" - icon_state = "facial_abe" +/datum/sprite_accessory/facial_hair/abe + name = "Abraham Lincoln Beard" + icon_state = "facial_abe" - chinstrap - name = "Chinstrap" - icon_state = "facial_chin" +/datum/sprite_accessory/facial_hair/chinstrap + name = "Chinstrap" + icon_state = "facial_chin" - hip - name = "Hipster Beard" - icon_state = "facial_hip" +/datum/sprite_accessory/facial_hair/hip + name = "Hipster Beard" + icon_state = "facial_hip" - gt - name = "Goatee" - icon_state = "facial_gt" +/datum/sprite_accessory/facial_hair/gt + name = "Goatee" + icon_state = "facial_gt" - jensen - name = "Adam Jensen Beard" - icon_state = "facial_jensen" +/datum/sprite_accessory/facial_hair/jensen + name = "Adam Jensen Beard" + icon_state = "facial_jensen" - dwarf - name = "Dwarf Beard" - icon_state = "facial_dwarf" +/datum/sprite_accessory/facial_hair/dwarf + name = "Dwarf Beard" + icon_state = "facial_dwarf" ////////////////////////////// //////START VG HAIRSTYLES///// ////////////////////////////// - britstache - name = "Brit Stache" - icon_state = "facial_britstache" +/datum/sprite_accessory/facial_hair/britstache + name = "Brit Stache" + icon_state = "facial_britstache" - martialartist - name = "Martial Artist" - icon_state = "facial_martialartist" +/datum/sprite_accessory/facial_hair/martialartist + name = "Martial Artist" + icon_state = "facial_martialartist" - moonshiner - name = "Moonshiner" - icon_state = "facial_moonshiner" +/datum/sprite_accessory/facial_hair/moonshiner + name = "Moonshiner" + icon_state = "facial_moonshiner" - tribeard - name = "Tri-beard" - icon_state = "facial_tribeard" +/datum/sprite_accessory/facial_hair/tribeard + name = "Tri-beard" + icon_state = "facial_tribeard" - unshaven - name = "Unshaven" - icon_state = "facial_unshaven" +/datum/sprite_accessory/facial_hair/unshaven + name = "Unshaven" + icon_state = "facial_unshaven" ////////////////////////////// //////END VG HAIRSTYLES/////// ////////////////////////////// -/* -/////////////////////////////////// -/ =---------------------------= / -/ == Alien Style Definitions == / -/ =---------------------------= / -/////////////////////////////////// -*/ +/datum/sprite_accessory/facial_hair/tajara + species_allowed = list("Tajaran") -/datum/sprite_accessory/hair +/datum/sprite_accessory/facial_hair/tajara/taj_sideburns + name = "Tajara Sideburns" + icon_state = "facial_sideburns" - una_horns - name = "Unathi Horns" - icon_state = "soghun_horns" - species_allowed = list("Unathi") +/datum/sprite_accessory/facial_hair/tajara/taj_mutton + name = "Tajara Mutton" + icon_state = "facial_mutton" - skr_tentacle_m - name = "Skrell Male Tentacles" - icon_state = "skrell_hair_m" - species_allowed = list("Skrell") - gender = MALE +/datum/sprite_accessory/facial_hair/tajara/taj_pencilstache + name = "Tajara Pencilstache" + icon_state = "facial_pencilstache" - skr_tentacle_f - name = "Skrell Female Tentacles" - icon_state = "skrell_hair_f" - species_allowed = list("Skrell") - gender = FEMALE +/datum/sprite_accessory/facial_hair/tajara/taj_moustache + name = "Tajara Moustache" + icon_state = "facial_moustache" - skr_gold_m - name = "Gold plated Skrell Male Tentacles" - icon_state = "skrell_goldhair_m" - species_allowed = list("Skrell") - gender = MALE +/datum/sprite_accessory/facial_hair/tajara/taj_goatee + name = "Tajara Goatee" + icon_state = "facial_goatee" - skr_gold_f - name = "Gold chained Skrell Female Tentacles" - icon_state = "skrell_goldhair_f" - species_allowed = list("Skrell") - gender = FEMALE +/datum/sprite_accessory/facial_hair/tajara/taj_smallstache + name = "Tajara Smallstache" + icon_state = "facial_smallstache" + +/datum/sprite_accessory/facial_hair/vox + species_allowed = list("Vox") + gender = NEUTER + +/datum/sprite_accessory/facial_hair/vox/vox_colonel + name = "Vox Colonel Beard" + icon_state = "vox_colonel" + +/datum/sprite_accessory/facial_hair/vox/vox_long + name = "Long Mustache" + icon_state = "vox_fu" + +/datum/sprite_accessory/facial_hair/vox/vox_neck + name = "Neck Quills" + icon_state = "vox_neck" + +/datum/sprite_accessory/facial_hair/vox/vox_beard + name = "Vox Quill Beard" + icon_state = "vox_beard" + +/datum/sprite_accessory/facial_hair/vulpkanin + species_allowed = list("Vulpkanin") + gender = NEUTER + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_blaze + name = "Blaze" + icon_state = "vulp_facial_blaze" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_vulpine + name = "Vulpine" + icon_state = "vulp_facial_vulpine" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_vulpine_brows + name = "Vulpine and Brows" + icon_state = "vulp_facial_vulpine_brows" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_vulpine_fluff + name = "Vulpine and Earfluff" + icon_state = "vulp_facial_vulpine_fluff" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_mask + name = "Mask" + icon_state = "vulp_facial_mask" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_patch + name = "Patch" + icon_state = "vulp_facial_patch" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_ruff + name = "Ruff" + icon_state = "vulp_facial_ruff" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_kita + name = "Kita" + icon_state = "vulp_facial_kita" + +/datum/sprite_accessory/facial_hair/vulpkanin/vulp_swift + name = "Swift" + icon_state = "vulp_facial_swift" + +/datum/sprite_accessory/facial_hair/unathi + species_allowed = list("Unathi") + gender = NEUTER + +/datum/sprite_accessory/facial_hair/unathi/una_spines_long + name = "Long Spines" + icon_state = "soghun_longspines" + +/datum/sprite_accessory/facial_hair/unathi/una_spines_short + name = "Short Spines" + icon_state = "soghun_shortspines" + +/datum/sprite_accessory/facial_hair/unathi/una_frills_aquatic + name = "Aquatic Frills" + icon_state = "soghun_aquaticfrills" - skr_clothtentacle_m - name = "Cloth draped Skrell Male Tentacles" - icon_state = "skrell_clothhair_m" - species_allowed = list("Skrell") - gender = MALE +/datum/sprite_accessory/facial_hair/unathi/una_frills_long + name = "Long Frills" + icon_state = "soghun_longfrills" - skr_clothtentacle_f - name = "Cloth draped Skrell Female Tentacles" - icon_state = "skrell_clothhair_f" - species_allowed = list("Skrell") - gender = FEMALE - - taj_ears - name = "Tajaran Ears" - icon_state = "ears_plain" - species_allowed = list("Tajaran") - - taj_ears_clean - name = "Tajara Clean" - icon_state = "hair_clean" - species_allowed = list("Tajaran") - - taj_ears_bangs - name = "Tajara Bangs" - icon_state = "hair_bangs" - species_allowed = list("Tajaran") - - taj_ears_braid - name = "Tajara Braid" - icon_state = "hair_tbraid" - species_allowed = list("Tajaran") - - taj_ears_shaggy - name = "Tajara Shaggy" - icon_state = "hair_shaggy" - species_allowed = list("Tajaran") - - taj_ears_mohawk - name = "Tajaran Mohawk" - icon_state = "hair_mohawk" - species_allowed = list("Tajaran") - - taj_ears_plait - name = "Tajara Plait" - icon_state = "hair_plait" - species_allowed = list("Tajaran") - - taj_ears_straight - name = "Tajara Straight" - icon_state = "hair_straight" - species_allowed = list("Tajaran") - - taj_ears_long - name = "Tajara Long" - icon_state = "hair_long" - species_allowed = list("Tajaran") - - taj_ears_rattail - name = "Tajara Rat Tail" - icon_state = "hair_rattail" - species_allowed = list("Tajaran") - - taj_ears_spiky - name = "Tajara Spiky" - icon_state = "hair_tajspiky" - species_allowed = list("Tajaran") - - taj_ears_messy - name = "Tajara Messy" - icon_state = "hair_messy" - species_allowed = list("Tajaran") - -//Vulpkanin - - vulp_hair_none - name = "None" - icon_state = "bald" - species_allowed = list("Vulpkanin") - - vulp_hair_kajam - name = "Kajam" - icon_state = "kajam" - species_allowed = list("Vulpkanin") - - vulp_hair_keid - name = "Keid" - icon_state = "keid" - species_allowed = list("Vulpkanin") - - vulp_hair_adhara - name = "Adhara" - icon_state = "adhara" - species_allowed = list("Vulpkanin") - - vulp_hair_kleeia - name = "Kleeia" - icon_state = "kleeia" - species_allowed = list("Vulpkanin") - - vulp_hair_mizar - name = "Mizar" - icon_state = "mizar" - species_allowed = list("Vulpkanin") - - vulp_hair_apollo - name = "Apollo" - icon_state = "apollo" - species_allowed = list("Vulpkanin") - - vulp_hair_belle - name = "Belle" - icon_state = "belle" - species_allowed = list("Vulpkanin") - - vulp_hair_bun - name = "Bun" - icon_state = "bun" - species_allowed = list("Vulpkanin") - - vulp_hair_jagged - name = "Jagged" - icon_state = "jagged" - species_allowed = list("Vulpkanin") - - vulp_hair_curl - name = "Curl" - icon_state = "curl" - species_allowed = list("Vulpkanin") - - vulp_hair_hawk - name = "Hawk" - icon_state = "hawk" - species_allowed = list("Vulpkanin") - - vulp_hair_anita - name = "Anita" - icon_state = "anita" - species_allowed = list("Vulpkanin") - - vulp_hair_short - name = "Short" - icon_state = "short" - species_allowed = list("Vulpkanin") - - vulp_hair_spike - name = "Spike" - icon_state = "spike" - species_allowed = list("Vulpkanin") - -//Vox - - vox_quills_short - name = "Short Vox Quills" - icon_state = "vox_shortquills" - species_allowed = list("Vox") - - vox_crestedquills - name = "Crested Vox Quills" - icon_state = "vox_crestedquills" - species_allowed = list("Vox") - - vox_tielquills - name = "Vox Tiel Quills" - icon_state = "vox_tielquills" - species_allowed = list("Vox") - - vox_emperorquills - name = "Vox Emperor Quills" - icon_state = "vox_emperorquills" - species_allowed = list("Vox") - - vox_keelquills - name = "Vox Keel Quills" - icon_state = "vox_keelquills" - species_allowed = list("Vox") - - vox_keetquills - name = "Vox Keet Quills" - icon_state = "vox_keetquills" - species_allowed = list("Vox") - - vox_quills_kingly - name = "Kingly Vox Quills" - icon_state = "vox_kingly" - species_allowed = list("Vox") - - vox_quills_fluff - name = "Fluffy Vox Quills" - icon_state = "vox_afro" - species_allowed = list("Vox") - - vox_quills_mohawk - name = "Vox Quill Mohawk" - icon_state = "vox_mohawk" - species_allowed = list("Vox") - - vox_quills_long - name = "Long Vox Quills" - icon_state = "vox_yasu" - species_allowed = list("Vox") - - vox_horns - name = "Vox Spikes" - icon_state = "vox_horns" - species_allowed = list("Vox") - - vox_nights - name = "Vox Pigtails" - icon_state = "vox_nights" - species_allowed = list("Vox") - - vox_razor - name = "Vox Razorback" - icon_state = "vox_razor" - species_allowed = list("Vox") - -// Apollo-specific - - //Wryn antennae - - wry_antennae_default - name = "Antennae" - icon_state = "wryn_antennae" - species_allowed = list("Wryn") - - //Nucleation "hairstyles" - - nuc_crystals - name = "Nucleation Crystals" - icon_state = "nuc_crystal" - species_allowed = list("Nucleation") - - nuc_betaburns - name = "Nucleation Beta Burns" - icon_state = "nuc_betaburns" - species_allowed = list("Nucleation") - - nuc_fallout - name = "Nucleation Fallout" - icon_state = "nuc_fallout" - species_allowed = list("Nucleation") - - nuc_frission - name = "Nucleation Frission" - icon_state = "nuc_frission" - species_allowed = list("Nucleation") - - nuc_radical - name = "Nucleation Free Radical" - icon_state = "nuc_radical" - species_allowed = list("Nucleation") - - nuc_gammaray - name = "Nucleation Gamma Ray" - icon_state = "nuc_gammaray" - species_allowed = list("Nucleation") - - nuc_neutron - name = "Nucleation Neutron Bomb" - icon_state = "nuc_neutron" - species_allowed = list("Nucleation") - -/datum/sprite_accessory/facial_hair - -//Tajara - - taj_sideburns - name = "Tajara Sideburns" - icon_state = "facial_sideburns" - species_allowed = list("Tajaran") - - taj_mutton - name = "Tajara Mutton" - icon_state = "facial_mutton" - species_allowed = list("Tajaran") - - taj_pencilstache - name = "Tajara Pencilstache" - icon_state = "facial_pencilstache" - species_allowed = list("Tajaran") - - taj_moustache - name = "Tajara Moustache" - icon_state = "facial_moustache" - species_allowed = list("Tajaran") - - taj_goatee - name = "Tajara Goatee" - icon_state = "facial_goatee" - species_allowed = list("Tajaran") - - taj_smallstache - name = "Tajara Smallstache" - icon_state = "facial_smallstache" - species_allowed = list("Tajaran") - -//Vox - - vox_colonel - name = "Vox Colonel Beard" - icon_state = "vox_colonel" - species_allowed = list("Vox") - - vox_long - name = "Long Mustache" - icon_state = "vox_fu" - species_allowed = list("Vox") - - vox_neck - name = "Neck Quills" - icon_state = "vox_neck" - species_allowed = list("Vox") - - vox_beard - name = "Vox Quill Beard" - icon_state = "vox_beard" - species_allowed = list("Vox") - -//Vulpkanin - - vulp_blaze - name = "Blaze" - icon_state = "vulp_facial_blaze" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_vulpine - name = "Vulpine" - icon_state = "vulp_facial_vulpine" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_vulpine_fluff - name = "Vulpine and Earfluff" - icon_state = "vulp_facial_vulpine_fluff" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_mask - name = "Mask" - icon_state = "vulp_facial_mask" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_patch - name = "Patch" - icon_state = "vulp_facial_patch" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_ruff - name = "Ruff" - icon_state = "vulp_facial_ruff" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_kita - name = "Kita" - icon_state = "vulp_facial_kita" - species_allowed = list("Vulpkanin") - gender = NEUTER - - vulp_swift - name = "Swift" - icon_state = "vulp_facial_swift" - species_allowed = list("Vulpkanin") - gender = NEUTER - -//Unathi - - una_spines_long - name = "Long Spines" - icon_state = "soghun_longspines" - species_allowed = list("Unathi") - gender = NEUTER - - una_spines_short - name = "Short Spines" - icon_state = "soghun_shortspines" - species_allowed = list("Unathi") - gender = NEUTER - - una_frills_long - name = "Long Frills" - icon_state = "soghun_longfrills" - species_allowed = list("Unathi") - gender = NEUTER - - una_frills_short - name = "Short Frills" - icon_state = "soghun_shortfrills" - species_allowed = list("Unathi") - gender = NEUTER - - una_frills_webbed_long - name = "Long Webbed Frills" - icon_state = "soghun_longfrills_webbed" - species_allowed = list("Unathi") - gender = NEUTER - - una_frills_webbed_short - name = "Short Webbed Frills" - icon_state = "soghun_shortfrills_webbed" - species_allowed = list("Unathi") - gender = NEUTER - - una_frills_webbed_aquatic - name = "Aquatic Frills" - icon_state = "soghun_aquaticfrills_webbed" - species_allowed = list("Unathi") - gender = NEUTER +/datum/sprite_accessory/facial_hair/unathi/una_frills_short + name = "Short Frills" + icon_state = "soghun_shortfrills" +/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_aquatic + name = "Aquatic Webbed Frills" + icon_state = "soghun_aquaticfrills" + secondary_theme = "webbing" + +/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_long + name = "Long Webbed Frills" + icon_state = "soghun_longfrills" + secondary_theme = "webbing" + +/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_short + name = "Short Webbed Frills" + icon_state = "soghun_shortfrills" + secondary_theme = "webbing" //skin styles - WIP //going to have to re-integrate this with surgery @@ -1118,420 +1066,355 @@ /datum/sprite_accessory/skin icon = 'icons/mob/human_races/r_human.dmi' - human - name = "Default human skin" - icon_state = "default" - species_allowed = list("Human") +/datum/sprite_accessory/skin/human + name = "Default human skin" + icon_state = "default" + species_allowed = list("Human") - human_tatt01 - name = "Tatt01 human skin" - icon_state = "tatt1" - species_allowed = list("Human") +/datum/sprite_accessory/skin/human/human_tatt01 + name = "Tatt01 human skin" + icon_state = "tatt1" - tajaran - name = "Default tajaran skin" - icon_state = "default" - icon = 'icons/mob/human_races/r_tajaran.dmi' - species_allowed = list("Tajaran") +/datum/sprite_accessory/skin/tajaran + name = "Default tajaran skin" + icon_state = "default" + icon = 'icons/mob/human_races/r_tajaran.dmi' + species_allowed = list("Tajaran") - vulpkanin - name = "Default Vulpkanin skin" - icon_state = "default" - icon = 'icons/mob/human_races/r_vulpkanin.dmi' - species_allowed = list("Vulpkanin") +/datum/sprite_accessory/skin/vulpkanin + name = "Default Vulpkanin skin" + icon_state = "default" + icon = 'icons/mob/human_races/r_vulpkanin.dmi' + species_allowed = list("Vulpkanin") - unathi - name = "Default Unathi skin" - icon_state = "default" - icon = 'icons/mob/human_races/r_lizard.dmi' - species_allowed = list("Unathi") +/datum/sprite_accessory/skin/unathi + name = "Default Unathi skin" + icon_state = "default" + icon = 'icons/mob/human_races/r_lizard.dmi' + species_allowed = list("Unathi") - skrell - name = "Default skrell skin" - icon_state = "default" - icon = 'icons/mob/human_races/r_skrell.dmi' - species_allowed = list("Skrell") +/datum/sprite_accessory/skin/skrell + name = "Default skrell skin" + icon_state = "default" + icon = 'icons/mob/human_races/r_skrell.dmi' + species_allowed = list("Skrell") /////////////////////////// // Underwear Definitions // /////////////////////////// /datum/sprite_accessory/underwear icon = 'icons/mob/underwear.dmi' + species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skeleton", "Drask") + gender = NEUTER - species_allowed = list("Human", "Unathi", "Vox", "Diona", "Vulpkanin", "Kidan", "Grey", "Plasmaman", "Skeleton", "Machine") +/datum/sprite_accessory/underwear/nude + name = "Nude" + icon_state = null + species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skeleton", "Drask", "Vox") - nude - name = "Nude" - icon_state = null - gender = NEUTER +/datum/sprite_accessory/underwear/male + gender = MALE - male_white - name = "Mens White" - icon_state = "male_white" - gender = MALE +/datum/sprite_accessory/underwear/male/male_white + name = "Mens White" + icon_state = "male_white" - male_grey - name = "Mens Grey" - icon_state = "male_grey" - gender = MALE +/datum/sprite_accessory/underwear/male/male_grey + name = "Mens Grey" + icon_state = "male_grey" - male_grey - name = "Mens Grey Alt" - icon_state = "male_greyalt" - gender = MALE +/datum/sprite_accessory/underwear/male/male_grey + name = "Mens Grey Alt" + icon_state = "male_greyalt" - male_green - name = "Mens Green" - icon_state = "male_green" - gender = MALE +/datum/sprite_accessory/underwear/male/male_green + name = "Mens Green" + icon_state = "male_green" - male_blue - name = "Mens Blue" - icon_state = "male_blue" - gender = MALE +/datum/sprite_accessory/underwear/male/male_blue + name = "Mens Blue" + icon_state = "male_blue" - male_red - name = "Mens Red" - icon_state = "male_red" - gender = MALE +/datum/sprite_accessory/underwear/male/male_red + name = "Mens Red" + icon_state = "male_red" - male_black - name = "Mens Black" - icon_state = "male_black" - gender = MALE +/datum/sprite_accessory/underwear/male/male_black + name = "Mens Black" + icon_state = "male_black" - male_black_alt - name = "Mens Black Alt" - icon_state = "male_blackalt" - gender = MALE +/datum/sprite_accessory/underwear/male/male_black_alt + name = "Mens Black Alt" + icon_state = "male_blackalt" - male_striped - name = "Mens Striped" - icon_state = "male_stripe" - gender = MALE +/datum/sprite_accessory/underwear/male/male_striped + name = "Mens Striped" + icon_state = "male_stripe" - male_heart - name = "Mens Hearts" - icon_state = "male_hearts" - gender = MALE +/datum/sprite_accessory/underwear/male/male_heart + name = "Mens Hearts" + icon_state = "male_hearts" - male_kinky - name = "Mens Kinky" - icon_state = "male_kinky" - gender = MALE +/datum/sprite_accessory/underwear/male/male_kinky + name = "Mens Kinky" + icon_state = "male_kinky" - male_mankini - name = "Mankini" - icon_state = "male_mankini" - gender = MALE +/datum/sprite_accessory/underwear/male/male_mankini + name = "Mankini" + icon_state = "male_mankini" - female_red - name = "Ladies Red" - icon_state = "female_red" - gender = FEMALE +/datum/sprite_accessory/underwear/female + gender = FEMALE - female_green - name = "Ladies Green" - icon_state = "female_green" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_red + name = "Ladies Red" + icon_state = "female_red" - female_white - name = "Ladies White" - icon_state = "female_white" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_green + name = "Ladies Green" + icon_state = "female_green" - female_whiter - name = "Ladies Whiter" - icon_state = "female_whiter" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_white + name = "Ladies White" + icon_state = "female_white" - female_whitealt - name = "Ladies White Alt" - icon_state = "female_whitealt" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_whiter + name = "Ladies Whiter" + icon_state = "female_whiter" - female_yellow - name = "Ladies Yellow" - icon_state = "female_yellow" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_whitealt + name = "Ladies White Alt" + icon_state = "female_whitealt" - female_blue - name = "Ladies Blue" - icon_state = "female_blue" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_yellow + name = "Ladies Yellow" + icon_state = "female_yellow" - female_babyblue - name = "Ladies Baby Blue" - icon_state = "female_babyblue" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_blue + name = "Ladies Blue" + icon_state = "female_blue" +/datum/sprite_accessory/underwear/female/female_babyblue + name = "Ladies Baby Blue" + icon_state = "female_babyblue" - female_black - name = "Ladies Black" - icon_state = "female_black" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_black + name = "Ladies Black" + icon_state = "female_black" - female_blacker - name = "Ladies Blacker" - icon_state = "female_blacker" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_blacker + name = "Ladies Blacker" + icon_state = "female_blacker" - female_blackalt - name = "Ladies Black Alt" - icon_state = "female_blackalt" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_blackalt + name = "Ladies Black Alt" + icon_state = "female_blackalt" - female_kinky - name = "Ladies Kinky" - icon_state = "female_kinky" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_kinky + name = "Ladies Kinky" + icon_state = "female_kinky" - female_babydoll - name = "Ladies Full Grey" - icon_state = "female_babydoll" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_babydoll + name = "Ladies Full Grey" + icon_state = "female_babydoll" - female_pink - name = "Ladies Pink" - icon_state = "female_pink" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_pink + name = "Ladies Pink" + icon_state = "female_pink" - female_thong - name = "Ladies Thong" - icon_state = "female_thong" - gender = FEMALE +/datum/sprite_accessory/underwear/female/female_thong + name = "Ladies Thong" + icon_state = "female_thong" //////////////////////////// // Undershirt Definitions // //////////////////////////// /datum/sprite_accessory/undershirt icon = 'icons/mob/underwear.dmi' - - species_allowed = list("Human", "Unathi", "Vox", "Diona", "Vulpkanin", "Kidan", "Grey", "Plasmaman", "Skeleton", "Machine") + species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skeleton", "Drask") + gender = NEUTER /datum/sprite_accessory/undershirt/nude name = "Nude" icon_state = null - gender = NEUTER + species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skeleton", "Drask", "Vox") //plain color shirts /datum/sprite_accessory/undershirt/shirt_white name = "White Shirt" icon_state = "shirt_white" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_black name = "Black Shirt" icon_state = "shirt_black" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_blacker name = "Blacker Shirt" icon_state = "shirt_blacker" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_grey name = "Grey Shirt" icon_state = "shirt_grey" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_red name = "Red Shirt" icon_state = "shirt_red" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_blue name = "Blue Shirt" icon_state = "shirt_blue" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_yellow name = "Yellow Shirt" icon_state = "shirt_yellow" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_green name = "Green Shirt" icon_state = "shirt_green" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_darkblue name = "Dark Blue Shirt" icon_state = "shirt_darkblue" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_darkred name = "Dark Red Shirt" icon_state = "shirt_darkred" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_darkgreen name = "Dark Green Shirt" icon_state = "shirt_darkgreen" - gender = NEUTER //end plain color shirts +//graphic shirts /datum/sprite_accessory/undershirt/shirt_heart name = "Heart Shirt" icon_state = "shirt_heart" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_corgi name = "Corgi Shirt" icon_state = "shirt_corgi" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_clown name = "Clown Shirt" icon_state = "shirt_clown" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_alien name = "Alien Shirt" icon_state = "shirt_alien" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_jack name = "Union Jack Shirt" icon_state = "shirt_jack" - gender = NEUTER /datum/sprite_accessory/undershirt/love_nt name = "I Love NT Shirt" icon_state = "shirt_lovent" - gender = NEUTER /datum/sprite_accessory/undershirt/peace name = "Peace Shirt" icon_state = "shirt_peace" - gender = NEUTER /datum/sprite_accessory/undershirt/mondmondjaja name = "Band Shirt" icon_state = "shirt_band" - gender = NEUTER /datum/sprite_accessory/undershirt/pacman name = "Pogoman Shirt" icon_state = "shirt_pogoman" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_ss13 name = "SS13 Shirt" icon_state = "shirt_ss13" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_question name = "Question Mark Shirt" icon_state = "shirt_question" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_skull name = "Skull Shirt" icon_state = "shirt_skull" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_commie name = "Communist Shirt" icon_state = "shirt_commie" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_nano name = "Nanotrasen Shirt" icon_state = "shirt_nano" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_meat name = "Meat Shirt" icon_state = "shirt_meat" - gender = NEUTER /datum/sprite_accessory/undershirt/shirt_tiedie name = "Tiedie Shirt" icon_state = "shirt_tiedie" - gender = NEUTER /datum/sprite_accessory/undershirt/blue_striped name = "Striped Blue Shirt" icon_state = "shirt_bluestripe" - gender = NEUTER /datum/sprite_accessory/undershirt/brightblue_striped name = "Striped Bright Blue Shirt" icon_state = "shirt_brightbluestripe" - gender = NEUTER - +//end graphic shirts //short sleeved /datum/sprite_accessory/undershirt/short_white name = "White Short-sleeved Shirt" icon_state = "short_white" - gender = NEUTER /datum/sprite_accessory/undershirt/short_purple name = "Purple Short-sleeved Shirt" icon_state = "short_purple" - gender = NEUTER /datum/sprite_accessory/undershirt/short_blue name = "Blue Short-sleeved Shirt" icon_state = "short_blue" - gender = NEUTER /datum/sprite_accessory/undershirt/short_green name = "Green Short-sleeved Shirt" icon_state = "short_green" - gender = NEUTER /datum/sprite_accessory/undershirt/short_black name = "Black Short-sleeved Shirt" icon_state = "short_black" - gender = NEUTER //end short sleeved //polo shirts /datum/sprite_accessory/undershirt/polo_blue name = "Blue Polo Shirt" icon_state = "polo_blue" - gender = NEUTER /datum/sprite_accessory/undershirt/polo_red name = "Red Polo Shirt" icon_state = "polo_red" - gender = NEUTER /datum/sprite_accessory/undershirt/polo_greyelllow name = "Grey-Yellow Polo Shirt" icon_state = "polo_greyellow" - gender = NEUTER //end polo shirts //sport shirts /datum/sprite_accessory/undershirt/sport_green name = "Green Sports Shirt" icon_state = "sport_green" - gender = NEUTER /datum/sprite_accessory/undershirt/sport_red name = "Red Sports Shirt" icon_state = "sport_red" - gender = NEUTER /datum/sprite_accessory/undershirt/sport_blue name = "Blue Sports Shirt" icon_state = "sport_blue" - gender = NEUTER -//end sport shirts /datum/sprite_accessory/undershirt/jersey_red name = "Red Jersey" icon_state = "jersey_red" - gender = NEUTER /datum/sprite_accessory/undershirt/jersey_blue name = "Blue Jersey" icon_state = "jersey_blue" - gender = NEUTER - +//end sport shirts //tanktops /datum/sprite_accessory/undershirt/tank_redtop @@ -1552,39 +1435,30 @@ /datum/sprite_accessory/undershirt/tank_white name = "White Tank-Top" icon_state = "tank_white" - gender = NEUTER /datum/sprite_accessory/undershirt/tank_black name = "Black Tank-Top" icon_state = "tank_black" - gender = NEUTER /datum/sprite_accessory/undershirt/tank_blacker name = "Blacker Tank-Top" icon_state = "tank_blacker" - gender = NEUTER /datum/sprite_accessory/undershirt/tank_grey name = "Grey Tank-Top" icon_state = "tank_grey" - gender = NEUTER /datum/sprite_accessory/undershirt/tank_red name = "Red Tank-Top" icon_state = "tank_red" - gender = NEUTER /datum/sprite_accessory/undershirt/tank_fire name = "Fire Tank-Top" icon_state = "tank_fire" - gender = NEUTER /datum/sprite_accessory/undershirt/tank_stripes name = "Striped Tank-Top" icon_state = "tank_stripes" - gender = NEUTER - - //end tanktops /////////////////////// @@ -1592,174 +1466,127 @@ /////////////////////// /datum/sprite_accessory/socks icon = 'icons/mob/underwear.dmi' - species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Slime People", "Skeleton") + species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skeleton", "Drask") + gender = NEUTER /datum/sprite_accessory/socks/nude name = "Nude" icon_state = null - gender = NEUTER - species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Slime People", "Skeleton", "Vox") - + species_allowed = list("Human", "Unathi", "Diona", "Vulpkanin", "Tajaran", "Kidan", "Grey", "Plasmaman", "Machine", "Skeleton", "Drask", "Vox") /datum/sprite_accessory/socks/white_norm name = "Normal White" icon_state = "white_norm" - gender = NEUTER - /datum/sprite_accessory/socks/black_norm name = "Normal Black" icon_state = "black_norm" - gender = NEUTER - /datum/sprite_accessory/socks/white_short name = "Short White" icon_state = "white_short" - gender = NEUTER - /datum/sprite_accessory/socks/black_short name = "Short Black" icon_state = "black_short" - gender = NEUTER - /datum/sprite_accessory/socks/white_knee name = "Knee-high White" icon_state = "white_knee" - gender = NEUTER - /datum/sprite_accessory/socks/black_knee name = "Knee-high Black" icon_state = "black_knee" - gender = NEUTER - /datum/sprite_accessory/socks/thin_knee name = "Knee-high Thin" icon_state = "thin_knee" gender = FEMALE - /datum/sprite_accessory/socks/striped_knee name = "Knee-high Striped" icon_state = "striped_knee" - gender = NEUTER - /datum/sprite_accessory/socks/rainbow_knee name = "Knee-high Rainbow" icon_state = "rainbow_knee" - gender = NEUTER - /datum/sprite_accessory/socks/white_thigh name = "Thigh-high White" icon_state = "white_thigh" - gender = NEUTER /datum/sprite_accessory/socks/black_thigh name = "Thigh-high Black" icon_state = "black_thigh" - gender = NEUTER - /datum/sprite_accessory/socks/thin_thigh name = "Thigh-high Thin" icon_state = "thin_thigh" gender = FEMALE - /datum/sprite_accessory/socks/striped_thigh name = "Thigh-high Striped" icon_state = "striped_thigh" - gender = NEUTER - /datum/sprite_accessory/socks/rainbow_thigh name = "Thigh-high Rainbow" icon_state = "rainbow_thigh" - gender = NEUTER - /datum/sprite_accessory/socks/pantyhose name = "Pantyhose" icon_state = "pantyhose" gender = FEMALE - /datum/sprite_accessory/socks/black_fishnet name = "Black Fishnet" icon_state = "black_fishnet" - gender = NEUTER -/datum/sprite_accessory/socks/vox_white +/datum/sprite_accessory/socks/vox + species_allowed = list("Vox") + +/datum/sprite_accessory/socks/vox/vox_white name = "Vox White" icon_state = "vox_white" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_black +/datum/sprite_accessory/socks/vox/vox_black name = "Vox Black" icon_state = "vox_black" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_thin +/datum/sprite_accessory/socks/vox/vox_thin name = "Vox Black Thin" icon_state = "vox_blackthin" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_rainbow +/datum/sprite_accessory/socks/vox/vox_rainbow name = "Vox Rainbow" icon_state = "vox_rainbow" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_stripped +/datum/sprite_accessory/socks/vox/vox_stripped name = "Vox Striped" icon_state = "vox_white" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_white_thigh +/datum/sprite_accessory/socks/vox/vox_white_thigh name = "Vox Thigh-high White" icon_state = "vox_whiteTH" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_black_thigh +/datum/sprite_accessory/socks/vox/vox_black_thigh name = "Vox Thigh-high Black" icon_state = "vox_blackTH" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_thin_thigh +/datum/sprite_accessory/socks/vox/vox_thin_thigh name = "Vox Thigh-high Thin" icon_state = "vox_blackthinTH" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_rainbow_thigh +/datum/sprite_accessory/socks/vox/vox_rainbow_thigh name = "Vox Thigh-high Rainbow" icon_state = "vox_rainbowTH" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_striped_thigh +/datum/sprite_accessory/socks/vox/vox_striped_thigh name = "Vox Thigh-high Striped" icon_state = "vox_stripedTH" - gender = NEUTER - species_allowed = list("Vox") -/datum/sprite_accessory/socks/vox_fishnet +/datum/sprite_accessory/socks/vox/vox_fishnet name = "Vox Fishnets" icon_state = "vox_fishnet" - gender = NEUTER - species_allowed = list("Vox") /* HEAD ACCESSORY */ @@ -1773,185 +1600,494 @@ species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Slime People", "Skeleton", "Vox") icon_state = "accessory_none" -/datum/sprite_accessory/head_accessory/simple - name = "Simple" +/datum/sprite_accessory/head_accessory/unathi species_allowed = list("Unathi") + +/datum/sprite_accessory/head_accessory/unathi/simple + name = "Simple" icon_state = "horns_simple" -/datum/sprite_accessory/head_accessory/short +/datum/sprite_accessory/head_accessory/unathi/short name = "Short" - species_allowed = list("Unathi") icon_state = "horns_short" -/datum/sprite_accessory/head_accessory/curled +/datum/sprite_accessory/head_accessory/unathi/curled name = "Curled" - species_allowed = list("Unathi") icon_state = "horns_curled" -/datum/sprite_accessory/head_accessory/ram +/datum/sprite_accessory/head_accessory/unathi/ram name = "Ram" - species_allowed = list("Unathi") icon_state = "horns_ram" -/datum/sprite_accessory/head_accessory/vulp_earfluff - icon = 'icons/mob/human_face.dmi' - name = "Vulpkanin Earfluff" - icon_state = "vulp_facial_earfluff" - species_allowed = list("Vulpkanin") +/datum/sprite_accessory/head_accessory/tajara + species_allowed = list("Tajaran") -/datum/sprite_accessory/head_accessory/vulp_blaze - icon = 'icons/mob/human_face.dmi' - name = "Blaze" - icon_state = "vulp_facial_blaze" - species_allowed = list("Vulpkanin") +/datum/sprite_accessory/head_accessory/tajara/outears_taj + name = "Tajaran Outer Ears" + icon_state = "markings_face_outears_taj" -/datum/sprite_accessory/head_accessory/vulp_vulpine - icon = 'icons/mob/human_face.dmi' - name = "Vulpine" - icon_state = "vulp_facial_vulpine" - species_allowed = list("Vulpkanin") +/datum/sprite_accessory/head_accessory/tajara/inears_taj + name = "Tajaran Inner Ears" + icon_state = "markings_face_inears_taj" -/datum/sprite_accessory/head_accessory/vulp_vulpine_fluff - icon = 'icons/mob/human_face.dmi' - name = "Vulpine and Earfluff" - icon_state = "vulp_facial_vulpine_fluff" - species_allowed = list("Vulpkanin") +/datum/sprite_accessory/head_accessory/tajara/muzzle_taj + name = "Tajaran Muzzle" + icon_state = "markings_face_muzzle_taj" -/datum/sprite_accessory/head_accessory/vulp_mask - icon = 'icons/mob/human_face.dmi' - name = "Mask" - icon_state = "vulp_facial_mask" - species_allowed = list("Vulpkanin") +/datum/sprite_accessory/head_accessory/tajara/muzzle_and_inears_taj + name = "Tajaran Muzzle and Inner Ears" + icon_state = "markings_face_muzzle_and_inears_taj" -/datum/sprite_accessory/head_accessory/vulp_patch - icon = 'icons/mob/human_face.dmi' - name = "Patch" - icon_state = "vulp_facial_patch" - species_allowed = list("Vulpkanin") - -/datum/sprite_accessory/head_accessory/vulp_ruff - icon = 'icons/mob/human_face.dmi' - name = "Ruff" - icon_state = "vulp_facial_ruff" - species_allowed = list("Vulpkanin") - -/datum/sprite_accessory/head_accessory/vulp_kita - icon = 'icons/mob/human_face.dmi' - name = "Kita" - icon_state = "vulp_facial_kita" - species_allowed = list("Vulpkanin") - -/datum/sprite_accessory/head_accessory/vulp_swift - icon = 'icons/mob/human_face.dmi' - name = "Swift" - icon_state = "vulp_facial_swift" - species_allowed = list("Vulpkanin") - -/datum/sprite_accessory/head_accessory/taj_ears +/datum/sprite_accessory/head_accessory/tajara/taj_ears icon = 'icons/mob/human_face.dmi' name = "Tajaran Ears" icon_state = "ears_plain" - species_allowed = list("Tajaran") -/datum/sprite_accessory/head_accessory/ipc_antennae +/datum/sprite_accessory/head_accessory/tajara/taj_nose + name = "Tajaran Nose" + icon_state = "markings_face_nose_taj" + +/datum/sprite_accessory/head_accessory/vulpkanin + species_allowed = list("Vulpkanin") + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_earfluff + icon = 'icons/mob/human_face.dmi' + name = "Vulpkanin Earfluff" + icon_state = "vulp_facial_earfluff" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_blaze + icon = 'icons/mob/human_face.dmi' + name = "Blaze" + icon_state = "vulp_facial_blaze" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_vulpine + icon = 'icons/mob/human_face.dmi' + name = "Vulpine" + icon_state = "vulp_facial_vulpine" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_vulpine_fluff + icon = 'icons/mob/human_face.dmi' + name = "Vulpine and Earfluff" + icon_state = "vulp_facial_vulpine_fluff" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_mask + icon = 'icons/mob/human_face.dmi' + name = "Mask" + icon_state = "vulp_facial_mask" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_patch + icon = 'icons/mob/human_face.dmi' + name = "Patch" + icon_state = "vulp_facial_patch" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_ruff + icon = 'icons/mob/human_face.dmi' + name = "Ruff" + icon_state = "vulp_facial_ruff" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_kita + icon = 'icons/mob/human_face.dmi' + name = "Kita" + icon_state = "vulp_facial_kita" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_swift + icon = 'icons/mob/human_face.dmi' + name = "Swift" + icon_state = "vulp_facial_swift" + +/datum/sprite_accessory/head_accessory/vulpkanin/vulp_nose + name = "Vulpkanin Nose" + icon_state = "markings_face_nose_vulp" + +/datum/sprite_accessory/head_accessory/ipc + species_allowed = list("Machine") + +/datum/sprite_accessory/head_accessory/ipc/ipc_antennae name = "Antennae" icon_state = "antennae" - species_allowed = list("Machine") -/datum/sprite_accessory/head_accessory/ipc_tv_antennae +/datum/sprite_accessory/head_accessory/ipc/ipc_tv_antennae name = "T.V. Antennae" icon_state = "tvantennae" - species_allowed = list("Machine") -/datum/sprite_accessory/head_accessory/ipc_tesla_antennae +/datum/sprite_accessory/head_accessory/ipc/ipc_tesla_antennae name = "Tesla Antennae" icon_state = "tesla" - species_allowed = list("Machine") -/datum/sprite_accessory/head_accessory/ipc_light +/datum/sprite_accessory/head_accessory/ipc/ipc_light name = "Head Light" icon_state = "light" - species_allowed = list("Machine") /* BODY MARKINGS */ /datum/sprite_accessory/body_markings icon = 'icons/mob/body_accessory.dmi' - species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine") + species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine", "Vox") icon_state = "accessory_none" + marking_location = "body" /datum/sprite_accessory/body_markings/none name = "None" species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Slime People", "Skeleton", "Vox") icon_state = "accessory_none" -/datum/sprite_accessory/body_markings/stripe - name = "Stripe" - species_allowed = list("Unathi") - icon_state = "markings_stripe" - /datum/sprite_accessory/body_markings/tiger name = "Tiger Body" species_allowed = list("Unathi", "Tajaran", "Vulpkanin") icon_state = "markings_tiger" -/datum/sprite_accessory/body_markings/tigerhead - name = "Tiger Body and Head" - species_allowed = list("Unathi", "Tajaran", "Vulpkanin") - icon_state = "markings_tigerhead" - -/datum/sprite_accessory/body_markings/tigerheadface_taj - name = "Tajaran Tiger Body, Head and Face" - species_allowed = list("Tajaran") - icon_state = "markings_tigerheadface_taj" - -/datum/sprite_accessory/body_markings/tigerheadface_vulp - name = "Vulpkanin Tiger Body, Head and Face" - species_allowed = list("Vulpkanin") - icon_state = "markings_tigerheadface_vulp" - -/datum/sprite_accessory/body_markings/tigerheadface_una - name = "Unathi Tiger Body, Head and Face" +/datum/sprite_accessory/body_markings/unathi species_allowed = list("Unathi") - icon_state = "markings_tigerheadface_una" -/datum/sprite_accessory/body_markings/optics +/datum/sprite_accessory/body_markings/unathi/stripe_una + name = "Unathi Stripe" + icon_state = "markings_stripe_una" + +/datum/sprite_accessory/body_markings/unathi/belly_narrow_una + name = "Unathi Belly" + icon_state = "markings_belly_narrow_una" + +/datum/sprite_accessory/body_markings/unathi/banded_una + name = "Unathi Banded" + icon_state = "markings_banded_una" + +/datum/sprite_accessory/body_markings/unathi/points_una + name = "Unathi Points" + icon_state = "markings_points_una" + +/datum/sprite_accessory/body_markings/tajara + species_allowed = list("Tajaran") + +/datum/sprite_accessory/body_markings/tajara/belly_flat_taj + name = "Tajaran Belly" + icon_state = "markings_belly_flat_taj" + +/datum/sprite_accessory/body_markings/tajara/belly_crest_taj + name = "Tajaran Chest Crest" + icon_state = "markings_belly_crest_taj" + +/datum/sprite_accessory/body_markings/tajara/belly_full_taj + name = "Tajaran Belly 2" + icon_state = "markings_belly_full_taj" + +/datum/sprite_accessory/body_markings/tajara/points_taj + name = "Tajaran Points" + icon_state = "markings_points_taj" + +/datum/sprite_accessory/body_markings/tajara/patchy_taj + name = "Tajaran Patches" + icon_state = "markings_patch_taj" + +/datum/sprite_accessory/body_markings/vulpkanin + species_allowed = list("Vulpkanin") + +/datum/sprite_accessory/body_markings/vulpkanin/belly_fox_vulp + name = "Vulpkanin Belly" + icon_state = "markings_belly_fox_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/belly_full_vulp + name = "Vulpkanin Belly 2" + icon_state = "markings_belly_full_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/belly_crest_vulp + name = "Vulpkanin Belly Crest" + icon_state = "markings_belly_crest_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/points_fade_vulp + name = "Vulpkanin Points" + icon_state = "markings_points_fade_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/points_fade_belly_vulp + name = "Vulpkanin Points and Belly" + icon_state = "markings_points_fade_belly_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/points_fade_belly_alt_vulp + name = "Vulpkanin Points and Belly Alt." + icon_state = "markings_points_fade_belly_alt_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/points_sharp_vulp + name = "Vulpkanin Points 2" + icon_state = "markings_points_sharp_vulp" + +/datum/sprite_accessory/body_markings/vulpkanin/points_crest_vulp + name = "Vulpkanin Points and Crest" + icon_state = "markings_points_crest_vulp" + +/datum/sprite_accessory/body_markings/drask + species_allowed = list("Drask") + +/datum/sprite_accessory/body_markings/drask/arm_spines_drask + name = "Drask Arm Spines" + icon_state = "markings_armspines_drask" + +/datum/sprite_accessory/body_markings/head + marking_location = "head" + species_allowed = list() + +/datum/sprite_accessory/body_markings/head/tajara + species_allowed = list("Tajaran") + +/datum/sprite_accessory/body_markings/head/tajara/tiger_head_taj + name = "Tajaran Tiger Head" + icon_state = "markings_head_tiger_taj" + +/datum/sprite_accessory/body_markings/head/tajara/tiger_face_taj + name = "Tajaran Tiger Head and Face" + icon_state = "markings_face_tiger_taj" + +/datum/sprite_accessory/body_markings/head/tajara/outears_taj + name = "Tajaran Outer Ears" + icon_state = "markings_face_outears_taj" + +/datum/sprite_accessory/body_markings/head/tajara/inears_taj + name = "Tajaran Inner Ears" + icon_state = "markings_face_inears_taj" + +/datum/sprite_accessory/body_markings/head/tajara/nose_taj + name = "Tajaran Nose" + icon_state = "markings_face_nose_taj" + +/datum/sprite_accessory/body_markings/head/tajara/muzzle_taj + name = "Tajaran Muzzle" + icon_state = "markings_face_muzzle_taj" + +/datum/sprite_accessory/body_markings/head/tajara/muzzle_and_inears_taj + name = "Tajaran Muzzle and Inner Ears" + icon_state = "markings_face_muzzle_and_inears_taj" + +/datum/sprite_accessory/body_markings/head/tajara/muzzle_alt_taj //Companion marking for Tajaran Belly 2. + name = "Tajaran Muzzle 2" + icon_state = "markings_face_full_taj" + +/datum/sprite_accessory/body_markings/head/tajara/points_taj //Companion marking for Tajaran Points. + name = "Tajaran Points Head" + icon_state = "markings_face_points_taj" + +/datum/sprite_accessory/body_markings/head/tajara/patchy_taj //Companion marking for Tajaran Patches. + name = "Tajaran Patches Head" + icon_state = "markings_face_patch_taj" + +/datum/sprite_accessory/body_markings/head/vulpkanin + species_allowed = list("Vulpkanin") + +/datum/sprite_accessory/body_markings/head/vulpkanin/tiger_head_vulp + name = "Vulpkanin Tiger Head" + icon_state = "markings_head_tiger_vulp" + +/datum/sprite_accessory/body_markings/head/vulpkanin/tiger_face_vulp + name = "Vulpkanin Tiger Head and Face" + icon_state = "markings_face_tiger_vulp" + +/datum/sprite_accessory/body_markings/head/vulpkanin/nose_default_vulp + name = "Vulpkanin Nose" + icon_state = "markings_face_nose_vulp" + +/datum/sprite_accessory/body_markings/head/vulpkanin/muzzle_vulp //Companion marking for Vulpkanin Belly Alt.. + name = "Vulpkanin Muzzle" + icon_state = "markings_face_full_vulp" + +/datum/sprite_accessory/body_markings/head/vulpkanin/muzzle_ears_vulp //Companion marking for Vulpkanin Belly Alt.. + name = "Vulpkanin Muzzle and Ears" + icon_state = "markings_face_full_ears_vulp" + +/datum/sprite_accessory/body_markings/head/vulpkanin/points_fade_vulp //Companion marking for Vulpkanin Points Fade. + name = "Vulpkanin Points Head" + icon_state = "markings_face_points_fade_vulp" + +/datum/sprite_accessory/body_markings/head/vulpkanin/points_sharp_vulp //Companion marking for Vulpkanin Points Sharp. + name = "Vulpkanin Points Head 2" + icon_state = "markings_face_points_sharp_vulp" + +/datum/sprite_accessory/body_markings/head/unathi + species_allowed = list("Unathi") + +/datum/sprite_accessory/body_markings/head/unathi/tiger_head_una + name = "Unathi Tiger Head" + icon_state = "markings_head_tiger_una" + heads_allowed = list("All") + +/datum/sprite_accessory/body_markings/head/unathi/tiger_face_una + name = "Unathi Tiger Head and Face" + icon_state = "markings_face_tiger_una" + +/datum/sprite_accessory/body_markings/head/unathi/snout_una_round + name = "Unathi Round Snout" + icon_state = "markings_face_snout_una_round" + +/datum/sprite_accessory/body_markings/head/unathi/snout_lower_una_round + name = "Unathi Lower Round Snout" + icon_state = "markings_face_snout_lower_una" + +/datum/sprite_accessory/body_markings/head/unathi/banded_una //Companion marking for Unathi Banded. + name = "Unathi Banded Head" + icon_state = "markings_face_banded_una" + heads_allowed = list("All") + +/datum/sprite_accessory/body_markings/head/unathi/snout_narrow_una //Companion marking for Unathi Narrow Belly. + name = "Unathi Snout 2" + icon_state = "markings_face_narrow_una" + +/datum/sprite_accessory/body_markings/head/unathi/points_una //Companion marking for Unathi Points. + name = "Unathi Points Head" + icon_state = "markings_face_points_una" + +/datum/sprite_accessory/body_markings/head/unathi/sharp + heads_allowed = list("Unathi Sharp Snout") + +/datum/sprite_accessory/body_markings/head/unathi/sharp/tiger_face_una_sharp + name = "Unathi Sharp Tiger Head and Face" + icon_state = "markings_face_tiger_una_sharp" + +/datum/sprite_accessory/body_markings/head/unathi/sharp/snout_una_sharp + name = "Unathi Sharp Snout" + icon_state = "markings_face_snout_una_sharp" + +/datum/sprite_accessory/body_markings/head/unathi/sharp/snout_narrow_una_sharp //Companion marking for Unathi Narrow Belly. + name = "Unathi Sharp Snout 2" + icon_state = "markings_face_narrow_una_sharp" + +/datum/sprite_accessory/body_markings/head/unathi/sharp/points_una_sharp //Companion marking for Unathi Points. + name = "Unathi Sharp Points Head" + icon_state = "markings_face_points_una" + +/datum/sprite_accessory/body_markings/head/optics name = "Humanoid Optics" species_allowed = list("Machine") icon_state = "optics" models_allowed = list("Bishop Cybernetics", "Hesphiastos Industries", "Ward-Takahashi", "Xion Manufacturing Group", "Zeng-Hu Pharmaceuticals") //Should be the same as the manufacturing company of the limb in robolimbs.dm - marking_location = "head" -/datum/sprite_accessory/body_markings/optics/bishop_alt +/datum/sprite_accessory/body_markings/head/optics/bishop_alt name = "Bishop Alt. Optics" - species_allowed = list("Machine") icon_state = "bishop_alt_optics" models_allowed = list("Bishop Cybernetics alt.") -/datum/sprite_accessory/body_markings/optics/morpheus_alt +/datum/sprite_accessory/body_markings/head/optics/morpheus_alt name = "Morpheus Alt. Optics" - species_allowed = list("Machine") icon_state = "morpheus_alt_optics" models_allowed = list("Morpheus Cyberkinetics alt.") -/datum/sprite_accessory/body_markings/optics/wardtakahashi_alt +/datum/sprite_accessory/body_markings/head/optics/wardtakahashi_alt name = "Ward-Takahashi Alt. Optics" - species_allowed = list("Machine") icon_state = "wardtakahashi_alt_optics" models_allowed = list("Ward-Takahashi alt.") -/datum/sprite_accessory/body_markings/optics/xion_alt +/datum/sprite_accessory/body_markings/head/optics/xion_alt name = "Xion Alt. Optics" - species_allowed = list("Machine") icon_state = "xion_alt_optics" models_allowed = list("Xion Manufacturing Group alt.") /datum/sprite_accessory/body_markings/tattoo // Tattoos applied post-round startup with tattoo guns in item_defines.dm - name = "base tattoo" - species_allowed = list() + species_allowed = list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell") icon_state = "accessory_none" /datum/sprite_accessory/body_markings/tattoo/elliot name = "Elliot Circuit Tattoo" - icon_state = "campbell_tattoo" \ No newline at end of file + icon_state = "campbell_tattoo" + species_allowed = null + +/datum/sprite_accessory/body_markings/tattoo/tiger_body + name = "Tiger-stripe Tattoo" + species_allowed = list("Human", "Unathi", "Vulpkanin", "Tajaran", "Skrell") + icon_state = "markings_tiger" + +/datum/sprite_accessory/body_markings/tattoo/heart + name = "Heart Tattoo" + icon_state = "markings_tattoo_heart" + +/datum/sprite_accessory/body_markings/tattoo/hive + name = "Hive Tattoo" + icon_state = "markings_tattoo_hive" + +/datum/sprite_accessory/body_markings/tattoo/nightling + name = "Nightling Tattoo" + icon_state = "markings_tattoo_nightling" + +/datum/sprite_accessory/body_markings/tattoo/vox + species_allowed = list("Vox") + +/datum/sprite_accessory/body_markings/tattoo/vox/heart_vox + name = "Vox Heart Tattoo" + icon_state = "markings_tattoo_heart_vox" + +/datum/sprite_accessory/body_markings/tattoo/vox/hive_vox + name = "Vox Hive Tattoo" + icon_state = "markings_tattoo_hive_vox" + +/datum/sprite_accessory/body_markings/tattoo/vox/nightling_vox + name = "Vox Nightling Tattoo" + icon_state = "markings_tattoo_nightling_vox" + +/datum/sprite_accessory/body_markings/tail + species_allowed = list() + icon_state = "accessory_none" + marking_location = "tail" + tails_allowed = null + +/datum/sprite_accessory/body_markings/tail/vox + species_allowed = list("Vox") + +/datum/sprite_accessory/body_markings/tail/vox/vox_band + name = "Vox Tail Band" + icon_state = "markings_voxtail_band" + +/datum/sprite_accessory/body_markings/tail/vox/vox_tip + name = "Vox Tail Tip" + icon_state = "markings_voxtail_tip" + +/datum/sprite_accessory/body_markings/tail/vox/vox_stripe + name = "Vox Tail Stripe" + icon_state = "markings_voxtail_stripe" + +/datum/sprite_accessory/body_markings/tail/vulpkanin + species_allowed = list("Vulpkanin") + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_default_tip + name = "Vulpkanin Default Tail Tip" + icon_state = "markings_vulptail_tip" + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_default_fade + name = "Vulpkanin Default Tail Fade" + icon_state = "markings_vulptail_fade" + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_bushy_fluff + name = "Vulpkanin Bushy Tail Fluff" + tails_allowed = list("Vulpkanin Alt 1 (Bushy)") + icon_state = "markings_vulptail2_fluff" + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_short_tip + name = "Vulpkanin Short Tail Tip" + tails_allowed = list("Vulpkanin Alt 4 (Short)") + icon_state = "markings_vulptail5_tip" + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_hybrid_tip + name = "Vulpkanin Bushy Straight Tail Tip" + tails_allowed = list("Vulpkanin Alt 5 (Straight Bushy)") + icon_state = "markings_vulptail6_tip" + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_hybrid_fade + name = "Vulpkanin Bushy Straight Tail Fade" + tails_allowed = list("Vulpkanin Alt 5 (Straight Bushy)") + icon_state = "markings_vulptail6_fade" + +/datum/sprite_accessory/body_markings/tail/vulpkanin/vulp_hybrid_silverf + name = "Vulpkanin Bushy Straight Tail Black Fade White Tip" + tails_allowed = list("Vulpkanin Alt 5 (Straight Bushy)") + icon_state = "markings_vulptail6_silverf" + +/* ALT HEADS */ + +/datum/sprite_accessory/alt_heads + icon = null + icon_state = null + species_allowed = null + var/suffix = null + +/datum/sprite_accessory/alt_heads/none + name = "None" + +/datum/sprite_accessory/alt_heads/una_sharp_snout + name = "Unathi Sharp Snout" + species_allowed = list("Unathi") + icon_state = "head_sharp" + suffix = "sharp" diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index f280bec0ce1..d010bdfa135 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -142,7 +142,7 @@ if(length(message) >= 2) var/language_prefix = trim_right(lowertext(copytext(message, 1 ,4))) var/datum/language/L = language_keys[language_prefix] - if(can_speak(L)) + if(can_speak_language(L)) return L return null diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm new file mode 100644 index 00000000000..7358486deee --- /dev/null +++ b/code/modules/mob/status_procs.dm @@ -0,0 +1,202 @@ +// A bunch of empty procs for all the status procs in living/status_procs.dm, because +// I can't be bothered to deal with all the merge conflicts it would cause to +// typecast every mob in the codebase correctly + +/mob/proc/Confused() + return + +/mob/proc/SetConfused() + return + +/mob/proc/AdjustConfused() + return + + +/mob/proc/Dizzy() + return + +/mob/proc/SetDizzy() + return + +/mob/proc/AdjustDizzy() + return + + +/mob/proc/Drowsy() + return + +/mob/proc/SetDrowsy() + return + +/mob/proc/AdjustDrowsy() + return + + +/mob/proc/Drunk() + return + +/mob/proc/SetDrunk() + return + +/mob/proc/AdjustDrunk() + return + + +/mob/proc/Druggy() + return + +/mob/proc/SetDruggy() + return + +/mob/proc/AdjustDruggy() + return + + +/mob/proc/EarDamage() + return + +/mob/proc/SetEarDamage() + return + +/mob/proc/AdjustEarDamage() + return + + +/mob/proc/EarDeaf() + return + +/mob/proc/SetEarDeaf() + return + +/mob/proc/AdjustEarDeaf() + return + + +/mob/proc/EyeBlind() + return + +/mob/proc/SetEyeBlind() + return + +/mob/proc/AdjustEyeBlind() + return + + +/mob/proc/EyeBlurry() + return + +/mob/proc/SetEyeBlurry() + return + +/mob/proc/AdjustEyeBlurry() + return + + +/mob/proc/Hallucinate() + return + +/mob/proc/SetHallucinate() + return + +/mob/proc/AdjustHallucinate() + return + + +/mob/proc/Jitter() + return + +/mob/proc/SetJitter() + return + +/mob/proc/AdjustJitter() + return + + +/mob/proc/LoseBreath() + return + +/mob/proc/SetLoseBreath() + return + +/mob/proc/AdjustLoseBreath() + return + + +/mob/proc/Paralyse() + return + +/mob/proc/SetParalysis() + return + +/mob/proc/AdjustParalysis() + return + + +/mob/proc/Silence() + return + +/mob/proc/SetSilence() + return + +/mob/proc/AdjustSilence() + return + + +/mob/proc/Sleeping() + return + +/mob/proc/SetSleeping() + return + +/mob/proc/AdjustSleeping() + return + + +/mob/proc/Slowed() + return + +/mob/proc/SetSlowed() + return + +/mob/proc/AdjustSlowed() + return + + +/mob/proc/Slur() + return + +/mob/proc/SetSlur() + return + +/mob/proc/AdjustSlur() + return + + +/mob/proc/Stun() + return + +/mob/proc/SetStunned() + return + +/mob/proc/AdjustStunned() + return + + +/mob/proc/Stuttering() + return + +/mob/proc/SetStuttering() + return + +/mob/proc/AdjustStuttering() + return + + +/mob/proc/Weaken() + return + +/mob/proc/SetWeakened() + return + +/mob/proc/AdjustWeakened() + return diff --git a/code/modules/mob/update_status.dm b/code/modules/mob/update_status.dm new file mode 100644 index 00000000000..3893085edb3 --- /dev/null +++ b/code/modules/mob/update_status.dm @@ -0,0 +1,65 @@ +// These are procs that cause immediate updates to features of the mob - prefixed with `update_` +// Procs that have a stacking effect depending on how many times they are called +// do not belong in this file - those go in `life.dm` instead, with the prefix `handle_` + +// OVERLAY/SIGHT PROCS + +// These return 0 if they are not applying an overlay, and 1 if they are + +// Call this to immediately apply blindness effects, instead of +// waiting for the next `Life` tick +/mob/proc/update_blind_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_blurry_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_druggy_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_nearsighted_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_sleeping_effects() + // No handling for this on the mob level + return 0 + +/mob/proc/update_tint_effects() + // No handling for this on the mob level + return 0 + +// Procs that give information about the status of the mob + +/mob/proc/can_hear() + return 1 + +/mob/proc/can_see() + return 1 + +/mob/proc/can_speak() + return 1 + +/mob/proc/incapacitated(ignore_restraints, ignore_grab) + return 0 + +/mob/proc/restrained(ignore_grab) + // All are created free + return 0 + +// Procs that update other things about the mob + +// Does various animations - Jitter, Flying, Spinning +/mob/proc/update_animations() + if(flying) + animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) + animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING) + +/mob/proc/update_stat() + return + +/mob/proc/update_canmove() + return 1 diff --git a/code/modules/nano/interaction/base.dm b/code/modules/nano/interaction/base.dm index 3f8897eb5c8..e4e5dd1a33b 100644 --- a/code/modules/nano/interaction/base.dm +++ b/code/modules/nano/interaction/base.dm @@ -17,7 +17,7 @@ else if(incapacitated()) return STATUS_UPDATE // update only (orange visibility) return STATUS_INTERACTIVE - + /mob/dead/observer/shared_nano_interaction() if(check_rights(R_ADMIN, 0, src)) return STATUS_INTERACTIVE // Admins are more equal diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 8606dafbd31..21c14077886 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -7,8 +7,11 @@ var/list/valid_hairstyles = list() var/list/valid_facial_hairstyles = list() var/list/valid_head_accessories = list() - var/list/valid_marking_styles = list() + var/list/valid_head_marking_styles = list() + var/list/valid_body_marking_styles = list() + var/list/valid_tail_marking_styles = list() var/list/valid_body_accessories = list() + var/list/valid_alt_head_styles = list() var/check_whitelist var/list/whitelist @@ -48,7 +51,7 @@ else if(owner.species.bodyflags & HAS_ICON_SKIN_TONE) var/const/MAX_LINE_ENTRIES = 4 var/prompt = "Choose your character's skin tone: 1-[owner.species.icon_skin_tones.len]\n(" - for(var/i = 1; i <= owner.species.icon_skin_tones.len; i++) + for(var/i = 1 to owner.species.icon_skin_tones.len) if(i > MAX_LINE_ENTRIES && !((i - 1) % MAX_LINE_ENTRIES)) prompt += "\n" prompt += "[i] = [owner.species.icon_skin_tones[i]]" @@ -66,9 +69,9 @@ if(can_change_skin_color()) var/new_skin = input(usr, "Choose your character's skin colour: ", "Skin Color", rgb(owner.r_skin, owner.g_skin, owner.b_skin)) as color|null if(new_skin && can_still_topic(state)) - var/r_skin = hex2num(copytext(new_skin, 2, 4)) - var/g_skin = hex2num(copytext(new_skin, 4, 6)) - var/b_skin = hex2num(copytext(new_skin, 6, 8)) + var/r_skin = color2R(new_skin) + var/g_skin = color2G(new_skin) + var/b_skin = color2B(new_skin) if(owner.change_skin_color(r_skin, g_skin, b_skin)) update_dna() return 1 @@ -81,12 +84,22 @@ if(can_change(APPEARANCE_HAIR_COLOR)) var/new_hair = input("Please select hair color.", "Hair Color", rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair)) as color|null if(new_hair && can_still_topic(state)) - var/r_hair = hex2num(copytext(new_hair, 2, 4)) - var/g_hair = hex2num(copytext(new_hair, 4, 6)) - var/b_hair = hex2num(copytext(new_hair, 6, 8)) + var/r_hair = color2R(new_hair) + var/g_hair = color2G(new_hair) + var/b_hair = color2B(new_hair) if(owner.change_hair_color(r_hair, g_hair, b_hair)) update_dna() return 1 + if(href_list["secondary_hair_color"]) + if(can_change(APPEARANCE_SECONDARY_HAIR_COLOR)) + var/new_hair = input("Please select secondary hair color.", "Secondary Hair Color", rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec)) as color|null + if(new_hair && can_still_topic(state)) + var/r_hair_sec = color2R(new_hair) + var/g_hair_sec = color2G(new_hair) + var/b_hair_sec = color2B(new_hair) + if(owner.change_hair_color(r_hair_sec, g_hair_sec, b_hair_sec, 1)) + update_dna() + return 1 if(href_list["facial_hair"]) if(can_change(APPEARANCE_FACIAL_HAIR) && (href_list["facial_hair"] in valid_facial_hairstyles)) if(owner.change_facial_hair(href_list["facial_hair"])) @@ -96,12 +109,22 @@ if(can_change(APPEARANCE_FACIAL_HAIR_COLOR)) var/new_facial = input("Please select facial hair color.", "Facial Hair Color", rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial)) as color|null if(new_facial && can_still_topic(state)) - var/r_facial = hex2num(copytext(new_facial, 2, 4)) - var/g_facial = hex2num(copytext(new_facial, 4, 6)) - var/b_facial = hex2num(copytext(new_facial, 6, 8)) + var/r_facial = color2R(new_facial) + var/g_facial = color2G(new_facial) + var/b_facial = color2B(new_facial) if(owner.change_facial_hair_color(r_facial, g_facial, b_facial)) update_dna() return 1 + if(href_list["secondary_facial_hair_color"]) + if(can_change(APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR)) + var/new_facial = input("Please select secondary facial hair color.", "Secondary Facial Hair Color", rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec)) as color|null + if(new_facial && can_still_topic(state)) + var/r_facial_sec = color2R(new_facial) + var/g_facial_sec = color2G(new_facial) + var/b_facial_sec = color2B(new_facial) + if(owner.change_facial_hair_color(r_facial_sec, g_facial_sec, b_facial_sec, 1)) + update_dna() + return 1 if(href_list["eye_color"]) if(can_change(APPEARANCE_EYE_COLOR)) var/obj/item/organ/internal/eyes/eyes_organ = owner.get_int_organ(/obj/item/organ/internal/eyes) @@ -114,9 +137,9 @@ eyes_blue = eyes_organ.eye_colour[3] var/new_eyes = input("Please select eye color.", "Eye Color", rgb(eyes_red, eyes_green, eyes_blue)) as color|null if(new_eyes && can_still_topic(state)) - var/r_eyes = hex2num(copytext(new_eyes, 2, 4)) - var/g_eyes = hex2num(copytext(new_eyes, 4, 6)) - var/b_eyes = hex2num(copytext(new_eyes, 6, 8)) + var/r_eyes = color2R(new_eyes) + var/g_eyes = color2G(new_eyes) + var/b_eyes = color2B(new_eyes) if(owner.change_eye_color(r_eyes, g_eyes, b_eyes)) update_dna() return 1 @@ -129,31 +152,60 @@ if(can_change_head_accessory()) var/new_head_accessory = input("Please select head accessory color.", "Head Accessory Color", rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc)) as color|null if(new_head_accessory && can_still_topic(state)) - var/r_headacc = hex2num(copytext(new_head_accessory, 2, 4)) - var/g_headacc = hex2num(copytext(new_head_accessory, 4, 6)) - var/b_headacc = hex2num(copytext(new_head_accessory, 6, 8)) + var/r_headacc = color2R(new_head_accessory) + var/g_headacc = color2G(new_head_accessory) + var/b_headacc = color2B(new_head_accessory) if(owner.change_head_accessory_color(r_headacc, g_headacc, b_headacc)) update_dna() return 1 - if(href_list["marking"]) - if(can_change_markings() && (href_list["marking"] in valid_marking_styles)) - if(owner.change_markings(href_list["marking"])) + if(href_list["head_marking"]) + if(can_change_markings("head") && (href_list["head_marking"] in valid_head_marking_styles)) + if(owner.change_markings(href_list["head_marking"], "head")) update_dna() return 1 - if(href_list["marking_color"]) - if(can_change_markings()) - var/new_markings = input("Please select marking color.", "Marking Color", rgb(owner.r_markings, owner.g_markings, owner.b_markings)) as color|null + if(href_list["head_marking_color"]) + if(can_change_markings("head")) + var/new_markings = input("Please select head marking color.", "Marking Color", owner.m_colours["head"]) as color|null if(new_markings && can_still_topic(state)) - var/r_markings = hex2num(copytext(new_markings, 2, 4)) - var/g_markings = hex2num(copytext(new_markings, 4, 6)) - var/b_markings = hex2num(copytext(new_markings, 6, 8)) - if(owner.change_marking_color(r_markings, g_markings, b_markings)) + if(owner.change_marking_color(new_markings, "head")) + update_dna() + return 1 + if(href_list["body_marking"]) + if(can_change_markings("body") && (href_list["body_marking"] in valid_body_marking_styles)) + if(owner.change_markings(href_list["body_marking"], "body")) + update_dna() + return 1 + if(href_list["body_marking_color"]) + if(can_change_markings("body")) + var/new_markings = input("Please select body marking color.", "Marking Color", owner.m_colours["body"]) as color|null + if(new_markings && can_still_topic(state)) + if(owner.change_marking_color(new_markings, "body")) + update_dna() + return 1 + if(href_list["tail_marking"]) + if(can_change_markings("tail") && (href_list["tail_marking"] in valid_tail_marking_styles)) + if(owner.change_markings(href_list["tail_marking"], "tail")) + update_dna() + return 1 + if(href_list["tail_marking_color"]) + if(can_change_markings("tail")) + var/new_markings = input("Please select tail marking color.", "Marking Color", owner.m_colours["tail"]) as color|null + if(new_markings && can_still_topic(state)) + if(owner.change_marking_color(new_markings, "tail")) update_dna() return 1 if(href_list["body_accessory"]) if(can_change_body_accessory() && (href_list["body_accessory"] in valid_body_accessories)) if(owner.change_body_accessory(href_list["body_accessory"])) update_dna() + cut_and_generate_data() + return 1 + if(href_list["alt_head"]) + if(can_change_alt_head() && (href_list["alt_head"] in valid_alt_head_styles)) + if(owner.change_alt_head(href_list["alt_head"])) + update_dna() + head_organ = owner.get_organ("head") //Update the head with the new information. + cut_and_generate_data() return 1 return 0 @@ -199,13 +251,32 @@ data["facial_hair_styles"] = facial_hair_styles data["facial_hair_style"] = (head_organ ? head_organ.f_style : "Shaved") - data["change_markings"] = can_change_markings() - if(data["change_markings"]) - var/marking_styles[0] - for(var/marking_style in valid_marking_styles) - marking_styles[++marking_styles.len] = list("markingstyle" = marking_style) - data["marking_styles"] = marking_styles - data["marking_style"] = owner.m_style + data["change_head_markings"] = can_change_markings("head") + if(data["change_head_markings"]) + var/m_style = owner.m_styles["head"] + var/head_marking_styles[0] + for(var/head_marking_style in valid_head_marking_styles) + head_marking_styles[++head_marking_styles.len] = list("headmarkingstyle" = head_marking_style) + data["head_marking_styles"] = head_marking_styles + data["head_marking_style"] = m_style + + data["change_body_markings"] = can_change_markings("body") + if(data["change_body_markings"]) + var/m_style = owner.m_styles["body"] + var/body_marking_styles[0] + for(var/body_marking_style in valid_body_marking_styles) + body_marking_styles[++body_marking_styles.len] = list("bodymarkingstyle" = body_marking_style) + data["body_marking_styles"] = body_marking_styles + data["body_marking_style"] = m_style + + data["change_tail_markings"] = can_change_markings("tail") + if(data["change_tail_markings"]) + var/m_style = owner.m_styles["tail"] + var/tail_marking_styles[0] + for(var/tail_marking_style in valid_tail_marking_styles) + tail_marking_styles[++tail_marking_styles.len] = list("tailmarkingstyle" = tail_marking_style) + data["tail_marking_styles"] = tail_marking_styles + data["tail_marking_style"] = m_style data["change_body_accessory"] = can_change_body_accessory() if(data["change_body_accessory"]) @@ -213,15 +284,24 @@ for(var/body_accessory_style in valid_body_accessories) body_accessory_styles[++body_accessory_styles.len] = list("bodyaccessorystyle" = body_accessory_style) data["body_accessory_styles"] = body_accessory_styles - var/datum/body_accessory/BA - if(owner.body_accessory) - BA = owner.body_accessory.name - data["body_accessory_style"] = BA + data["body_accessory_style"] = (owner.body_accessory ? owner.body_accessory.name : "None") + + data["change_alt_head"] = can_change_alt_head() + if(data["change_alt_head"]) + var/alt_head_styles[0] + for(var/alt_head_style in valid_alt_head_styles) + alt_head_styles[++alt_head_styles.len] = list("altheadstyle" = alt_head_style) + data["alt_head_styles"] = alt_head_styles + data["alt_head_style"] = head_organ.alt_head data["change_head_accessory_color"] = can_change_head_accessory() data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR) + data["change_secondary_hair_color"] = can_change(APPEARANCE_SECONDARY_HAIR_COLOR) data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR) - data["change_marking_color"] = can_change_markings() + data["change_secondary_facial_hair_color"] = can_change(APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR) + data["change_head_marking_color"] = can_change_markings("head") + data["change_body_marking_color"] = can_change_markings("body") + data["change_tail_marking_color"] = can_change_markings("tail") ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) @@ -248,19 +328,41 @@ return 0 return owner && (flags & APPEARANCE_HEAD_ACCESSORY) && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY) -/datum/nano_module/appearance_changer/proc/can_change_markings() - return owner && (flags & APPEARANCE_MARKINGS) && (owner.species.bodyflags & HAS_MARKINGS) +/datum/nano_module/appearance_changer/proc/can_change_markings(var/location = "body") + var/marking_flag = HAS_BODY_MARKINGS + var/body_flags = owner.species.bodyflags + if(location == "head") + if(!head_organ) + log_debug("Missing head!") + return 0 + body_flags = head_organ.species.bodyflags + marking_flag = HAS_HEAD_MARKINGS + if(location == "body") + marking_flag = HAS_BODY_MARKINGS + if(location == "tail") + marking_flag = HAS_TAIL_MARKINGS + + return owner && (flags & APPEARANCE_MARKINGS) && (body_flags & marking_flag) /datum/nano_module/appearance_changer/proc/can_change_body_accessory() return owner && (flags & APPEARANCE_BODY_ACCESSORY) && (owner.species.bodyflags & HAS_TAIL) +/datum/nano_module/appearance_changer/proc/can_change_alt_head() + if(!head_organ) + log_debug("Missing head!") + return 0 + return owner && (flags & APPEARANCE_ALT_HEAD) && (head_organ.species.bodyflags & HAS_ALT_HEADS) + /datum/nano_module/appearance_changer/proc/cut_and_generate_data() // Making the assumption that the available species remain constant valid_hairstyles.Cut() valid_facial_hairstyles.Cut() valid_head_accessories.Cut() - valid_marking_styles.Cut() + valid_head_marking_styles.Cut() + valid_body_marking_styles.Cut() + valid_tail_marking_styles.Cut() valid_body_accessories.Cut() + valid_alt_head_styles.Cut() generate_data() /datum/nano_module/appearance_changer/proc/generate_data() @@ -273,7 +375,13 @@ valid_facial_hairstyles = owner.generate_valid_facial_hairstyles() if(!valid_head_accessories.len) valid_head_accessories = owner.generate_valid_head_accessories() - if(!valid_marking_styles.len) - valid_marking_styles = owner.generate_valid_markings() + if(!valid_head_marking_styles.len) + valid_head_marking_styles = owner.generate_valid_markings("head") + if(!valid_body_marking_styles.len) + valid_body_marking_styles = owner.generate_valid_markings("body") + if(!valid_tail_marking_styles.len) + valid_tail_marking_styles = owner.generate_valid_markings("tail") if(!valid_body_accessories.len) valid_body_accessories = owner.generate_valid_body_accessories() + if(!valid_alt_head_styles.len) + valid_alt_head_styles = owner.generate_valid_alt_heads() diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index f86b17eaab7..0ff6289ea66 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -1,211 +1,241 @@ - /obj/machinery/power/generator name = "thermoelectric generator" desc = "It's a high efficiency thermoelectric generator." icon_state = "teg" - density = 1 anchored = 0 + density = 1 + use_power = 0 - use_power = 1 - idle_power_usage = 100 //Watts, I hope. Just enough to do the computer and display things. - - var/obj/machinery/atmospherics/binary/circulator/circ1 - var/obj/machinery/atmospherics/binary/circulator/circ2 + var/obj/machinery/atmospherics/binary/circulator/cold_circ + var/obj/machinery/atmospherics/binary/circulator/hot_circ + var/cold_dir = WEST + var/hot_dir = EAST + var/lastgen = 0 var/lastgenlev = -1 - - var/image/overlay_image - - var/power_multiplier = 1 // This is so admins can tweak how good it is to find a good balance for effort -> power - var/powercap = 500000 //Not a hard cap, but outputs above this have a 10% chance to cause the TeG to lose half it's power. - + var/lastcirc = "00" + /obj/machinery/power/generator/New() ..() + update_desc() + +/obj/machinery/power/generator/proc/update_desc() + desc = initial(desc) + " Its cold circulator is located on the [dir2text(cold_dir)] side, and its heat circulator is located on the [dir2text(hot_dir)] side." + +/obj/machinery/power/generator/Destroy() + disconnect() + return ..() + +/obj/machinery/power/generator/proc/disconnect() + if(cold_circ) + cold_circ.generator = null + if(hot_circ) + hot_circ.generator = null + if(powernet) + disconnect_from_network() - spawn(1) - reconnect() +/obj/machinery/power/generator/initialize() + ..() + connect() + +/obj/machinery/power/generator/proc/connect() + connect_to_network() + + var/obj/machinery/atmospherics/binary/circulator/circpath = /obj/machinery/atmospherics/binary/circulator + cold_circ = locate(circpath) in get_step(src, cold_dir) + hot_circ = locate(circpath) in get_step(src, hot_dir) -//generators connect in dir and reverse_dir(dir) directions -//mnemonic to determine circulator/generator directions: the cirulators orbit clockwise around the generator -//so a circulator to the NORTH of the generator connects first to the EAST, then to the WEST -//and a circulator to the WEST of the generator connects first to the NORTH, then to the SOUTH -//note that the circulator's outlet dir is it's always facing dir, and it's inlet is always the reverse -/obj/machinery/power/generator/proc/reconnect() - circ1 = null - circ2 = null - if(src.loc && anchored) - if(src.dir & (EAST|WEST)) - circ1 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,EAST) - circ2 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,WEST) + if(cold_circ && cold_circ.side == cold_dir) + cold_circ.generator = src + cold_circ.update_icon() + else + cold_circ = null - if(circ1 && circ2) - if(circ1.dir != SOUTH || circ2.dir != NORTH) - circ1 = null - circ2 = null + if(hot_circ && hot_circ.side == hot_dir) + hot_circ.generator = src + hot_circ.update_icon() + else + hot_circ = null - else if(src.dir & (NORTH|SOUTH)) - circ1 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,NORTH) - circ2 = locate(/obj/machinery/atmospherics/binary/circulator) in get_step(src,SOUTH) - - if(circ1 && circ2 && (circ1.dir != EAST || circ2.dir != WEST)) - circ1 = null - circ2 = null - -/obj/machinery/power/generator/proc/updateicon() - if(isnull(src.overlay_image)) - src.overlay_image = image('icons/obj/power.dmi') - - overlays.Cut() - if(!(stat & (NOPOWER|BROKEN))) + power_change() + update_icon() + updateDialog() + +/obj/machinery/power/generator/power_change() + if(!anchored) + stat |= NOPOWER + else + ..() + +/obj/machinery/power/generator/update_icon() + if(stat & (NOPOWER|BROKEN)) + overlays.Cut() + else + overlays.Cut() if(lastgenlev != 0) - src.overlay_image.icon_state = "teg-op[lastgenlev]" - overlays += src.overlay_image + overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]") -/obj/machinery/power/generator/process() - if(!circ1 || !circ2 || !anchored || stat & (BROKEN|NOPOWER)) + overlays += image('icons/obj/power.dmi', "teg-oc[lastcirc]") + +/obj/machinery/power/generator/process() + if(stat & (NOPOWER|BROKEN)) return + if(!cold_circ || !hot_circ) + return + + lastgen = 0 + + if(powernet) + + //log_debug("cold_circ and hot_circ pass") + + var/datum/gas_mixture/cold_air = cold_circ.return_transfer_air() + var/datum/gas_mixture/hot_air = hot_circ.return_transfer_air() + + //log_debug("hot_air = [hot_air]; cold_air = [cold_air];") + + if(cold_air && hot_air) + + //log_debug("hot_air = [hot_air] temperature = [hot_air.temperature]; cold_air = [cold_air] temperature = [hot_air.temperature];") + + //log_debug("coldair and hotair pass") + var/cold_air_heat_capacity = cold_air.heat_capacity() + var/hot_air_heat_capacity = hot_air.heat_capacity() + + var/delta_temperature = hot_air.temperature - cold_air.temperature + + //log_debug("delta_temperature = [delta_temperature]; cold_air_heat_capacity = [cold_air_heat_capacity]; hot_air_heat_capacity = [hot_air_heat_capacity]") + + if(delta_temperature > 0 && cold_air_heat_capacity > 0 && hot_air_heat_capacity > 0) + var/efficiency = 0.65 + + var/energy_transfer = delta_temperature * hot_air_heat_capacity * cold_air_heat_capacity / (hot_air_heat_capacity + cold_air_heat_capacity) + + var/heat = energy_transfer * (1 - efficiency) + lastgen = energy_transfer * efficiency + + //log_debug("lastgen = [lastgen]; heat = [heat]; delta_temperature = [delta_temperature]; hot_air_heat_capacity = [hot_air_heat_capacity]; cold_air_heat_capacity = [cold_air_heat_capacity];") + + hot_air.temperature = hot_air.temperature - energy_transfer / hot_air_heat_capacity + cold_air.temperature = cold_air.temperature + heat / cold_air_heat_capacity + + //log_debug("POWER: [lastgen] W generated at [efficiency * 100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]") + + add_avail(lastgen) + // update icon overlays only if displayed level has changed + + if(hot_air) + var/datum/gas_mixture/hot_circ_air1 = hot_circ.air1 + hot_circ_air1.merge(hot_air) + + if(cold_air) + var/datum/gas_mixture/cold_circ_air1 = cold_circ.air1 + cold_circ_air1.merge(cold_air) + + var/genlev = max(0, min( round(11 * lastgen / 100000), 11)) + var/circ = "[cold_circ && cold_circ.last_pressure_delta > 0 ? "1" : "0"][hot_circ && hot_circ.last_pressure_delta > 0 ? "1" : "0"]" + if((genlev != lastgenlev) || (circ != lastcirc)) + lastgenlev = genlev + lastcirc = circ + update_icon() + updateDialog() - var/datum/gas_mixture/air1 = circ1.return_transfer_air() - var/datum/gas_mixture/air2 = circ2.return_transfer_air() - lastgen = 0 - - if(air1 && air2) - var/air1_heat_capacity = air1.heat_capacity() - var/air2_heat_capacity = air2.heat_capacity() - var/delta_temperature = abs(air2.temperature - air1.temperature) - - if(delta_temperature > 0 && air1_heat_capacity > 0 && air2_heat_capacity > 0) - var/efficiency = 0.65 - var/energy_transfer = delta_temperature*air2_heat_capacity*air1_heat_capacity/(air2_heat_capacity+air1_heat_capacity) - var/heat = energy_transfer*(1-efficiency) - lastgen = energy_transfer*efficiency*0.05*power_multiplier - - if(air2.temperature > air1.temperature) - air2.temperature = air2.temperature - energy_transfer/air2_heat_capacity - air1.temperature = air1.temperature + heat/air1_heat_capacity - else - air2.temperature = air2.temperature + heat/air2_heat_capacity - air1.temperature = air1.temperature - energy_transfer/air1_heat_capacity - - //Transfer the air - if(air1) - circ1.air2.merge(air1) - if(air2) - circ2.air2.merge(air2) - - //Update the gas networks - if(circ1.parent2) - circ1.parent2.update = 1 - if(circ2.parent2) - circ2.parent2.update = 1 - - // update icon overlays and power usage only if displayed level has changed - if(lastgen > powercap && prob(10)) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() - lastgen *= 0.5 - var/genlev = max(0, min( round(11*lastgen / powercap), 11)) - if(lastgen > 100 && genlev == 0) - genlev = 1 - if(genlev != lastgenlev) - lastgenlev = genlev - updateicon() - add_avail(lastgen) - /obj/machinery/power/generator/attack_ai(mob/user) - if(stat & (BROKEN|NOPOWER)) return + return attack_hand(user) + +/obj/machinery/power/generator/attack_ghost(mob/user) + if(stat & (NOPOWER|BROKEN)) + return + interact(user) + +/obj/machinery/power/generator/attack_hand(mob/user) + if(..()) + user << browse(null, "window=teg") + return interact(user) /obj/machinery/power/generator/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/wrench)) anchored = !anchored - to_chat(user, "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.") - use_power = anchored - reconnect() + if(!anchored) + disconnect() + power_change() + else + connect() + playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) + to_chat(user, "You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor.") + else if(istype(W, /obj/item/device/multitool)) + if(cold_dir == WEST) + cold_dir = EAST + hot_dir = WEST + else + cold_dir = WEST + hot_dir = EAST + connect() + to_chat(user, "You reverse the generator's circulator settings. The cold circulator is now on the [dir2text(cold_dir)] side, and the heat circulator is now on the [dir2text(hot_dir)] side.") + update_desc() else - ..() + ..() + +/obj/machinery/power/generator/proc/get_menu(include_link = 1) + var/t = "" + if(!powernet) + t += "Unable to connect to the power network!" + t += "
Retry" + else if(cold_circ && hot_circ) + var/datum/gas_mixture/cold_circ_air1 = cold_circ.air1 + var/datum/gas_mixture/cold_circ_air2 = cold_circ.air2 + var/datum/gas_mixture/hot_circ_air1 = hot_circ.air1 + var/datum/gas_mixture/hot_circ_air2 = hot_circ.air2 -/obj/machinery/power/generator/attack_hand(mob/user) - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER) || !anchored) return - interact(user) + t += "
" + t += "Output: [round(lastgen)] W" + + t += "
" + + t += "Cold loop
" + t += "Temperature Inlet: [round(cold_circ_air2.temperature, 0.1)] K / Outlet: [round(cold_circ_air1.temperature, 0.1)] K
" + t += "Pressure Inlet: [round(cold_circ_air2.return_pressure(), 0.1)] kPa / Outlet: [round(cold_circ_air1.return_pressure(), 0.1)] kPa
" + + t += "Hot loop
" + t += "Temperature Inlet: [round(hot_circ_air2.temperature, 0.1)] K / Outlet: [round(hot_circ_air1.temperature, 0.1)] K
" + t += "Pressure Inlet: [round(hot_circ_air2.return_pressure(), 0.1)] kPa / Outlet: [round(hot_circ_air1.return_pressure(), 0.1)] kPa
" + + t += "
" + else + t += "Unable to locate all parts!" + t += "
Retry" + if(include_link) + t += "
Close" + + return t /obj/machinery/power/generator/interact(mob/user) - if( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai))) - user.unset_machine() - user << browse(null, "window=teg") - return - user.set_machine(src) - var/t = "
Thermo-Electric Generator
" - - if(circ1 && circ2) - t += "Output : [round(lastgen)] W

" - - t += "Primary Circulator (top or right)
" - t += "Inlet Pressure: [round(circ1.air1.return_pressure(), 0.1)] kPa
" - t += "Inlet Temperature: [round(circ1.air1.temperature, 0.1)] K
" - t += "Outlet Pressure: [round(circ1.air2.return_pressure(), 0.1)] kPa
" - t += "Outlet Temperature: [round(circ1.air2.temperature, 0.1)] K
" - - t += "Secondary Circulator (bottom or left)
" - t += "Inlet Pressure: [round(circ2.air1.return_pressure(), 0.1)] kPa
" - t += "Inlet Temperature: [round(circ2.air1.temperature, 0.1)] K
" - t += "Outlet Pressure: [round(circ2.air2.return_pressure(), 0.1)] kPa
" - t += "Outlet Temperature: [round(circ2.air2.temperature, 0.1)] K
" - - else - t += "Unable to connect to circulators.
" - t += "Ensure both are in position and wrenched into place." - - t += "
" - t += "
" - t += "Refresh Close" - - user << browse(t, "window=teg;size=460x300") - onclose(user, "teg") + var/datum/browser/popup = new(user, "teg", "Thermo-Electric Generator", 460, 300) + popup.set_content(get_menu()) + popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() return 1 - /obj/machinery/power/generator/Topic(href, href_list) - ..() + if(..()) + return 0 if( href_list["close"] ) usr << browse(null, "window=teg") usr.unset_machine() return 0 - - updateDialog() + if( href_list["check"] ) + if(!powernet || !cold_circ || !hot_circ) + connect() return 1 - /obj/machinery/power/generator/power_change() ..() - updateicon() - - -/obj/machinery/power/generator/verb/rotate_clock() - set category = "Object" - set name = "Rotate Generator (Clockwise)" - set src in view(1) - - if(usr.stat || usr.restrained() || anchored) - return - - src.dir = turn(src.dir, 90) - -/obj/machinery/power/generator/verb/rotate_anticlock() - set category = "Object" - set name = "Rotate Generator (Counterclockwise)" - set src in view(1) - - if(usr.stat || usr.restrained() || anchored) - return - - src.dir = turn(src.dir, -90) \ No newline at end of file + update_icon() \ No newline at end of file diff --git a/code/modules/power/generator_type2.dm b/code/modules/power/generator_type2.dm deleted file mode 100644 index d1ff1f1079c..00000000000 --- a/code/modules/power/generator_type2.dm +++ /dev/null @@ -1,143 +0,0 @@ -/obj/machinery/power/generator_type2 - name = "thermoelectric generator" - desc = "It's a high efficiency thermoelectric generator." - icon_state = "teg" - anchored = 1 - density = 1 - use_power = 0 - - var/obj/machinery/atmospherics/unary/generator_input/input1 - var/obj/machinery/atmospherics/unary/generator_input/input2 - - var/lastgen = 0 - var/lastgenlev = -1 - - var/image/overlay_image - -/obj/machinery/power/generator_type2/New() - ..() - spawn(5) - input1 = locate(/obj/machinery/atmospherics/unary/generator_input) in get_step(src,turn(dir, 90)) - input2 = locate(/obj/machinery/atmospherics/unary/generator_input) in get_step(src,turn(dir, -90)) - if(!input1 || !input2) - stat |= BROKEN - updateicon() - - -/obj/machinery/power/generator_type2/proc/updateicon() - - if(isnull(src.overlay_image)) - src.overlay_image = image('icons/obj/power.dmi') - - overlays.Cut() - if(!(stat & (NOPOWER|BROKEN))) - - if(lastgenlev != 0) - src.overlay_image.icon_state = "teg-op[lastgenlev]" - overlays += src.overlay_image - -#define GENRATE 800 // generator output coefficient from Q - - -/obj/machinery/power/generator_type2/process() - if(!input1 || !input2) - return - - var/datum/gas_mixture/air1 = input1.return_exchange_air() - var/datum/gas_mixture/air2 = input2.return_exchange_air() - - - lastgen = 0 - - if(air1 && air2) - var/datum/gas_mixture/hot_air = air1 - var/datum/gas_mixture/cold_air = air2 - if(hot_air.temperature < cold_air.temperature) - hot_air = air2 - cold_air = air1 - - var/hot_air_heat_capacity = hot_air.heat_capacity() - var/cold_air_heat_capacity = cold_air.heat_capacity() - - var/delta_temperature = hot_air.temperature - cold_air.temperature - - if(delta_temperature > 1 && cold_air_heat_capacity > 0.01 && hot_air_heat_capacity > 0.01) - var/efficiency = (1 - cold_air.temperature/hot_air.temperature)*0.65 //65% of Carnot efficiency - - var/energy_transfer = delta_temperature*hot_air_heat_capacity*cold_air_heat_capacity/(hot_air_heat_capacity+cold_air_heat_capacity) - - var/heat = energy_transfer*(1-efficiency) - lastgen = energy_transfer*efficiency - - hot_air.temperature = hot_air.temperature - energy_transfer/hot_air_heat_capacity - cold_air.temperature = cold_air.temperature + heat/cold_air_heat_capacity - -// to_chat(world, "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]") - - input1.parent.update = 1 - input2.parent.update = 1 - - add_avail(lastgen) - // update icon overlays only if displayed level has changed - - var/genlev = max(0, min( round(11*lastgen / 100000), 11)) - if(genlev != lastgenlev) - lastgenlev = genlev - updateicon() - - src.updateDialog() - - -/obj/machinery/power/generator_type2/attack_ai(mob/user) - if(stat & (BROKEN|NOPOWER)) return - interact(user) - - -/obj/machinery/power/generator_type2/attack_hand(mob/user) - add_fingerprint(user) - if(stat & (BROKEN|NOPOWER)) return - interact(user) - - -/obj/machinery/power/generator_type2/interact(mob/user) - if( (get_dist(src, user) > 1 ) && (!istype(user, /mob/living/silicon/ai))) - user.unset_machine() - user << browse(null, "window=teg") - return - - user.set_machine(src) - - var/t = "
Thermo-Electric Generator
" - - t += "Output : [round(lastgen)] W

" - - t += "Cold loop
" - t += "Temperature: [round(input1.air_contents.temperature, 0.1)] K
" - t += "Pressure: [round(input1.air_contents.return_pressure(), 0.1)] kPa
" - - t += "Hot loop
" - t += "Temperature: [round(input2.air_contents.temperature, 0.1)] K
" - t += "Pressure: [round(input2.air_contents.return_pressure(), 0.1)] kPa
" - - t += "

Close" - - t += "
" - user << browse(t, "window=teg;size=460x300") - onclose(user, "teg") - return 1 - - -/obj/machinery/power/generator_type2/Topic(href, href_list) - ..() - - if( href_list["close"] ) - usr << browse(null, "window=teg") - usr.unset_machine() - return 0 - - return 1 - - -/obj/machinery/power/generator_type2/power_change() - ..() - updateicon() \ No newline at end of file diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 0f6d41fc145..420733f7c76 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -122,7 +122,7 @@ if(ishuman(mob)) //Hilariously enough, running into a closet should make you get hit the hardest. var/mob/living/carbon/human/H = mob - H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) + H.AdjustHallucinate(max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1))))) var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) ) mob.apply_effect(rads, IRRADIATE) @@ -189,7 +189,7 @@ var/obj/item/organ/internal/eyes/eyes = l.get_int_organ(/obj/item/organ/internal/eyes) if(!istype(eyes)) continue - l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) ) + l.Hallucinate(min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src))))) for(var/mob/living/l in range(src, round((power / 100) ** 0.25))) var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) ) diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 99a1660ba35..8d920a7e736 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -49,7 +49,7 @@ /obj/item/weapon/gun/energy/gun/hos name = "\improper X-01 MultiPhase Energy Gun" - desc = "This is a expensive, modern recreation of a antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time." + desc = "This is an expensive, modern recreation of an antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time." icon_state = "hoslaser" force = 10 ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/disabler) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 0ae9b10752e..275e2ec94e5 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -23,18 +23,18 @@ /obj/item/projectile/bullet/weakbullet/booze/on_hit(atom/target, blocked = 0) if(..(target, blocked)) var/mob/living/M = target - M.dizziness += 20 - M.slurring += 20 - M.confused += 20 - M.eye_blurry += 20 - M.drowsyness += 20 + M.AdjustDizzy(20) + M.AdjustSlur(20) + M.AdjustConfused(20) + M.AdjustEyeBlurry(20) + M.AdjustDrowsy(20) for(var/datum/reagent/ethanol/A in M.reagents.reagent_list) M.AdjustParalysis(2) - M.dizziness += 10 - M.slurring += 10 - M.confused += 10 - M.eye_blurry += 10 - M.drowsyness += 10 + M.AdjustDizzy(10) + M.AdjustSlur(10) + M.AdjustConfused(10) + M.AdjustEyeBlurry(10) + M.AdjustDrowsy(10) A.volume += 5 //Because we can /obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down @@ -216,7 +216,7 @@ ..(target, blocked) if(iscarbon(target)) var/mob/living/carbon/M = target - M.silent = max(M.silent, 10) + M.Silence(10) else if(istype(target, /obj/mecha/combat/honker)) var/obj/mecha/chassis = target chassis.occupant_message("A mimetech anti-honk bullet has hit \the [chassis]!") diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 0e1b7478cc8..bcc4335f66a 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -186,7 +186,7 @@ if(ishuman(target)) var/mob/living/carbon/human/M = target M.adjustBrainLoss(20) - M.hallucination += 20 + M.AdjustHallucinate(20) /obj/item/projectile/clown name = "snap-pop" diff --git a/code/modules/reagents/newchem/Blob-Reagents.dm b/code/modules/reagents/newchem/Blob-Reagents.dm index fa5e9747e34..a7cfa32f403 100644 --- a/code/modules/reagents/newchem/Blob-Reagents.dm +++ b/code/modules/reagents/newchem/Blob-Reagents.dm @@ -61,7 +61,7 @@ volume = ..() M.apply_damage(0.4*volume, BRUTE) M.apply_damage(1*volume, OXY) - M.losebreath += round(0.3*volume) + M.AdjustLoseBreath(round(0.3*volume)) /datum/reagent/blob/kinetic //does semi-random brute damage diff --git a/code/modules/reagents/newchem/disease.dm b/code/modules/reagents/newchem/disease.dm index def94ba9a2c..cdc2d0b8d43 100644 --- a/code/modules/reagents/newchem/disease.dm +++ b/code/modules/reagents/newchem/disease.dm @@ -131,12 +131,12 @@ color = "#EC536D" // rgb: 236, 83, 109 /datum/reagent/synaphydramine/on_mob_life(mob/living/M) - M.drowsyness = max(M.drowsyness-5, 0) + M.AdjustDrowsy(-5) if(holder.has_reagent("lsd")) holder.remove_reagent("lsd", 5) if(holder.has_reagent("histamine")) holder.remove_reagent("histamine", 5) - M.hallucination = max(0, M.hallucination - 10) + M.AdjustHallucinate(-10) if(prob(30)) M.adjustToxLoss(1) ..() @@ -317,4 +317,4 @@ if(B && B.data) var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] if(D) - D.Devolve() \ No newline at end of file + D.Devolve() diff --git a/code/modules/reagents/newchem/drinks.dm b/code/modules/reagents/newchem/drinks.dm index b1f789b7f22..da07f7a995f 100644 --- a/code/modules/reagents/newchem/drinks.dm +++ b/code/modules/reagents/newchem/drinks.dm @@ -15,7 +15,7 @@ mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' /datum/reagent/ginsonic/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) + M.AdjustDrowsy(-5) if(prob(25)) M.AdjustParalysis(-1) M.AdjustStunned(-1) diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/newchem/drugs.dm index 99a637e4fca..bc5b10be569 100644 --- a/code/modules/reagents/newchem/drugs.dm +++ b/code/modules/reagents/newchem/drugs.dm @@ -30,7 +30,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] looks nervous!") - M.confused += 15 + M.AdjustConfused(15) M.adjustToxLoss(2) M.Jitter(10) M.emote("twitch_s") @@ -55,7 +55,7 @@ M.Jitter(10) M.adjustToxLoss(5) M.Weaken(1) - M.confused += 33 + M.AdjustConfused(33) else if(effect <= 7) M.emote("collapse") to_chat(M, "Your heart is pounding!") @@ -90,7 +90,7 @@ if(prob(4)) to_chat(M, "You feel kinda awful!") M.adjustToxLoss(1) - M.jitteriness += 30 + M.AdjustJitter(30) M.emote(pick("groan", "moan")) ..() @@ -99,7 +99,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] looks confused!") - M.confused += 20 + M.AdjustConfused(20) M.Jitter(20) M.emote("scream") else if(effect <= 4) @@ -123,7 +123,7 @@ M.adjustToxLoss(2) M.adjustBrainLoss(8) M.Weaken(3) - M.confused += 25 + M.AdjustConfused(25) M.emote("scream") M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 7) @@ -160,7 +160,7 @@ /datum/reagent/krokodil/on_mob_life(mob/living/M) - M.jitteriness -= 40 + M.AdjustJitter(-40) if(prob(25)) M.adjustBrainLoss(1) if(prob(15)) @@ -241,8 +241,8 @@ if(prob(5)) M.emote(pick("twitch_s","blink_r","shiver")) if(current_cycle >= 25) - M.jitteriness += 5 - M.drowsyness = max(0, M.drowsyness-10) + M.AdjustJitter(5) + M.AdjustDrowsy(-10) M.AdjustParalysis(-2.5) M.AdjustStunned(-2.5) M.AdjustWeakened(-2.5) @@ -262,7 +262,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] can't seem to control their legs!") - M.confused += 20 + M.AdjustConfused(20) M.Weaken(4) else if(effect <= 4) M.visible_message("[M]'s hands flip out and flail everywhere!") @@ -296,7 +296,7 @@ for(var/mob/living/carbon/C in range(T, 1)) if(C.can_breathe_gas()) C.emote("gasp") - C.losebreath++ + C.AdjustLoseBreath(1) C.reagents.add_reagent("toxin", 10) C.reagents.add_reagent("neurotoxin2", 20) @@ -342,15 +342,15 @@ M.SetWeakened(0) if(check < 30) M.emote(pick("twitch", "twitch_s", "scream", "drool", "grumble", "mumble")) - M.druggy = max(M.druggy, 15) + M.Druggy(15) if(check < 20) - M.confused += 10 + M.AdjustConfused(10) if(check < 8) M.reagents.add_reagent(pick("methamphetamine", "crank", "neurotoxin"), rand(1,5)) M.visible_message("[M] scratches at something under their skin!") M.adjustBruteLoss(5) else if(check < 16) - M.hallucination += 30 + M.AdjustHallucinate(30) else if(check < 24) to_chat(M, "They're coming for you!") else if(check < 28) @@ -373,7 +373,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] flails around like a lunatic!") - M.confused += 25 + M.AdjustConfused(25) M.Jitter(10) M.emote("scream") M.reagents.add_reagent("jagged_crystals", 5) @@ -383,7 +383,7 @@ M.adjustToxLoss(2) M.adjustBrainLoss(1) M.Stun(3) - M.eye_blurry = max(M.eye_blurry, 7) + M.EyeBlurry(7) M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 7) M.emote("faint") @@ -394,7 +394,7 @@ M.adjustToxLoss(2) M.adjustBrainLoss(1) M.Stun(3) - M.eye_blurry = max(M.eye_blurry, 7) + M.EyeBlurry(7) M.reagents.add_reagent("jagged_crystals", 5) else if(effect <= 4) M.visible_message("[M] convulses violently and falls to the floor!") @@ -479,7 +479,7 @@ to_chat(M, "You cannot breathe!") M.adjustOxyLoss(15) M.Stun(1) - M.losebreath++ + M.AdjustLoseBreath(1) ..() /datum/reagent/thc @@ -497,10 +497,10 @@ if(prob(5)) to_chat(M, "[pick("You feel hungry.","Your stomach rumbles.","You feel cold.","You feel warm.")]") if(prob(4)) - M.confused = max(M.confused, 10) + M.Confused(10) if(volume >= 50 && prob(25)) if(prob(10)) - M.drowsyness = max(M.drowsyness, 10) + M.Drowsy(10) ..() /datum/reagent/fliptonium @@ -545,7 +545,7 @@ if(current_cycle == 50) M.SpinAnimation(speed = 4, loops = -1) - M.drowsyness = max(0, M.drowsyness-6) + M.AdjustDrowsy(-6) M.AdjustParalysis(-1.5) M.AdjustStunned(-1.5) M.AdjustWeakened(-1.5) @@ -561,7 +561,7 @@ if(severity == 1) if(effect <= 2) M.visible_message("[M] can't seem to control their legs!") - M.confused += 33 + M.AdjustConfused(33) M.Weaken(2) else if(effect <= 4) M.visible_message("[M]'s hands flip out and flail everywhere!") @@ -655,7 +655,7 @@ /datum/reagent/surge/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 15) + M.Druggy(15) var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.") if(prob(1)) if(prob(1)) diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm index 777c10ebfd7..a84ac83f385 100644 --- a/code/modules/reagents/newchem/medicine.dm +++ b/code/modules/reagents/newchem/medicine.dm @@ -167,7 +167,7 @@ M.adjustBruteLoss(-2*REM) M.adjustFireLoss(-2*REM) if(prob(50)) - M.losebreath -= 1 + M.AdjustLoseBreath(-1) ..() /datum/reagent/omnizine/overdose_process(mob/living/M, severity) @@ -181,7 +181,7 @@ M.Weaken(4) else if(effect <= 3) M.visible_message("[M] completely spaces out for a moment.") - M.confused += 15 + M.AdjustConfused(15) else if(effect <= 5) M.visible_message("[M] stumbles and staggers.") M.Dizzy(5) @@ -317,7 +317,7 @@ /datum/reagent/salbutamol/on_mob_life(mob/living/M) M.adjustOxyLoss(-6*REM) - M.losebreath = max(0, M.losebreath-4) + M.AdjustLoseBreath(-4) ..() /datum/chemical_reaction/salbutamol @@ -341,8 +341,8 @@ /datum/reagent/perfluorodecalin/on_mob_life(mob/living/carbon/human/M) M.adjustOxyLoss(-25*REM) if(volume >= 4) - M.losebreath = max(M.losebreath, 6) - M.silent = max(M.silent, 6) + M.LoseBreath(6) + M.Silence(6) if(prob(33)) M.adjustBruteLoss(-1*REM) M.adjustFireLoss(-1*REM) @@ -369,13 +369,12 @@ addiction_chance = 25 /datum/reagent/ephedrine/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) + M.AdjustDrowsy(-5) M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) M.adjustStaminaLoss(-1*REM) - if(M.losebreath > 5) - M.losebreath = max(5, M.losebreath-1) + M.AdjustLoseBreath(-1, bound_lower = 5) if(M.oxyloss > 75) M.adjustOxyLoss(-1) if(M.health < 0 || M.health > 0 && prob(33)) @@ -422,14 +421,14 @@ addiction_chance = 10 /datum/reagent/diphenhydramine/on_mob_life(mob/living/M) - M.jitteriness = max(0, M.jitteriness-20) + M.AdjustJitter(-20) M.reagents.remove_reagent("histamine",3) M.reagents.remove_reagent("itching_powder",3) if(prob(7)) M.emote("yawn") if(prob(3)) M.Stun(2) - M.drowsyness += 1 + M.AdjustDrowsy(1) M.visible_message("[M] looks a bit dazed.") ..() @@ -453,16 +452,16 @@ shock_reduction = 50 /datum/reagent/morphine/on_mob_life(mob/living/M) - M.jitteriness = max(0, M.jitteriness-25) + M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) if(prob(7)) M.emote("yawn") if(16 to 35) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(36 to INFINITY) M.Paralyse(15) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.traumatic_shock < 100) @@ -476,16 +475,16 @@ var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes) if(istype(E)) E.damage = max(E.damage-1, 0) - M.eye_blurry = max(M.eye_blurry-1 , 0) - M.adjustEarDamage(-1,0) + M.AdjustEyeBlurry(-1) + M.AdjustEarDamage(-1) if(prob(50)) - M.disabilities &= ~NEARSIGHTED + M.CureNearsighted() if(prob(30)) - M.disabilities &= ~BLIND - M.eye_blind = 0 + M.CureBlind() + M.SetEyeBlind(0) if(M.ear_damage <= 25) if(prob(30)) - M.setEarDamage(-1,0) + M.SetEarDeaf(0) ..() /datum/chemical_reaction/oculine @@ -515,12 +514,11 @@ overdose_threshold = 25 /datum/reagent/atropine/on_mob_life(mob/living/M) - M.dizziness += 1 - M.confused = max(M.confused, 5) + M.AdjustDizzy(1) + M.Confused(5) if(prob(4)) M.emote("collapse") - if(M.losebreath > 5) - M.losebreath = max(5, M.losebreath-5) + M.AdjustLoseBreath(-5, bound_lower = 5) if(M.oxyloss > 65) M.adjustOxyLoss(-10*REM) if(M.health < -25) @@ -550,7 +548,7 @@ overdose_threshold = 20 /datum/reagent/epinephrine/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) + M.AdjustDrowsy(-5) if(prob(20)) M.AdjustParalysis(-1) if(prob(20)) @@ -562,8 +560,7 @@ if(prob(5)) M.adjustBrainLoss(-1) holder.remove_reagent("histamine", 15) - if(M.losebreath > 3) - M.losebreath-- + M.AdjustLoseBreath(-1, bound_lower = 3) if(M.oxyloss > 35) M.adjustOxyLoss(-10*REM) if(M.health < -10 && M.health > -65) @@ -694,7 +691,7 @@ color = "#D1D1F1" /datum/reagent/mutadone/on_mob_life(mob/living/carbon/human/M) - M.jitteriness = 0 + M.SetJitter(0) var/needs_update = M.mutations.len > 0 || M.disabilities > 0 if(needs_update) @@ -733,7 +730,7 @@ color = "#009CA8" /datum/reagent/antihol/on_mob_life(mob/living/M) - M.slurring = 0 + M.SetSlur(0) M.AdjustDrunk(-4) M.reagents.remove_all_type(/datum/reagent/ethanol, 8, 0, 1) if(M.toxloss <= 25) @@ -763,10 +760,10 @@ M.adjustBruteLoss(-10*REM) M.adjustFireLoss(-10*REM) M.setStaminaLoss(0) - M.slowed = 0 - M.dizziness = max(0,M.dizziness-10) - M.drowsyness = max(0,M.drowsyness-10) - M.confused = 0 + M.SetSlowed(0) + M.AdjustDizzy(-10) + M.AdjustDrowsy(-10) + M.SetConfused(0) M.SetSleeping(0) var/status = CANSTUN | CANWEAKEN | CANPARALYSE M.status_flags &= ~status @@ -811,7 +808,7 @@ if(prob(33)) M.adjustStaminaLoss(2.5*REM) M.adjustToxLoss(1*REM) - M.losebreath++ + M.AdjustLoseBreath(1) /datum/reagent/insulin name = "Insulin" @@ -882,11 +879,11 @@ M.reagents.remove_reagent("bath_salts", 5) M.reagents.remove_reagent("lsd", 5) M.reagents.remove_reagent("thc", 5) - M.druggy -= 5 - M.hallucination -= 5 - M.jitteriness -= 5 + M.AdjustDruggy(-5) + M.AdjustHallucinate(-5) + M.AdjustJitter(-5) if(prob(50)) - M.drowsyness = max(M.drowsyness, 3) + M.Drowsy(3) if(prob(10)) M.emote("drool") if(prob(20)) @@ -910,16 +907,16 @@ color = "#96DEDE" /datum/reagent/ether/on_mob_life(mob/living/M) - M.jitteriness = max(M.jitteriness-25,0) + M.AdjustJitter(-25) switch(current_cycle) if(1 to 15) if(prob(7)) M.emote("yawn") if(16 to 35) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(36 to INFINITY) M.Paralyse(15) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) ..() /datum/chemical_reaction/ether @@ -960,7 +957,7 @@ M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) - M.confused = max(0, M.confused-5) + M.AdjustConfused(-5) for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) if(R.id == "ultralube" || R.id == "lube") @@ -1037,7 +1034,7 @@ M.Weaken(4) else if(effect <= 3) M.visible_message("[M] completely spaces out for a moment.") - M.confused += 15 + M.AdjustConfused(15) else if(effect <= 5) M.visible_message("[M] stumbles and staggers.") M.Dizzy(5) diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm index 6dece72544c..05ecb1b1206 100644 --- a/code/modules/reagents/newchem/pyro.dm +++ b/code/modules/reagents/newchem/pyro.dm @@ -356,12 +356,13 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) + M.AdjustEarDamage(rand(0, 5)) + M.EarDeaf(15) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 10 + 5)) + if(prob(M.ear_damage - 5)) to_chat(M, "You can't hear anything!") - M.disabilities |= DEAF + M.BecomeDeaf() else if(M.ear_damage >= 5) to_chat(M, "Your ears start to ring!") @@ -384,10 +385,11 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) + M.AdjustEarDamage(rand(0, 5)) + M.EarDeaf(15) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") - if(prob(M.ear_damage - 10 + 5)) + if(prob(M.ear_damage - 5)) to_chat(M, "You can't hear anything!") M.disabilities |= DEAF else @@ -619,4 +621,4 @@ if(method == TOUCH) M.adjust_fire_stacks(volume / 5) return - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/newchem/toxins.dm index 56d64d9a62e..d8e8205b1f7 100644 --- a/code/modules/reagents/newchem/toxins.dm +++ b/code/modules/reagents/newchem/toxins.dm @@ -41,7 +41,7 @@ if(prob(10)) to_chat(M, "Your eyes itch.") M.emote(pick("blink", "sneeze")) - M.eye_blurry += 3 + M.AdjustEyeBlurry(3) if(prob(10)) M.visible_message("[M] scratches at an itch.") M.adjustBruteLoss(1) @@ -141,7 +141,7 @@ if(prob(4)) M.visible_message("[M] starts convulsing violently!", "You feel as if your body is tearing itself apart!") M.Weaken(15) - M.jitteriness += 1000 + M.AdjustJitter(1000) spawn(rand(20, 100)) M.gib() @@ -159,19 +159,19 @@ current_cycle++ return if(5 to 8) - M.dizziness += 1 - M.confused = max(M.confused, 10) + M.AdjustDizzy(1) + M.Confused(10) if(9 to 12) - M.drowsyness = max(M.drowsyness, 10) - M.dizziness += 1 - M.confused = max(M.confused, 20) + M.Drowsy(10) + M.AdjustDizzy(1) + M.Confused(20) if(13) M.emote("faint") if(14 to INFINITY) M.Paralyse(10) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) - M.jitteriness = max(0, M.jitteriness-30) + M.AdjustJitter(-30) if(M.getBrainLoss() <= 80) M.adjustBrainLoss(1) else @@ -207,7 +207,7 @@ M.emote("drool") if(prob(10)) to_chat(M, "You cannot breathe!") - M.losebreath += 1 + M.AdjustLoseBreath(1) M.emote("gasp") if(prob(8)) to_chat(M, "You feel horrendously weak!") @@ -261,7 +261,7 @@ to_chat(M, "AHHHHHH!") M.adjustBruteLoss(5) M.Weaken(5) - M.jitteriness += 6 + M.AdjustJitter(6) M.visible_message("[M] falls to the floor, scratching themselves violently!") M.emote("scream") ..() @@ -364,11 +364,11 @@ if(prob(10)) to_chat(M, "You cannot breathe!") M.adjustOxyLoss(10) - M.losebreath++ + M.AdjustLoseBreath(1) if(prob(10)) to_chat(M, "Your chest is burning with pain!") M.adjustOxyLoss(10) - M.losebreath++ + M.AdjustLoseBreath(1) M.Stun(3) M.Weaken(2) if(ishuman(M)) @@ -425,12 +425,12 @@ M.Weaken(20) if(prob(10)) M.emote(pick("drool", "tremble", "gasp")) - M.losebreath++ + M.AdjustLoseBreath(1) if(prob(9)) to_chat(M, "You can't [pick("move", "feel your legs", "feel your face", "feel anything")]!") if(prob(7)) to_chat(M, "You can't breathe!") - M.losebreath += 3 + M.AdjustLoseBreath(3) ..() /datum/reagent/sodium_thiopental @@ -445,15 +445,15 @@ switch(current_cycle) if(1) M.emote("drool") - M.confused = max(M.confused, 5) + M.Confused(5) if(2 to 4) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(5) M.emote("faint") M.Weaken(5) if(6 to INFINITY) M.Paralyse(20) - M.jitteriness = max(0, M.jitteriness-50) + M.AdjustJitter(-50) if(prob(10)) M.emote("drool") M.adjustBrainLoss(1) @@ -474,7 +474,7 @@ if(prob(25)) M.emote("yawn") if(6 to 9) - M.eye_blurry += 5 + M.AdjustEyeBlurry(5) if(prob(35)) M.emote("yawn") if(10) @@ -502,20 +502,20 @@ mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' /datum/reagent/sulfonal/on_mob_life(mob/living/M) - M.jitteriness = max(0, M.jitteriness-30) + M.AdjustJitter(-30) switch(current_cycle) if(1 to 10) if(prob(7)) M.emote("yawn") if(11 to 20) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(21) M.emote("faint") if(22 to INFINITY) if(prob(20)) M.emote("faint") M.Paralyse(5) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) M.adjustToxLoss(1) ..() @@ -570,7 +570,7 @@ /datum/reagent/coniine/on_mob_life(mob/living/M) M.adjustToxLoss(2) - M.losebreath += 5 + M.AdjustLoseBreath(5) ..() /datum/reagent/curare @@ -590,7 +590,7 @@ if(prob(20)) M.emote(pick("drool", "pale", "gasp")) if(6 to 10) - M.eye_blurry += 5 + M.AdjustEyeBlurry(5) if(prob(8)) to_chat(M, "You feel [pick("weak", "horribly weak", "numb", "like you can barely move", "tingly")].") M.Stun(1) @@ -598,12 +598,12 @@ M.emote(pick("drool","pale", "gasp")) if(11 to INFINITY) M.Stun(30) - M.drowsyness = max(M.drowsyness, 20) + M.Drowsy(20) if(prob(20)) M.emote(pick("drool", "faint", "pale", "gasp", "collapse")) else if(prob(8)) to_chat(M, "You can't [pick("breathe", "move", "feel your legs", "feel your face", "feel anything")]!") - M.losebreath++ + M.AdjustLoseBreath(1) ..() /datum/reagent/sarin @@ -636,22 +636,22 @@ /datum/reagent/sarin/on_mob_life(mob/living/M) switch(current_cycle) if(1 to 15) - M.jitteriness += 20 + M.AdjustJitter(20) if(prob(20)) M.emote(pick("twitch","twitch_s","quiver")) if(16 to 30) if(prob(25)) M.emote(pick("twitch","twitch","drool","quiver","tremble")) - M.eye_blurry += 5 - M.stuttering = max(M.stuttering, 5) + M.AdjustEyeBlurry(5) + M.Stuttering(5) if(prob(10)) - M.confused = max(M.confused, 15) + M.Confused(15) if(prob(15)) M.Stun(1) M.emote("scream") if(30 to 60) - M.eye_blurry += 5 - M.stuttering = max(M.stuttering, 5) + M.AdjustEyeBlurry(5) + M.Stuttering(5) if(prob(10)) M.Stun(1) M.emote(pick("twitch","twitch","drool","shake","tremble")) @@ -660,15 +660,15 @@ if(prob(5)) M.Weaken(3) M.visible_message("[M] has a seizure!") - M.jitteriness = 1000 + M.SetJitter(1000) if(prob(5)) to_chat(M, "You can't breathe!") M.emote(pick("gasp", "choke", "cough")) - M.losebreath++ + M.AdjustLoseBreath(1) if(61 to INFINITY) if(prob(15)) M.emote(pick("gasp", "choke", "cough","twitch", "shake", "tremble","quiver","drool", "twitch","collapse")) - M.losebreath = max(5, M.losebreath + 5) + M.LoseBreath(5) M.adjustToxLoss(1) M.adjustBrainLoss(1) M.Weaken(4) @@ -754,16 +754,16 @@ /datum/reagent/capulettium/on_mob_life(mob/living/M) switch(current_cycle) if(1 to 5) - M.eye_blurry += 10 + M.AdjustEyeBlurry(10) if(6 to 10) - M.drowsyness = max(M.drowsyness, 10) + M.Drowsy(10) if(11) M.Paralyse(10) M.visible_message("[M] seizes up and falls limp, their eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary. if(12 to 60) M.Paralyse(10) if(61 to INFINITY) - M.eye_blurry += 10 + M.AdjustEyeBlurry(10) ..() /datum/reagent/capulettium_plus @@ -783,7 +783,7 @@ mix_message = "The solution begins to slosh about violently by itself." /datum/reagent/capulettium_plus/on_mob_life(mob/living/M) - M.silent = max(M.silent, 2) + M.Silence(2) ..() /datum/reagent/toxic_slurry @@ -884,4 +884,4 @@ var/location = get_turf(holder.my_atom) var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread s.set_up(6, 1, location) - s.start() \ No newline at end of file + s.start() diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm index da92ffee0f2..e337aa10e1f 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm @@ -13,7 +13,7 @@ /datum/reagent/ethanol/on_mob_life(mob/living/M) M.nutrition += nutriment_factor M.AdjustDrunk(alcohol_perc) - M.dizziness += dizzy_adj + M.AdjustDizzy(dizzy_adj) ..() @@ -84,7 +84,7 @@ //copy paste from LSD... shoot me /datum/reagent/ethanol/absinthe/on_mob_life(mob/living/M) - M.hallucination += 5 + M.AdjustHallucinate(5) ..() /datum/reagent/ethanol/absinthe/overdose_process(mob/living/M, severity) @@ -97,10 +97,7 @@ color = "#664300" // rgb: 102, 67, 0 overdose_threshold = 30 alcohol_perc = 0.4 - -/datum/reagent/ethanol/rum/on_mob_life(mob/living/M) - M.dizziness +=5 - ..() + dizzy_adj = 5 /datum/reagent/ethanol/rum/overdose_process(mob/living/M, severity) M.adjustToxLoss(1) @@ -182,7 +179,7 @@ /datum/reagent/ethanol/thirteenloko/on_mob_life(mob/living/M) M.nutrition += nutriment_factor - M.drowsyness = max(0, M.drowsyness-7) + M.AdjustDrowsy(-7) M.AdjustSleeping(-2) if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) @@ -625,7 +622,7 @@ /datum/reagent/ethanol/neurotoxin/on_mob_life(mob/living/M) M.weakened = max(M.weakened, 3) if(current_cycle >=55) - M.druggy = max(M.druggy, 55) + M.Druggy(55) if(current_cycle >=200) M.adjustToxLoss(2) ..() @@ -637,10 +634,7 @@ reagent_state = LIQUID color = "#2E6671" // rgb: 46, 102, 113 alcohol_perc = 0.7 - -/datum/reagent/ethanol/changelingsting/on_mob_life(mob/living/M) - M.dizziness +=5 - ..() + dizzy_adj = 5 /datum/reagent/ethanol/irishcarbomb name = "Irish Car Bomb" @@ -649,10 +643,7 @@ reagent_state = LIQUID color = "#2E6671" // rgb: 46, 102, 113 alcohol_perc = 0.3 - -/datum/reagent/ethanol/irishcarbomb/on_mob_life(mob/living/M) - M.dizziness +=5 - ..() + dizzy_adj = 5 /datum/reagent/ethanol/syndicatebomb name = "Syndicate Bomb" @@ -677,9 +668,9 @@ nutriment_factor = 1 * FOOD_METABOLISM color = "#2E6671" // rgb: 46, 102, 113 alcohol_perc = 0.5 + dizzy_adj = 10 /datum/reagent/ethanol/driestmartini/on_mob_life(mob/living/M) - M.dizziness +=10 if(current_cycle >= 55 && current_cycle < 115) M.stuttering += 10 ..() @@ -692,8 +683,8 @@ alcohol_perc = 0.2 /datum/reagent/ethanol/kahlua/on_mob_life(mob/living/M) - M.dizziness = max(0, M.dizziness-5) - M.drowsyness = max(0, M.drowsyness-3) + M.AdjustDizzy(-5) + M.AdjustDrowsy(-3) M.AdjustSleeping(-2) M.Jitter(5) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm index 26bad6c1665..869e9295bf5 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm @@ -38,8 +38,8 @@ color = "#973800" // rgb: 151, 56, 0 /datum/reagent/drink/carrotjuicde/on_mob_life(mob/living/M) - M.eye_blurry = max(M.eye_blurry-1 , 0) - M.eye_blind = max(M.eye_blind-1 , 0) + M.AdjustEyeBlurry(-1) + M.AdjustEyeBlind(-1) switch(current_cycle) if(1 to 20) //nothing @@ -282,4 +282,4 @@ if(ishuman(M) && M.job in list("Mime")) M.adjustBruteLoss(-1) M.adjustFireLoss(-1) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm index 1868489adb7..6e30efb9423 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm @@ -14,9 +14,9 @@ /datum/reagent/drink/on_mob_life(mob/living/M) M.nutrition += nutriment_factor if(adj_dizzy) - M.dizziness = max(0, M.dizziness + adj_dizzy) + M.AdjustDizzy(adj_dizzy) if(adj_drowsy) - M.drowsyness = max(0, M.drowsyness + adj_drowsy) + M.AdjustDrowsy(adj_drowsy) if(adj_sleepy) M.AdjustSleeping(adj_sleepy) if(adj_temp_hot) @@ -25,4 +25,4 @@ if(adj_temp_cool) if(M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = max(310, M.bodytemperature - (adj_temp_cool * TEMPERATURE_DAMAGE_COEFFICIENT)) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm index fe54ed97246..26164571769 100644 --- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm +++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm @@ -48,9 +48,9 @@ /datum/reagent/drink/cold/nuka_cola/on_mob_life(mob/living/M) M.Jitter(20) - M.druggy = max(M.druggy, 30) - M.dizziness +=5 - M.drowsyness = 0 + M.Druggy(30) + M.AdjustDizzy(5) + M.SetDrowsy(0) M.status_flags |= GOTTAGOFAST ..() @@ -121,4 +121,4 @@ /datum/reagent/drink/cold/rewriter/on_mob_life(mob/living/M) M.Jitter(5) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/oldchem/reagents/reagents_admin.dm b/code/modules/reagents/oldchem/reagents/reagents_admin.dm index ccc617d2aaa..09636bd111f 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_admin.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_admin.dm @@ -14,7 +14,6 @@ M.adjustBruteLoss(-5) M.adjustFireLoss(-5) M.adjustToxLoss(-5) - M.hallucination = 0 M.setBrainLoss(0) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -24,20 +23,28 @@ for(var/obj/item/organ/external/E in H.organs) if(E.mend_fracture()) E.perma_injury = 0 - M.disabilities = 0 - M.eye_blurry = 0 - M.eye_blind = 0 + M.SetEyeBlind(0) + M.CureNearsighted() + M.CureBlind() + M.CureMute() + M.CureDeaf() + M.CureEpilepsy() + M.CureTourettes() + M.CureCoughing() + M.CureNervous() + M.SetEyeBlurry(0) M.SetWeakened(0) M.SetStunned(0) M.SetParalysis(0) - M.silent = 0 - M.dizziness = 0 - M.drowsyness = 0 - M.stuttering = 0 - M.slurring = 0 - M.confused = 0 + M.SetSilence(0) + M.SetHallucinate(0) + M.SetDizzy(0) + M.SetDrowsy(0) + M.SetStuttering(0) + M.SetSlur(0) + M.SetConfused(0) M.SetSleeping(0) - M.jitteriness = 0 + M.SetJitter(0) for(var/datum/disease/D in M.viruses) if(D.severity == NONTHREAT) continue @@ -73,4 +80,4 @@ outgoing += tocheck else outgoing += tocheck - return outgoing \ No newline at end of file + return outgoing diff --git a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm b/code/modules/reagents/oldchem/reagents/reagents_drugs.dm index 7cbc79b41b0..1fd0188287a 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_drugs.dm @@ -37,7 +37,7 @@ metabolization_rate = 0.2 * REAGENTS_METABOLISM /datum/reagent/hippies_delight/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 50) + M.Druggy(50) switch(current_cycle) if(1 to 5) if(!M.stuttering) M.stuttering = 1 @@ -47,13 +47,13 @@ if(!M.stuttering) M.stuttering = 1 M.Jitter(20) M.Dizzy(20) - M.druggy = max(M.druggy, 45) + M.Druggy(45) if(prob(20)) M.emote(pick("twitch","giggle")) if(10 to INFINITY) if(!M.stuttering) M.stuttering = 1 M.Jitter(40) M.Dizzy(40) - M.druggy = max(M.druggy, 60) + M.Druggy(60) if(prob(30)) M.emote(pick("twitch","giggle")) ..() @@ -65,8 +65,8 @@ color = "#0000D8" /datum/reagent/lsd/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 15) - M.hallucination += 10 + M.Druggy(15) + M.AdjustHallucinate(10) ..() /datum/reagent/space_drugs @@ -80,7 +80,7 @@ heart_rate_decrease = 1 /datum/reagent/space_drugs/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 15) + M.Druggy(15) if(isturf(M.loc) && !istype(M.loc, /turf/space)) if(M.canmove && !M.restrained()) step(M, pick(cardinal)) @@ -94,22 +94,22 @@ color = "#E700E7" // rgb: 231, 0, 231 /datum/reagent/psilocybin/on_mob_life(mob/living/M) - M.druggy = max(M.druggy, 30) + M.Druggy(30) switch(current_cycle) if(1 to 5) - if(!M.stuttering) M.stuttering = 1 + M.Stuttering(1) M.Dizzy(5) if(prob(10)) M.emote(pick("twitch","giggle")) if(5 to 10) - if(!M.stuttering) M.stuttering = 1 + M.Stuttering(1) M.Jitter(10) M.Dizzy(10) - M.druggy = max(M.druggy, 35) + M.Druggy(35) if(prob(20)) M.emote(pick("twitch","giggle")) if(10 to INFINITY) - if(!M.stuttering) M.stuttering = 1 + M.Stuttering(1) M.Jitter(20) M.Dizzy(20) - M.druggy = max(M.druggy, 40) + M.Druggy(40) if(prob(30)) M.emote(pick("twitch","giggle")) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm b/code/modules/reagents/oldchem/reagents/reagents_flammable.dm index 52d33e21e07..61228dfb2d0 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_flammable.dm @@ -22,7 +22,7 @@ M.adjustBrainLoss(3) if(iscultist(M)) M.status_flags |= GOTTAGOFAST - M.drowsyness = max(M.drowsyness-5, 0) + M.AdjustDrowsy(-5) M.AdjustParalysis(-2) M.AdjustStunned(-2) M.AdjustWeakened(-2) @@ -78,4 +78,4 @@ id = "glycerol" description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity." reagent_state = LIQUID - color = "#808080" // rgb: 128, 128, 128 \ No newline at end of file + color = "#808080" // rgb: 128, 128, 128 diff --git a/code/modules/reagents/oldchem/reagents/reagents_food.dm b/code/modules/reagents/oldchem/reagents/reagents_food.dm index 1dbe1f05a20..de52805fef2 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_food.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_food.dm @@ -370,9 +370,9 @@ overdose_threshold = 200 // Hyperglycaemic shock /datum/reagent/sugar/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) + M.AdjustDrowsy(-5) if(current_cycle >= 90) - M.jitteriness += 2 + M.AdjustJitter(2) if(prob(50)) M.AdjustParalysis(-1) M.AdjustStunned(-1) @@ -391,4 +391,3 @@ M.Weaken(4 * severity) if(prob(8)) M.adjustToxLoss(severity) - diff --git a/code/modules/reagents/oldchem/reagents/reagents_med.dm b/code/modules/reagents/oldchem/reagents/reagents_med.dm index cc5592dd42e..b0a09afc999 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_med.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_med.dm @@ -41,7 +41,7 @@ overdose_threshold = 40 /datum/reagent/synaptizine/on_mob_life(mob/living/M) - M.drowsyness = max(0, M.drowsyness-5) + M.AdjustDrowsy(-5) M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) @@ -139,4 +139,4 @@ description = "An all-purpose antibiotic agent extracted from space fungus." reagent_state = LIQUID color = "#0AB478" - metabolization_rate = 0.2 \ No newline at end of file + metabolization_rate = 0.2 diff --git a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm index bbdf92b8693..0aae5e3f40e 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm @@ -326,7 +326,7 @@ /datum/reagent/spores/on_mob_life(mob/living/M) M.adjustToxLoss(1) M.damageoverlaytemp = 60 - M.eye_blurry = max(M.eye_blurry, 3) + M.EyeBlurry(3) ..() /datum/reagent/beer2 //disguised as normal beer for use by emagged brobots @@ -385,25 +385,25 @@ to_chat(victim, "Your [safe_thing] protect you from most of the pepperspray!") if(prob(5)) victim.emote("scream") - victim.eye_blurry = max(M.eye_blurry, 3) - victim.eye_blind = max(M.eye_blind, 1) - victim.confused = max(M.confused, 3) + victim.EyeBlurry(3) + victim.EyeBlind(1) + victim.Confused(3) victim.damageoverlaytemp = 60 victim.Weaken(3) victim.drop_item() return else if( eyes_covered ) // Eye cover is better than mouth cover to_chat(victim, "Your [safe_thing] protects your eyes from the pepperspray!") - victim.eye_blurry = max(M.eye_blurry, 3) + victim.EyeBlurry(3) victim.damageoverlaytemp = 30 return else // Oh dear :D if(prob(5)) victim.emote("scream") to_chat(victim, "You're sprayed directly in the eyes with pepperspray!") - victim.eye_blurry = max(M.eye_blurry, 5) - victim.eye_blind = max(M.eye_blind, 2) - victim.confused = max(M.confused, 6) + victim.EyeBlurry(5) + victim.EyeBlind(2) + victim.Confused(6) victim.damageoverlaytemp = 75 victim.Weaken(5) victim.drop_item() @@ -411,4 +411,4 @@ /datum/reagent/condensedcapsaicin/on_mob_life(mob/living/M) if(prob(5)) M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]") - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/oldchem/reagents/reagents_water.dm b/code/modules/reagents/oldchem/reagents/reagents_water.dm index bbfcbeb8142..a2dd3eb7fc4 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_water.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_water.dm @@ -264,27 +264,27 @@ process_flags = ORGANIC | SYNTHETIC /datum/reagent/holywater/on_mob_life(mob/living/M) - M.jitteriness = max(M.jitteriness-5,0) + M.AdjustJitter(-5) if(current_cycle >= 30) // 12 units, 60 seconds @ metabolism 0.4 units & tick rate 2.0 sec - M.stuttering = min(M.stuttering+4, 20) + M.AdjustStuttering(4, bound_lower = 0, bound_upper = 20) M.Dizzy(5) if(iscultist(M) && prob(5)) M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu")) if(current_cycle >= 75 && prob(33)) // 30 units, 150 seconds - M.confused += 3 + M.AdjustConfused(3) if(isvampirethrall(M)) ticker.mode.remove_vampire_mind(M.mind) holder.remove_reagent(id, volume) - M.jitteriness = 0 - M.stuttering = 0 - M.confused = 0 + M.SetJitter(0) + M.SetStuttering(0) + M.SetConfused(0) return if(iscultist(M)) ticker.mode.remove_cultist(M.mind) holder.remove_reagent(id, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better?? - M.jitteriness = 0 - M.stuttering = 0 - M.confused = 0 + M.SetJitter(0) + M.SetStuttering(0) + M.SetConfused(0) return if(ishuman(M) && M.mind && M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full) && prob(80)) switch(current_cycle) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 1da5f07b2e5..a6fd792e795 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -80,12 +80,6 @@ icon_state = "pill8" list_reagents = list("haloperidol" = 15) -/obj/item/weapon/reagent_containers/food/pill/paroxetine - name = "Paroxetine pill" - desc = "Heavy anti-depressant." - icon_state = "pill8" - list_reagents = list("paroxetine" = 15) - /obj/item/weapon/reagent_containers/food/pill/happy name = "Happy pill" desc = "Happy happy joy joy!" diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 85657dd2b5b..232d2a9b3c5 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -255,20 +255,20 @@ /obj/machinery/disposal/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) var/data[0] - var/pressure = 100 * air_contents.return_pressure() / (SEND_PRESSURE) + var/pressure = Clamp(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 100) var/pressure_round = round(pressure,1) data["isAI"] = isAI(user) data["flushing"] = flush data["mode"] = mode if(mode <= 0) - data["pumpstatus"] = "" + data["pumpstatus"] = "N/A" else if(mode == 1) - data["pumpstatus"] = "(pressurizing)" + data["pumpstatus"] = "Pressurizing" else if(mode == 2) - data["pumpstatus"] = "(ready)" + data["pumpstatus"] = "Ready" else - data["pumpstatus"] = "(idle)" + data["pumpstatus"] = "Idle" data["pressure"] = pressure_round ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm index 373b5d9454f..0e83e5812c3 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm @@ -37,7 +37,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) /datum/artifact_effect/badfeeling/DoEffectAura() if(holder) @@ -50,7 +50,7 @@ to_chat(H, "[pick(drastic_messages)]") if(prob(10)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) return 1 /datum/artifact_effect/badfeeling/DoEffectPulse() @@ -64,7 +64,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) else if(prob(25)) - H.dizziness += rand(5,15) + H.AdjustDizzy(rand(5,15)) return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm index 08639dec98f..dd42c44204c 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm @@ -35,7 +35,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) /datum/artifact_effect/goodfeeling/DoEffectAura() if(holder) @@ -48,7 +48,7 @@ to_chat(H, "[pick(drastic_messages)]") if(prob(5)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) return 1 /datum/artifact_effect/goodfeeling/DoEffectPulse() @@ -62,7 +62,7 @@ to_chat(H, "[pick(messages)]") if(prob(50)) - H.dizziness += rand(3,5) + H.AdjustDizzy(rand(3,5)) else if(prob(25)) - H.dizziness += rand(5,15) + H.AdjustDizzy(rand(5,15)) return 1 diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm index bbb16d76a3d..1f098ddfa6b 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm @@ -13,8 +13,8 @@ if(ishuman(toucher) && prob(weakness * 100)) var/mob/living/carbon/human/H = toucher to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")) - H.drowsyness = min(H.drowsyness + rand(5,25) * weakness, 50 * weakness) - H.eye_blurry = min(H.eye_blurry + rand(1,3) * weakness, 50 * weakness) + H.AdjustDrowsy(rand(5,25) * weakness, bound_lower = 0, bound_upper = 50 * weakness) + H.AdjustEyeBlurry(rand(1,3) * weakness, bound_lower = 0, bound_upper = 50 * weakness) return 1 else if(isrobot(toucher)) to_chat(toucher, "\red SYSTEM ALERT: CPU cycles slowing down.") @@ -28,8 +28,8 @@ if(prob(weakness * 100)) if(prob(10)) to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")) - H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness) - H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness) + H.AdjustDrowsy(1 * weakness, bound_lower = 0, bound_upper = 25 * weakness) + H.AdjustEyeBlurry(1 * weakness, bound_lower = 0, bound_upper = 25 * weakness) for(var/mob/living/silicon/robot/R in range(src.effectrange,holder)) to_chat(R, "\red SYSTEM ALERT: CPU cycles slowing down.") return 1 @@ -41,8 +41,8 @@ var/weakness = GetAnomalySusceptibility(H) if(prob(weakness * 100)) to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")) - H.drowsyness = min(H.drowsyness + rand(5,15) * weakness, 50 * weakness) - H.eye_blurry = min(H.eye_blurry + rand(5,15) * weakness, 50 * weakness) + H.AdjustDrowsy(rand(5,15) * weakness, bound_lower = 0, bound_upper = 50 * weakness) + H.AdjustEyeBlurry(rand(5,15) * weakness, bound_lower = 0, bound_upper = 50 * weakness) for(var/mob/living/silicon/robot/R in range(src.effectrange,holder)) to_chat(R, "\red SYSTEM ALERT: CPU cycles slowing down.") return 1 diff --git a/code/modules/research/xenoarchaeology/finds/finds_special.dm b/code/modules/research/xenoarchaeology/finds/finds_special.dm index ce6fb4c2663..8ddcf27593b 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_special.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_special.dm @@ -194,7 +194,7 @@ 'sound/hallucinations/turn_around1.ogg',\ 'sound/hallucinations/turn_around2.ogg',\ ), 50, 1, -3) - M.sleeping = max(M.sleeping,rand(5,10)) + M.Sleeping(rand(5,10)) src.loc = null else processing_objects.Remove(src) diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm index 188bf7597c2..8ff0ed6eb64 100644 --- a/code/modules/security_levels/keycard authentication.dm +++ b/code/modules/security_levels/keycard authentication.dm @@ -3,6 +3,7 @@ desc = "This device is used to trigger station functions, which require more than one ID card to authenticate." icon = 'icons/obj/monitors.dmi' icon_state = "auth_off" + var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made. var/event = "" var/screen = 1 @@ -14,25 +15,25 @@ var/mob/event_triggered_by var/mob/event_confirmed_by var/ert_reason = "Reason for ERT" - //1 = select event - //2 = authenticate - anchored = 1.0 + + anchored = 1 use_power = 1 idle_power_usage = 2 active_power_usage = 6 power_channel = ENVIRON + + req_access = list(access_keycard_auth) /obj/machinery/keycard_auth/attack_ai(mob/user as mob) - to_chat(user, "The station AI is not to interact with these devices.") + to_chat(user, "The station AI is not to interact with these devices.") return /obj/machinery/keycard_auth/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") return - if(istype(W,/obj/item/weapon/card/id)) - var/obj/item/weapon/card/id/ID = W - if(access_keycard_auth in ID.access) + if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)) + if(check_access(W)) if(active == 1) //This is not the device that made the initial request. It is the device confirming the request. if(event_source) @@ -44,6 +45,8 @@ return event_triggered_by = usr broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices + else + to_chat(user, "Access denied.") /obj/machinery/keycard_auth/power_change() if(powered(ENVIRON)) @@ -51,16 +54,16 @@ icon_state = "auth_off" else stat |= NOPOWER + +/obj/machinery/keycard_auth/attack_ghost(mob/user) + ui_interact(user) /obj/machinery/keycard_auth/attack_hand(mob/user as mob) - if(!user.IsAdvancedToolUser()) - return 0 + if(..()) + return 1 ui_interact(user) /obj/machinery/keycard_auth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - if(user.stat || stat & (NOPOWER|BROKEN)) - to_chat(user, "This device is not powered.") - return if(busy) to_chat(user, "This device is busy.") return @@ -74,19 +77,18 @@ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) - ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 520, 320) + ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320) ui.set_initial_data(data) ui.open() /obj/machinery/keycard_auth/Topic(href, href_list) if(..()) - return + return 1 + if(busy) to_chat(usr, "This device is busy.") return - if(usr.stat || stat & (BROKEN|NOPOWER)) - to_chat(usr, "This device is without power.") - return + if(href_list["triggerevent"]) event = href_list["triggerevent"] screen = 2 diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index 406c1f83083..6c2f7354b43 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -55,7 +55,7 @@ user.visible_message(" [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \ " Your hand slips, slicing [target]'s throat wth \the [tool]!" ) affected.createwound(CUT, 60) - target.losebreath += 4 + target.AdjustLoseBreath(4) return 0 @@ -83,7 +83,7 @@ /datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) user.visible_message(" [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \ " Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!") - target.losebreath += 4 + target.AdjustLoseBreath(4) return 0 /datum/surgery_step/face/fix_face diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index a0dcd29525f..794bf2a3e9f 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -162,9 +162,9 @@ var/obj/item/organ/external/head/H = target.get_organ("head") var/datum/robolimb/robohead = all_robolimbs[H.model] if(robohead.is_monitor) //Ensures that if an IPC gets a head that's got a human hair wig attached to their body, the hair won't wipe. - H.h_style = "" - H.f_style = "" - target.m_style = "" + H.h_style = "Bald" + H.f_style = "Shaved" + target.m_styles["head"] = "None" E.status &= ~ORGAN_DESTROYED if(E.children) for(var/obj/item/organ/external/C in E.children) diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 9034393bfe2..f71e9bff0be 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -101,7 +101,7 @@ else adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)) if(prob(5)) - eye_blurry = max(eye_blurry, 6) + EyeBlurry(6) var/word = pick("dizzy","woozy","faint") to_chat(src, "You feel very [word].") if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index d10fea6b7aa..ce4b55efb11 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -860,11 +860,13 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/proc/mutate() src.status |= ORGAN_MUTATED - if(owner) owner.update_body() + if(owner) + owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly render the deformed sprite. /obj/item/organ/external/proc/unmutate() src.status &= ~ORGAN_MUTATED - if(owner) owner.update_body() + if(owner) + owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly return them to normal. /obj/item/organ/external/proc/get_damage() //returns total damage return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health? diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 31ef55f4919..272adcad52c 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -107,13 +107,14 @@ var/global/list/limb_icon_cache = list() overlays |= lip_icon mob_icon.Blend(lip_icon, ICON_OVERLAY) - if(owner.m_style) - var/datum/sprite_accessory/marking_style = marking_styles_list[owner.m_style] - if(marking_style && marking_style.species_allowed && (species.name in marking_style.species_allowed) && marking_style.marking_location == "head") - var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") - if(marking_style.do_colouration) - markings_s.Blend(rgb(owner.r_markings, owner.g_markings, owner.b_markings), ICON_ADD) - overlays |= markings_s + var/head_marking = owner.m_styles["head"] + if(head_marking && head_marking != "None") + var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] + if(head_marking_style && head_marking_style.species_allowed && (species.name in head_marking_style.species_allowed) && head_marking_style.marking_location == "head") + var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") + if(head_marking_style.do_colouration) + h_marking_s.Blend(owner.m_colours["head"], ICON_ADD) + overlays |= h_marking_s if(ha_style) var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[ha_style] @@ -158,6 +159,10 @@ var/global/list/limb_icon_cache = list() gender = "f" else gender = "m" + if(limb_name == "head") + var/obj/item/organ/external/head/head_organ = src + head_organ.handle_alt_icon() + new_icon_state = "[icon_name][gender ? "_[gender]" : ""]" if(skeletal) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index bb408f51726..18f0e51b2e2 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -307,7 +307,7 @@ owner.drip(10) if(prob(4)) spawn owner.custom_emote(1, "gasps for air!") - owner.losebreath += 5 + owner.AdjustLoseBreath(5) /obj/item/organ/internal/kidneys name = "kidneys" @@ -357,10 +357,10 @@ /obj/item/organ/internal/eyes/surgeryize() if(!owner) return - owner.disabilities &= ~NEARSIGHTED - owner.disabilities &= ~BLIND - owner.eye_blurry = 0 - owner.eye_blind = 0 + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) /obj/item/organ/internal/liver @@ -493,6 +493,7 @@ slot = "brain_tumor" health = 3 var/organhonked = 0 + var/suffering_delay = 900 /obj/item/organ/internal/honktumor/New() ..() @@ -535,11 +536,11 @@ return if(organhonked < world.time) - organhonked = world.time+900 + organhonked = world.time + suffering_delay to_chat(owner, "HONK") - owner.sleeping = 0 - owner.stuttering = 20 - owner.adjustEarDamage(0, 30) + owner.SetSleeping(0) + owner.Stuttering(20) + owner.AdjustEarDeaf(30) owner.Weaken(3) owner << 'sound/items/AirHorn.ogg' if(prob(30)) diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm index 23d2af69bf3..f0b4b912eaf 100644 --- a/code/modules/surgery/organs/pain.dm +++ b/code/modules/surgery/organs/pain.dm @@ -15,8 +15,8 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0 if(world.time < next_pain_time && !force) return if(amount > 10 && istype(src,/mob/living/carbon/human)) - if(src:paralysis) - src:paralysis = max(0, src:paralysis-round(amount/10)) + if(paralysis) + AdjustParalysis(-round(amount/10)) if(amount > 50 && prob(amount / 5)) src:drop_item() var/msg @@ -132,4 +132,4 @@ mob/living/carbon/human/proc/handle_pain() toxDamageMessage = "Your body aches all over, it's driving you mad." if(toxDamageMessage && prob(toxMessageProb)) - src.custom_pain(toxDamageMessage, getToxLoss() >= 15) \ No newline at end of file + src.custom_pain(toxDamageMessage, getToxLoss() >= 15) diff --git a/code/modules/surgery/organs/subtypes/diona.dm b/code/modules/surgery/organs/subtypes/diona.dm index 0f75fe9f80f..a4b0d8fb92b 100644 --- a/code/modules/surgery/organs/subtypes/diona.dm +++ b/code/modules/surgery/organs/subtypes/diona.dm @@ -169,10 +169,10 @@ /obj/item/organ/internal/diona_receptor/surgeryize() if(!owner) return - owner.disabilities &= ~NEARSIGHTED - owner.disabilities &= ~BLIND - owner.eye_blurry = 0 - owner.eye_blind = 0 + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) //TODO:Make absorb rads on insert diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index 61b2f143f69..0f402a42e5d 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -142,10 +142,10 @@ /obj/item/organ/internal/optical_sensor/surgeryize() if(!owner) return - owner.disabilities &= ~NEARSIGHTED - owner.disabilities &= ~BLIND - owner.eye_blurry = 0 - owner.eye_blind = 0 + owner.CureNearsighted() + owner.CureBlind() + owner.SetEyeBlurry(0) + owner.SetEyeBlind(0) // Used for an MMI or posibrain being installed into a human. diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index 02351f523a8..faa6c403355 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -159,11 +159,15 @@ gendered_icon = 1 encased = "skull" var/can_intake_reagents = 1 + var/alt_head = "None" //Hair colour and style var/r_hair = 0 var/g_hair = 0 var/b_hair = 0 + var/r_hair_sec = 0 + var/g_hair_sec = 0 + var/b_hair_sec = 0 var/h_style = "Bald" //Head accessory colour and style @@ -176,6 +180,9 @@ var/r_facial = 0 var/g_facial = 0 var/b_facial = 0 + var/r_facial_sec = 0 + var/g_facial_sec = 0 + var/b_facial_sec = 0 var/f_style = "Shaved" /obj/item/organ/external/head/remove() @@ -197,6 +204,8 @@ if(owner)//runtimer no runtiming owner.update_hair() owner.update_fhair() + owner.update_head_accessory() + owner.update_markings() . = ..() /obj/item/organ/external/head/replaced() @@ -213,6 +222,17 @@ if(burn_dam > 40) disfigure("burn") +/obj/item/organ/external/head/proc/handle_alt_icon() + if(alt_head && alt_heads_list[alt_head]) + var/datum/sprite_accessory/alt_heads/alternate_head = alt_heads_list[alt_head] + if(alternate_head.icon_state) + icon_name = alternate_head.icon_state + else //If alternate_head.icon_state doesn't exist, that means alternate_head is "None", so default icon_name back to "head". + icon_name = initial(icon_name) + else //If alt_head is null, set it to "None" and default icon_name for sanity. + alt_head = initial(alt_head) + icon_name = initial(icon_name) + /obj/item/organ/external/head/set_dna(datum/dna/new_dna) ..() new_dna.write_head_attributes(src) diff --git a/html/changelog.html b/html/changelog.html index 6ab1e019045..2d41f163168 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,6 +55,47 @@ -->
+

23 October 2016

+

KasparoVy updated:

+
    +
  • Refactors markings. Now split into head, body and tail markings.
  • +
  • Refactors morph again. Changes made while morphing are now reflected instantly on your sprite.
  • +
  • Darkens Vulpkanin and Tajara for improved colour fidelity. Species base colour changed to compensate. Add 27 to R, G and B values if Vulp, 15 if Taj to keep the same colour on your character.
  • +
  • Darkens Vulpkanin facial fur patterns for improved colour fidelity. Add 23 to the R, G and B values of your facial hair/head accessory to keep the same colour on your character.
  • +
  • Darkens Unathi frills and horns. Add 27 to the R, G and B values of your frills and 21 for horns to keep the same colour on your character.
  • +
  • Vulpkanin tails are now split-rendered. Tails overlap hair when facing north, but are overlapped by hair when facing all other directions. No other differences, only affects the fluffy husky tail.
  • +
  • The heads of tiger markings have been isolated and can now be coloured independently.
  • +
  • Hair can now cover facial hair, and glasses are no longer covered by facial hair and head accessories. Means that two-piece Vulpkanin facial fur patterns won't almost entirely cover whatever glasses they're wearing.
  • +
  • Tajaran head and facial hair have been darkened. Add 28 to the R, G and B values of your Tajara head/facial hair to keep the same colour on your character.
  • +
  • Vulpkanin head hair and one facial hair style has been darkened. Refer to PR notes for darkening factors.
  • +
  • The HAS_MARKINGS flag now represents all marking locations. The HAS_location_MARKINGS flags are for specific locations (head, body, tail).
  • +
  • Improves the quality of some Vulpkanin/Tajara/Unathi mask sprites.
  • +
  • Naked Humans and Skrell will no longer have exposed flesh poking out their wrists when facing east or west. Male Humans now no longer lack a butt pixel when facing east or west.
  • +
  • Mutated limbs now render correctly as soon as they're mutated.
  • +
  • Mobs will now correctly appear as fat/skinny.
  • +
  • Species with TAIL_OVERLAPPED will no longer wag tail at max speed when facing north.
  • +
  • Species with TAIL_OVERLAPPED and body accessories won't crash the game when they wag.
  • +
  • Tiger Head and Face markings adjusted so they don't look ugly on certain species' ears.
  • +
  • Fixes issue where Unathi dorsal stripe didn't render.
  • +
  • Tajaran ears are no longer in their hair sprites, but on their actual heads.
  • +
  • The adminbus body accessory now overrides the TAIL_OVERLAPPED flag and will now be rendered correctly on a body regardless of species bodyflags.
  • +
  • Changing a person's species via CMA will no longer result in a mob with all the same cosmetic attributes as the old species.
  • +
  • Dressers now have species fitting checks for undergarments. Drask are now able to wear undershirts and underwear like they were originally meant to.
  • +
  • Adds some head markings for Tajara and Vulpkanin.
  • +
  • Adds body marking(s) for Tajara, Vulpkanin, Unathi and Drask.
  • +
  • Adds tail markings for Vox and Vulpkanin.
  • +
  • Adds 5 Tajaran hairstyles.
  • +
  • Adds a tweaked version of an existing Vox hairstyle. Shouldn't clip with certain jackets as much.
  • +
  • Adds a hairstyle for Humans, Unathi and Vulpkanin.
  • +
  • Adds a facial hairstyle for Vulpkanin.
  • +
  • Adds secondary hair (head and facial) themes. Skrell can now colour their tentacle cloths independently, the beads in the Tajaran/Hippie braid hairstyles can be coloured and the same with the webbing in Unathi frills. Can be changed at nanomirrors, via morph and CMA.
  • +
  • Adds alternate heads. Unathi can now choose a head with a sharp snout. Can be changed via morph and CMA.
  • +
  • Helper procs to convert a hex colour into either R, G, or B.
  • +
  • Markings, body accessories, head accessories, alt heads and their colours (if they have colours) can now be randomized at the character preferences screen.
  • +
  • Adds a system that attempts to fit mobs with alternate heads with appropriate mask sprites. The sprites just need to be suffixed with the alt_head suffix in sprite_accessories.dm.
  • +
  • Adds mask sprites tweaked to fit the new Unathi alternate head to go along with the new alt. head mask fitting system.
  • +
+

15 October 2016

Crazylemon64 updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 9dfe354606f..7f682f24250 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -2978,3 +2978,73 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. messages. - bugfix: Fixed camera monitors immobilizing you if you reconnect while using one. - bugfix: Fixed selecting datum types through SDQL2 never returning any datums. +2016-10-23: + KasparoVy: + - tweak: Refactors markings. Now split into head, body and tail markings. + - tweak: Refactors morph again. Changes made while morphing are now reflected instantly + on your sprite. + - tweak: Darkens Vulpkanin and Tajara for improved colour fidelity. Species base + colour changed to compensate. Add 27 to R, G and B values if Vulp, 15 if Taj + to keep the same colour on your character. + - tweak: Darkens Vulpkanin facial fur patterns for improved colour fidelity. Add + 23 to the R, G and B values of your facial hair/head accessory to keep the same + colour on your character. + - tweak: Darkens Unathi frills and horns. Add 27 to the R, G and B values of your + frills and 21 for horns to keep the same colour on your character. + - tweak: Vulpkanin tails are now split-rendered. Tails overlap hair when facing + north, but are overlapped by hair when facing all other directions. No other + differences, only affects the fluffy husky tail. + - tweak: The heads of tiger markings have been isolated and can now be coloured + independently. + - tweak: Hair can now cover facial hair, and glasses are no longer covered by facial + hair and head accessories. Means that two-piece Vulpkanin facial fur patterns + won't almost entirely cover whatever glasses they're wearing. + - tweak: Tajaran head and facial hair have been darkened. Add 28 to the R, G and + B values of your Tajara head/facial hair to keep the same colour on your character. + - tweak: Vulpkanin head hair and one facial hair style has been darkened. Refer + to PR notes for darkening factors. + - tweak: The HAS_MARKINGS flag now represents all marking locations. The HAS_location_MARKINGS + flags are for specific locations (head, body, tail). + - tweak: Improves the quality of some Vulpkanin/Tajara/Unathi mask sprites. + - bugfix: Naked Humans and Skrell will no longer have exposed flesh poking out their + wrists when facing east or west. Male Humans now no longer lack a butt pixel + when facing east or west. + - bugfix: Mutated limbs now render correctly as soon as they're mutated. + - bugfix: Mobs will now correctly appear as fat/skinny. + - bugfix: Species with TAIL_OVERLAPPED will no longer wag tail at max speed when + facing north. + - bugfix: Species with TAIL_OVERLAPPED and body accessories won't crash the game + when they wag. + - bugfix: Tiger Head and Face markings adjusted so they don't look ugly on certain + species' ears. + - bugfix: Fixes issue where Unathi dorsal stripe didn't render. + - bugfix: Tajaran ears are no longer in their hair sprites, but on their actual + heads. + - bugfix: The adminbus body accessory now overrides the TAIL_OVERLAPPED flag and + will now be rendered correctly on a body regardless of species bodyflags. + - bugfix: Changing a person's species via CMA will no longer result in a mob with + all the same cosmetic attributes as the old species. + - bugfix: Dressers now have species fitting checks for undergarments. Drask are + now able to wear undershirts and underwear like they were originally meant to. + - rscadd: Adds some head markings for Tajara and Vulpkanin. + - rscadd: Adds body marking(s) for Tajara, Vulpkanin, Unathi and Drask. + - rscadd: Adds tail markings for Vox and Vulpkanin. + - rscadd: Adds 5 Tajaran hairstyles. + - rscadd: Adds a tweaked version of an existing Vox hairstyle. Shouldn't clip with + certain jackets as much. + - rscadd: Adds a hairstyle for Humans, Unathi and Vulpkanin. + - rscadd: Adds a facial hairstyle for Vulpkanin. + - rscadd: Adds secondary hair (head and facial) themes. Skrell can now colour their + tentacle cloths independently, the beads in the Tajaran/Hippie braid hairstyles + can be coloured and the same with the webbing in Unathi frills. Can be changed + at nanomirrors, via morph and CMA. + - rscadd: Adds alternate heads. Unathi can now choose a head with a sharp snout. + Can be changed via morph and CMA. + - rscadd: Helper procs to convert a hex colour into either R, G, or B. + - rscadd: Markings, body accessories, head accessories, alt heads and their colours + (if they have colours) can now be randomized at the character preferences screen. + - rscadd: Adds a system that attempts to fit mobs with alternate heads with appropriate + mask sprites. The sprites just need to be suffixed with the alt_head suffix + in sprite_accessories.dm. + - imageadd: Adds mask sprites tweaked to fit the new Unathi alternate head to go + along with the new alt. head mask fitting system. diff --git a/html/changelogs/AutoChangeLog-pr-5601.yml b/html/changelogs/AutoChangeLog-pr-5601.yml new file mode 100644 index 00000000000..cd74a767312 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5601.yml @@ -0,0 +1,4 @@ +author: Crazylemon +delete-after: True +changes: + - tweak: "Status effects should work a little more consistently now" diff --git a/html/changelogs/AutoChangeLog-pr-5811.yml b/html/changelogs/AutoChangeLog-pr-5811.yml new file mode 100644 index 00000000000..33d9eb32a8b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5811.yml @@ -0,0 +1,7 @@ +author: KasparoVy +delete-after: True +changes: + - bugfix: "Fixes a bug where changing your alt head required two icon updates to show." + - bugfix: "Fixes a bug where you couldn't choose head marking styles that would ordinarily be available regardless of your alt head." + - bugfix: "Fixes a bug where Tajara couldn't choose undergarments." + - bugfix: "Resolves an issue with the Vulpkanin Jagged hairstyle missing a pixel." diff --git a/html/changelogs/AutoChangeLog-pr-5826.yml b/html/changelogs/AutoChangeLog-pr-5826.yml new file mode 100644 index 00000000000..62bc989c620 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5826.yml @@ -0,0 +1,4 @@ +author: Twinmold93 +delete-after: True +changes: + - bugfix: "Fixes a runtime issue caused by using the detective's scanner on the space hotel cleaver." diff --git a/icons/effects/species.dmi b/icons/effects/species.dmi index ee3da07c3c5..87c047f397a 100644 Binary files a/icons/effects/species.dmi and b/icons/effects/species.dmi differ diff --git a/icons/mob/body_accessory.dmi b/icons/mob/body_accessory.dmi index c45bd957a1a..6e94d89854d 100644 Binary files a/icons/mob/body_accessory.dmi and b/icons/mob/body_accessory.dmi differ diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index ad4f2d137a6..02bbf79ad76 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index 79df46605a2..bf6507c412c 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/mob/human_races/r_def_human.dmi b/icons/mob/human_races/r_def_human.dmi index 9d6af67be61..92ee97b4aba 100644 Binary files a/icons/mob/human_races/r_def_human.dmi and b/icons/mob/human_races/r_def_human.dmi differ diff --git a/icons/mob/human_races/r_def_lizard.dmi b/icons/mob/human_races/r_def_lizard.dmi index 3926ca17092..e1c40712b23 100644 Binary files a/icons/mob/human_races/r_def_lizard.dmi and b/icons/mob/human_races/r_def_lizard.dmi differ diff --git a/icons/mob/human_races/r_def_tajaran.dmi b/icons/mob/human_races/r_def_tajaran.dmi index 1e7da69c495..e62f4228fc6 100644 Binary files a/icons/mob/human_races/r_def_tajaran.dmi and b/icons/mob/human_races/r_def_tajaran.dmi differ diff --git a/icons/mob/human_races/r_grey.dmi b/icons/mob/human_races/r_grey.dmi index d270ab83934..4f603380545 100644 Binary files a/icons/mob/human_races/r_grey.dmi and b/icons/mob/human_races/r_grey.dmi differ diff --git a/icons/mob/human_races/r_human.dmi b/icons/mob/human_races/r_human.dmi index 0aa7295b8d3..0cbbde7fb3a 100644 Binary files a/icons/mob/human_races/r_human.dmi and b/icons/mob/human_races/r_human.dmi differ diff --git a/icons/mob/human_races/r_lizard.dmi b/icons/mob/human_races/r_lizard.dmi index 457e50b204e..d60ae4979df 100644 Binary files a/icons/mob/human_races/r_lizard.dmi and b/icons/mob/human_races/r_lizard.dmi differ diff --git a/icons/mob/human_races/r_skrell.dmi b/icons/mob/human_races/r_skrell.dmi index f1c4966dc51..586714c7da8 100644 Binary files a/icons/mob/human_races/r_skrell.dmi and b/icons/mob/human_races/r_skrell.dmi differ diff --git a/icons/mob/human_races/r_tajaran.dmi b/icons/mob/human_races/r_tajaran.dmi index c287ef822f3..3f45032951d 100644 Binary files a/icons/mob/human_races/r_tajaran.dmi and b/icons/mob/human_races/r_tajaran.dmi differ diff --git a/icons/mob/human_races/r_vulpkanin.dmi b/icons/mob/human_races/r_vulpkanin.dmi index 0f1b6956c10..3bcdb3539b7 100644 Binary files a/icons/mob/human_races/r_vulpkanin.dmi and b/icons/mob/human_races/r_vulpkanin.dmi differ diff --git a/icons/mob/inhands/clothing_lefthand.dmi b/icons/mob/inhands/clothing_lefthand.dmi index 3fe35fe7651..9aed5172330 100644 Binary files a/icons/mob/inhands/clothing_lefthand.dmi and b/icons/mob/inhands/clothing_lefthand.dmi differ diff --git a/icons/mob/inhands/clothing_righthand.dmi b/icons/mob/inhands/clothing_righthand.dmi index 590945e9e15..c0c5dbd8678 100644 Binary files a/icons/mob/inhands/clothing_righthand.dmi and b/icons/mob/inhands/clothing_righthand.dmi differ diff --git a/icons/mob/species/tajaran/mask.dmi b/icons/mob/species/tajaran/mask.dmi index ea17113a2fc..9217fb7730c 100644 Binary files a/icons/mob/species/tajaran/mask.dmi and b/icons/mob/species/tajaran/mask.dmi differ diff --git a/icons/mob/species/unathi/helmet.dmi b/icons/mob/species/unathi/helmet.dmi index 4ad3b228849..46b11152ba7 100644 Binary files a/icons/mob/species/unathi/helmet.dmi and b/icons/mob/species/unathi/helmet.dmi differ diff --git a/icons/mob/species/unathi/mask.dmi b/icons/mob/species/unathi/mask.dmi index a211a035012..e0571e592db 100644 Binary files a/icons/mob/species/unathi/mask.dmi and b/icons/mob/species/unathi/mask.dmi differ diff --git a/icons/mob/species/vox/mask.dmi b/icons/mob/species/vox/mask.dmi index b39ee5577a6..93dacb8f058 100644 Binary files a/icons/mob/species/vox/mask.dmi and b/icons/mob/species/vox/mask.dmi differ diff --git a/icons/mob/species/vulpkanin/mask.dmi b/icons/mob/species/vulpkanin/mask.dmi index f0353c1766d..14a70e1bb4c 100644 Binary files a/icons/mob/species/vulpkanin/mask.dmi and b/icons/mob/species/vulpkanin/mask.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 95a1a902aa0..568fcce4443 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/atmospherics/circulator.dmi b/icons/obj/atmospherics/circulator.dmi new file mode 100644 index 00000000000..45f7a626ef6 Binary files /dev/null and b/icons/obj/atmospherics/circulator.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index a555009ae6a..5a198ee1e64 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/pipe-item.dmi b/icons/obj/pipe-item.dmi index 34fedaa560f..73d62edfaa8 100644 Binary files a/icons/obj/pipe-item.dmi and b/icons/obj/pipe-item.dmi differ diff --git a/icons/obj/pipes.dmi b/icons/obj/pipes.dmi index 45f79d9e66b..99e6e84d185 100644 Binary files a/icons/obj/pipes.dmi and b/icons/obj/pipes.dmi differ diff --git a/nano/templates/appearance_changer.tmpl b/nano/templates/appearance_changer.tmpl index 886076f21d2..47a3ce113e2 100644 --- a/nano/templates/appearance_changer.tmpl +++ b/nano/templates/appearance_changer.tmpl @@ -23,7 +23,7 @@
{{/if}} -{{if data.change_eye_color || data.change_skin_tone || data.change_skin_color || data.change_head_accessory_color || data.change_hair_color || data.change_facial_hair_color || data.change_marking_color}} +{{if data.change_eye_color || data.change_skin_tone || data.change_skin_color || data.change_head_accessory_color || data.change_hair_color || data.change_facial_hair_color || data.change_head_marking_color || data.change_body_marking_color || data.change_tail_marking_color}}
Colors: @@ -44,11 +44,23 @@ {{if data.change_hair_color}} {{:helper.link('Change hair color', null, { 'hair_color' : 1})}} {{/if}} + {{if data.change_secondary_hair_color}} + {{:helper.link('Change secondary hair color', null, { 'secondary_hair_color' : 1})}} + {{/if}} {{if data.change_facial_hair_color}} {{:helper.link('Change facial hair color', null, { 'facial_hair_color' : 1})}} {{/if}} - {{if data.change_marking_color}} - {{:helper.link('Change marking color', null, { 'marking_color' : 1})}} + {{if data.change_secondary_facial_hair_color}} + {{:helper.link('Change secondary facial hair color', null, { 'secondary_facial_hair_color' : 1})}} + {{/if}} + {{if data.change_head_marking_color}} + {{:helper.link('Change head marking color', null, { 'head_marking_color' : 1})}} + {{/if}} + {{if data.change_body_marking_color}} + {{:helper.link('Change body marking color', null, { 'body_marking_color' : 1})}} + {{/if}} + {{if data.change_tail_marking_color}} + {{:helper.link('Change tail marking color', null, { 'tail_marking_color' : 1})}} {{/if}}
@@ -93,14 +105,40 @@ {{/if}} -{{if data.change_markings}} +{{if data.change_head_markings}}
- Marking styles: + Head Marking styles:
- {{for data.marking_styles}} - {{:helper.link(value.markingstyle, null, { 'marking' : value.markingstyle}, null, data.marking_style == value.markingstyle ? 'selected' : null)}} + {{for data.head_marking_styles}} + {{:helper.link(value.headmarkingstyle, null, { 'head_marking' : value.headmarkingstyle}, null, data.head_marking_style == value.headmarkingstyle ? 'selected' : null)}} + {{/for}} +
+
+{{/if}} + +{{if data.change_body_markings}} +
+
+ Body Marking styles: +
+
+ {{for data.body_marking_styles}} + {{:helper.link(value.bodymarkingstyle, null, { 'body_marking' : value.bodymarkingstyle}, null, data.body_marking_style == value.bodymarkingstyle ? 'selected' : null)}} + {{/for}} +
+
+{{/if}} + +{{if data.change_tail_markings}} +
+
+ Tail Marking styles: +
+
+ {{for data.tail_marking_styles}} + {{:helper.link(value.tailmarkingstyle, null, { 'tail_marking' : value.tailmarkingstyle}, null, data.tail_marking_style == value.tailmarkingstyle ? 'selected' : null)}} {{/for}}
@@ -118,3 +156,16 @@ {{/if}} + +{{if data.change_alt_head}} +
+
+ Alternate Heads: +
+
+ {{for data.alt_head_styles}} + {{:helper.link(value.altheadstyle, null, { 'alt_head' : value.altheadstyle}, null, data.alt_head_style == value.altheadstyle ? 'selected' : null)}} + {{/for}} +
+
+{{/if}} diff --git a/nano/templates/chem_dispenser.tmpl b/nano/templates/chem_dispenser.tmpl index cec3028652e..f8988e35e43 100644 --- a/nano/templates/chem_dispenser.tmpl +++ b/nano/templates/chem_dispenser.tmpl @@ -78,24 +78,12 @@ Used In File(s): \code\modules\reagents\Chemistry-Machinery.dm
{{empty}} - - {{if data.glass}} - Glass - {{else}} - Beaker - {{/if}} - is empty + {{if data.glass}}Glass{{else}}Beaker{{/if}} is empty {{/for}} {{else}} - No - {{if data.glass}} - Glass - {{else}} - Beaker - {{/if}} - loaded + No {{if data.glass}}Glass{{else}}Beaker{{/if}} loaded {{/if}} diff --git a/nano/templates/disposal_bin.tmpl b/nano/templates/disposal_bin.tmpl index c68389a95cb..d211b3fbb17 100644 --- a/nano/templates/disposal_bin.tmpl +++ b/nano/templates/disposal_bin.tmpl @@ -31,6 +31,13 @@ Used In File(s): \code\modules\recycling\disposal.dm
{{:helper.link('On', 'gear', {'pump' : 1}, data.mode > 0 ? 'selected' : '')}} {{:helper.link('Off', 'gear', {'pump' : 0}, data.mode <= 0 ? 'selected' : '')}} +
+ +
+
+ Pump Status: +
+
{{:data.pumpstatus}}
diff --git a/nano/templates/keycard_auth.tmpl b/nano/templates/keycard_auth.tmpl index 7f8f24b80eb..af58b061a9f 100644 --- a/nano/templates/keycard_auth.tmpl +++ b/nano/templates/keycard_auth.tmpl @@ -29,7 +29,7 @@ Used In File(s): \code\modules\security_levels\keycard_authentication.dm {{/if}} -

Please swipe your card to authorize the following event

+

Please swipe your card to authorize the following event:

{{:data.event}}
{{:helper.link('Back', 'close', { 'reset' : 1 })}} {{/if}} diff --git a/paradise.dme b/paradise.dme index 17f48fd9dba..ad5db876321 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1434,9 +1434,11 @@ #include "code\modules\mob\mob_movement.dm" #include "code\modules\mob\mob_transformation_simple.dm" #include "code\modules\mob\say.dm" +#include "code\modules\mob\status_procs.dm" #include "code\modules\mob\transform_procs.dm" #include "code\modules\mob\typing_indicator.dm" #include "code\modules\mob\update_icons.dm" +#include "code\modules\mob\update_status.dm" #include "code\modules\mob\camera\camera.dm" #include "code\modules\mob\dead\death.dm" #include "code\modules\mob\dead\observer\login.dm" @@ -1455,6 +1457,9 @@ #include "code\modules\mob\living\login.dm" #include "code\modules\mob\living\logout.dm" #include "code\modules\mob\living\say.dm" +#include "code\modules\mob\living\stat_states.dm" +#include "code\modules\mob\living\status_procs.dm" +#include "code\modules\mob\living\update_status.dm" #include "code\modules\mob\living\carbon\_defines.dm" #include "code\modules\mob\living\carbon\carbon.dm" #include "code\modules\mob\living\carbon\carbon_defenses.dm" @@ -1465,6 +1470,7 @@ #include "code\modules\mob\living\carbon\shock.dm" #include "code\modules\mob\living\carbon\superheroes.dm" #include "code\modules\mob\living\carbon\update_icons.dm" +#include "code\modules\mob\living\carbon\update_status.dm" #include "code\modules\mob\living\carbon\alien\alien.dm" #include "code\modules\mob\living\carbon\alien\alien_defenses.dm" #include "code\modules\mob\living\carbon\alien\death.dm" @@ -1501,6 +1507,7 @@ #include "code\modules\mob\living\carbon\brain\MMI.dm" #include "code\modules\mob\living\carbon\brain\posibrain.dm" #include "code\modules\mob\living\carbon\brain\say.dm" +#include "code\modules\mob\living\carbon\brain\update_status.dm" #include "code\modules\mob\living\carbon\human\appearance.dm" #include "code\modules\mob\living\carbon\human\body_accessories.dm" #include "code\modules\mob\living\carbon\human\death.dm" @@ -1558,6 +1565,7 @@ #include "code\modules\mob\living\silicon\ai\login.dm" #include "code\modules\mob\living\silicon\ai\logout.dm" #include "code\modules\mob\living\silicon\ai\say.dm" +#include "code\modules\mob\living\silicon\ai\update_status.dm" #include "code\modules\mob\living\silicon\ai\freelook\cameranet.dm" #include "code\modules\mob\living\silicon\ai\freelook\chunk.dm" #include "code\modules\mob\living\silicon\ai\freelook\eye.dm" @@ -1574,6 +1582,7 @@ #include "code\modules\mob\living\silicon\pai\say.dm" #include "code\modules\mob\living\silicon\pai\software.dm" #include "code\modules\mob\living\silicon\pai\software_modules.dm" +#include "code\modules\mob\living\silicon\pai\update_status.dm" #include "code\modules\mob\living\silicon\robot\component.dm" #include "code\modules\mob\living\silicon\robot\death.dm" #include "code\modules\mob\living\silicon\robot\emote.dm" @@ -1588,6 +1597,7 @@ #include "code\modules\mob\living\silicon\robot\robot_items.dm" #include "code\modules\mob\living\silicon\robot\robot_modules.dm" #include "code\modules\mob\living\silicon\robot\robot_movement.dm" +#include "code\modules\mob\living\silicon\robot\update_status.dm" #include "code\modules\mob\living\silicon\robot\drone\drone.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_abilities.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_console.dm" @@ -1595,6 +1605,7 @@ #include "code\modules\mob\living\silicon\robot\drone\drone_items.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_manufacturer.dm" #include "code\modules\mob\living\silicon\robot\drone\drone_say.dm" +#include "code\modules\mob\living\silicon\robot\drone\update_status.dm" #include "code\modules\mob\living\simple_animal\constructs.dm" #include "code\modules\mob\living\simple_animal\corpse.dm" #include "code\modules\mob\living\simple_animal\parrot.dm" @@ -1737,7 +1748,6 @@ #include "code\modules\power\cell.dm" #include "code\modules\power\engine.dm" #include "code\modules\power\generator.dm" -#include "code\modules\power\generator_type2.dm" #include "code\modules\power\gravitygenerator.dm" #include "code\modules\power\lighting.dm" #include "code\modules\power\port_gen.dm"