mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-17 10:05:27 +01:00
Replace the alt click menu with the RPG Lootpanel (#17938)
* Port lootpanel without removing old obj panel * Rip out the loot panel leaving examine tab intact * some fixes * we want nice icons * that * Switch to more robust hotkey detection * Add a reminder to ctrl-r --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -397,6 +397,7 @@
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user)
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
return
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
var/pass_color = FALSE // Will the item pass its own color var to the created item? Dyed cloth, wood, etc.
|
||||
var/strict_color_stacking = FALSE // Will the stack merge with other stacks that are different colors? (Dyed cloth, wood, etc)
|
||||
var/is_building = FALSE
|
||||
|
||||
/obj/item/stack/Initialize(mapload, var/starting_amount)
|
||||
. = ..()
|
||||
@@ -158,6 +159,9 @@
|
||||
var/required = quantity*recipe.req_amount
|
||||
var/produced = min(quantity*recipe.res_amount, recipe.max_res_amount)
|
||||
|
||||
if(is_building)
|
||||
return
|
||||
|
||||
if (!can_use(required))
|
||||
if (produced>1)
|
||||
to_chat(user, span_warning("You haven't got enough [src] to build \the [produced] [recipe.title]\s!"))
|
||||
@@ -175,9 +179,12 @@
|
||||
|
||||
if (recipe.time)
|
||||
to_chat(user, span_notice("Building [recipe.title] ..."))
|
||||
is_building = TRUE
|
||||
if (!do_after(user, recipe.time))
|
||||
is_building = FALSE
|
||||
return
|
||||
|
||||
is_building = FALSE
|
||||
if (use(required))
|
||||
var/atom/O
|
||||
if(recipe.use_material)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
to_chat(user, span_notice("You can taste the sweet flavor of digital friendship. Or maybe it is something else."))
|
||||
|
||||
/obj/item/reagent_containers/food/after_trash_eaten(var/mob/living/user)
|
||||
if(!reagents.total_volume)
|
||||
if(!reagents?.total_volume)
|
||||
to_chat(user, span_notice("You can taste the flavor of garbage and leftovers. Delicious?"))
|
||||
else
|
||||
to_chat(user, span_notice("You can taste the flavor of gluttonous waste of food."))
|
||||
|
||||
Reference in New Issue
Block a user