From a598acf1594943d3683802d51e87ef17de609e85 Mon Sep 17 00:00:00 2001
From: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
Date: Thu, 8 Jul 2021 17:33:59 -0400
Subject: [PATCH] General Bugfixes + Closing Issues (#15936)
* Prevents Species Action Icons from Duplicating
* Spelling Correction for Igniter
* Guardian Fixes
* Photocopier bugfix
* another spelling fix
Co-authored-by: Sean Williams <12197162+S34NW@users.noreply.github.com>
* removes redundant item_state declaration
Co-authored-by: Sean Williams <12197162+S34NW@users.noreply.github.com>
---
code/game/gamemodes/changeling/changeling_power.dm | 6 ++++--
.../gamemodes/miniantags/guardian/types/ranged.dm | 3 +++
code/game/objects/buckling.dm | 4 ++++
code/game/objects/items/tools/crowbar.dm | 1 -
code/modules/assembly/igniter.dm | 2 +-
code/modules/mob/living/carbon/human/human.dm | 13 ++++++++++---
code/modules/paperwork/photocopier.dm | 6 +++---
7 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/code/game/gamemodes/changeling/changeling_power.dm b/code/game/gamemodes/changeling/changeling_power.dm
index 47f83b4618b..5741447cd58 100644
--- a/code/game/gamemodes/changeling/changeling_power.dm
+++ b/code/game/gamemodes/changeling/changeling_power.dm
@@ -93,5 +93,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p
/datum/action/changeling/proc/transform_dna(mob/living/carbon/human/H, datum/dna/D)
if(!D)
return
-
- H.change_dna(D, TRUE)
+ var/changesSpecies = TRUE
+ if (H.dna.species.name == D.species.name)
+ changesSpecies = FALSE
+ H.change_dna(D, changesSpecies)
diff --git a/code/game/gamemodes/miniantags/guardian/types/ranged.dm b/code/game/gamemodes/miniantags/guardian/types/ranged.dm
index dab7dfb1eca..184b4e625b5 100644
--- a/code/game/gamemodes/miniantags/guardian/types/ranged.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/ranged.dm
@@ -10,6 +10,7 @@
melee_damage_lower = 10
melee_damage_upper = 10
damage_transfer = 0.9
+ can_strip = TRUE
projectiletype = /obj/item/projectile/guardian
ranged_cooldown_time = 5 //fast!
projectilesound = 'sound/effects/hit_on_shattered_glass.ogg'
@@ -35,6 +36,7 @@
alpha = 255
range = 13
incorporeal_move = 0
+ can_strip = TRUE
to_chat(src, "You switch to combat mode.")
toggle = FALSE
else
@@ -46,6 +48,7 @@
alpha = 60
range = 255
incorporeal_move = 1
+ can_strip = FALSE //spiritual pickpocketting is forbidden
to_chat(src, "You switch to scout mode.")
toggle = TRUE
else
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index e3c14ff459c..6ef46e63d85 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -122,6 +122,10 @@
if(!in_range(user, src) || !isturf(user.loc) || user.incapacitated() || M.anchored)
return FALSE
+ if (isguardian(user))
+ if (M.loc == user.loc || user.alpha == 60) //Alpha is for detecting ranged guardians in scout mode
+ return //unmanifested guardians shouldn't be able to buckle mobs
+
add_fingerprint(user)
. = buckle_mob(M, check_loc = check_loc)
if(.)
diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm
index c90315ffbeb..9374c68fdd5 100644
--- a/code/game/objects/items/tools/crowbar.dm
+++ b/code/game/objects/items/tools/crowbar.dm
@@ -9,7 +9,6 @@
slot_flags = SLOT_BELT
force = 5
throwforce = 7
- item_state = "crowbar"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50)
drop_sound = 'sound/items/handling/crowbar_drop.ogg'
diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm
index b81acbbe2b0..7d88bbafd4a 100644
--- a/code/modules/assembly/igniter.dm
+++ b/code/modules/assembly/igniter.dm
@@ -1,6 +1,6 @@
/obj/item/assembly/igniter
name = "igniter"
- desc = "A small electronic device able to ignite combustable substances."
+ desc = "A small electronic device able to ignite combustible substances."
icon_state = "igniter"
materials = list(MAT_METAL=500, MAT_GLASS=50)
origin_tech = "magnets=1"
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index dd1f1cab01f..f2b55168e0b 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1163,6 +1163,10 @@
set src in view(1)
var/self = 0
+ if (!ishuman(src))
+ to_chat(usr, "You do not know how to check someone's pulse!")
+ return
+
if(usr.stat == 1 || usr.restrained() || !isliving(usr) || usr.is_dead()) return
if(usr == src)
@@ -1192,8 +1196,10 @@
/mob/living/carbon/human/proc/change_dna(datum/dna/new_dna, include_species_change = FALSE, keep_flavor_text = FALSE)
if(include_species_change)
- set_species(new_dna.species.type, retain_damage = TRUE)
+ set_species(new_dna.species.type, retain_damage = TRUE, transformation = TRUE)
dna = new_dna.Clone()
+ if (include_species_change) //We have to call this after new_dna.Clone() so that species actions don't get overwritten
+ dna.species.on_species_gain(src)
real_name = new_dna.real_name
domutcheck(src, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them
if(!keep_flavor_text)
@@ -1205,7 +1211,7 @@
sec_hud_set_ID()
-/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE, retain_damage = FALSE)
+/mob/living/carbon/human/proc/set_species(datum/species/new_species, default_colour, delay_icon_update = FALSE, skip_same_check = FALSE, retain_damage = FALSE, transformation = FALSE)
if(!skip_same_check)
if(dna.species.name == initial(new_species.name))
return
@@ -1362,7 +1368,8 @@
dna.real_name = real_name
- dna.species.on_species_gain(src)
+ if (!transformation) //Distinguish between creating a mob and switching species
+ dna.species.on_species_gain(src)
update_sight()
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index ecca752ec9b..e3355adfe76 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -113,6 +113,7 @@
updateUsrDialog()
else if(check_ass())
to_chat(ass, "You feel a slight pressure on your ass.")
+ atom_say("Attention: Unable to remove large object!")
updateUsrDialog()
else if(href_list["min"])
if(copies > 1)
@@ -240,6 +241,7 @@
var/icon/temp_img
if(!check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on.
return
+ atom_say("Attention: Posterior Placed on Printing Plaque!")
if(emagged)
if(ishuman(ass))
var/mob/living/carbon/human/H = ass
@@ -314,7 +316,6 @@
toner = 0
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
- check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
if(!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai) || target == ass)
return
src.add_fingerprint(user)
@@ -332,7 +333,7 @@
copyitem = null
updateUsrDialog()
-/obj/machinery/photocopier/proc/check_ass() //I'm not sure wether I made this proc because it's good form or because of the name.
+/obj/machinery/photocopier/proc/check_ass() //I'm not sure whether I made this proc because it's good form or because of the name.
if(!ass)
return 0
if(ass.loc != src.loc)
@@ -341,7 +342,6 @@
return 0
else
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
- atom_say("Attention: Posterior Placed on Printing Plaque!")
return 1
/obj/machinery/photocopier/emag_act(user as mob)