2014-07-09 04:21:52 -06:00
|
|
|
--blood-del.lua
|
2014-06-26 06:36:57 -06:00
|
|
|
--makes it so that civs won't come with barrels full of blood, ichor, or goo
|
|
|
|
--author Urist Da Vinci
|
2015-03-22 06:24:51 -06:00
|
|
|
--edited by expwnent, scamtank
|
2014-06-26 06:36:57 -06:00
|
|
|
|
|
|
|
local my_entity=df.historical_entity.find(df.global.ui.civ_id)
|
|
|
|
local sText=" "
|
|
|
|
local k=0
|
|
|
|
local v=1
|
|
|
|
|
|
|
|
for x,y in pairs(df.global.world.entities.all) do
|
|
|
|
my_entity=y
|
|
|
|
k=0
|
|
|
|
while k < #my_entity.resources.misc_mat.extracts.mat_index do
|
|
|
|
v=my_entity.resources.misc_mat.extracts.mat_type[k]
|
|
|
|
sText=dfhack.matinfo.decode(v,my_entity.resources.misc_mat.extracts.mat_index[k])
|
|
|
|
if (sText==nil) then
|
|
|
|
--LIQUID barrels
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_type:erase(k)
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_index:erase(k)
|
|
|
|
k=k-1
|
|
|
|
else
|
|
|
|
if(sText.material.id=="BLOOD") then
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_type:erase(k)
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_index:erase(k)
|
|
|
|
k=k-1
|
|
|
|
end
|
|
|
|
if(sText.material.id=="ICHOR") then
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_type:erase(k)
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_index:erase(k)
|
|
|
|
k=k-1
|
|
|
|
end
|
|
|
|
if(sText.material.id=="GOO") then
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_type:erase(k)
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_index:erase(k)
|
|
|
|
k=k-1
|
|
|
|
end
|
2015-03-22 06:24:51 -06:00
|
|
|
if(sText.material.id=="SWEAT") then
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_type:erase(k)
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_index:erase(k)
|
|
|
|
k=k-1
|
|
|
|
end
|
|
|
|
if(sText.material.id=="TEARS") then
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_type:erase(k)
|
|
|
|
my_entity.resources.misc_mat.extracts.mat_index:erase(k)
|
|
|
|
k=k-1
|
|
|
|
end
|
2014-06-26 06:36:57 -06:00
|
|
|
--VENOM
|
|
|
|
--POISON
|
|
|
|
--FLUID
|
|
|
|
--MILK
|
|
|
|
--EXTRACT
|
2015-02-14 20:53:06 -07:00
|
|
|
|
2014-06-26 06:36:57 -06:00
|
|
|
end
|
|
|
|
k=k+1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|