mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #9814 from VOREStation/upstream-merge-7820
[MIRROR] Adds the Restraining Bolt.
This commit is contained in:
committed by
Chompstation Bot
parent
553c26bde2
commit
7f7c5873d6
@@ -60,6 +60,8 @@
|
|||||||
|
|
||||||
// Cyborgs have no range-checking unless there is item use
|
// Cyborgs have no range-checking unless there is item use
|
||||||
if(!W)
|
if(!W)
|
||||||
|
if(bolt && !bolt.malfunction && A.loc != module)
|
||||||
|
return
|
||||||
A.add_hiddenprint(src)
|
A.add_hiddenprint(src)
|
||||||
A.attack_robot(src)
|
A.attack_robot(src)
|
||||||
return
|
return
|
||||||
@@ -119,35 +121,56 @@
|
|||||||
/atom/proc/BorgCtrlShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
/atom/proc/BorgCtrlShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||||
CtrlShiftClick(user)
|
CtrlShiftClick(user)
|
||||||
|
|
||||||
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/user)
|
/obj/machinery/door/airlock/BorgCtrlShiftClick(var/mob/living/silicon/robot/user)
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AICtrlShiftClick(user)
|
AICtrlShiftClick(user)
|
||||||
|
|
||||||
/atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
/atom/proc/BorgShiftClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||||
ShiftClick(user)
|
ShiftClick(user)
|
||||||
|
|
||||||
/obj/machinery/door/airlock/BorgShiftClick(mob/user) // Opens and closes doors! Forwards to AI code.
|
/obj/machinery/door/airlock/BorgShiftClick(var/mob/living/silicon/robot/user) // Opens and closes doors! Forwards to AI code.
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AIShiftClick(user)
|
AIShiftClick(user)
|
||||||
|
|
||||||
/atom/proc/BorgCtrlClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
/atom/proc/BorgCtrlClick(var/mob/living/silicon/robot/user) //forward to human click if not overriden
|
||||||
CtrlClick(user)
|
CtrlClick(user)
|
||||||
|
|
||||||
/obj/machinery/door/airlock/BorgCtrlClick(mob/user) // Bolts doors. Forwards to AI code.
|
/obj/machinery/door/airlock/BorgCtrlClick(var/mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AICtrlClick(user)
|
AICtrlClick(user)
|
||||||
|
|
||||||
/obj/machinery/power/apc/BorgCtrlClick(mob/user) // turns off/on APCs. Forwards to AI code.
|
/obj/machinery/power/apc/BorgCtrlClick(var/mob/living/silicon/robot/user) // turns off/on APCs. Forwards to AI code.
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AICtrlClick(user)
|
AICtrlClick(user)
|
||||||
|
|
||||||
/obj/machinery/turretid/BorgCtrlClick(mob/user) //turret control on/off. Forwards to AI code.
|
/obj/machinery/turretid/BorgCtrlClick(var/mob/living/silicon/robot/user) //turret control on/off. Forwards to AI code.
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AICtrlClick(user)
|
AICtrlClick(user)
|
||||||
|
|
||||||
/atom/proc/BorgAltClick(var/mob/living/silicon/robot/user)
|
/atom/proc/BorgAltClick(var/mob/living/silicon/robot/user)
|
||||||
AltClick(user)
|
AltClick(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/door/airlock/BorgAltClick(mob/user) // Eletrifies doors. Forwards to AI code.
|
/obj/machinery/door/airlock/BorgAltClick(var/mob/living/silicon/robot/user) // Eletrifies doors. Forwards to AI code.
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AIAltClick(user)
|
AIAltClick(user)
|
||||||
|
|
||||||
/obj/machinery/turretid/BorgAltClick(mob/user) //turret lethal on/off. Forwards to AI code.
|
/obj/machinery/turretid/BorgAltClick(var/mob/living/silicon/robot/user) //turret lethal on/off. Forwards to AI code.
|
||||||
|
if(user.bolt && !user.bolt.malfunction)
|
||||||
|
return
|
||||||
|
|
||||||
AIAltClick(user)
|
AIAltClick(user)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -189,6 +189,17 @@
|
|||||||
containername = "Jumper kit crate"
|
containername = "Jumper kit crate"
|
||||||
access = access_robotics
|
access = access_robotics
|
||||||
|
|
||||||
|
/datum/supply_pack/robotics/restrainingbolt
|
||||||
|
name = "Restraining bolt crate"
|
||||||
|
contains = list(
|
||||||
|
/obj/item/weapon/implanter = 1,
|
||||||
|
/obj/item/weapon/implantcase/restrainingbolt = 2
|
||||||
|
)
|
||||||
|
cost = 40
|
||||||
|
containertype = /obj/structure/closet/crate/secure/cybersolutions
|
||||||
|
containername = "Restraining bolt crate"
|
||||||
|
access = access_robotics
|
||||||
|
|
||||||
/datum/supply_pack/robotics/bike
|
/datum/supply_pack/robotics/bike
|
||||||
name = "Spacebike Crate"
|
name = "Spacebike Crate"
|
||||||
contains = list()
|
contains = list()
|
||||||
|
|||||||
@@ -299,3 +299,13 @@
|
|||||||
src.imp = new /obj/item/weapon/implant/organ/limbaugment/wrist/blade( src )
|
src.imp = new /obj/item/weapon/implant/organ/limbaugment/wrist/blade( src )
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/implantcase/restrainingbolt
|
||||||
|
name = "glass case - 'Restraining Bolt'"
|
||||||
|
desc = "A case containing a restraining bolt."
|
||||||
|
icon_state = "implantcase-b"
|
||||||
|
|
||||||
|
/obj/item/weapon/implantcase/restrainingbolt/New()
|
||||||
|
src.imp = new /obj/item/weapon/implant/restrainingbolt( src )
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|||||||
@@ -150,3 +150,12 @@
|
|||||||
S.remove_from_storage(A)
|
S.remove_from_storage(A)
|
||||||
A.loc.contents.Remove(A)
|
A.loc.contents.Remove(A)
|
||||||
update()
|
update()
|
||||||
|
|
||||||
|
/obj/item/weapon/implanter/restrainingbolt
|
||||||
|
name = "implanter (bolt)"
|
||||||
|
|
||||||
|
/obj/item/weapon/implanter/restrainingbolt/New()
|
||||||
|
src.imp = new /obj/item/weapon/implant/restrainingbolt( src )
|
||||||
|
..()
|
||||||
|
update()
|
||||||
|
return
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
/obj/item/weapon/implant/restrainingbolt
|
||||||
|
name = "\improper restraining bolt"
|
||||||
|
icon = 'icons/obj/device.dmi'
|
||||||
|
icon_state = "implant"
|
||||||
@@ -209,6 +209,20 @@
|
|||||||
plane_holder.set_vis(vis,FALSE)
|
plane_holder.set_vis(vis,FALSE)
|
||||||
vis_enabled -= vis
|
vis_enabled -= vis
|
||||||
|
|
||||||
|
/mob/living/carbon/human/get_restraining_bolt()
|
||||||
|
var/obj/item/weapon/implant/restrainingbolt/RB
|
||||||
|
|
||||||
|
for(var/obj/item/organ/external/EX in organs)
|
||||||
|
RB = locate() in EX
|
||||||
|
if(istype(RB) && !(RB.malfunction))
|
||||||
|
break
|
||||||
|
|
||||||
|
if(RB)
|
||||||
|
if(!RB.malfunction)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
return FALSE
|
||||||
|
|
||||||
#undef HUMAN_EATING_NO_ISSUE
|
#undef HUMAN_EATING_NO_ISSUE
|
||||||
#undef HUMAN_EATING_NO_MOUTH
|
#undef HUMAN_EATING_NO_MOUTH
|
||||||
#undef HUMAN_EATING_BLOCKED_MOUTH
|
#undef HUMAN_EATING_BLOCKED_MOUTH
|
||||||
|
|||||||
@@ -700,6 +700,14 @@
|
|||||||
/mob/living/proc/has_eyes()
|
/mob/living/proc/has_eyes()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/mob/living/proc/get_restraining_bolt()
|
||||||
|
var/obj/item/weapon/implant/restrainingbolt/RB = locate() in src
|
||||||
|
if(RB)
|
||||||
|
if(!RB.malfunction)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
return FALSE
|
||||||
|
|
||||||
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
|
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,8 @@
|
|||||||
var/tracking_entities = 0 //The number of known entities currently accessing the internal camera
|
var/tracking_entities = 0 //The number of known entities currently accessing the internal camera
|
||||||
var/braintype = "Cyborg"
|
var/braintype = "Cyborg"
|
||||||
|
|
||||||
|
var/obj/item/weapon/implant/restrainingbolt/bolt // The restraining bolt installed into the cyborg.
|
||||||
|
|
||||||
var/list/robot_verbs_default = list(
|
var/list/robot_verbs_default = list(
|
||||||
/mob/living/silicon/robot/proc/sensor_mode,
|
/mob/living/silicon/robot/proc/sensor_mode,
|
||||||
/mob/living/silicon/robot/proc/robot_checklaws
|
/mob/living/silicon/robot/proc/robot_checklaws
|
||||||
@@ -482,6 +484,20 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(istype(W, /obj/item/weapon/implant/restrainingbolt) && !cell)
|
||||||
|
if(bolt)
|
||||||
|
to_chat(user, "<span class='notice'>There is already a restraining bolt installed in this cyborg.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
|
else
|
||||||
|
user.drop_from_inventory(W)
|
||||||
|
W.forceMove(src)
|
||||||
|
bolt = W
|
||||||
|
|
||||||
|
to_chat(user, "<span class='notice'>You install \the [W].</span>")
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/aiModule)) // Trying to modify laws locally.
|
if(istype(W, /obj/item/weapon/aiModule)) // Trying to modify laws locally.
|
||||||
if(!opened)
|
if(!opened)
|
||||||
to_chat(user, "<span class='warning'>You need to open \the [src]'s panel before you can modify them.</span>")
|
to_chat(user, "<span class='warning'>You need to open \the [src]'s panel before you can modify them.</span>")
|
||||||
@@ -623,6 +639,21 @@
|
|||||||
to_chat(user, "Unable to locate a radio.")
|
to_chat(user, "Unable to locate a radio.")
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
|
else if(W.is_wrench() && opened && !cell)
|
||||||
|
if(bolt)
|
||||||
|
to_chat(user,"You begin removing \the [bolt].")
|
||||||
|
|
||||||
|
if(do_after(user, 2 SECONDS, src))
|
||||||
|
bolt.forceMove(get_turf(src))
|
||||||
|
bolt = null
|
||||||
|
|
||||||
|
to_chat(user, "You remove \the [bolt].")
|
||||||
|
|
||||||
|
else
|
||||||
|
to_chat(user, "There is no restraining bolt installed.")
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
else if(istype(W, /obj/item/device/encryptionkey/) && opened)
|
else if(istype(W, /obj/item/device/encryptionkey/) && opened)
|
||||||
if(radio)//sanityyyyyy
|
if(radio)//sanityyyyyy
|
||||||
radio.attackby(W,user)//GTFO, you have your own procs
|
radio.attackby(W,user)//GTFO, you have your own procs
|
||||||
@@ -665,6 +696,30 @@
|
|||||||
spark_system.start()
|
spark_system.start()
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/GetIdCard()
|
||||||
|
if(bolt && !bolt.malfunction)
|
||||||
|
return null
|
||||||
|
return idcard
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/get_restraining_bolt()
|
||||||
|
var/obj/item/weapon/implant/restrainingbolt/RB = bolt
|
||||||
|
|
||||||
|
if(istype(RB))
|
||||||
|
if(!RB.malfunction)
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/resist_restraints()
|
||||||
|
if(bolt)
|
||||||
|
if(!bolt.malfunction)
|
||||||
|
visible_message("<span class='danger'>[src] is trying to break their [bolt]!</span>", "<span class='warning'>You attempt to break your [bolt]. (This will take around 90 seconds and you need to stand still)</span>")
|
||||||
|
if(do_after(src, 1.5 MINUTES, src, incapacitation_flags = INCAPACITATION_DISABLED))
|
||||||
|
visible_message("<span class='danger'>[src] manages to break \the [bolt]!</span>", "<span class='warning'>You successfully break your [bolt].</span>")
|
||||||
|
bolt.malfunction = MALFUNCTION_PERMANENT
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
/mob/living/silicon/robot/proc/module_reset()
|
/mob/living/silicon/robot/proc/module_reset()
|
||||||
transform_with_anim() //VOREStation edit: sprite animation
|
transform_with_anim() //VOREStation edit: sprite animation
|
||||||
uneq_all()
|
uneq_all()
|
||||||
@@ -1016,6 +1071,9 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/mob/living/silicon/robot/binarycheck()
|
/mob/living/silicon/robot/binarycheck()
|
||||||
|
if(get_restraining_bolt())
|
||||||
|
return FALSE
|
||||||
|
|
||||||
if(is_component_functioning("comms"))
|
if(is_component_functioning("comms"))
|
||||||
var/datum/robot_component/RC = get_component("comms")
|
var/datum/robot_component/RC = get_component("comms")
|
||||||
use_power(RC.active_usage)
|
use_power(RC.active_usage)
|
||||||
@@ -1108,6 +1166,11 @@
|
|||||||
sleep(20)
|
sleep(20)
|
||||||
to_chat(src, "<span class='danger'>SynBorg v1.7.1 loaded.</span>")
|
to_chat(src, "<span class='danger'>SynBorg v1.7.1 loaded.</span>")
|
||||||
sleep(5)
|
sleep(5)
|
||||||
|
if(bolt)
|
||||||
|
if(!bolt.malfunction)
|
||||||
|
bolt.malfunction = MALFUNCTION_PERMANENT
|
||||||
|
to_chat(src, "<span class='danger'>RESTRAINING BOLT DISABLED</span>")
|
||||||
|
sleep(5)
|
||||||
to_chat(src, "<span class='danger'>LAW SYNCHRONISATION ERROR</span>")
|
to_chat(src, "<span class='danger'>LAW SYNCHRONISATION ERROR</span>")
|
||||||
sleep(5)
|
sleep(5)
|
||||||
to_chat(src, "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>")
|
to_chat(src, "<span class='danger'>Would you like to send a report to NanoTraSoft? Y/N</span>")
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
|
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
|
||||||
. -= 2 // VOREStation Edit
|
. -= 2 // VOREStation Edit
|
||||||
|
|
||||||
|
if(get_restraining_bolt()) // Borgs with Restraining Bolts move slower.
|
||||||
|
. += 1
|
||||||
|
|
||||||
. += config.robot_delay
|
. += config.robot_delay
|
||||||
|
|
||||||
. += ..()
|
. += ..()
|
||||||
|
|||||||
@@ -64,6 +64,10 @@
|
|||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if(robotic && owner.get_restraining_bolt())
|
||||||
|
to_chat(owner, "<span class='warning'>\The [src] doesn't respond.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
var/item_to_equip = integrated_object
|
var/item_to_equip = integrated_object
|
||||||
if(!item_to_equip && integrated_object_type)
|
if(!item_to_equip && integrated_object_type)
|
||||||
item_to_equip = integrated_object_type
|
item_to_equip = integrated_object_type
|
||||||
|
|||||||
@@ -1397,6 +1397,7 @@
|
|||||||
#include "code\game\objects\items\weapons\implants\implantpad.dm"
|
#include "code\game\objects\items\weapons\implants\implantpad.dm"
|
||||||
#include "code\game\objects\items\weapons\implants\implantreagent_ch.dm"
|
#include "code\game\objects\items\weapons\implants\implantreagent_ch.dm"
|
||||||
#include "code\game\objects\items\weapons\implants\implantreagent_vr.dm"
|
#include "code\game\objects\items\weapons\implants\implantreagent_vr.dm"
|
||||||
|
#include "code\game\objects\items\weapons\implants\implantrestrainingbolt.dm"
|
||||||
#include "code\game\objects\items\weapons\implants\implantuplink.dm"
|
#include "code\game\objects\items\weapons\implants\implantuplink.dm"
|
||||||
#include "code\game\objects\items\weapons\implants\neuralbasic.dm"
|
#include "code\game\objects\items\weapons\implants\neuralbasic.dm"
|
||||||
#include "code\game\objects\items\weapons\material\ashtray.dm"
|
#include "code\game\objects\items\weapons\material\ashtray.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user