Fixes typos and errors I made.

Fixes unscrewing a broken computer only dropping one glass shard instead of two.
Fixes AI holopad, recharger, keycard authentication device, reagent_dispensers reagentgrinder, and APC  not being attackable.
Fixes APC cover knockdown being random, it now uses the take_damage() proc, which also allows animals and xenos to knock down the cover of a broken apc.
This commit is contained in:
phil235
2016-04-25 22:29:17 +02:00
parent fcf544283d
commit bb1f60e769
18 changed files with 102 additions and 86 deletions
+6 -2
View File
@@ -73,17 +73,21 @@
return
if(istype(O, /obj/item/weapon/reagent_containers/glass))
. = 1 //no afterattack
if(!panel_open)
if(beaker)
user << "<span class='warning'>A container is already loaded into the machine.</span>"
else
user.unEquip(O)
if(!user.drop_item())
return
O.loc = src
beaker = O
user << "<span class='notice'>You add the container to the machine.</span>"
update_icon()
updateUsrDialog()
return 1 //no afterattack
else
user << "<span class='warning'>Close the maintenance panel first.</span>"
return
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/PB = O
+12 -13
View File
@@ -1,4 +1,4 @@
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor)
/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user)
var/t_amount = 0
if(t_max == -1)
if(extractor)
@@ -13,6 +13,8 @@
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/grown/))
var/obj/item/weapon/reagent_containers/food/snacks/grown/F = O
if(F.seed)
if(user && !user.drop_item()) //couldn't drop the item
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
@@ -23,6 +25,8 @@
else if(istype(O, /obj/item/weapon/grown))
var/obj/item/weapon/grown/F = O
if(F.seed)
if(user && !user.drop_item())
return
while(t_amount < t_max)
var/obj/item/seeds/t_prod = F.seed.Copy()
t_prod.loc = seedloc
@@ -89,17 +93,13 @@
user << "<span class='notice'>There are no seeds in \the [O.name].</span>"
return
if(!user.drop_item()) //couldn't drop the item
user << "<span class='warning'>\The [O] is stuck to your hand, you cannot put it in the seed extractor!</span>"
return
else if(seedify(O,-1, src))
else if(seedify(O,-1, src, user))
user << "<span class='notice'>You extract some seeds.</span>"
return
else if (istype(O,/obj/item/seeds))
add_seed(O)
user << "<span class='notice'>You add [O] to [src.name].</span>"
updateUsrDialog()
if(add_seed(O))
user << "<span class='notice'>You add [O] to [src.name].</span>"
updateUsrDialog()
return
else if(user.a_intent != "harm")
user << "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>"
@@ -188,15 +188,14 @@
if(istype(O.loc,/mob))
var/mob/M = O.loc
if(!M.unEquip(O))
usr << "<span class='warning'>\the [O] is stuck to your hand, you cannot put it in \the [src]!</span>"
return
if(!M.drop_item())
return 0
else if(istype(O.loc,/obj/item/weapon/storage))
var/obj/item/weapon/storage/S = O.loc
S.remove_from_storage(O,src)
O.loc = src
. = 1
for (var/datum/seed_pile/N in piles)
if (O.plantname == N.name && O.lifespan == N.lifespan && O.endurance == N.endurance && O.maturation == N.maturation && O.production == N.production && O.yield == N.yield && O.potency == N.potency)
++N.amount