Merge pull request #3138 from CHOMPStationBot/upstream-merge-11698

[MIRROR] Tool Time (Fixed)
This commit is contained in:
Nadyr
2021-10-27 19:14:36 -04:00
committed by GitHub
21 changed files with 1573 additions and 82 deletions
+77 -27
View File
@@ -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
@@ -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"
@@ -1,7 +1,10 @@
/*
* Toolboxes
*/
/obj/item/weapon/storage/toolbox
name = "toolbox"
desc = "Danger. Very robust."
icon = 'icons/obj/storage.dmi'
icon = 'icons/obj/storage_vr.dmi'
icon_state = "red"
item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red")
center_of_mass = list("x" = 16,"y" = 11)
@@ -18,8 +21,10 @@
drop_sound = 'sound/items/drop/toolbox.ogg'
pickup_sound = 'sound/items/pickup/toolbox.ogg'
//Emergency
/obj/item/weapon/storage/toolbox/emergency
name = "emergency toolbox"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "red"
item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red")
starts_with = list(
@@ -34,8 +39,10 @@
new /obj/item/device/flashlight/flare(src)
. = ..()
//Mechanical
/obj/item/weapon/storage/toolbox/mechanical
name = "mechanical toolbox"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "blue"
item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue")
starts_with = list(
@@ -47,8 +54,10 @@
/obj/item/weapon/tool/wirecutters
)
//Electrical
/obj/item/weapon/storage/toolbox/electrical
name = "electrical toolbox"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "yellow"
item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow")
starts_with = list(
@@ -67,8 +76,10 @@
new /obj/item/stack/cable_coil/random(src,30)
calibrate_size()
//Syndicate
/obj/item/weapon/storage/toolbox/syndicate
name = "black and red toolbox"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "syndicate"
item_state_slots = list(slot_r_hand_str = "toolbox_syndi", slot_l_hand_str = "toolbox_syndi")
origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1)
@@ -94,9 +105,43 @@
/obj/item/device/analyzer
)
//Brass
/obj/item/weapon/storage/toolbox/brass
name = "brass toolbox"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "brass"
item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow")
starts_with = list(
/obj/item/weapon/tool/crowbar/brass,
/obj/item/weapon/tool/wirecutters/brass,
/obj/item/weapon/tool/screwdriver/brass,
/obj/item/weapon/tool/wrench/brass,
/obj/item/weapon/weldingtool/brass
)
//Hydro
/obj/item/weapon/storage/toolbox/hydro
name = "hydroponic toolbox"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "green"
item_state_slots = list(slot_r_hand_str = "toolbox_green", slot_l_hand_str = "toolbox_green")
starts_with = list(
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/material/knife/machete/hatchet,
/obj/item/weapon/tool/wirecutters/clippers/trimmers,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/glass/beaker
)
/*
* Lunchboxes
*/
/obj/item/weapon/storage/toolbox/lunchbox
max_storage_space = ITEMSIZE_COST_SMALL * 4 //slightly smaller than a toolbox
name = "rainbow lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_rainbow"
item_state_slots = list(slot_r_hand_str = "toolbox_pink", slot_l_hand_str = "toolbox_pink")
desc = "A little lunchbox. This one is the colors of the rainbow!"
@@ -125,6 +170,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/heart
name = "heart lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_lovelyhearts"
item_state_slots = list(slot_r_hand_str = "toolbox_pink", slot_l_hand_str = "toolbox_pink")
desc = "A little lunchbox. This one has cute little hearts on it!"
@@ -134,6 +180,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/cat
name = "cat lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_sciencecatshow"
item_state_slots = list(slot_r_hand_str = "toolbox_green", slot_l_hand_str = "toolbox_green")
desc = "A little lunchbox. This one has a cute little science cat from a popular show on it!"
@@ -143,6 +190,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/nt
name = "NanoTrasen brand lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_nanotrasen"
item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue")
desc = "A little lunchbox. This one is branded with the NanoTrasen logo!"
@@ -152,6 +200,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/mars
name = "\improper Mojave university lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_marsuniversity"
item_state_slots = list(slot_r_hand_str = "toolbox_red", slot_l_hand_str = "toolbox_red")
desc = "A little lunchbox. This one is branded with the Mojave university logo!"
@@ -161,6 +210,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/cti
name = "\improper CTI lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_cti"
item_state_slots = list(slot_r_hand_str = "toolbox_blue", slot_l_hand_str = "toolbox_blue")
desc = "A little lunchbox. This one is branded with the CTI logo!"
@@ -170,6 +220,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/nymph
name = "\improper Diona nymph lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_dionanymph"
item_state_slots = list(slot_r_hand_str = "toolbox_yellow", slot_l_hand_str = "toolbox_yellow")
desc = "A little lunchbox. This one is an adorable Diona nymph on the side!"
@@ -179,6 +230,7 @@
/obj/item/weapon/storage/toolbox/lunchbox/syndicate
name = "black and red lunchbox"
icon = 'icons/obj/storage.dmi'
icon_state = "lunchbox_syndie"
item_state_slots = list(slot_r_hand_str = "toolbox_syndi", slot_l_hand_str = "toolbox_syndi")
desc = "A little lunchbox. This one is a sleek black and red, made of a durable steel!"
@@ -0,0 +1,32 @@
/*
* Brass Tools
*/
//Crowbar
/obj/item/weapon/tool/crowbar/brass
icon_state = "crowbar_brass"
item_state = "crowbar"
//Cutters
/obj/item/weapon/tool/wirecutters/brass
icon_state = "cutters_brass"
item_state = "cutters_yellow"
//Screwdriver
/obj/item/weapon/tool/screwdriver/brass
icon_state = "screwdriver_brass"
item_state = "screwdriver_black"
//Wrench
/obj/item/weapon/tool/wrench/brass
icon_state = "wrench_brass"
item_state = "wrench_brass"
//Welder
/obj/item/weapon/weldingtool/brass
name = "brass welding tool"
desc = "A welder made from brass fittings."
icon_state = "brasswelder"
max_fuel = 20
origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2)
matter = list(MAT_STEEL = 70, MAT_GLASS = 60)
@@ -1,7 +1,6 @@
/*
* Crowbar
*/
/obj/item/weapon/tool/crowbar
name = "crowbar"
desc = "Used to remove floors and to pry open doors."
@@ -27,6 +26,10 @@
icon_state = "red_crowbar"
item_state = "crowbar_red"
/obj/item/weapon/tool/crowbar/old
icon = 'icons/obj/tools.dmi'
icon_state = "old_crowbar"
item_state = "crowbar"
/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar
name = "Precursor Alpha Object - Hard Light Pry Tool"
@@ -7,11 +7,11 @@
desc = "A steel bar with a wedge, designed specifically for opening unpowered doors in an emergency. It comes in a variety of configurations - collect them all!"
icon = 'icons/obj/tools_vr.dmi'
icon_state = "prybar"
item_state = "crowbar"
slot_flags = SLOT_BELT
force = 4
throwforce = 5
pry = 1
item_state = "crowbar"
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(MAT_STEEL = 30)
@@ -21,7 +21,7 @@
//R&D tech level
origin_tech = list(TECH_ENGINEERING = 1)
tool_qualities = list(TOOL_WELDER)
//Welding tool specific stuff
@@ -375,7 +375,7 @@
/obj/item/weapon/weldingtool/hugetank
name = "upgraded welding tool"
desc = "A much larger welder with a huge tank."
icon_state = "indwelder"
icon_state = "upindwelder"
max_fuel = 80
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 3)
@@ -392,6 +392,9 @@
toolspeed = 2
eye_safety_modifier = 1 // Safer on eyes.
/obj/item/weapon/weldingtool/mini/two
icon_state = "miniwelder2"
/datum/category_item/catalogue/anomalous/precursor_a/alien_welder
name = "Precursor Alpha Object - Self Refueling Exothermic Tool"
desc = "An unwieldly tool which somewhat resembles a weapon, due to \
@@ -6,6 +6,7 @@
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
item_state = "cutters"
center_of_mass = list("x" = 18,"y" = 10)
slot_flags = SLOT_BELT
force = 6
@@ -26,9 +27,20 @@
var/random_color = TRUE
/obj/item/weapon/tool/wirecutters/New()
if(random_color && prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
if(random_color)
switch(pick("red","blue","yellow"))
if ("red")
icon_state = "cutters"
item_state = "cutters"
if ("blue")
icon_state = "cutters-b"
item_state = "cutters_blue"
if ("yellow")
icon_state = "cutters-y"
item_state = "cutters_yellow"
if (prob(75))
src.pixel_y = rand(0, 16)
..()
/obj/item/weapon/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
@@ -25,6 +25,14 @@
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/weapon/tool/wrench/pipe
name = "pipe wrench"
desc = "A wrench used for plumbing. Can make a good makeshift weapon."
icon_state = "pipe_wrench"
slot_flags = SLOT_BELT
force = 8
throwforce = 10
/obj/item/weapon/tool/wrench/hybrid // Slower and bulkier than normal power tools, but it has the power of reach. If reach even worked half the time.
name = "strange wrench"
desc = "A wrench with many common uses. Can be usually found in your hand."
@@ -40,7 +48,6 @@
toolspeed = 0.5
reach = 2
/datum/category_item/catalogue/anomalous/precursor_a/alien_wrench
name = "Precursor Alpha Object - Fastener Torque Tool"
desc = "This is an object that has a distinctive tool shape. \
+9 -2
View File
@@ -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,
+18
View File
@@ -972,3 +972,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
)
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1230,7 +1230,6 @@
#include "code\game\objects\items\devices\flash.dm"
#include "code\game\objects\items\devices\flash_vr.dm"
#include "code\game\objects\items\devices\flashlight.dm"
#include "code\game\objects\items\devices\flashlight_vr.dm"
#include "code\game\objects\items\devices\floor_painter.dm"
#include "code\game\objects\items\devices\geiger.dm"
#include "code\game\objects\items\devices\gps.dm"
@@ -1497,6 +1496,7 @@
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
#include "code\game\objects\items\weapons\tanks\tank_types_vr.dm"
#include "code\game\objects\items\weapons\tanks\tanks.dm"
#include "code\game\objects\items\weapons\tools\brass.dm"
#include "code\game\objects\items\weapons\tools\crowbar.dm"
#include "code\game\objects\items\weapons\tools\crowbar_vr.dm"
#include "code\game\objects\items\weapons\tools\screwdriver.dm"