mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
[MIRROR] Refactored fundamental circuit components that have varying inputs. Improvements to the integrated circuit UI. Improves and rebalances the drone shell [MDB IGNORE] (#15264)
* Refactored fundamental circuit components that have varying inputs. Improvements to the integrated circuit UI. Improves and rebalances the drone shell (#68586) * Refactored fundamental circuit components that have varying inputs. Made the integrated circuit UI slightly better. * Fixes with UI * Removes logger * Ran prettier * Fixed documentation * Rebalances drone circuit * Drones can now charge in chargers Co-authored-by: Watermelon914 <hidden@ hidden.com> * Refactored fundamental circuit components that have varying inputs. Improvements to the integrated circuit UI. Improves and rebalances the drone shell Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <hidden@ hidden.com>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
name = "drone"
|
||||
icon = 'icons/obj/wiremod.dmi'
|
||||
icon_state = "setup_medium_med"
|
||||
maxHealth = 300
|
||||
health = 300
|
||||
living_flags = 0
|
||||
light_system = MOVABLE_LIGHT_DIRECTIONAL
|
||||
light_on = FALSE
|
||||
@@ -17,11 +19,30 @@
|
||||
new /obj/item/circuit_component/bot_circuit()
|
||||
), SHELL_CAPACITY_LARGE)
|
||||
|
||||
/mob/living/circuit_drone/examine(mob/user)
|
||||
. = ..()
|
||||
if(health < maxHealth)
|
||||
if(health > maxHealth/3)
|
||||
. += "[src]'s parts look loose."
|
||||
else
|
||||
. += "[src]'s parts look very loose!"
|
||||
else
|
||||
. += "[src] is in pristine condition."
|
||||
|
||||
/mob/living/circuit_drone/updatehealth()
|
||||
. = ..()
|
||||
if(health < 0)
|
||||
gib(no_brain = TRUE, no_organs = TRUE, no_bodyparts = TRUE)
|
||||
|
||||
/mob/living/circuit_drone/welder_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
if(health == maxHealth)
|
||||
balloon_alert(user, "already at maximum integrity!")
|
||||
return TRUE
|
||||
if(tool.use_tool(src, user, 1 SECONDS, volume = 50))
|
||||
heal_overall_damage(50, 50)
|
||||
return TRUE
|
||||
|
||||
/mob/living/circuit_drone/spawn_gibs()
|
||||
new /obj/effect/gibspawner/robot(drop_location(), src, get_static_viruses())
|
||||
|
||||
@@ -44,6 +65,21 @@
|
||||
/// Delay between each movement
|
||||
var/move_delay = 0.2 SECONDS
|
||||
|
||||
/obj/item/circuit_component/bot_circuit/register_shell(atom/movable/shell)
|
||||
. = ..()
|
||||
if(ismob(shell))
|
||||
RegisterSignal(shell, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, .proc/on_borg_charge)
|
||||
|
||||
/obj/item/circuit_component/bot_circuit/unregister_shell(atom/movable/shell)
|
||||
UnregisterSignal(shell, COMSIG_PROCESS_BORGCHARGER_OCCUPANT)
|
||||
return ..()
|
||||
|
||||
/obj/item/circuit_component/bot_circuit/proc/on_borg_charge(datum/source, amount)
|
||||
SIGNAL_HANDLER
|
||||
if (isnull(parent.cell))
|
||||
return
|
||||
parent.cell.give(amount)
|
||||
|
||||
/obj/item/circuit_component/bot_circuit/populate_ports()
|
||||
north = add_input_port("Move North", PORT_TYPE_SIGNAL)
|
||||
east = add_input_port("Move East", PORT_TYPE_SIGNAL)
|
||||
|
||||
Reference in New Issue
Block a user