Matt's Bugfix Galore (#9816)

This commit is contained in:
Matt Atlas
2020-08-29 16:24:10 +02:00
committed by GitHub
parent 7e4db0b830
commit 5d875f9bb5
40 changed files with 168 additions and 136 deletions
+10 -7
View File
@@ -58,12 +58,8 @@
if(!gibbed && deathmessage != "no message") // This is gross, but reliable. Only brains use it.
src.visible_message("<b>\The [src.name]</b> [deathmessage]", range = messagerange)
// If we have a remotely controlled mob, we come back to our body to die properly
if(vr_mob)
vr_mob.body_return()
// Alternatively, if we are the remotely controlled mob, just kick our controller out
if(old_mob)
body_return()
exit_vr()
stat = DEAD
update_canmove()
@@ -105,5 +101,12 @@
if(SSticker.mode)
SSticker.mode.check_win()
return 1
/mob/proc/exit_vr()
// If we have a remotely controlled mob, we come back to our body to die properly
if(vr_mob)
vr_mob.body_return()
// Alternatively, if we are the remotely controlled mob, just kick our controller out
if(old_mob)
body_return()
+2 -1
View File
@@ -27,7 +27,8 @@
//Revised. Brainmob is now contained directly within object of transfer. MMI in this case.
var/locked = 0
var/locked = FALSE
var/can_be_ipc = FALSE
var/mob/living/carbon/brain/brainmob = null//The current occupant.
var/obj/item/organ/internal/brain/brainobj = null //The current brain organ.
@@ -5,9 +5,10 @@
icon_state = "posibrain"
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4)
var/searching = FALSE
req_access = list(access_robotics)
locked = FALSE
can_be_ipc = TRUE
var/searching = FALSE
/obj/item/device/mmi/digital/posibrain/Initialize()
. = ..()
@@ -1,5 +1,6 @@
/mob/living/carbon/
/mob/living/carbon
gender = MALE
accent = ACCENT_CETI
var/datum/species/species //Contains icon generation and language information, set during New().
//stomach contents redefined at mob/living level, removed from here
@@ -1311,7 +1311,7 @@
if(istype(M))
if(!blood_DNA[M.dna.unique_enzymes])
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
hand_blood_color = blood_color
hand_blood_color = species.blood_color
src.update_inv_gloves() //handles bloody hands overlays and updating
verbs += /mob/living/carbon/human/proc/bloody_doodle
return 1 //we applied blood to the item
@@ -472,7 +472,9 @@
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
user.do_attack_animation(src)
var/dam_zone = pick(organs_by_name)
var/dam_zone = user.zone_sel?.selecting
if(!dam_zone)
dam_zone = pick(organs)
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
@@ -47,6 +47,8 @@ emp_act
var/armor = getarmor_organ(organ, "bullet")
if(prob(20 + max(P.damage - armor, -10)))
var/obj/item/SP = new P.shrapnel_type()
SP.edge = TRUE
SP.sharp = TRUE
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
SP.forceMove(organ)
@@ -25,7 +25,6 @@
has_organ = list()
siemens_coefficient = 0
rarity_value = 10
virus_immune = 1
breakcuffs = list(MALE,FEMALE,NEUTER)
@@ -35,8 +35,6 @@
reagent_tag = IS_UNDEAD
virus_immune = TRUE
rarity_value = 10
blurb = "Skeletons are undead brought back to life through dark wizardry, \
they are empty shells fueled by sheer obscure power and blood-magic. \
@@ -106,13 +104,11 @@
icobase = 'icons/mob/human_races/r_manifested.dmi'
deform = 'icons/mob/human_races/r_manifested.dmi'
default_language = "Ceti Basic"
language = "Cult"
name_language = "Cult"
default_language = LANGUAGE_TCB
language = LANGUAGE_CULT
name_language = LANGUAGE_CULT
has_organ = list()
virus_immune = 1
reagent_tag = IS_UNDEAD
rarity_value = 10
@@ -186,8 +182,6 @@
BP_STOMACH = /obj/item/organ/internal/stomach
)
virus_immune = 1
vision_flags = DEFAULT_SIGHT | SEE_MOBS
reagent_tag = IS_UNDEAD
@@ -38,7 +38,6 @@
eyes = "vox_eyes_s"
gluttonous = 2
virus_immune = 1
breath_type = GAS_NITROGEN
poison_type = GAS_OXYGEN
@@ -45,7 +45,6 @@
var/icon/icon_template // Used for mob icon generation for non-32x32 species.
var/mob_size = MOB_MEDIUM
var/show_ssd = "fast asleep"
var/virus_immune
var/short_sighted
var/bald = 0
var/light_range
@@ -44,7 +44,6 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL,
brute_mod = 2
burn_mod = 4
virus_immune = 1
grab_mod = 2
resist_mod = 2
@@ -76,7 +76,6 @@
blood_color = COLOR_IPC_BLOOD
flesh_color = "#575757"
virus_immune = 1
reagent_tag = IS_MACHINE
has_organ = list(
@@ -233,7 +233,6 @@
appearance_flags = HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_SOCKS
vision_flags = DEFAULT_SIGHT | SEE_MOBS
virus_immune = 1
reagent_tag = IS_MACHINE
inherent_verbs = list(
@@ -13,7 +13,6 @@
siemens_coefficient = 3 //conductive
darksight = 3
rarity_value = 5
virus_immune = 1
fall_mod = 0
grab_mod = 1.5
resist_mod = 0.25
+23 -23
View File
@@ -161,30 +161,30 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
to_chat(user, SPAN_WARNING("The potion only works on slimes!"))
return ..()
if(M.stat)
to_chat(user, SPAN_WARNING("The slime is dead!"))
return ..()
if(M.mind)
to_chat(user, SPAN_WARNING("The slime resists!"))
return ..()
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
to_chat(user, "You feed the slime the potion, removing it's powers and calming it.")
qdel(M)
var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN)
/obj/item/slimepotion2/attack(mob/living/carbon/slime/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/slime/))//If target is not a slime.
to_chat(user, SPAN_WARNING("The potion only works on slimes!"))
return ..()
if(M.stat)
to_chat(user, SPAN_WARNING("The slime is dead!"))
return ..()
if(M.mind)
to_chat(user, SPAN_WARNING("The slime resists!"))
return ..()
var/mob/living/simple_animal/adultslime/pet = new /mob/living/simple_animal/adultslime(M.loc)
pet.icon_state = "[M.colour] adult slime"
pet.icon_living = "[M.colour] adult slime"
pet.icon_dead = "[M.colour] baby slime dead"
pet.colour = "[M.colour]"
to_chat(user, "You feed the slime the potion, removing it's powers and calming it.")
qdel(M)
var/newname = sanitize(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text, MAX_NAME_LEN)
if(!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
if(!newname)
newname = "pet slime"
pet.name = newname
pet.real_name = newname
qdel(src)
/obj/item/slimesteroid
name = "slime steroid"
+3 -2
View File
@@ -740,11 +740,12 @@ var/list/ai_verbs_default = list(
else if(W.iswrench())
if(anchored)
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
if(!do_after(user,40/W.toolspeed))
if(!do_after(user, 40/W.toolspeed))
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
return
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
anchored = 0
anchored = FALSE
exit_vr()
return
else
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating.</span>..")
@@ -232,6 +232,8 @@
/obj/item/computer_hardware,
/obj/item/slimesteroid,
/obj/item/slimesteroid2,
/obj/item/slimepotion,
/obj/item/slimepotion2,
/obj/item/remote_mecha
)
@@ -250,6 +250,10 @@
to_chat(user, SPAN_WARNING("\The [W] does not seem to fit. (The player lacks the appropriate whitelist.)"))
return
if(!M.can_be_ipc)
to_chat(user, SPAN_WARNING("There's no way that would fit in an IPC chassis!"))
return
var/mob/living/carbon/human/new_shell = new(get_turf(src), chest.linked_frame)
forceMove(new_shell) //so people won't mess around with the chassis until it is deleted
M.brainmob.mind.transfer_to(new_shell)