Merge pull request #9186 from phil235/AutoDrobeSupplyFix

Autodrobe and cult construct bugfixes
This commit is contained in:
Jordie
2015-04-28 23:49:20 +10:00
3 changed files with 23 additions and 9 deletions
+2
View File
@@ -169,6 +169,8 @@
var/mob/living/simple_animal/shade/A = locate() in C
if(A)
var/construct_class = alert(U, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
if(!T || !T.loc)
return
switch(construct_class)
if("Juggernaut")
makeNewConstruct(/mob/living/simple_animal/construct/armored, A, U)
+20 -8
View File
@@ -234,14 +234,6 @@
return
if(component_parts && istype(W, /obj/item/weapon/crowbar))
var/list/all_products = product_records + hidden_records + coin_records
for(var/datum/data/vending_product/machine_content in all_products)
while(machine_content.amount !=0)
for(var/obj/item/weapon/vending_refill/VR in component_parts)
VR.charges++
machine_content.amount--
if(!machine_content.amount)
break
default_deconstruction_crowbar(W)
if(istype(W, /obj/item/weapon/screwdriver) && anchored)
@@ -282,6 +274,25 @@
else
..()
/obj/machinery/vending/default_deconstruction_crowbar(var/obj/item/O)
var/list/all_products = product_records + hidden_records + coin_records
for(var/datum/data/vending_product/machine_content in all_products)
while(machine_content.amount !=0)
var/safety = 0 //to avoid infinite loop
for(var/obj/item/weapon/vending_refill/VR in component_parts)
safety++
if(VR.charges < initial(VR.charges))
VR.charges++
machine_content.amount--
if(!machine_content.amount)
break
else
safety--
if(safety <= 0)
break
..()
/obj/machinery/vending/emag_act(user as mob)
if(!emagged)
emagged = 1
@@ -594,6 +605,7 @@
contraband = list()
premium = list()
IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY CANISTER CHARGES in vending_items.dm
*/
/*
@@ -56,7 +56,7 @@
/obj/item/weapon/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
charges = 26// of 77
charges = 29// of 87
/obj/item/weapon/vending_refill/clothing
machine_name = "ClothesMate"