Various Bugfixes (#12296)

* Various bugfixes.
Fixes #8286
Fixes #8416
Fixes #8492
Fixes #9147
Fixes #10166
Fixes #12126
Fixes #12275

* Removes some debug output.

* Changes the beach ball solution.

* Makes the put_in_hand_check() call independent of the get_inactive_hand() call.

* Made a reagent_containers-level proc for displaying a list of reagents in a readable format.
This commit is contained in:
Shadowmech88
2016-10-24 05:16:02 -05:00
committed by clusterfack
parent edad59b61f
commit 76edc74b43
16 changed files with 93 additions and 61 deletions

View File

@@ -69,7 +69,7 @@
abbreviation = "CT"
spawned_items = list(/obj/item/weapon/antag_spawner/contract)
price = APPRENTICE_PRICE
/datum/spellbook_artifact/bundle
name = "Spellbook Bundle"
desc = "Feeling adventurous? Buy this bundle and recieve seven random spellbooks! Who knows what spells you will get? (Warning, each spell book may only be used once! No refunds)."
@@ -159,7 +159,7 @@
H.add_spell(new/spell/aoe_turf/conjure/snowmobile)
H.add_spell(new/spell/targeted/wrapping_paper)
H.add_spell(new/spell/aoe_turf/conjure/gingerbreadman)
H.add_spell(new/spell/targeted/flesh_to_coal)
// H.add_spell(new/spell/targeted/flesh_to_coal)
to_chat(world,'sound/misc/santa.ogg')
SetUniversalState(/datum/universal_state/christmas)

View File

@@ -196,6 +196,8 @@
if(src == user.get_inactive_hand())
if(src.flags & TWOHANDABLE)
return src.wield(user)
if(!user.put_in_hand_check(src, user.get_active_hand()))
return
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
if(!src.canremove)
return
@@ -232,6 +234,8 @@
M.client.screen -= src
src.throwing = 0
if (src.loc == user)
if(!user.put_in_hand_check(src, user.get_active_hand()))
return
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
if(istype(src, /obj/item/clothing) && !src:canremove)
return

View File

@@ -95,14 +95,15 @@
sterile = 1
setGender(FEMALE)
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
/obj/item/clothing/mask/facehugger/lamarr/New()
..()
create_reagents(15)
/obj/item/clothing/mask/facehugger/lamarr/process()
if(istype(loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = loc
if(src.reagents)
for (var/datum/reagent/current_reagent in src.reagents.reagent_list)
if(reagents)
for (var/datum/reagent/current_reagent in reagents.reagent_list)
if (current_reagent.id == CREATINE)
to_chat(H, "<span class='warning'>[src]'s body contorts and expands!</span>")
var/index = H.is_holding_item(src)
@@ -113,15 +114,12 @@
if(index)
H.put_in_hand(index, I)
qdel(src)
return
src.reagents.clear_reagents()
reagents.clear_reagents()
..()
/obj/item/clothing/mask/facehugger/lamarr/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
if(src.loc == user && user.is_holding_item(W))
processing_objects.Add(src)
else
if(!istype(W, /obj/item/weapon/reagent_containers/syringe))
..(W, user)
return

View File

@@ -206,7 +206,6 @@
/mob/proc/put_in_hand_check(var/obj/item/W, index)
if(lying) //&& !(W.flags & ABSTRACT))
return 0
if(!isitem(W))
return 0
@@ -218,6 +217,12 @@
to_chat(src, "You need both hands to pick up \the [W].")
return 0
if(W.cant_drop) //if the item can't be dropped
var/I = is_holding_item(W) //AND the item is currently being held in one of the mob's hands
if(I)
to_chat(src, "You can't pry \the [W] out of your [get_index_limb_name(I)]!")
return 0
return 1
//Puts the item into our active hand if possible. returns 1 on success.

View File

@@ -142,7 +142,7 @@ var/const/MAX_ACTIVE_TIME = 400
if(real) // Lamarr still tries to couple with heads, but toys won't
processing_objects.Add(src)
else
else if(!sterile)
qdel(src)
/obj/item/clothing/mask/facehugger/examine(mob/user)
@@ -244,7 +244,7 @@ var/const/MAX_ACTIVE_TIME = 400
if(istype(mouth_protection, /obj/item/clothing/head/helmet/space/rig))
rng = 15
if(prob(rng)) // Temporary balance change, all mouth-covering hats will be more effective
H.visible_message("<span class='danger'>\The [src] smashes against [H]'s [mouth_protection], and rips it off in the process!</span>")
H.visible_message("<span class='danger'>\The [src] smashes against [H]'s \the [mouth_protection], and rips it off in the process!</span>")
H.drop_from_inventory(mouth_protection)
GoIdle(15)
return

View File

@@ -407,7 +407,7 @@
return
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
/mob/living/carbon/human/proc/get_visible_name()
if( wear_mask && (is_slot_hidden(wear_mask.body_parts_covered,HIDEFACE)) && !istype(wear_mask,/obj/item/clothing/mask/gas/golem)) //Wearing a mask which hides our face, use id-name if possible
if( wear_mask && (is_slot_hidden(wear_mask.body_parts_covered,HIDEFACE))) //Wearing a mask which hides our face, use id-name if possible
return get_id_name("Unknown")
if( head && (is_slot_hidden(head.body_parts_covered,HIDEFACE)))
return get_id_name("Unknown") //Likewise for hats
@@ -421,7 +421,7 @@
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/datum/organ/external/head/head_organ = get_organ(LIMB_HEAD)
if((wear_mask && (is_slot_hidden(wear_mask.body_parts_covered,HIDEFACE)) && !istype(wear_mask,/obj/item/clothing/mask/gas/golem)) || ( head && (is_slot_hidden(head.body_parts_covered,HIDEFACE))) || !head_organ || head_organ.disfigured || (head_organ.status & ORGAN_DESTROYED) || !real_name || (M_HUSK in mutations) ) //Wearing a mask which hides our face, use id-name if possible
if((wear_mask && (is_slot_hidden(wear_mask.body_parts_covered,HIDEFACE))) || ( head && (is_slot_hidden(head.body_parts_covered,HIDEFACE))) || !head_organ || head_organ.disfigured || (head_organ.status & ORGAN_DESTROYED) || !real_name || (M_HUSK in mutations) ) //Wearing a mask which hides our face, use id-name if possible
return "Unknown"
return real_name

View File

@@ -433,7 +433,7 @@ var/global/list/damage_icon_parts = list()
if(dna)
switch(dna.mutantrace)
if("golem","slime","shadow","adamantine","coalgolem")
if("slime","shadow")
if(species && (!species.override_icon && species.has_mutant_race))
var/obj/Overlays/O = obj_overlays[MUTANTRACE_LAYER]
O.icon = 'icons/effects/genetics.dmi'

View File

@@ -1064,7 +1064,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
icon_state = "bottle14"
////////Adamantine Golem stuff I dunno where else to put it
/*
/obj/item/clothing/under/golem
name = "adamantine skin"
desc = "a golem's skin"
@@ -1136,7 +1136,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/obj/item/clothing/head/space/golem/acidable()
return 0
*/
/obj/effect/golem_rune
anchored = 1
desc = "a strange rune used to create golems. It glows when spirits are nearby."

View File

@@ -148,7 +148,7 @@
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.dna)
if((H.dna.mutantrace == "slime") || (isgolem(H)) || (H.dna.mutantrace == "adamantine") || (H.dna.mutantrace=="coalgolem"))
if((H.dna.mutantrace == "slime") || (isgolem(H)))
return 0
//IF WE ARE MOBS SPAWNED BY THE ADMINBUS THEN WE DON'T ATTACK TEST DUMMIES OR IAN (wait what? man that's snowflaky as fuck)
if((istype(L,/mob/living/simple_animal/corgi/Ian) || istype(L,/mob/living/carbon/human/dummy)) && (faction == "adminbus mob"))

View File

@@ -113,7 +113,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H=user
if(golem_check)
if(isgolem(H) || (H.dna && (H.dna.mutantrace == "adamantine" || H.dna.mutantrace=="coalgolem"))) //leaving the mutantrace checks in just in case
if(isgolem(H))
if(display_message)
to_chat(user, "<span class='warning'>Your fat fingers don't fit in the trigger guard!</span>")
return 0

View File

@@ -110,6 +110,7 @@
loaded_item = W
user.visible_message("[user] jams \the [W] into the muzzle of the [src].","You jam \the [W] into the muzzle of \the [src].")
update_verbs()
return 1
else if(!loaded_item && item_prohibited)
to_chat(user, "<span class='warning'>That won't fit into the muzzle!</span>")
return 1

View File

@@ -79,6 +79,15 @@
icon_state = "venom_sword"
var/beaker = null
var/obj/item/weapon/reagent_containers/hypospray/HY = null
var/max_beaker_volume = 50 //The maximum volume a beaker can have and still be placed into the sword
var/inject_amount = 5 //The amount of reagents injected from the beaker each hit
/obj/item/weapon/sword/venom/examine(mob/user)
..()
if(beaker)
to_chat(user, "[bicon(beaker)] There is \a [beaker] in \the [src]'s beaker port.")
var/obj/item/weapon/reagent_containers/glass/beaker/B = beaker
B.show_list_of_reagents(user)
/obj/item/weapon/sword/venom/Destroy()
if(beaker)
@@ -151,7 +160,8 @@
if(beaker)
to_chat(user, "<span class='notice'>There is already a beaker in \the [src]'s beaker port.</span>")
return
if(!(W.type == /obj/item/weapon/reagent_containers/glass/beaker || W.type == /obj/item/weapon/reagent_containers/glass/beaker/noreact))
var/obj/item/weapon/reagent_containers/glass/beaker/B = W
if(B.volume > max_beaker_volume)
to_chat(user, "<span class='warning'>That beaker is too large to fit into \the [src]'s beaker port.</span>")
return
if(!user.drop_item(W, src))
@@ -207,7 +217,7 @@
else
M.LAssailant = user
B.reagents.trans_to(M, 5)
B.reagents.trans_to(M, inject_amount)
if(!B.reagents.total_volume)
update_color()

View File

@@ -282,3 +282,12 @@ var/list/LOGGED_SPLASH_REAGENTS = list(FUEL, THERMITE)
return data
else
return "No reagents"
/obj/item/weapon/reagent_containers/proc/show_list_of_reagents(mob/user) //Displays a list of the reagents to a mob, formatted for reading
to_chat(user, "It contains:")
if(!reagents.total_volume)
to_chat(user, "<span class='info'>Nothing.</span>")
else
if(reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
to_chat(user, "<span class='info'>[R.volume] units of [R.name]</span>")

View File

@@ -194,9 +194,12 @@
to_chat(user, "<span class='warning'>\The [src] is empty.</span>")
return
if (istype(target, /obj/item/clothing/mask/facehugger/lamarr) && !user.is_holding_item(target))
to_chat(user, "<span class='warning'>\The [target] is squirming around too much. She needs to be held still.</span>")
return
if (istype(target, /obj/item/clothing/mask/facehugger/lamarr))
var/obj/item/clothing/mask/facehugger/lamarr/L = target
if(!user.is_holding_item(target))
if(L.stat != DEAD)
to_chat(user, "<span class='warning'>\The [target] is squirming around too much. She needs to be held still.</span>")
return
// TODO Remove snowflake
if (!ismob(target) && !target.is_open_container() && !is_type_in_list(target, injectable_types))

View File

@@ -1,4 +1,4 @@
/*
/obj/item/clothing/under/golem/coal
name = "coal body"
icon_state="golem_coal"
@@ -62,4 +62,6 @@
if(ticker.mode.name == "sandbox")
H.CanBuild()
to_chat(H, "Sandbox tab enabled.")
to_chat(H, "Sandbox tab enabled.")
*/

View File

@@ -26,7 +26,7 @@ Aheylite
Ahlfeldite
Aikinite
Ajoite
Akagan<EFBFBD>ite
Akaganeite
Akatoreite
Akdalaite
<EFBFBD>kermanite
@@ -36,7 +36,7 @@ Akrochordite
Aksaite
Aktashite
Alabandite
Alacr<EFBFBD>nite
Alacranite
Alamosite
Alarsite
Albite
@@ -157,7 +157,7 @@ Barstowite
Baryte
Barytocalcite
Bassanite
Bastn<EFBFBD>site
Bastnasite
Baumhauerite
Bayldonite
Bayleyite
@@ -178,7 +178,7 @@ Beryllonite
Beudantite
Bicchulite
Biehlite
B<EFBFBD>linite
Bilinite
Billietite
Billwiseite
Biotite
@@ -190,7 +190,7 @@ Bismuthinite
Bismutite
Bityite
Bixbyite
Bl<EFBFBD>dite
Blodite
Blossite
Bobfergusonite
Boehmite
@@ -371,8 +371,8 @@ Cyrilovite
Danalite
Danburite
Datolite
Daubr<EFBFBD>eite
Daubr<EFBFBD>elite
Daubreeite
Daubreelite
Davidite
Dawsonite
Delafossite
@@ -438,7 +438,7 @@ Faustite
Fayalite
Feldspar
Feldspathoid
Felsob<EFBFBD>nyaite
Felsobanyaite
Ferberite
Fergusonite
Feroxyhyte
@@ -466,7 +466,7 @@ Fluorite
Fluororichterite
Fornacite
Forsterite
Foug<EFBFBD>rite
Fougerite
Fourmarierite
Fraipontite
Francevillite
@@ -544,7 +544,7 @@ Hagendorfite
Haggertyite
Haidingerite
Haiweeite
H<EFBFBD>leniusite
Haleniusite
Halite
Halloysite
Halotrichite
@@ -573,7 +573,7 @@ Herderite
Hessite
Heulandite
Hexaferrum
Hi<EFBFBD>rneite
Hiarneite
Hibonite
Hidalgoite
Hilgardite
@@ -588,7 +588,7 @@ Hornblende
Howlite
Hsianghualite
Hubeite
H<EFBFBD>bnerite
Hubnerite
Huemulite
Humite
Huntite
@@ -675,13 +675,13 @@ Kolbeckite
Kornerupine
Kosmochlor
Kostovite
K<EFBFBD>ttigite
Kottigite
Kovdorskite
Kratochv<EFBFBD>lite
Kremersite
Krennerite
Krieselite
Kr<EFBFBD>hnkite
Krohnkite
Krotite
Krutovite
Kukharenkoite
@@ -716,7 +716,7 @@ Letovicite
Leucite
Leucophanite
Leucophoenicite
L<EFBFBD>vyne
Levyne
Libethenite
Liebigite
Linarite
@@ -731,8 +731,8 @@ Lizardite
Loellingite
Lonsdaleite
Loparite
L<EFBFBD>pezite
Lor<EFBFBD>ndite
Lopezite
Lorandite
Lorenzenite
Loveringite
Ludlamite
@@ -828,7 +828,7 @@ Nabalamprophyllite
Nabesite
Nacrite
Nadorite
Nagy<EFBFBD>gite
Nagyagite
Nahcolite
Naldrettite
Nambulite
@@ -841,7 +841,7 @@ Nekrasovite
Nelenite
Nenadkevichite
Nepheline
N<EFBFBD>pouite
Nepouite
Neptunite
Nichromite
Nickel
@@ -865,7 +865,7 @@ Olgite
Olivenite
Olivine
Omphacite
Ord<EFBFBD><EFBFBD>ezite
Ordonezite
Oregonite
Orpiment
Orthoclase
@@ -875,7 +875,7 @@ Osumilite
Otavite
Ottrelite
Otwayite
P<EFBFBD><EFBFBD>kk<EFBFBD>nenite
Paakkonenite
Pabstite
Painite
Palladium
@@ -890,9 +890,9 @@ Pararealgar
Pargasite
Parisite
Parsonsite
Parth<EFBFBD>ite
Partheite
Pascoite
Patr<EFBFBD>nite
Patronite
Paulingite
Paulscherrerite
Pearceite
@@ -984,13 +984,13 @@ Ringwoodite
Roaldite
Robertsite
Rodalquilarite
Roman<EFBFBD>chite
Romanechite
Romeite
Rosasite
Roscoelite
Roselite
Rosenbergite
Rosick<EFBFBD>ite
Rosickyite
Routhierite
Rozenite
Rubicline
@@ -1005,7 +1005,7 @@ Sabieite
Sabinaite
Sacrofanite
Safflorite
Sal ammoniac
Sal Ammoniac
Saleeite
Saliotite
Salzburgite
@@ -1027,14 +1027,14 @@ Satterlyite
Sauconite
Sborgite
Scapolite
Sch<EFBFBD>ferite
Schaferite
Scheelite
Schmiederite
Schoepite
Schorl
Schreibersite
Schreyerite
Schr<EFBFBD>ckingerite
Schrockingerite
Schwertmannite
Scolecite
Scorodite
@@ -1052,7 +1052,7 @@ Sellaite
Semseyite
Senarmontite
Sepiolite
S<EFBFBD>randite
Serandite
Serendibite
Serpentine
Serpierite
@@ -1116,7 +1116,7 @@ Strontianite
Struvite
Studenitsite
Studtite
St<EFBFBD>tzite
Stutzite
Suanite
Suessite
Sugilite
@@ -1212,7 +1212,7 @@ Uklonskovite
Ulexite
Ullmannite
Ulrichite
Ulv<EFBFBD>spinel
Ulvospinel
Umangite
Umbite
Upalite
@@ -1278,7 +1278,7 @@ Wollastonite
Woodhouseite
Wulfenite
Wurtzite
W<EFBFBD>stite
Wustite
Wyartite
Xanthiosite
Xanthoconite
@@ -1302,7 +1302,7 @@ Yuksporite
Zabuyelite
Zaccagnaite
Zaherite
Za<EFBFBD>rite
Zairite
Zakharovite
Zanazziite
Zaratite