12/21 modernizations from TG live (#103)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
This commit is contained in:
Poojawa
2016-12-22 03:57:55 -06:00
committed by GitHub
parent f5e143a452
commit cf59ac1c3d
2215 changed files with 707445 additions and 87041 deletions
+111 -180
View File
@@ -7,10 +7,6 @@
anchored = 1
use_power = 1
idle_power_usage = 40
use_auto_lights = 1
light_power_on = 2
light_range_on = 3
light_color = LIGHT_COLOR_BLUE
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0
@@ -18,13 +14,35 @@
var/efficiency = 0
var/productivity = 0
var/max_items = 40
var/datum/research/files
var/list/show_categories = list("Food", "Botany Chemicals", "Leather and Cloth")
var/list/timesFiveCategories = list("Food", "Botany Chemicals")
/obj/machinery/biogenerator/New()
..()
files = new /datum/research/biogenerator(src)
create_reagents(1000)
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/biogenerator(null)
B.apply_default_parts(src)
/obj/machinery/biogenerator/Destroy()
if(beaker)
qdel(beaker)
beaker = null
return ..()
/obj/machinery/biogenerator/contents_explosion(severity, target)
..()
if(beaker)
beaker.ex_act(severity, target)
/obj/machinery/biogenerator/handle_atom_del(atom/A)
..()
if(A == beaker)
beaker = null
update_icon()
updateUsrDialog()
/obj/item/weapon/circuitboard/machine/biogenerator
name = "circuit board (Biogenerator)"
build_path = /obj/machinery/biogenerator
@@ -63,6 +81,9 @@
return
/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
if(user.a_intent == INTENT_HARM)
return ..()
if(processing)
user << "<span class='warning'>The biogenerator is currently processing.</span>"
return
@@ -130,11 +151,20 @@
O.loc = src
user << "<span class='info'>You put [O.name] in [src.name]</span>"
return 1 //no afterattack
else if(user.a_intent != "harm")
user << "<span class='warning'>You cannot put this in [src.name]!</span>"
else if (istype(O, /obj/item/weapon/disk/design_disk))
user.visible_message("[user] begins to load \the [O] in \the [src]...",
"You begin to load a design from \the [O]...",
"You hear the chatter of a floppy drive.")
processing = 1
var/obj/item/weapon/disk/design_disk/D = O
if(do_after(user, 10, target = src))
for(var/B in D.blueprints)
if(B)
files.AddDesign2Known(B)
processing = 0
return 1
else
return ..()
user << "<span class='warning'>You cannot put this in [src.name]!</span>"
/obj/machinery/biogenerator/interact(mob/user)
if(stat & BROKEN || panel_open)
@@ -146,7 +176,7 @@
else
switch(menustat)
if("nopoints")
dat += "<div class='statusDisplay'>You do not have biomass to create products.<BR>Please, put growns into reactor and activate it.</div>"
dat += "<div class='statusDisplay'>You do not have enough biomass to create products.<BR>Please, put growns into reactor and activate it.</div>"
menustat = "menu"
if("complete")
dat += "<div class='statusDisplay'>Operation complete.</div>"
@@ -158,43 +188,29 @@
dat += "<div class='statusDisplay'>Not enough space left in container. Unable to create product.</div>"
menustat = "menu"
if(beaker)
var/categories = show_categories.Copy()
for(var/V in categories)
categories[V] = list()
for(var/V in files.known_designs)
var/datum/design/D = files.known_designs[V]
for(var/C in categories)
if(C in D.category)
categories[C] += D
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
dat += "<A href='?src=\ref[src];activate=1'>Activate</A><A href='?src=\ref[src];detach=1'>Detach Container</A>"
dat += "<h3>Food:</h3>"
dat += "<div class='statusDisplay'>"
dat += "10 milk: <A href='?src=\ref[src];create=milk;amount=1'>Make</A><A href='?src=\ref[src];create=milk;amount=5'>x5</A> ([20/efficiency])<BR>"
dat += "10 cream: <A href='?src=\ref[src];create=cream;amount=1'>Make</A><A href='?src=\ref[src];create=cream;amount=5'>x5</A> ([30/efficiency])<BR>"
dat += "Milk carton: <A href='?src=\ref[src];create=cmilk;amount=1'>Make</A><A href='?src=\ref[src];create=cmilk;amount=5'>x5</A> ([100/efficiency])<BR>"
dat += "Cream carton: <A href='?src=\ref[src];create=ccream;amount=1'>Make</A><A href='?src=\ref[src];create=ccream;amount=5'>x5</A> ([300/efficiency])<BR>"
dat += "10u black pepper: <A href='?src=\ref[src];create=bpepper;amount=1'>Make</A><A href='?src=\ref[src];create=bpepper;amount=5'>x5</A> ([25/efficiency])<BR>"
dat += "Pepper mill: <A href='?src=\ref[src];create=mpepper;amount=1'>Make</A><A href='?src=\ref[src];create=mpepper;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Monkey cube: <A href='?src=\ref[src];create=meat;amount=1'>Make</A><A href='?src=\ref[src];create=meat;amount=5'>x5</A> ([250/efficiency])"
dat += "</div>"
dat += "<h3>Botany Chemicals:</h3>"
dat += "<div class='statusDisplay'>"
dat += "E-Z-Nutrient: <A href='?src=\ref[src];create=ez;amount=1'>Make</A><A href='?src=\ref[src];create=ez;amount=5'>x5</A> ([10/efficiency])<BR>"
dat += "Left 4 Zed: <A href='?src=\ref[src];create=l4z;amount=1'>Make</A><A href='?src=\ref[src];create=l4z;amount=5'>x5</A> ([20/efficiency])<BR>"
dat += "Robust Harvest: <A href='?src=\ref[src];create=rh;amount=1'>Make</A><A href='?src=\ref[src];create=rh;amount=5'>x5</A> ([25/efficiency])<BR>"
dat += "Weed Killer: <A href='?src=\ref[src];create=wk;amount=1'>Make</A><A href='?src=\ref[src];create=wk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Pest Killer: <A href='?src=\ref[src];create=pk;amount=1'>Make</A><A href='?src=\ref[src];create=pk;amount=5'>x5</A> ([50/efficiency])<BR>"
dat += "Empty bottle: <A href='?src=\ref[src];create=empty;amount=1'>Make</A><A href='?src=\ref[src];create=empty;amount=5'>x5</A> ([5/efficiency])<BR>"
dat += "</div>"
dat += "<h3>Leather and Cloth:</h3>"
dat += "<div class='statusDisplay'>"
dat += "Roll of cloth: <A href='?src=\ref[src];create=cloth;amount=1'>Make</A><A href='?src=\ref[src];create=tencloth;amount=1'>x10</A> ([50/efficiency])<BR>"
dat += "Wallet: <A href='?src=\ref[src];create=wallet;amount=1'>Make</A> ([100/efficiency])<BR>"
dat += "Botanical gloves: <A href='?src=\ref[src];create=gloves;amount=1'>Make</A> ([250/efficiency])<BR>"
dat += "Utility belt: <A href='?src=\ref[src];create=tbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Security belt: <A href='?src=\ref[src];create=sbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Medical belt: <A href='?src=\ref[src];create=mbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Janitorial belt: <A href='?src=\ref[src];create=jbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Bandolier belt: <A href='?src=\ref[src];create=bbelt;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "Shoulder holster: <A href='?src=\ref[src];create=sholster;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather satchel: <A href='?src=\ref[src];create=satchel;amount=1'>Make</A> ([400/efficiency])<BR>"
dat += "Leather jacket: <A href='?src=\ref[src];create=jacket;amount=1'>Make</A> ([500/efficiency])<BR>"
dat += "Leather overcoat: <A href='?src=\ref[src];create=overcoat;amount=1'>Make</A> ([1000/efficiency])<BR>"
dat += "Rice hat: <A href='?src=\ref[src];create=rice_hat;amount=1'>Make</A> ([300/efficiency])<BR>"
dat += "</div>"
for(var/cat in categories)
dat += "<h3>[cat]:</h3>"
dat += "<div class='statusDisplay'>"
for(var/V in categories[cat])
var/datum/design/D = V
dat += "[D.name]: <A href='?src=\ref[src];create=\ref[D];amount=1'>Make</A>"
if(cat in timesFiveCategories)
dat += "<A href='?src=\ref[src];create=\ref[D];amount=5'>x5</A>"
if(ispath(D.build_path, /obj/item/stack))
dat += "<A href='?src=\ref[src];create=\ref[D];amount=10'>x10</A>"
dat += "([D.materials[MAT_BIOMASS]/efficiency])<br>"
dat += "</div>"
else
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
@@ -211,7 +227,7 @@
return
if (src.stat != 0) //NOPOWER etc
return
if(src.processing)
if(processing)
usr << "<span class='warning'>The biogenerator is in the process of working.</span>"
return
var/S = 0
@@ -234,142 +250,62 @@
menustat = "void"
return
/obj/machinery/biogenerator/proc/check_cost(cost)
if (cost > points)
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = 1)
if(materials.len != 1 || materials[1] != MAT_BIOMASS)
return 0
if (materials[MAT_BIOMASS]*multiplier/efficiency > points)
menustat = "nopoints"
return 1
return 0
else
points -= cost
processing = 1
if(remove_points)
points -= materials[MAT_BIOMASS]*multiplier/efficiency
update_icon()
updateUsrDialog()
return 0
/obj/machinery/biogenerator/proc/check_container_volume(reagent_amount)
if(beaker.reagents.total_volume + reagent_amount > beaker.reagents.maximum_volume)
menustat = "nobeakerspace"
return 1
/obj/machinery/biogenerator/proc/create_product(create)
switch(create)
if("milk")
if(check_container_volume(10))
return 0
else if (check_cost(20/efficiency))
return 0
else beaker.reagents.add_reagent("milk",10)
if("bpepper")
if(check_container_volume(10))
return 0
else if (check_cost(25/efficiency))
return 0
else beaker.reagents.add_reagent("blackpepper",10)
if("cream")
if(check_container_volume(10))
return 0
else if (check_cost(30/efficiency))
return 0
else beaker.reagents.add_reagent("cream",10)
if("cmilk")
if (check_cost(100/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/condiment/milk(src.loc)
if("mpepper")
if (check_cost(50/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/condiment/peppermill(src.loc)
if("ccream")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/drinks/bottle/cream(src.loc)
if("meat")
if (check_cost(250/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/food/snacks/monkeycube(src.loc)
if("ez")
if (check_cost(10/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/ez(src.loc)
if("l4z")
if (check_cost(20/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/l4z(src.loc)
if("rh")
if (check_cost(25/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/rh(src.loc)
if("wk")
if (check_cost(50/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/killer/weedkiller(src.loc)
if("pk")
if (check_cost(50/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/killer/pestkiller(src.loc)
if("empty")
if (check_cost(5/efficiency))
return 0
else new/obj/item/weapon/reagent_containers/glass/bottle/nutrient/empty(src.loc)
if("cloth")
if (check_cost(50/efficiency))
return 0
else new/obj/item/stack/sheet/cloth(src.loc)
if("tencloth")
if (check_cost(500/efficiency))
return 0
else new/obj/item/stack/sheet/cloth/ten(src.loc)
if("wallet")
if (check_cost(100/efficiency))
return 0
else new/obj/item/weapon/storage/wallet(src.loc)
if("gloves")
if (check_cost(250/efficiency))
return 0
else new/obj/item/clothing/gloves/botanic_leather(src.loc)
if("tbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/utility(src.loc)
if("sbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/security(src.loc)
if("mbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/medical(src.loc)
if("jbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/janitor(src.loc)
if("bbelt")
if (check_cost(300/efficiency))
return 0
else new/obj/item/weapon/storage/belt/bandolier(src.loc)
if("sholster")
if (check_cost(400/efficiency))
return 0
else new/obj/item/weapon/storage/belt/holster(src.loc)
if("satchel")
if (check_cost(400/efficiency))
return 0
else new/obj/item/weapon/storage/backpack/satchel(src.loc)
if("jacket")
if (check_cost(500/efficiency))
return 0
else new/obj/item/clothing/suit/jacket/leather(src.loc)
if("overcoat")
if (check_cost(1000/efficiency))
return 0
else new/obj/item/clothing/suit/jacket/leather/overcoat(src.loc)
if("rice_hat")
if (check_cost(300/efficiency))
return 0
else new/obj/item/clothing/head/rice_hat(src.loc)
processing = 0
/obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1)
var/sum_reagents = 0
for(var/R in reagents)
sum_reagents += reagents[R]
sum_reagents *= multiplier
if(beaker.reagents.total_volume + sum_reagents > beaker.reagents.maximum_volume)
menustat = "nobeakerspace"
return 0
return 1
/obj/machinery/biogenerator/proc/create_product(datum/design/D, amount)
if(!beaker || !loc)
return 0
if(ispath(D.build_path, /obj/item/stack))
if(!check_container_volume(D.make_reagents, amount))
return 0
if(!check_cost(D.materials, amount))
return 0
var/obj/item/stack/product = new D.build_path(loc)
product.amount = amount
for(var/R in D.make_reagents)
beaker.reagents.add_reagent(R, D.make_reagents[R]*amount)
else
var/i = amount
while(i > 0)
if(!check_container_volume(D.make_reagents))
return .
if(!check_cost(D.materials))
return .
if(D.build_path)
new D.build_path(loc)
for(var/R in D.make_reagents)
beaker.reagents.add_reagent(R, D.make_reagents[R])
. = 1
--i
menustat = "complete"
update_icon()
return 1
return .
/obj/machinery/biogenerator/proc/detach()
if(beaker)
@@ -393,13 +329,8 @@
else if(href_list["create"])
var/amount = (text2num(href_list["amount"]))
var/i = amount
var/C = href_list["create"]
if(i <= 0)
return
while(i >= 1)
create_product(C)
i--
var/datum/design/D = locate(href_list["create"])
create_product(D, amount)
updateUsrDialog()
else if(href_list["menu"])