From 7be148b98f885b3e4be9528ae3af73c3f5b49091 Mon Sep 17 00:00:00 2001 From: Shadowmech88 Date: Fri, 27 May 2016 00:28:06 -0400 Subject: [PATCH] Highlander Changes (#9931) * Highlanders will now receive a full heal if they decapitate another highlander. Highlanders can no longer use machinery, guns, or vehicles. Silicons will now become humans when the highlander button is pressed. * Fixes stuff. * Adds string define for "highlander". Puts the code for making a tracker effect into its own proc. All highlanders are now permahulks. * Plasmamen no longer lose their suits, helmets, tanks, or masks when made into highlanders. Vox no longer lose their tanks or masks. --- code/game/gamemodes/cult/runes.dm | 4 +- code/game/gamemodes/wizard/soulstone.dm | 14 ++----- code/game/objects/effects/trackers.dm | 13 +++++++ .../objects/structures/vehicles/vehicle.dm | 11 +++--- code/modules/admin/admin.dm | 2 +- code/modules/admin/verbs/onlyone.dm | 39 ++++++++++++++++--- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/organs/organ_external.dm | 11 +++++- code/setup.dm | 4 +- html/changelogs/Shadowmech88.yml | 9 +++++ 10 files changed, 81 insertions(+), 28 deletions(-) create mode 100644 html/changelogs/Shadowmech88.yml diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index fdb46e4c091..0becfde93f6 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -394,9 +394,7 @@ spawn() for(var/i = 0;i < 2;i++) for(var/turf/T in drain_turflist) - var/obj/effect/tracker/drain/Tr = getFromPool(/obj/effect/tracker/drain, T) - Tr.target = user - Tr.icon_state = pick("soul1","soul2","soul3") + make_tracker_effects(T, user, 1, "soul", 3, /obj/effect/tracker/drain) sleep(1) if(user.bhunger) diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 580a25b7d8a..2b573573615 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -310,17 +310,9 @@ if(add_target && add_target.loc) T2 = get_turf(add_target) - spawn() - for(var/i = 0;i < 10;i++) - var/obj/effect/tracker/soul/Tr = getFromPool(/obj/effect/tracker/soul, T1) - Tr.target = user - Tr.icon_state = pick("soul1","soul2","soul3") - if(T2) - var/obj/effect/tracker/soul/Tr2 = getFromPool(/obj/effect/tracker/soul, T2) - Tr2.target = user - Tr2.icon_state = pick("soul1","soul2","soul3") - sleep(1) - + make_tracker_effects(T1, user) + if(T2) + make_tracker_effects(T2, user) //Cleaning up the corpse qdel(target) diff --git a/code/game/objects/effects/trackers.dm b/code/game/objects/effects/trackers.dm index 3b553f4e18d..96772b6766f 100644 --- a/code/game/objects/effects/trackers.dm +++ b/code/game/objects/effects/trackers.dm @@ -91,3 +91,16 @@ /obj/effect/tracker/singularity_pull() return + +/proc/make_tracker_effects(tr_source, tr_destination, var/tr_number = 10, var/custom_icon_state = "soul", var/number_of_icons = 3, var/tr_type = /obj/effect/tracker/soul) + spawn() + var/list/possible_icons = list() + if(custom_icon_state) + for(var/i = 1;i <= number_of_icons;i++) + possible_icons.Add("[custom_icon_state][i]") + for(var/i = 0;i < tr_number;i++) + var/obj/effect/tracker/Tr = getFromPool(tr_type, tr_source) + Tr.target = tr_destination + if(custom_icon_state) + Tr.icon_state = pick(possible_icons) + sleep(1) \ No newline at end of file diff --git a/code/game/objects/structures/vehicles/vehicle.dm b/code/game/objects/structures/vehicles/vehicle.dm index 4511bcc2af6..fba55b54596 100644 --- a/code/game/objects/structures/vehicles/vehicle.dm +++ b/code/game/objects/structures/vehicles/vehicle.dm @@ -64,11 +64,6 @@ if(empstun < 0) empstun = 0 -/obj/structure/bed/chair/vehicle/buckle_mob(mob/M as mob, mob/user as mob) - if(isanimal(M)) return //Animals can't buckle - - ..() - /obj/structure/bed/chair/vehicle/attackby(obj/item/W, mob/user) if (istype(W, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = W @@ -222,6 +217,12 @@ /obj/structure/bed/chair/vehicle/proc/can_buckle(mob/M, mob/user) if(M != user || !ishuman(user) || !Adjacent(user) || user.restrained() || user.lying || user.stat || user.locked_to || destroyed || occupant) return 0 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.mind && H.mind.special_role == HIGHLANDER) + if(user == M) + to_chat(user, "A true highlander has no need for a mount!") + return 0 return 1 /obj/structure/bed/chair/vehicle/buckle_mob(mob/M, mob/user) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index c9931bda230..afd6950317e 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -771,7 +771,7 @@ var/global/floorIsLava = 0 Warp all Players to Prison
Triple AI mode (needs to be used in the lobby)
Everyone is the traitor
- There can only be one!
+ There can be only one!
Ghost Mode
Make all players retarded
Make all items look like guns
diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index aed5f1f5945..61e6b94c5b1 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -3,12 +3,33 @@ alert("The game hasn't started yet!") return + for(var/mob/living/silicon/S in player_list) //All silicons get made into humans so they can be highlanders, too. + if(S.isDead() || !S.client) continue + if(is_special_character(S)) continue + + var/mob/living/carbon/human/new_human = new /mob/living/carbon/human(S.loc, delay_ready_dna=1) + new_human.setGender(pick(MALE, FEMALE)) //The new human's gender will be random + var/datum/preferences/A = new() //Randomize appearance for the human + A.randomize_appearance_for(new_human) + new_human.generate_name() + new_human.languages |= S.languages + if(S.default_language) new_human.default_language = S.default_language + if(S.mind) + S.mind.transfer_to(new_human) + else + new_human.key = S.key + qdel(S) + for(var/mob/living/carbon/human/H in player_list) - if(H.stat == 2 || !(H.client)) continue + if(H.isDead() || !H.client) continue if(is_special_character(H)) continue ticker.mode.traitors += H.mind - H.mind.special_role = "traitor" + H.mind.special_role = HIGHLANDER + + H.mutations.Add(M_HULK) //all highlanders are permahulks + H.update_mutations() + H.update_body() /* This never worked. var/datum/objective/steal/steal_objective = new @@ -21,7 +42,7 @@ hijack_objective.owner = H.mind H.mind.objectives += hijack_objective - to_chat(H, "You are the traitor.") + to_chat(H, "You are a highlander!") var/obj_count = 1 for(var/datum/objective/OBJ in H.mind.objectives) to_chat(H, "Objective #[obj_count]: [OBJ.explanation_text]") @@ -30,11 +51,19 @@ for (var/obj/item/I in H) if (istype(I, /obj/item/weapon/implant)) continue - del(I) + if(isplasmaman(H)) //Plasmamen don't lose their plasma gear since they need it to live. + if(!(istype(I, /obj/item/clothing/suit/space/plasmaman) || istype(I, /obj/item/clothing/head/helmet/space/plasmaman) || istype(I, /obj/item/weapon/tank/plasma/plasmaman) || istype(I, /obj/item/clothing/mask/breath))) + qdel(I) + else if(isvox(H)) //Vox don't lose their N2 gear since they need it to live. + if(!(istype(I, /obj/item/weapon/tank/nitrogen) || istype(I, /obj/item/clothing/mask/breath/vox))) + qdel(I) + else + qdel(I) H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears) - H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head) + if(!isplasmaman(H)) //Plasmamen don't get a beret since they need their helmet to not burn to death. + H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head) H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_l_hand) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(H.loc), slot_l_store) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cbe880e942c..f0830fa9e99 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1843,4 +1843,4 @@ if(lying) layer = MOB_LAYER - 0.1 //so we move under bedsheets else - layer = MOB_LAYER \ No newline at end of file + layer = MOB_LAYER diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 523b4241963..08631e7ddf4 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -625,7 +625,7 @@ Note that amputating the affected organ does in fact remove the infection from t src.status &= ~ORGAN_BLEEDING src.status &= ~ORGAN_SPLINTED src.status &= ~ORGAN_DEAD - + for(var/implant in implants) qdel(implant) @@ -1382,6 +1382,15 @@ obj/item/weapon/organ/head/New(loc, mob/living/carbon/human/H) brainmob.stat = 2 brainmob.death() + if(brainmob.mind && brainmob.mind.special_role == HIGHLANDER) + if(H.lastattacker && istype(H.lastattacker, /mob/living/carbon/human)) + var/mob/living/carbon/human/L = H.lastattacker + if(L.mind && L.mind.special_role == HIGHLANDER) + L.revive(0) + to_chat(L, "You absorb \the [brainmob]'s power!") + var/turf/T1 = get_turf(H) + make_tracker_effects(T1, L) + obj/item/weapon/organ/head/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->head brainmob = new(src) brainmob.name = H.real_name diff --git a/code/setup.dm b/code/setup.dm index fcda8450b73..5d4cf438fd0 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -1504,4 +1504,6 @@ var/proccalls = 1 #define CANCER_STAGE_METASTASIS 1200 //Cancer has maximal effects, growing out of control in the organ, and can start "colonizing" other organs very quickly, dooming the patient. 30 minutes #define EVENT_OBJECT_INDEX "o" -#define EVENT_PROC_INDEX "p" \ No newline at end of file +#define EVENT_PROC_INDEX "p" + +#define HIGHLANDER "highlander" \ No newline at end of file diff --git a/html/changelogs/Shadowmech88.yml b/html/changelogs/Shadowmech88.yml new file mode 100644 index 00000000000..020c5ca28da --- /dev/null +++ b/html/changelogs/Shadowmech88.yml @@ -0,0 +1,9 @@ +author: Shadowmech88 +delete-after: True +changes: +- rscadd: A highlander will be fully healed if he decapitates another highlander. +- rscadd: Highlanders are now perma-hulked, making them immune to stuns. +- tweak: Plasmamen and vox will now retain the gear that they require to survive when they're made into highlanders. +- tweak: Upon pressing the highlander button, all silicons will be made into humans so that they can also be highlanders. +- rscdel: Highlanders can no longer use guns as a result of their hulk power. +- rscdel: Highlanders can no longer be buckled to vehicles.