From 0dabf4fc0a19024855b805ac765efe92ebad2de6 Mon Sep 17 00:00:00 2001 From: Decius Date: Mon, 14 Jul 2014 16:27:07 -0400 Subject: [PATCH 1/5] Added in loyalty implant as a configuration... Also reorganized a few configurations to be more intuitive and readable. Just spaces and moving around on the switch thingy. Signed-off-by: Decius --- code/controllers/configuration.dm | 26 ++++++++++++++++++-------- config/example/game_options.txt | 8 ++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index f9d825d896..66747abbb5 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -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]'") diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 4fdc0f5f3f..614e696df2 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -56,3 +56,11 @@ MONKEY_DELAY 0 ALIEN_DELAY 0 METROID_DELAY 0 ANIMAL_DELAY 0 + + +### Miscellaneous ### + +## Config options which, of course, don't fit into previous categories. + +## Remove the # in front of this config option to have loyalty implants spawn by default on your server. +#USE_LOYALTY_IMPLANTS From 203c36114d478ff27478b0f3ba4d2de5f2c68f5c Mon Sep 17 00:00:00 2001 From: Decius Date: Mon, 14 Jul 2014 17:21:11 -0400 Subject: [PATCH 2/5] Made spawning with a loyalty implant compliant to configuration... Created a proc for being implanted with loyalty implant which checks for the configuration for whether or not it will work. If it is enabled, it continues on-- if it is disabled, it returns from the proc. Also made secure closets not automatically spawn them unless the config is set to allow it. Admin 'loyalty implanting' via the panel is now compliant to the configuration file. If preferred, I am willing to make an override variable to the proc that will allow admins to do it anyway. Supply pack for it commented out due to inability to make it conform. Easy enough to re-add back for anyone downstream if they wish it. Same applies to the design. Signed-off-by: Decius --- .../Sigyn/Department Sec/jobs.dm | 6 +- code/WorkInProgress/Sigyn/Softcurity/jobs.dm | 22 ++++--- .../Sigyn/Softcurity/secure_closet.dm | 2 +- code/WorkInProgress/kilakk/responseteam.dm | 4 +- code/datums/mind.dm | 60 +++++++++---------- code/datums/supplypacks.dm | 19 +++--- code/game/gamemodes/epidemic/epidemic.dm | 2 +- code/game/jobs/job/captain.dm | 9 +-- code/game/jobs/job/civilian.dm | 10 ++-- code/game/jobs/job/security.dm | 9 +-- .../objects/items/weapons/implants/implant.dm | 6 ++ code/modules/admin/verbs/striketeam.dm | 4 +- code/modules/mob/living/carbon/human/human.dm | 10 ++++ code/modules/research/designs.dm | 2 + 14 files changed, 85 insertions(+), 80 deletions(-) diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm index 66e14b040c..7f98a7b6ec 100644 --- a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm +++ b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm @@ -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() diff --git a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm index a214626d1c..243dc47c75 100644 --- a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm +++ b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm @@ -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 diff --git a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm index 88f06f98e7..e74c6fce6c 100644 --- a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm +++ b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm @@ -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) diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm index 6faafad342..8e0cdbc638 100644 --- a/code/WorkInProgress/kilakk/responseteam.dm +++ b/code/WorkInProgress/kilakk/responseteam.dm @@ -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) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 936eea26d1..cc24ed7fdb 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -510,37 +510,37 @@ datum/mind I.Del() break H << "\blue Your loyalty implant has been deactivated." - 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 - H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!" - if(src in ticker.mode.revolutionaries) - special_role = null - ticker.mode.revolutionaries -= src - src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" - if(src in ticker.mode.head_revolutionaries) - special_role = null - ticker.mode.head_revolutionaries -=src - src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" - if(src in ticker.mode.cult) - ticker.mode.cult -= src - ticker.mode.update_cult_icons_removed(src) - special_role = null - var/datum/game_mode/cult/cult = ticker.mode - if (istype(cult)) - cult.memorize_cult_objectives(src) - current << "\red The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!" - memory = "" - if(src in ticker.mode.traitors) - ticker.mode.traitors -= src - special_role = null - current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!" - log_admin("[key_name_admin(usr)] has de-traitor'ed [current].") + if("add") + H.implant_loyalty(src) + + if(config.use_loyalty_implants) // The following won't occur if there are not loyalty implants. + H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!" + if(src in ticker.mode.revolutionaries) + special_role = null + ticker.mode.revolutionaries -= src + src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" + if(src in ticker.mode.head_revolutionaries) + special_role = null + ticker.mode.head_revolutionaries -=src + src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" + if(src in ticker.mode.cult) + ticker.mode.cult -= src + ticker.mode.update_cult_icons_removed(src) + special_role = null + var/datum/game_mode/cult/cult = ticker.mode + if (istype(cult)) + cult.memorize_cult_objectives(src) + current << "\red The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!" + memory = "" + if(src in ticker.mode.traitors) + ticker.mode.traitors -= src + special_role = null + current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!" + log_admin("[key_name_admin(usr)] has de-traitor'ed [current].") + else + usr << "Loyalty implants are currently disabled for your server in the configuration files." + else if (href_list["revolution"]) current.hud_updateflag |= (1 << SPECIALROLE_HUD) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 7990329aa1..abca12f25e 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -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, diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm index d0db2d66b9..4a0712c712 100644 --- a/code/game/gamemodes/epidemic/epidemic.dm +++ b/code/game/gamemodes/epidemic/epidemic.dm @@ -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 diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index acc7c3e853..dfa159be37 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -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 << "[H.real_name] is the captain!" - var/datum/organ/external/affected = H.organs_by_name["head"] - affected.implants += L - L.part = affected + + H.implant_loyalty(src) + return 1 get_access() diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 0576e5b823..57350f087a 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -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 diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 69e9babb0a..c83c0c0ea2 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -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 diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index f8c46134c1..b9f3ef4afd 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -1,5 +1,11 @@ #define MALFUNCTION_TEMPORARY 1 #define MALFUNCTION_PERMANENT 2 + + +/mob/living/carbon/human/ + + + /obj/item/weapon/implant name = "implant" icon = 'icons/obj/device.dmi' diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index cf5b94322d..e8a92edbe3 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 56374bcd0f..a1b76fa081 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -317,6 +317,16 @@ if(armor >= 2) return +/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M) + if(!config.use_loyalty_implants) return + + 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)) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 002888e61e..38fb4994fa 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -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" From b37ce454df8586b39f6a1559d7043833d96036bc Mon Sep 17 00:00:00 2001 From: Decius Date: Mon, 14 Jul 2014 18:02:04 -0400 Subject: [PATCH 3/5] Removed from map + made implanters conform to configuration... Signed-off-by: Decius --- code/game/objects/items/weapons/implants/implantcase.dm | 3 ++- code/game/objects/items/weapons/implants/implanter.dm | 5 ++--- maps/tgstation2.dmm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 3dc57db654..9d0f40e159 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -113,7 +113,8 @@ New() - src.imp = new /obj/item/weapon/implant/loyalty( src ) + if (config.use_loyalty_implants) + src.imp = new /obj/item/weapon/implant/loyalty( src ) ..() return diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index f1f5d8521e..21d768a3aa 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -60,13 +60,12 @@ name = "implanter-loyalty" /obj/item/weapon/implanter/loyalty/New() - src.imp = new /obj/item/weapon/implant/loyalty( src ) + if(config.use_loyalty_implants) + src.imp = new /obj/item/weapon/implant/loyalty( src ) ..() update() return - - /obj/item/weapon/implanter/explosive name = "implanter (E)" diff --git a/maps/tgstation2.dmm b/maps/tgstation2.dmm index 8429057322..0186a02701 100644 --- a/maps/tgstation2.dmm +++ b/maps/tgstation2.dmm @@ -134,7 +134,7 @@ "acD" = (/obj/structure/stool/bed/chair{dir = 1},/obj/machinery/firealarm{dir = 4; pixel_x = 24},/obj/machinery/atmospherics/unary/vent_pump{dir = 1; external_pressure_bound = 101.325; on = 1; pressure_checks = 1},/turf/simulated/floor{icon_state = "red"; dir = 6},/area/security/prison) "acE" = (/obj/structure/rack,/obj/item/weapon/gun/energy/laser,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/machinery/door/window/brigdoor{dir = 4; name = "Weapons locker"; req_access_txt = "3"},/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) "acF" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/camera{c_tag = "Brig East"; dir = 8},/turf/simulated/floor{icon_state = "redcorner"; dir = 4},/area/security/brig) -"acG" = (/obj/structure/rack,/obj/item/weapon/storage/lockbox/loyalty,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) +"acG" = (/obj/structure/rack,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) "acH" = (/obj/machinery/flasher/portable,/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) "acI" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/security/brig) "acJ" = (/obj/structure/rack,/obj/item/clothing/suit/armor/riot,/obj/item/weapon/melee/baton,/obj/item/weapon/shield/riot,/obj/item/clothing/head/helmet/riot,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/window/brigdoor{dir = 8; name = "Weapons locker"; req_access_txt = "3"},/turf/simulated/floor{icon_state = "vault"; dir = 8},/area/security/warden) From 0b314561ca283f4b88ee0aaa8dab96f8ca64ab3b Mon Sep 17 00:00:00 2001 From: Decius Date: Mon, 14 Jul 2014 19:02:21 -0400 Subject: [PATCH 4/5] Now allows admin override via player panel, a small fix, and... implantation works again. Since they'll only be accessible via an admin specifically spawning it, except for in cases where it is configured to be allowed, it'll be fine. This now allows admins to incorporate loyalty implants still if they so wish for whatever reason, but it is normally inaccessible. Signed-off-by: Decius --- code/datums/mind.dm | 53 +++++++++---------- .../items/weapons/implants/implantcase.dm | 3 +- .../items/weapons/implants/implanter.dm | 3 +- code/modules/mob/living/carbon/human/human.dm | 4 +- 4 files changed, 29 insertions(+), 34 deletions(-) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index cc24ed7fdb..b749bfb07e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -512,34 +512,31 @@ datum/mind H << "\blue Your loyalty implant has been deactivated." if("add") - H.implant_loyalty(src) - - if(config.use_loyalty_implants) // The following won't occur if there are not loyalty implants. - H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!" - if(src in ticker.mode.revolutionaries) - special_role = null - ticker.mode.revolutionaries -= src - src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" - if(src in ticker.mode.head_revolutionaries) - special_role = null - ticker.mode.head_revolutionaries -=src - src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" - if(src in ticker.mode.cult) - ticker.mode.cult -= src - ticker.mode.update_cult_icons_removed(src) - special_role = null - var/datum/game_mode/cult/cult = ticker.mode - if (istype(cult)) - cult.memorize_cult_objectives(src) - current << "\red The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!" - memory = "" - if(src in ticker.mode.traitors) - ticker.mode.traitors -= src - special_role = null - current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!" - log_admin("[key_name_admin(usr)] has de-traitor'ed [current].") - else - usr << "Loyalty implants are currently disabled for your server in the configuration files." + H.implant_loyalty(H, override = TRUE) + H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!" + if(src in ticker.mode.revolutionaries) + special_role = null + ticker.mode.revolutionaries -= src + src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" + if(src in ticker.mode.head_revolutionaries) + special_role = null + ticker.mode.head_revolutionaries -=src + src << "\red The nanobots in the loyalty implant remove all thoughts about being a revolutionary. Get back to work!" + if(src in ticker.mode.cult) + ticker.mode.cult -= src + ticker.mode.update_cult_icons_removed(src) + special_role = null + var/datum/game_mode/cult/cult = ticker.mode + if (istype(cult)) + cult.memorize_cult_objectives(src) + current << "\red The nanobots in the loyalty implant remove all thoughts about being in a cult. Have a productive day!" + memory = "" + if(src in ticker.mode.traitors) + ticker.mode.traitors -= src + special_role = null + current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!" + log_admin("[key_name_admin(usr)] has de-traitor'ed [current].") + else else if (href_list["revolution"]) diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 9d0f40e159..3dc57db654 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -113,8 +113,7 @@ New() - if (config.use_loyalty_implants) - src.imp = new /obj/item/weapon/implant/loyalty( src ) + src.imp = new /obj/item/weapon/implant/loyalty( src ) ..() return diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 21d768a3aa..f92f5b759c 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -60,8 +60,7 @@ name = "implanter-loyalty" /obj/item/weapon/implanter/loyalty/New() - if(config.use_loyalty_implants) - src.imp = new /obj/item/weapon/implant/loyalty( src ) + src.imp = new /obj/item/weapon/implant/loyalty( src ) ..() update() return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a1b76fa081..4253810d28 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -317,8 +317,8 @@ if(armor >= 2) return -/mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M) - if(!config.use_loyalty_implants) 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 From 8d8e3f43d4dec3cff2baaff0a769f6875dcc22a3 Mon Sep 17 00:00:00 2001 From: Decius-R Date: Mon, 14 Jul 2014 19:14:38 -0400 Subject: [PATCH 5/5] Fixed a small mistake.. Forgot to remove where I was going to originally make a proc. Didn't see it at skim through. Fixed. --- code/game/objects/items/weapons/implants/implant.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index b9f3ef4afd..c474650f9a 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -2,10 +2,6 @@ #define MALFUNCTION_PERMANENT 2 -/mob/living/carbon/human/ - - - /obj/item/weapon/implant name = "implant" icon = 'icons/obj/device.dmi'