Adds Borg Pickup (#17474)

* Adds silicon pickup and associated toggle.

* FALSE, not null for startval

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Ectype
2025-04-12 12:30:37 -05:00
committed by GitHub
parent 9c8bacd22a
commit 22e8619432
2 changed files with 32 additions and 5 deletions

View File

@@ -16,6 +16,7 @@
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
var/lights_on = 0 // Is our integrated light on?
var/grabbable = FALSE //disables/enables pick-up mechanics.
var/robot_light_col = "#FFFFFF"
var/used_power_this_tick = 0
var/sight_mode = 0
@@ -510,6 +511,12 @@
to_chat(src, span_filter_notice("You harmlessly spark."))
spark_system.start()
/mob/living/silicon/robot/verb/toggle_grabbability() // Grisp the preyborgs with consent (and allows for your borg to still be pet).
set category = "Abilities.Silicon"
set name = "Toggle Pickup"
grabbable = !grabbable
to_chat(src, span_filter_notice("You feel [grabbable ? "more" : "less"] grabbable."))
// this function displays jetpack pressure in the stat panel
/mob/living/silicon/robot/proc/show_jetpack_pressure()
. = list()
@@ -552,6 +559,7 @@
. += show_cell_power()
. += show_jetpack_pressure()
. += "Lights: [lights_on ? "ON" : "OFF"]"
. += "Pickup: [grabbable ? "ENABLED" : "DISABLED"]"
if(module)
for(var/datum/matter_synth/ms in module.synths)
. += "[ms.name]: [ms.energy]/[ms.max_energy]"
@@ -890,12 +898,15 @@
//Adding borg petting. Help intent pets if preferences allow, Disarm intent taps and Harm is punching(no damage)
switch(H.a_intent)
if(I_HELP)
if(client && !client.prefs.borg_petting)
visible_message(span_notice("[H] reaches out for [src], but quickly refrains from petting."))
return
if(grabbable)
attempt_to_scoop(H)
else
visible_message(span_notice("[H] pets [src]."))
return
if(client && !client.prefs.borg_petting)
visible_message(span_notice("[H] reaches out for [src], but quickly refrains from petting."))
return
else
visible_message(span_notice("[H] pets [src]."))
return
if(I_HURT)
H.do_attack_animation(src)
if(H.species.can_shred(H))
@@ -1468,6 +1479,18 @@
if(buckle_mob(M))
visible_message(span_notice("[M] starts riding [name]!"))
/mob/living/silicon/robot/get_scooped(var/mob/living/carbon/grabber, var/self_drop)
var/obj/item/holder/H = ..(grabber, self_drop)
if(!istype(H))
return
H.desc = "An all-access ID-card, shaped like a robot!"
H.icon_state = "[sprite_name]"
grabber.update_inv_l_hand()
grabber.update_inv_r_hand()
return H
/mob/living/silicon/robot/onTransitZ(old_z, new_z)
if(shell)
if(deployed && using_map.ai_shell_restricted && !(new_z in using_map.ai_shell_allowed_levels))

View File

@@ -14,6 +14,10 @@
/mob/living/carbon/human
holder_type = /obj/item/holder/micro
// Let the robots have some fun too
/mob/living/silicon/robot
holder_type = /obj/item/holder/micro
// The reverse lookup of player_sizes_list, number to name.
/proc/player_size_name(var/size_multiplier)
// (This assumes list is sorted big->small)