Fixes a whole bunch of bugs. (#7984)

This commit is contained in:
Matt Atlas
2020-01-12 11:37:05 +01:00
committed by GitHub
parent 204b1614e3
commit 06dbe222ad
8 changed files with 56 additions and 13 deletions
@@ -53,11 +53,11 @@
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
if(H.stat != CONSCIOUS)
return
if(prob(33) && isturf(H.loc) && !H.pulledby) //won't move if being pulled
if(prob(33) && isturf(H.loc) && !H.pulledby && !ismob(H.loc)) //won't move if being pulled
step(H, pick(cardinal))
var/obj/held = H.get_active_hand()
if(held && prob(1))
if(held && prob(1) && !ismob(H.loc))
var/turf/T = get_random_turf_in_range(H, 7, 2)
if(T)
if(istype(held, /obj/item/gun) && prob(80))
@@ -67,7 +67,7 @@
H.throw_item(T)
else
H.drop_item()
if(!held && !H.restrained() && prob(5))
if(!held && !H.restrained() && prob(5) && !ismob(H.loc))
var/list/touchables = list()
for(var/obj/O in range(1,get_turf(H)))
if(O.simulated && O.Adjacent(H) && !is_type_in_list(O, no_touchie))
@@ -8,7 +8,7 @@
icon_state_broken = "laptop-broken"
base_idle_power_usage = 5
base_active_power_usage = 25
max_hardware_size = 2
max_hardware_size = 3
max_damage = 50
w_class = 3
var/mob/living/silicon/computer_host // Thing that contains this computer. Used for silicon computers
@@ -3,9 +3,9 @@
/obj/item/modular_computer/silicon/preset/install_default_hardware()
. = ..()
processor_unit = new/obj/item/computer_hardware/processor_unit(src)
hard_drive = new/obj/item/computer_hardware/hard_drive(src)
network_card = new/obj/item/computer_hardware/network_card(src)
processor_unit = new /obj/item/computer_hardware/processor_unit(src)
hard_drive = new /obj/item/computer_hardware/hard_drive(src)
network_card = new /obj/item/computer_hardware/network_card/advanced(src)
/obj/item/modular_computer/silicon/preset/install_default_programs()
@@ -24,9 +24,6 @@
if(!istype(target))
return 0
if(status & ORGAN_CUT_AWAY)
return 0 //organs don't work very well in the body when they aren't properly attached
// robotic organs emulate behavior of the equivalent flesh organ of the species
if(BP_IS_ROBOTIC(src) || !species)
species = target.species
@@ -177,7 +177,7 @@
if(BP_IS_ROBOTIC(E))
continue
if(heal_internal && (E.status & ORGAN_BROKEN) && E.damage < (E.min_broken_damage * config.organ_health_multiplier)) // So we don't mend and autobreak.
if(heal_internal && (E.status & ORGAN_BROKEN) && E.damage < E.min_broken_damage) // So we don't mend and autobreak.
if(spend_power(heal_rate))
if(E.mend_fracture())
to_chat(H, span("notice", "Your autoredactive faculty coaxes together the shattered bones in your [E.name]."))
+1 -2
View File
@@ -281,8 +281,7 @@
user.visible_message("<span class='notice'>[user] has transplanted \the [tool] into [target]'s [affected.name].</span>", \
"<span class='notice'>You have transplanted \the [tool] into [target]'s [affected.name].</span>")
var/obj/item/organ/O = tool
if(istype(O))
user.remove_from_mob(O)
if(istype(O) && user.unEquip(O))
O.replaced(target,affected)
playsound(target.loc, 'sound/effects/squelch1.ogg', 50, 1)