mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-31 20:43:38 +00:00
[MIRROR] improved robot HUD handling (#7381)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!istype(target))
|
||||
if(!istype(target) || !target.module)
|
||||
return
|
||||
|
||||
if(!target.module.modules)
|
||||
@@ -45,6 +45,7 @@
|
||||
robot.module.contents.Remove(add_item)
|
||||
target.module.modules.Add(add_item)
|
||||
target.module.contents.Add(add_item)
|
||||
target.hud_used.update_robot_modules_display()
|
||||
to_chat(usr, "<span class='danger'>You added \"[add_item]\" to [target].</span>")
|
||||
if(istype(add_item, /obj/item/stack/))
|
||||
var/obj/item/stack/item_with_synth = add_item
|
||||
@@ -94,6 +95,8 @@
|
||||
if(!istype(selected_module_module, /obj/item/))
|
||||
break
|
||||
to_chat(usr, "<span class='danger'>You removed \"[selected_module_module]\" from [target]</span>")
|
||||
target.uneq_all()
|
||||
target.hud_used.update_robot_modules_display(TRUE)
|
||||
target.module.emag.Remove(selected_module_module)
|
||||
target.module.modules.Remove(selected_module_module)
|
||||
target.module.contents.Remove(selected_module_module)
|
||||
|
||||
Reference in New Issue
Block a user