Porting update_icon improvements. Part 1.
This commit is contained in:
@@ -45,13 +45,13 @@
|
||||
if(prob(75))
|
||||
pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/update_icon()
|
||||
/obj/item/screwdriver/update_overlays()
|
||||
. = ..()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "screwdriver_screwybits")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
. += base_overlay
|
||||
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
|
||||
@@ -40,24 +40,24 @@
|
||||
reagents.add_reagent(/datum/reagent/fuel, max_fuel)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
/obj/item/weldingtool/update_icon_state()
|
||||
if(welding)
|
||||
add_overlay("[initial(icon_state)]-on")
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/weldingtool/update_overlays()
|
||||
. = ..()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
add_overlay("[initial(icon_state)][ratio]")
|
||||
update_torch()
|
||||
return
|
||||
|
||||
. += "[initial(icon_state)][ratio]"
|
||||
if(welding)
|
||||
. += "[initial(icon_state)]-on"
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
switch(welding)
|
||||
@@ -177,11 +177,6 @@
|
||||
if(get_fuel() <= 0 && welding)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
//mob icon update
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_hands(0)
|
||||
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
|
||||
/obj/item/wirecutters/update_icon()
|
||||
/obj/item/wirecutters/update_overlays()
|
||||
. = ..()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "cutters_cutty_thingy")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
. += base_overlay
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
|
||||
Reference in New Issue
Block a user