mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 15:06:39 +01:00
Merge pull request #3902 from Neerti/9/19/2017_lost_drone
Adds the Lost Drone
This commit is contained in:
@@ -20,9 +20,9 @@ AI MODULES
|
||||
origin_tech = list(TECH_DATA = 3)
|
||||
var/datum/ai_laws/laws = null
|
||||
|
||||
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
|
||||
if (istype(C, /obj/machinery/computer/aiupload))
|
||||
var/obj/machinery/computer/aiupload/comp = C
|
||||
/obj/item/weapon/aiModule/proc/install(var/atom/movable/AM, var/mob/living/user)
|
||||
if (istype(AM, /obj/machinery/computer/aiupload))
|
||||
var/obj/machinery/computer/aiupload/comp = AM
|
||||
if(comp.stat & NOPOWER)
|
||||
usr << "The upload computer has no power!"
|
||||
return
|
||||
@@ -33,10 +33,6 @@ AI MODULES
|
||||
usr << "You haven't selected an AI to transmit laws to!"
|
||||
return
|
||||
|
||||
if(ticker && ticker.mode && ticker.mode.name == "blob")
|
||||
usr << "Law uploads have been disabled by [using_map.company_name]!"
|
||||
return
|
||||
|
||||
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
else if (comp.current.see_in_dark == 0)
|
||||
@@ -52,8 +48,8 @@ AI MODULES
|
||||
usr << "Upload complete. The AI's laws have been modified."
|
||||
|
||||
|
||||
else if (istype(C, /obj/machinery/computer/borgupload))
|
||||
var/obj/machinery/computer/borgupload/comp = C
|
||||
else if (istype(AM, /obj/machinery/computer/borgupload))
|
||||
var/obj/machinery/computer/borgupload/comp = AM
|
||||
if(comp.stat & NOPOWER)
|
||||
usr << "The upload computer has no power!"
|
||||
return
|
||||
@@ -74,6 +70,31 @@ AI MODULES
|
||||
comp.current.show_laws()
|
||||
usr << "Upload complete. The robot's laws have been modified."
|
||||
|
||||
else if(istype(AM, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
if(R.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>Law Upload Error: Unit is nonfunctional.</span>")
|
||||
return
|
||||
if(R.emagged)
|
||||
to_chat(user, "<span class='warning'>Law Upload Error: Cannot obtain write access to laws.</span>")
|
||||
to_chat(R, "<span class='danger'>Law modification attempt detected. Blocking.</span>")
|
||||
return
|
||||
if(R.connected_ai)
|
||||
to_chat(user, "<span class='warning'>Law Upload Error: Unit is slaved to an AI.</span>")
|
||||
return
|
||||
|
||||
R.visible_message("<span class='danger'>\The [user] slides a law module into \the [R].</span>")
|
||||
to_chat(R, "<span class='danger'>Local law upload in progress.</span>")
|
||||
to_chat(user, "<span class='notice'>Uploading laws from board. This will take a moment...</span>")
|
||||
if(do_after(user, 10 SECONDS))
|
||||
transmitInstructions(R, user)
|
||||
to_chat(R, "These are your laws now:")
|
||||
R.show_laws()
|
||||
to_chat(user, "<span class='notice'>Law upload complete. Unit's laws have been modified.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Law Upload Error: Law board was removed before upload was complete. Aborting.</span>")
|
||||
to_chat(R, "<span class='notice'>Law upload aborted.</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/aiModule/proc/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
log_law_changes(target, sender)
|
||||
@@ -109,7 +130,7 @@ AI MODULES
|
||||
targetName = targName
|
||||
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
|
||||
|
||||
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C)
|
||||
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!targetName)
|
||||
usr << "No name detected on module, please enter one."
|
||||
return 0
|
||||
@@ -135,7 +156,7 @@ AI MODULES
|
||||
targetName = targName
|
||||
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
|
||||
|
||||
/obj/item/weapon/aiModule/oneHuman/install(var/obj/machinery/computer/C)
|
||||
/obj/item/weapon/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!targetName)
|
||||
usr << "No name detected on module, please enter one."
|
||||
return 0
|
||||
@@ -231,7 +252,7 @@ AI MODULES
|
||||
target.add_supplied_law(lawpos, law)
|
||||
lawchanges.Add("The law was '[newFreeFormLaw]'")
|
||||
|
||||
/obj/item/weapon/aiModule/freeform/install(var/obj/machinery/computer/C)
|
||||
/obj/item/weapon/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
return 0
|
||||
@@ -342,7 +363,7 @@ AI MODULES
|
||||
target.add_inherent_law(law)
|
||||
lawchanges.Add("The law is '[newFreeFormLaw]'")
|
||||
|
||||
/obj/item/weapon/aiModule/freeformcore/install(var/obj/machinery/computer/C)
|
||||
/obj/item/weapon/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
return 0
|
||||
@@ -371,7 +392,7 @@ AI MODULES
|
||||
target.add_ion_law(law)
|
||||
target.show_laws()
|
||||
|
||||
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C)
|
||||
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user)
|
||||
if(!newFreeFormLaw)
|
||||
usr << "No law detected on module, please create one."
|
||||
return 0
|
||||
|
||||
@@ -249,4 +249,35 @@
|
||||
|
||||
results += ..()
|
||||
|
||||
return results
|
||||
return results
|
||||
|
||||
// Rare version of a baton that causes lesser lifeforms to really hate the user and attack them.
|
||||
/obj/item/weapon/melee/baton/shocker
|
||||
name = "shocker"
|
||||
desc = "A device that appears to arc electricity into a target to incapacitate or otherwise hurt them, similar to a stun baton. It looks inefficent."
|
||||
description_info = "Hitting a lesser lifeform with this while it is on will compel them to attack you above other nearby targets. Otherwise \
|
||||
it works like a regular stun baton, just less effectively."
|
||||
icon_state = "shocker"
|
||||
force = 10
|
||||
throwforce = 5
|
||||
agonyforce = 25 // Less efficent than a regular baton.
|
||||
attack_verb = list("poked")
|
||||
|
||||
/obj/item/weapon/melee/baton/shocker/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
..(target, user, hit_zone)
|
||||
if(istype(target, /mob/living/simple_animal) && status)
|
||||
var/mob/living/simple_animal/SA = target
|
||||
SA.taunt(user)
|
||||
|
||||
// Borg version, for the lost module.
|
||||
/obj/item/weapon/melee/baton/shocker/robot
|
||||
|
||||
/obj/item/weapon/melee/baton/shocker/robot/attack_self(mob/user)
|
||||
//try to find our power cell
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if (istype(R))
|
||||
bcell = R.cell
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/melee/baton/shocker/robot/attackby(obj/item/weapon/W, mob/user)
|
||||
return
|
||||
@@ -706,11 +706,11 @@
|
||||
/obj/item/weapon/weldingtool/electric/get_max_fuel()
|
||||
if(use_external_power)
|
||||
var/obj/item/weapon/cell/external = get_external_power_supply()
|
||||
return external.maxcharge
|
||||
if(external)
|
||||
return external.maxcharge
|
||||
else if(power_supply)
|
||||
return power_supply.maxcharge
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null)
|
||||
if(!welding)
|
||||
|
||||
Reference in New Issue
Block a user