From a82e0b9ee5add65cb6c31a31e9f3879840a2ea8f Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Sat, 7 Dec 2019 09:45:38 +0100
Subject: [PATCH 1/2] Buffs clown ops by removing their clumsiness and adding a
new trait to be used in place of several clown role checks.
---
code/__DEFINES/traits.dm | 2 ++
code/game/gamemodes/clown_ops/clown_ops.dm | 1 -
code/modules/antagonists/nukeop/clownop.dm | 8 ++++++++
code/modules/clothing/shoes/miscellaneous.dm | 4 ++--
code/modules/clothing/shoes/taeclowndo.dm | 2 +-
code/modules/clothing/spacesuits/hardsuit.dm | 2 +-
code/modules/jobs/job_types/clown.dm | 2 ++
code/modules/mob/living/carbon/human/human_defense.dm | 2 +-
code/modules/projectiles/guns/ballistic/revolver.dm | 2 +-
code/modules/projectiles/pins.dm | 2 +-
code/modules/surgery/organs/vocal_cords.dm | 2 +-
code/modules/vehicles/cars/clowncar.dm | 2 +-
12 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index 14dbd97ffa..c36c018ba5 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -163,6 +163,7 @@
#define TRAIT_FRIENDLY "friendly"
#define TRAIT_ASSBLASTUSA "assblastusa"
#define TRAIT_CULT_EYES "cult_eyes"
+#define TRAIT_CLOWN_MENTALITY "clown_mentality" // The future is now, clownman.
#define TRAIT_FREESPRINT "free_sprinting"
@@ -218,4 +219,5 @@
#define NINJA_SUIT_TRAIT "ninja-suit"
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
+#define NUKEOP_ANTAGONIST "nukeop-antagonist"
#define MADE_UNCLONEABLE "made-uncloneable"
diff --git a/code/game/gamemodes/clown_ops/clown_ops.dm b/code/game/gamemodes/clown_ops/clown_ops.dm
index 49a336e16a..11898701fa 100644
--- a/code/game/gamemodes/clown_ops/clown_ops.dm
+++ b/code/game/gamemodes/clown_ops/clown_ops.dm
@@ -57,7 +57,6 @@
..()
if(visualsOnly)
return
- H.dna.add_mutation(CLOWNMUT)
H.dna.add_mutation(SMILE)
/datum/outfit/syndicate/clownop/leader
diff --git a/code/modules/antagonists/nukeop/clownop.dm b/code/modules/antagonists/nukeop/clownop.dm
index 43e62c4638..58b492b578 100644
--- a/code/modules/antagonists/nukeop/clownop.dm
+++ b/code/modules/antagonists/nukeop/clownop.dm
@@ -5,6 +5,14 @@
antagpanel_category = "ClownOp"
nukeop_outfit = /datum/outfit/syndicate/clownop
+/datum/antagonist/nukeop/clownop/on_gain()
+ . = ..()
+ ADD_TRAIT(owner, TRAIT_CLOWN_MENTALITY, NUKEOP_ANTAGONIST)
+
+/datum/antagonist/nukeop/clownop/on_removal()
+ REMOVE_TRAIT(owner, TRAIT_CLOWN_MENTALITY, NUKEOP_ANTAGONIST)
+ return ..()
+
/datum/antagonist/nukeop/leader/clownop
name = "Clown Operative Leader"
roundend_category = "clown operatives"
diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm
index 080d9281cf..96e73c7571 100644
--- a/code/modules/clothing/shoes/miscellaneous.dm
+++ b/code/modules/clothing/shoes/miscellaneous.dm
@@ -89,12 +89,12 @@
/obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot)
. = ..()
- if(user.mind && user.mind.assigned_role == "Clown")
+ if(user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY))
SEND_SIGNAL(user, COMSIG_CLEAR_MOOD_EVENT, "noshoes")
/obj/item/clothing/shoes/clown_shoes/dropped(mob/user)
. = ..()
- if(user.mind && user.mind.assigned_role == "Clown")
+ if(user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY))
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "noshoes", /datum/mood_event/noshoes)
/obj/item/clothing/shoes/clown_shoes/jester
diff --git a/code/modules/clothing/shoes/taeclowndo.dm b/code/modules/clothing/shoes/taeclowndo.dm
index f2bbdf0ceb..7c891dbde4 100644
--- a/code/modules/clothing/shoes/taeclowndo.dm
+++ b/code/modules/clothing/shoes/taeclowndo.dm
@@ -13,7 +13,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
- if(!(HAS_TRAIT(H, TRAIT_CLUMSY)) && !(H.mind && H.mind.assigned_role == "Clown"))
+ if(!(HAS_TRAIT(H, TRAIT_CLUMSY)) && !(H.mind && HAS_TRAIT(H.mind, TRAIT_CLOWN_MENTALITY)))
return
if(slot == SLOT_SHOES)
spells = new
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index eda12d66a9..fd8c5559b0 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -591,7 +591,7 @@
if(!..() || !ishuman(M))
return FALSE
var/mob/living/carbon/human/H = M
- if(H.mind.assigned_role == "Clown")
+ if(M.mind && HAS_TRAIT(M.mind, TRAIT_CLOWN_MENTALITY))
return TRUE
else
return FALSE
diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm
index 922b335a39..f8a7e70473 100644
--- a/code/modules/jobs/job_types/clown.dm
+++ b/code/modules/jobs/job_types/clown.dm
@@ -14,6 +14,8 @@
access = list(ACCESS_THEATRE)
minimal_access = list(ACCESS_THEATRE)
+ mind_traits = list(TRAIT_CLOWN_MENTALITY)
+
display_order = JOB_DISPLAY_ORDER_CLOWN
/datum/outfit/job/clown
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index f9fa5d84da..ffc1c2ce26 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -649,7 +649,7 @@
if(mind)
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer") )
gain = 100
- if(mind.assigned_role == "Clown")
+ if(HAS_TRAIT(mind, TRAIT_CLOWN_MENTALITY))
gain = rand(-300, 300)
investigate_log("([key_name(src)]) has been consumed by the singularity.", INVESTIGATE_SINGULO) //Oh that's where the clown ended up!
gib()
diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm
index d1a5f12888..c2206fcea8 100644
--- a/code/modules/projectiles/guns/ballistic/revolver.dm
+++ b/code/modules/projectiles/guns/ballistic/revolver.dm
@@ -352,7 +352,7 @@
clumsy_check = 0
/obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user)
- if((HAS_TRAIT(user, TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown"))
+ if((HAS_TRAIT(user, TRAIT_CLUMSY)) || (user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY)))
return ..()
if(process_fire(user, user, FALSE, null, BODY_ZONE_HEAD))
user.visible_message("[user] somehow manages to shoot [user.p_them()]self in the face!", "You somehow shoot yourself in the face! How the hell?!")
diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm
index 1e2070de1b..0465a611cd 100644
--- a/code/modules/projectiles/pins.dm
+++ b/code/modules/projectiles/pins.dm
@@ -135,7 +135,7 @@
// A gun with ultra-honk pin is useful for clown and useless for everyone else.
/obj/item/firing_pin/clown/ultra/pin_auth(mob/living/user)
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
- if(user && (!(HAS_TRAIT(user, TRAIT_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")))
+ if(user && (!(HAS_TRAIT(user, TRAIT_CLUMSY)) && !(user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY))))
return FALSE
return TRUE
diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm
index dedff3ae04..d3312954ea 100644
--- a/code/modules/surgery/organs/vocal_cords.dm
+++ b/code/modules/surgery/organs/vocal_cords.dm
@@ -560,7 +560,7 @@
else if((findtext(message, honk_words)))
cooldown = COOLDOWN_MEME
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, get_turf(user), 'sound/items/bikehorn.ogg', 300, 1), 25)
- if(user.mind && user.mind.assigned_role == "Clown")
+ if(user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY))
for(var/mob/living/carbon/C in listeners)
C.slip(140 * power_multiplier)
cooldown = COOLDOWN_MEME
diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm
index a2a9c37cfd..1415604aff 100644
--- a/code/modules/vehicles/cars/clowncar.dm
+++ b/code/modules/vehicles/cars/clowncar.dm
@@ -21,7 +21,7 @@
/obj/vehicle/sealed/car/clowncar/auto_assign_occupant_flags(mob/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
- if(H.mind && H.mind.assigned_role == "Clown") //Ensures only clowns can drive the car. (Including more at once)
+ if(H.mind && HAS_TRAIT(H.mind, TRAIT_CLOWN_MENTALITY)) //Ensures only clowns can drive the car. (Including more at once)
add_control_flags(M, VEHICLE_CONTROL_DRIVE|VEHICLE_CONTROL_PERMISSION)
return
add_control_flags(M, VEHICLE_CONTROL_KIDNAPPED)
From 19b9cbbb69f6e87dc8906c4e8fb54bfab84e993b Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Sat, 7 Dec 2019 09:58:37 +0100
Subject: [PATCH 2/2] F
---
code/modules/clothing/spacesuits/hardsuit.dm | 1 -
1 file changed, 1 deletion(-)
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index fd8c5559b0..1782f7d3ce 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -590,7 +590,6 @@
/obj/item/clothing/suit/space/hardsuit/clown/mob_can_equip(mob/M, slot)
if(!..() || !ishuman(M))
return FALSE
- var/mob/living/carbon/human/H = M
if(M.mind && HAS_TRAIT(M.mind, TRAIT_CLOWN_MENTALITY))
return TRUE
else