Merge pull request #5620 from Decius-R/loyalty_implants

Loyalty Implants
This commit is contained in:
Zuhayr
2014-07-15 10:30:48 +09:30
18 changed files with 82 additions and 68 deletions
@@ -83,9 +83,9 @@ proc/assign_sec_to_department(var/mob/living/carbon/human/H)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
implant_loyalty(H)
return 1
/obj/item/device/radio/headset/headset_sec/department/New()
+10 -12
View File
@@ -23,9 +23,9 @@
H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/taser(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
H.implant_loyalty(src) // Will not do so if config is set to disallow.
return 1
@@ -52,9 +52,9 @@
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
H.implant_loyalty(src) // // Will not do so if config is set to disallow.
return 1
@@ -89,9 +89,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
H.implant_loyalty(src) // Will not do so if config is set to disallow.
return 1
@@ -118,9 +116,9 @@
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
H.implant_loyalty(src) // Will not do so if config is set to disallow.
return 1
/datum/job/hop
@@ -70,7 +70,7 @@
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/weapon/storage/lockbox/loyalty(src)
if (config.use_loyalty_implants) new /obj/item/weapon/storage/lockbox/loyalty(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
+1 -3
View File
@@ -231,9 +231,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
// equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) // Regular medkit
// Loyalty implants
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)
L.imp_in = src
L.implanted = 1
implant_loyalty(src)
// ID cards
var/obj/item/weapon/card/id/E = new(src)
+18 -8
View File
@@ -112,6 +112,8 @@
var/revival_cloning = 1
var/revival_brain_life = -1
var/use_loyalty_implants = 0
//Used for modifying movement speed for mobs.
//Unversal modifiers
var/run_speed = 0
@@ -521,10 +523,21 @@
config.revival_cloning = value
if("revival_brain_life")
config.revival_brain_life = value
if("organ_health_multiplier")
config.organ_health_multiplier = value / 100
if("organ_regeneration_multiplier")
config.organ_regeneration_multiplier = value / 100
if("bones_can_break")
config.bones_can_break = value
if("limbs_can_break")
config.limbs_can_break = value
if("run_speed")
config.run_speed = value
if("walk_speed")
config.walk_speed = value
if("human_delay")
config.human_delay = value
if("robot_delay")
@@ -537,14 +550,11 @@
config.slime_delay = value
if("animal_delay")
config.animal_delay = value
if("organ_health_multiplier")
config.organ_health_multiplier = value / 100
if("organ_regeneration_multiplier")
config.organ_regeneration_multiplier = value / 100
if("bones_can_break")
config.bones_can_break = value
if("limbs_can_break")
config.limbs_can_break = value
if("use_loyalty_implants")
config.use_loyalty_implants = 1
else
log_misc("Unknown setting in configuration: '[name]'")
+4 -7
View File
@@ -510,14 +510,9 @@ datum/mind
I.Del()
break
H << "\blue <Font size =3><B>Your loyalty implant has been deactivated.</B></FONT>"
if("add")
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
if("add")
H.implant_loyalty(H, override = TRUE)
H << "\red <Font size =3><B>You somehow have become the recepient of a loyalty transplant, and it just activated!</B></FONT>"
if(src in ticker.mode.revolutionaries)
special_role = null
@@ -541,6 +536,8 @@ datum/mind
special_role = null
current << "\red <FONT size = 3><B>The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!</B></FONT>"
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
else
else if (href_list["revolution"])
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+11 -8
View File
@@ -681,14 +681,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
group = "Security"
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
contains = list (/obj/item/weapon/storage/lockbox/loyalty)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "Loyalty implant crate"
access = access_armory
group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -725,6 +717,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
group = "Security"
/*
/datum/supply_packs/loyalty
name = "Loyalty implant crate"
contains = list (/obj/item/weapon/storage/lockbox/loyalty)
cost = 60
containertype = /obj/structure/closet/crate/secure
containername = "Loyalty implant crate"
access = access_armory
group = "Security"
*/
/datum/supply_packs/expenergy
name = "Experimental energy gear crate"
contains = list(/obj/item/clothing/suit/armor/laserproof,
+1 -1
View File
@@ -71,7 +71,7 @@
world << sound('sound/AI/commandreport.ogg')
// add an extra law to the AI to make sure it cooperates with the heads
var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command, any crew member with loyalty implant. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws."
var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws."
for(var/mob/living/silicon/ai/M in world)
M.add_ion_law(extra_law)
M << "\red " + extra_law
+3 -6
View File
@@ -32,13 +32,10 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
world << "<b>[H.real_name] is the captain!</b>"
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.implant_loyalty(src)
return 1
get_access()
+4 -6
View File
@@ -357,10 +357,8 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.implant_loyalty(H)
return 1
+2 -7
View File
@@ -39,12 +39,7 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 1
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.implant_loyalty(H)
return 1
@@ -165,4 +160,4 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
return 1
@@ -1,5 +1,7 @@
#define MALFUNCTION_TEMPORARY 1
#define MALFUNCTION_PERMANENT 2
/obj/item/weapon/implant
name = "implant"
icon = 'icons/obj/device.dmi'
@@ -65,8 +65,6 @@
update()
return
/obj/item/weapon/implanter/explosive
name = "implanter (E)"
+1 -3
View File
@@ -158,9 +158,7 @@ var/global/sent_strike_team = 0
equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)//Here you go Deuryn
L.imp_in = src
L.implanted = 1
implant_loyalty(src)
@@ -317,6 +317,16 @@
if(armor >= 2) return
/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default.
if(!config.use_loyalty_implants && !override) return // Nuh-uh.
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
L.imp_in = M
L.implanted = 1
var/datum/organ/external/affected = M.organs_by_name["head"]
affected.implants += L
L.part = affected
/mob/living/carbon/human/proc/is_loyalty_implanted(mob/living/carbon/human/M)
for(var/L in M.contents)
if(istype(L, /obj/item/weapon/implant/loyalty))
+2
View File
@@ -1358,6 +1358,7 @@ datum/design/nanopaste
materials = list("$metal" = 7000, "$glass" = 7000)
build_path = "/obj/item/stack/nanopaste"
/* // Removal of loyalty implants. Can't think of a way to add this to the config option.
datum/design/implant_loyal
name = "loyalty implant"
desc = "Makes you loyal or such."
@@ -1366,6 +1367,7 @@ datum/design/implant_loyal
build_type = PROTOLATHE
materials = list("$metal" = 7000, "$glass" = 7000)
build_path = "/obj/item/weapon/implant/loyalty"
*/
datum/design/implant_chem
name = "chemical implant"