diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 9595f1ba80..3b20ccbb5c 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -1,3 +1,16 @@ +/* + * Contains: + * Flashlights + * Lamps + * Flares + * Chemlights + * Slime Extract + */ + +/* + * Flashlights + */ + /obj/item/device/flashlight name = "flashlight" desc = "A hand-held emergency light." @@ -7,15 +20,15 @@ slot_flags = SLOT_BELT matter = list(MAT_STEEL = 50,MAT_GLASS = 20) action_button_name = "Toggle Flashlight" - + light_system = MOVABLE_LIGHT_DIRECTIONAL light_range = 4 //luminosity when on light_power = 0.8 //lighting power when on light_color = "#FFFFFF" //LIGHT_COLOR_INCANDESCENT_FLASHLIGHT //lighting colour when on light_cone_y_offset = -7 - + var/on = 0 - + var/obj/item/weapon/cell/cell var/cell_type = /obj/item/weapon/cell/device var/power_usage = 1 @@ -26,7 +39,7 @@ if(power_use && cell_type) cell = new cell_type(src) - + update_brightness() /obj/item/device/flashlight/Destroy() @@ -232,24 +245,34 @@ w_class = ITEMSIZE_TINY power_use = 0 -/obj/item/device/flashlight/color //Default color is blue, just roll with it. +/obj/item/device/flashlight/color //Default color is blue name = "blue flashlight" - desc = "A hand-held emergency light. This one is blue." + desc = "A small flashlight. This one is blue." icon_state = "flashlight_blue" +/obj/item/device/flashlight/color/green + name = "green flashlight" + desc = "A small flashlight. This one is green." + icon_state = "flashlight_green" + +/obj/item/device/flashlight/color/purple + name = "purple flashlight" + desc = "A small flashlight. This one is purple." + icon_state = "flashlight_purple" + /obj/item/device/flashlight/color/red name = "red flashlight" - desc = "A hand-held emergency light. This one is red." + desc = "A small flashlight. This one is red." icon_state = "flashlight_red" /obj/item/device/flashlight/color/orange name = "orange flashlight" - desc = "A hand-held emergency light. This one is orange." + desc = "A small flashlight. This one is orange." icon_state = "flashlight_orange" /obj/item/device/flashlight/color/yellow name = "yellow flashlight" - desc = "A hand-held emergency light. This one is yellow." + desc = "A small flashlight. This one is yellow." icon_state = "flashlight_yellow" /obj/item/device/flashlight/maglight @@ -273,7 +296,11 @@ w_class = ITEMSIZE_TINY power_use = 0 -// the desk lamps are a bit special +/* + * Lamps + */ + +// pixar desk lamp /obj/item/device/flashlight/lamp name = "desk lamp" desc = "A desk lamp with an adjustable mount." @@ -286,14 +313,6 @@ on = 1 light_system = STATIC_LIGHT - -// green-shaded desk lamp -/obj/item/device/flashlight/lamp/green - desc = "A classic green-shaded desk lamp." - icon_state = "lampgreen" - center_of_mass = list("x" = 15,"y" = 11) - light_color = "#FFC58F" - /obj/item/device/flashlight/lamp/verb/toggle_light() set name = "Toggle light" set category = "Object" @@ -302,7 +321,23 @@ if(!usr.stat) attack_self(usr) -// FLARES +// green-shaded desk lamp +/obj/item/device/flashlight/lamp/green + desc = "A classic green-shaded desk lamp." + icon_state = "lampgreen" + center_of_mass = list("x" = 15,"y" = 11) + light_color = "#FFC58F" + +// clown lamp +/obj/item/device/flashlight/lamp/clown + desc = "A whacky banana peel shaped lamp." + icon_state = "bananalamp" + center_of_mass = list("x" = 15,"y" = 11) + + +/* + * Flares + */ /obj/item/device/flashlight/flare name = "flare" @@ -368,18 +403,20 @@ START_PROCESSING(SSobj, src) return 1 -//Glowsticks +/* + * Chemlights + */ /obj/item/device/flashlight/glowstick name = "green glowstick" - desc = "A green military-grade glowstick." + desc = "A green military-grade chemical light." w_class = ITEMSIZE_SMALL light_system = MOVABLE_LIGHT light_range = 4 light_power = 0.9 light_color = "#49F37C" - icon_state = "glowstick" - item_state = "glowstick" + icon_state = "glowstick_green" + item_state = "glowstick_green" var/fuel = 0 power_use = 0 @@ -414,32 +451,45 @@ /obj/item/device/flashlight/glowstick/red name = "red glowstick" - desc = "A red military-grade glowstick." + desc = "A red military-grade chemical light." light_color = "#FC0F29" icon_state = "glowstick_red" item_state = "glowstick_red" /obj/item/device/flashlight/glowstick/blue name = "blue glowstick" - desc = "A blue military-grade glowstick." + desc = "A blue military-grade chemical light." light_color = "#599DFF" icon_state = "glowstick_blue" item_state = "glowstick_blue" /obj/item/device/flashlight/glowstick/orange name = "orange glowstick" - desc = "A orange military-grade glowstick." + desc = "A orange military-grade chemical light." light_color = "#FA7C0B" icon_state = "glowstick_orange" item_state = "glowstick_orange" /obj/item/device/flashlight/glowstick/yellow name = "yellow glowstick" - desc = "A yellow military-grade glowstick." + desc = "A yellow military-grade chemical light." light_color = "#FEF923" icon_state = "glowstick_yellow" item_state = "glowstick_yellow" +/obj/item/device/flashlight/glowstick/radioisotope + name = "radioisotope glowstick" + desc = "A radioisotope powered chemical light. Escaping particles light up the area far brighter on similar levels to flares and for longer" + icon_state = "glowstick_isotope" + item_state = "glowstick_isotope" + + light_range = 8 + light_power = 0.1 + light_color = "#49F37C" + +/* + * Slime Extract + */ /obj/item/device/flashlight/slime gender = PLURAL diff --git a/code/game/objects/items/devices/flashlight_vr.dm b/code/game/objects/items/devices/flashlight_vr.dm deleted file mode 100644 index 876dddc76d..0000000000 --- a/code/game/objects/items/devices/flashlight_vr.dm +++ /dev/null @@ -1,9 +0,0 @@ -/obj/item/device/flashlight/glowstick/radioisotope - name = "radioisotope glowstick" - desc = "A radioisotope powered glowstick. Escaping particles light up the area far brighter on similar levels to flares and for longer" - icon_state = "glowstick_blue" - item_state = "glowstick_blue" - - light_range = 8 - light_power = 0.1 - light_color = "#599DFF" diff --git a/code/game/objects/random/mapping_vr.dm b/code/game/objects/random/mapping_vr.dm index b9ebfd1dc0..3075c40415 100644 --- a/code/game/objects/random/mapping_vr.dm +++ b/code/game/objects/random/mapping_vr.dm @@ -8,14 +8,21 @@ /obj/random/empty_or_lootable_crate/item_to_spawn() return pick(/obj/random/crate, /obj/random/multiple/corp_crate) - + /obj/random/forgotten_tram name = "random forgotten tram item" desc = "Spawns a random item that someone might accidentally leave on a tram. Sometimes spawns nothing." spawn_nothing_percentage = 30 /obj/random/forgotten_tram/item_to_spawn() - return pick(prob(2);/obj/item/device/flashlight, + return pick( + prob(2);/obj/item/device/flashlight, + prob(2);/obj/item/device/flashlight/color, + prob(2);/obj/item/device/flashlight/color/green, + prob(2);/obj/item/device/flashlight/color/purple, + prob(2);/obj/item/device/flashlight/color/red, + prob(2);/obj/item/device/flashlight/color/orange, + prob(2);/obj/item/device/flashlight/color/yellow, prob(2);/obj/item/device/flashlight/glowstick, prob(2);/obj/item/device/flashlight/glowstick/blue, prob(1);/obj/item/device/flashlight/glowstick/orange, diff --git a/code/game/objects/random/misc.dm b/code/game/objects/random/misc.dm index 4e37e0f17d..40ab128084 100644 --- a/code/game/objects/random/misc.dm +++ b/code/game/objects/random/misc.dm @@ -961,3 +961,21 @@ prob(5);/obj/item/weapon/storage/pouch/baton/full, prob(1);/obj/item/weapon/storage/pouch/holding ) + +/obj/random/flashlight + name = "Random Flashlight" + desc = "This is a random storage pouch." + icon = 'icons/obj/lighting.dmi' + icon_state = "random_flashlight" + +/obj/random/flashlight/item_to_spawn() + return pick( + prob(8);/obj/item/device/flashlight, + prob(6);/obj/item/device/flashlight/color, + prob(6);/obj/item/device/flashlight/color/green, + prob(6);/obj/item/device/flashlight/color/purple, + prob(6);/obj/item/device/flashlight/color/red, + prob(6);/obj/item/device/flashlight/color/orange, + prob(6);/obj/item/device/flashlight/color/yellow, + prob(2);/obj/item/device/flashlight/maglight + ) \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm index fb396762f5..4a945f442c 100644 --- a/code/modules/client/preference_setup/loadout/loadout_utility.dm +++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm @@ -89,37 +89,37 @@ display_name = "flashlight" path = /obj/item/device/flashlight -/datum/gear/utility/flashlight_blue - display_name = "flashlight, blue" - path = /obj/item/device/flashlight/color - -/datum/gear/utility/flashlight_orange - display_name = "flashlight, orange" - path = /obj/item/device/flashlight/color/orange - -/datum/gear/utility/flashlight_red - display_name = "flashlight, red" - path = /obj/item/device/flashlight/color/red - -/datum/gear/utility/flashlight_yellow - display_name = "flashlight, yellow" - path = /obj/item/device/flashlight/color/yellow - /datum/gear/utility/maglight display_name = "flashlight, maglight" path = /obj/item/device/flashlight/maglight cost = 2 +/datum/gear/utility/flashlight/color + display_name = "flashlight, small (selection)" + path = /obj/item/device/flashlight/color + +/datum/gear/utility/flashlight/color/New() + ..() + var/list/flashlights = list( + "Blue Flashlight" = /obj/item/device/flashlight/color, + "Red Flashlight" = /obj/item/device/flashlight/color/red, + "Green Flashlight" = /obj/item/device/flashlight/color/green, + "Yellow Flashlight" = /obj/item/device/flashlight/color/yellow, + "Purple Flashlight" = /obj/item/device/flashlight/color/purple, + "Orange Flashlight" = /obj/item/device/flashlight/color/orange + ) + gear_tweaks += new/datum/gear_tweak/path(flashlights) + /datum/gear/utility/battery display_name = "cell, device" path = /obj/item/weapon/cell/device /datum/gear/utility/pen - display_name = "Fountain Pen" + display_name = "fountain pen" path = /obj/item/weapon/pen/fountain /datum/gear/utility/umbrella - display_name = "Umbrella" + display_name = "umbrella" path = /obj/item/weapon/melee/umbrella cost = 3 @@ -131,7 +131,7 @@ display_name = "wheelchair selection" path = /obj/item/wheelchair cost = 4 - + /datum/gear/utility/wheelchair/New() ..() gear_tweaks += gear_tweak_free_color_choice diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 078e56af31..17b80b78a5 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index 816c083753..f8b95c18bc 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index 84fdd7be13..ededfc4b50 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ