Skip to content

Commit

Permalink
Async and cleaning.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir committed Oct 5, 2024
1 parent 56c6356 commit bfe24ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 7 additions & 3 deletions code/game/mecha/paintkits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,14 @@
to_chat(user, span_warning("There are no skins for this mech type!"))
return ATTACK_CHAIN_PROCEED

INVOKE_ASYNC(src, PROC_REF(choose_paint), user, mech, possibilities)
return ATTACK_CHAIN_BLOCKED_ALL


/obj/item/universal_paintkit/proc/choose_paint(mob/living/user, obj/mecha/mech, list/possibilities)
var/choice = tgui_input_list(user, "Pick your skin for mech.", "Paints", possibilities)
if(!choice)
return ATTACK_CHAIN_PROCEED
if(!choice || user.incapacitated() || !user.is_in_hands(src) || !user.Adjacent(mech))
return

user.visible_message(span_notice("[user] opens [src] and customises [mech.name]."))

Expand All @@ -400,4 +405,3 @@
mech.name = chosen_kit.new_name
mech.desc = chosen_kit.new_desc
mech.update_icon(UPDATE_ICON_STATE)
return ATTACK_CHAIN_BLOCKED_ALL
6 changes: 1 addition & 5 deletions code/modules/economy/robotic_quests/robo_quests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@
/// Custom item, leave empty if you okay with standart icon
var/icon_name
var/icon_file
/// Don`t touch
var/icon/tgui_icon
/// If emag only(Really??)
var/emag_only = FALSE

Expand All @@ -156,8 +154,6 @@
if(!name)
name = path::name // It is better to know exactly what we are buying.

src.tgui_icon = icon(icon_file, icon_name, SOUTH, 1, FALSE)


/datum/roboshop_item/bluespace_core
name = "bluespace anomaly core"
Expand Down Expand Up @@ -241,7 +237,7 @@

/obj/item/disk/design_disk/roboquest/shield_breaker
name = "plasma pistol design"
desc = "his disk contains blueprints for production of plasma pistols."
desc = "This disk contains blueprints for production of plasma pistols."
design_type = /datum/design/real_plasma_pistol
hint_name = "plasma pistols"

Expand Down

0 comments on commit bfe24ed

Please sign in to comment.