Merge pull request #11527 from Ghommie/Ghommie-cit628

More bug reports yee'd their last haw.
This commit is contained in:
kevinz000
2020-03-19 18:56:32 -07:00
committed by GitHub
14 changed files with 54 additions and 40 deletions
+2
View File
@@ -144,6 +144,7 @@
#define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites. #define TRAIT_NOMARROW "nomarrow" // You don't make blood, with chemicals or nanites.
#define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat. #define TRAIT_NOPULSE "nopulse" // Your heart doesn't beat.
#define TRAIT_EXEMPT_HEALTH_EVENTS "exempt-health-events" #define TRAIT_EXEMPT_HEALTH_EVENTS "exempt-health-events"
#define TRAIT_NO_MIDROUND_ANTAG "no-midround-antag" //can't be turned into an antag by random events
// mobility flag traits // mobility flag traits
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it) // IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
@@ -227,6 +228,7 @@
// unique trait sources, still defines // unique trait sources, still defines
#define STATUE_MUTE "statue" #define STATUE_MUTE "statue"
#define CLONING_POD_TRAIT "cloning-pod" #define CLONING_POD_TRAIT "cloning-pod"
#define VIRTUAL_REALITY_TRAIT "vr_trait"
#define CHANGELING_DRAIN "drain" #define CHANGELING_DRAIN "drain"
#define CHANGELING_HIVEMIND_MUTE "ling_mute" #define CHANGELING_HIVEMIND_MUTE "ling_mute"
#define ABYSSAL_GAZE_BLIND "abyssal_gaze" #define ABYSSAL_GAZE_BLIND "abyssal_gaze"
+3 -1
View File
@@ -58,6 +58,7 @@
RegisterSignal(current_mind, COMSIG_PRE_MIND_TRANSFER, .proc/pre_player_transfer) RegisterSignal(current_mind, COMSIG_PRE_MIND_TRANSFER, .proc/pre_player_transfer)
if(mastermind?.current) if(mastermind?.current)
mastermind.current.audiovisual_redirect = M mastermind.current.audiovisual_redirect = M
ADD_TRAIT(M, TRAIT_NO_MIDROUND_ANTAG, VIRTUAL_REALITY_TRAIT)
/datum/component/virtual_reality/UnregisterFromParent() /datum/component/virtual_reality/UnregisterFromParent()
. = ..() . = ..()
@@ -69,6 +70,7 @@
current_mind = null current_mind = null
if(mastermind?.current) if(mastermind?.current)
mastermind.current.audiovisual_redirect = null mastermind.current.audiovisual_redirect = null
REMOVE_TRAIT(parent, TRAIT_NO_MIDROUND_ANTAG, VIRTUAL_REALITY_TRAIT)
/** /**
* Called when attempting to connect a mob to a virtual reality mob. * Called when attempting to connect a mob to a virtual reality mob.
@@ -235,7 +237,7 @@
qdel(src) qdel(src)
/** /**
* Used for recursive virtual realities shenanigeans and should be called only through the above proc. * Used for recursive virtual realities shenanigeans and should be called by the above proc.
*/ */
/datum/component/virtual_reality/proc/vr_in_a_vr(mob/player, deathcheck = FALSE, lethal_cleanup = FALSE) /datum/component/virtual_reality/proc/vr_in_a_vr(mob/player, deathcheck = FALSE, lethal_cleanup = FALSE)
var/mob/M = parent var/mob/M = parent
@@ -43,7 +43,7 @@
if (!istype(M, required_type)) if (!istype(M, required_type))
trimmed_list.Remove(M) trimmed_list.Remove(M)
continue continue
if (M.GetComponent(/datum/component/virtual_reality)) if (HAS_TRAIT(M, TRAIT_NO_MIDROUND_ANTAG))
trimmed_list.Remove(M) trimmed_list.Remove(M)
continue continue
if (!M.client) // Are they connected? if (!M.client) // Are they connected?
@@ -195,9 +195,7 @@
return return
if(isgolem(user) && can_transfer) if(isgolem(user) && can_transfer)
var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No") var/transfer_choice = alert("Transfer your soul to [src]? (Warning, your old body will die!)",,"Yes","No")
if(transfer_choice != "Yes") if(transfer_choice != "Yes" || QDELETED(src) || uses <= 0 || !user.canUseTopic(src, BE_CLOSE, NO_DEXTERY, NO_TK))
return
if(QDELETED(src) || uses <= 0)
return return
log_game("[key_name(user)] golem-swapped into [src]") log_game("[key_name(user)] golem-swapped into [src]")
user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>") user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
@@ -680,8 +678,9 @@
new_spawn.AddElement(/datum/element/dusts_on_catatonia) new_spawn.AddElement(/datum/element/dusts_on_catatonia)
new_spawn.AddElement(/datum/element/dusts_on_leaving_area,list(A.type,/area/hilbertshotel)) new_spawn.AddElement(/datum/element/dusts_on_leaving_area,list(A.type,/area/hilbertshotel))
ADD_TRAIT(new_spawn, TRAIT_SIXTHSENSE, GHOSTROLE_TRAIT) ADD_TRAIT(new_spawn, TRAIT_SIXTHSENSE, GHOSTROLE_TRAIT)
ADD_TRAIT(new_spawn,TRAIT_EXEMPT_HEALTH_EVENTS,GHOSTROLE_TRAIT) ADD_TRAIT(new_spawn, TRAIT_EXEMPT_HEALTH_EVENTS, GHOSTROLE_TRAIT)
ADD_TRAIT(new_spawn,TRAIT_PACIFISM,GHOSTROLE_TRAIT) ADD_TRAIT(new_spawn, TRAIT_NO_MIDROUND_ANTAG, GHOSTROLE_TRAIT) //The mob can't be made into a random antag, they are still elegible for ghost roles popups.
ADD_TRAIT(new_spawn, TRAIT_PACIFISM, GHOSTROLE_TRAIT)
to_chat(new_spawn,"<span class='boldwarning'>You may be sharing your cafe with some ninja-captured individuals, so make sure to only interact with the ghosts you hear as a ghost!</span>") to_chat(new_spawn,"<span class='boldwarning'>You may be sharing your cafe with some ninja-captured individuals, so make sure to only interact with the ghosts you hear as a ghost!</span>")
to_chat(new_spawn,"<span class='boldwarning'>You can turn yourself into a ghost and freely reenter your body with the ghost action.</span>") to_chat(new_spawn,"<span class='boldwarning'>You can turn yourself into a ghost and freely reenter your body with the ghost action.</span>")
var/datum/action/ghost/G = new(new_spawn) var/datum/action/ghost/G = new(new_spawn)
@@ -27,7 +27,7 @@
INVOKE_ASYNC(B, /obj/effect/mine/pickup/bloodbath/.proc/mineEffect, H) //could use moving out from the mine INVOKE_ASYNC(B, /obj/effect/mine/pickup/bloodbath/.proc/mineEffect, H) //could use moving out from the mine
for(var/mob/living/carbon/human/P in GLOB.player_list) for(var/mob/living/carbon/human/P in GLOB.player_list)
if(P == H) if(P == H || HAS_TRAIT(P, TRAIT_NO_MIDROUND_ANTAG))
continue continue
to_chat(P, "<span class='userdanger'>You have an overwhelming desire to kill [H]. [H.p_theyve(TRUE)] been marked red! Whoever [H.p_they()] [H.p_were()], friend or foe, go kill [H.p_them()]!</span>") to_chat(P, "<span class='userdanger'>You have an overwhelming desire to kill [H]. [H.p_theyve(TRUE)] been marked red! Whoever [H.p_they()] [H.p_were()], friend or foe, go kill [H.p_them()]!</span>")
P.put_in_hands(new /obj/item/kitchen/knife/butcher(P), TRUE) P.put_in_hands(new /obj/item/kitchen/knife/butcher(P), TRUE)
+5 -4
View File
@@ -16,13 +16,14 @@
..() ..()
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list) for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
H.put_in_hands(new /obj/item/valentine) H.put_in_hands(new /obj/item/valentine)
var/obj/item/storage/backpack/b = locate() in H.contents var/obj/item/storage/backpack/B = locate() in H.contents
new /obj/item/reagent_containers/food/snacks/candyheart(b) if(B)
new /obj/item/storage/fancy/heart_box(b) new /obj/item/reagent_containers/food/snacks/candyheart(B)
new /obj/item/storage/fancy/heart_box(B)
var/list/valentines = list() var/list/valentines = list()
for(var/mob/living/M in GLOB.player_list) for(var/mob/living/M in GLOB.player_list)
if(!M.stat && M.client && M.mind) if(!M.stat && M.client && M.mind && !HAS_TRAIT(M, TRAIT_NO_MIDROUND_ANTAG))
valentines |= M valentines |= M
@@ -136,7 +136,7 @@
desc = "A device which causes kinetic accelerators to permanently gain damage against creature types killed with it." desc = "A device which causes kinetic accelerators to permanently gain damage against creature types killed with it."
id = "bountymod" id = "bountymod"
materials = list(/datum/material/iron = 4000, /datum/material/silver = 4000, /datum/material/gold = 4000, /datum/material/bluespace = 4000) materials = list(/datum/material/iron = 4000, /datum/material/silver = 4000, /datum/material/gold = 4000, /datum/material/bluespace = 4000)
reagents_list = list("blood" = 40) reagents_list = list(/datum/reagent/blood = 40)
build_path = /obj/item/borg/upgrade/modkit/bounty build_path = /obj/item/borg/upgrade/modkit/bounty
//Spooky special loot //Spooky special loot
+1 -1
View File
@@ -237,7 +237,7 @@
return /datum/reagent/blood/jellyblood return /datum/reagent/blood/jellyblood
if(dna?.species?.exotic_blood) if(dna?.species?.exotic_blood)
return dna.species.exotic_blood return dna.species.exotic_blood
else if((NOBLOOD in dna.species.species_traits) || (HAS_TRAIT(src, TRAIT_NOCLONE))) else if((dna && (NOBLOOD in dna.species.species_traits)) || HAS_TRAIT(src, TRAIT_NOCLONE))
return return
else else
return /datum/reagent/blood return /datum/reagent/blood
@@ -24,7 +24,7 @@
id = "spaceskeleton" id = "spaceskeleton"
limbs_id = "skeleton" limbs_id = "skeleton"
blacklisted = 1 blacklisted = 1
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER) inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT, TRAIT_FAKEDEATH, TRAIT_CALCIUM_HEALER)
/datum/species/skeleton/space/check_roundstart_eligible() /datum/species/skeleton/space/check_roundstart_eligible()
return FALSE return FALSE
+24 -19
View File
@@ -28,6 +28,16 @@
/datum/duel/New() /datum/duel/New()
id = next_id++ id = next_id++
/datum/duel/Destroy()
if(gun_A)
gun_A.duel = null
gun_A = null
if(gun_B)
gun_B.duel = null
gun_B = null
STOP_PROCESSING(SSobj, src)
. = ..()
/datum/duel/proc/try_begin() /datum/duel/proc/try_begin()
//Check if both guns are held and if so begin. //Check if both guns are held and if so begin.
var/mob/living/A = get_duelist(gun_A) var/mob/living/A = get_duelist(gun_A)
@@ -45,13 +55,13 @@
message_duelists("<span class='notice'>Set your gun setting and move [required_distance] steps away from your opponent.</span>") message_duelists("<span class='notice'>Set your gun setting and move [required_distance] steps away from your opponent.</span>")
START_PROCESSING(SSobj,src) START_PROCESSING(SSobj, src)
/datum/duel/proc/get_duelist(obj/gun) /datum/duel/proc/get_duelist(obj/item/gun/energy/dueling/G)
var/mob/living/G = gun.loc var/mob/living/L = G.loc
if(!istype(G) || !G.is_holding(gun)) if(!istype(L) || !L.is_holding(G))
return null return
return G return L
/datum/duel/proc/message_duelists(message) /datum/duel/proc/message_duelists(message)
var/mob/living/LA = get_duelist(gun_A) var/mob/living/LA = get_duelist(gun_A)
@@ -66,7 +76,7 @@
/datum/duel/proc/end() /datum/duel/proc/end()
message_duelists("<span class='notice'>Duel finished. Re-engaging safety.</span>") message_duelists("<span class='notice'>Duel finished. Re-engaging safety.</span>")
STOP_PROCESSING(SSobj,src) STOP_PROCESSING(SSobj, src)
state = DUEL_IDLE state = DUEL_IDLE
/datum/duel/process() /datum/duel/process()
@@ -129,10 +139,11 @@
return FALSE return FALSE
if(!isturf(A.loc) || !isturf(B.loc)) if(!isturf(A.loc) || !isturf(B.loc))
return FALSE return FALSE
if(get_dist(A,B) != required_distance) if(get_dist(A, B) != required_distance)
return FALSE return FALSE
for(var/turf/T in getline(get_turf(A),get_turf(B))) for(var/i in getline(A.loc, B.loc))
if(is_blocked_turf(T,TRUE)) var/turf/T = i
if(is_blocked_turf(T, TRUE))
return FALSE return FALSE
return TRUE return TRUE
@@ -180,7 +191,6 @@
return "duel_red" return "duel_red"
/obj/item/gun/energy/dueling/attack_self(mob/living/user) /obj/item/gun/energy/dueling/attack_self(mob/living/user)
. = ..()
if(duel.state == DUEL_IDLE) if(duel.state == DUEL_IDLE)
duel.try_begin() duel.try_begin()
else else
@@ -205,12 +215,9 @@
add_overlay(setting_overlay) add_overlay(setting_overlay)
/obj/item/gun/energy/dueling/Destroy() /obj/item/gun/energy/dueling/Destroy()
. = ..() if(duel)
if(duel.gun_A == src) qdel(duel)
duel.gun_A = null return ..()
if(duel.gun_B == src)
duel.gun_B = null
duel = null
/obj/item/gun/energy/dueling/can_trigger_gun(mob/living/user) /obj/item/gun/energy/dueling/can_trigger_gun(mob/living/user)
. = ..() . = ..()
@@ -234,10 +241,8 @@
if(duel.state == DUEL_READY) if(duel.state == DUEL_READY)
duel.confirmations[src] = TRUE duel.confirmations[src] = TRUE
to_chat(user,"<span class='notice'>You confirm your readiness.</span>") to_chat(user,"<span class='notice'>You confirm your readiness.</span>")
return
else if(!is_duelist(target)) //I kinda want to leave this out just to see someone shoot a bystander or missing. else if(!is_duelist(target)) //I kinda want to leave this out just to see someone shoot a bystander or missing.
to_chat(user,"<span class='warning'>[src] safety system prevents shooting anyone but your designated opponent.</span>") to_chat(user,"<span class='warning'>[src] safety system prevents shooting anyone but your designated opponent.</span>")
return
else else
duel.fired[src] = TRUE duel.fired[src] = TRUE
. = ..() . = ..()
@@ -356,7 +356,6 @@
replace_beaker(user, B) replace_beaker(user, B)
to_chat(user, "<span class='notice'>You add [B] to [src].</span>") to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
updateUsrDialog() updateUsrDialog()
update_icon()
else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag)) else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag))
to_chat(user, "<span class='warning'>You can't load [I] into [src]!</span>") to_chat(user, "<span class='warning'>You can't load [I] into [src]!</span>")
return ..() return ..()
+4
View File
@@ -55,6 +55,10 @@ Nothing else in the console has ID requirements.
if (istype(ID, /datum/material)) if (istype(ID, /datum/material))
var/datum/material/material = ID var/datum/material/material = ID
return material.name return material.name
else if(GLOB.chemical_reagents_list[ID])
var/datum/reagent/reagent = GLOB.chemical_reagents_list[ID]
return reagent.name
return ID return ID
/obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any). /obj/machinery/computer/rdconsole/proc/SyncRDevices() //Makes sure it is properly sync'ed up with the devices attached to it (if any).
@@ -705,8 +705,9 @@
desc = "A miraculous chemical mix that grants human like intelligence to living beings. It has been modified with Syndicate technology to also grant an internal radio implant to the target and authenticate with identification systems." desc = "A miraculous chemical mix that grants human like intelligence to living beings. It has been modified with Syndicate technology to also grant an internal radio implant to the target and authenticate with identification systems."
/obj/item/slimepotion/slime/sentience/nuclear/after_success(mob/living/user, mob/living/simple_animal/SM) /obj/item/slimepotion/slime/sentience/nuclear/after_success(mob/living/user, mob/living/simple_animal/SM)
var/obj/item/implant/radio/syndicate/imp = new if(SM.can_be_implanted())
imp.implant(SM, user) var/obj/item/implant/radio/syndicate/imp = new
imp.implant(SM, user)
SM.access_card = new /obj/item/card/id/syndicate(SM) SM.access_card = new /obj/item/card/id/syndicate(SM)
ADD_TRAIT(SM.access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT) ADD_TRAIT(SM.access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT)
@@ -961,11 +962,12 @@
icon_state = "potgrey" icon_state = "potgrey"
/obj/item/slimepotion/slime/slimeradio/attack(mob/living/M, mob/user) /obj/item/slimepotion/slime/slimeradio/attack(mob/living/M, mob/user)
if(!ismob(M))
return
if(!isanimal(M)) if(!isanimal(M))
to_chat(user, "<span class='warning'>[M] is too complex for the potion!</span>") to_chat(user, "<span class='warning'>[M] is too complex for the potion!</span>")
return return
if(!M.can_be_implanted())
to_chat(user, "<span class='warning'>[M] is incompatible with the potion!</span>")
return
if(M.stat) if(M.stat)
to_chat(user, "<span class='warning'>[M] is dead!</span>") to_chat(user, "<span class='warning'>[M] is dead!</span>")
return return
@@ -163,7 +163,7 @@ GLOBAL_VAR_INIT(summon_magic_triggered, FALSE)
for(var/mob/living/carbon/human/H in GLOB.player_list) for(var/mob/living/carbon/human/H in GLOB.player_list)
var/turf/T = get_turf(H) var/turf/T = get_turf(H)
if(T && is_away_level(T.z)) if((T && is_away_level(T.z)) || HAS_TRAIT(H, TRAIT_NO_MIDROUND_ANTAG))
continue continue
if(summon_type == SUMMON_MAGIC) if(summon_type == SUMMON_MAGIC)
give_magic(H) give_magic(H)