Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refinery and Sales Research #1688

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion ModularTegustation/tegu_items/refinery/refinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
//TRUE is for loaded
var/loaded = FALSE

/obj/structure/refinery/Initialize()
. = ..()
GLOB.lobotomy_devices += src

/obj/structure/refinery/Destroy()
GLOB.lobotomy_devices -= src
if(loaded)
new /obj/item/rawpe(get_turf(src))
return ..()

/obj/structure/refinery/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/rawpe))
if(!loaded)
Expand Down Expand Up @@ -63,7 +73,7 @@
to_chat(user, "<span class='danger'>You filtered it too hard! The PE box was destroyed.</span>")
loaded = FALSE
else if(blackjack == 0)
timeleft -= 20
timeleft -= round(refine_timer/3)
to_chat(user, "<span class='notice'>You correctly filter the PE, speding up refining.</span>")

/obj/structure/refinery/proc/counter()
Expand Down
5 changes: 5 additions & 0 deletions ModularTegustation/tegu_items/refinery/sales.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
/obj/structure/pe_sales/Initialize()
. = ..()
crates_per_box = crate_timer/power_timer
GLOB.lobotomy_devices += src

/obj/structure/pe_sales/Destroy()
GLOB.lobotomy_devices -= src
return ..()

/obj/structure/pe_sales/examine(mob/user)
. = ..()
Expand Down
12 changes: 10 additions & 2 deletions ModularTegustation/tegu_items/representative/console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
//For things we already researched.
var/list/researched_stuff = list()

/obj/structure/representative_console/Initialize()
. = ..()
GLOB.lobotomy_devices += src

/obj/structure/representative_console/Destroy()
GLOB.lobotomy_devices -= src
return ..()

//Landmarks for placing office stuff
/obj/effect/landmark/custom_office/poster
name = "custom office landmark"
Expand Down Expand Up @@ -77,15 +85,15 @@
dat += " ----------------------------<br>"
for(var/datum/data/extraction_cargo/A in order_list)
if((A.catagory == our_corporation || A.catagory == ALL_REP_RESEARCH))
dat += " <A href='byond://?src=[REF(src)];purchase=[REF(A)]'>[A.equipment_name]([A.cost] AHN)</A><br>"
dat += " <A href='byond://?src=[REF(src)];purchase=[REF(A)]'>[A.equipment_name] ([A.cost] AHN)</A><br>"

dat += " ----------------------------<br>"
dat += " :[our_corporation] RESEARCH:<br>"
dat += "-[pe_points] PE- <br>"
dat += " ----------------------------<br>"
for(var/datum/data/lc13research/R in research_list)
if(!LAZYFIND(researched_stuff, R) && R.CanResearch(src))
dat += " <A href='byond://?src=[REF(src)];research=[REF(R)]'>[R.research_name]([R.cost] PE)</A><br>"
dat += " <A href='byond://?src=[REF(src)];research=[REF(R)]'>[R.research_name] ([R.cost] PE)</A><br>"
dat += " :[R.research_desc] <br>"
dat += " -----<br>"
var/datum/browser/popup = new(user, "RepVendor", "RepVendor", 440, 640)
Expand Down
21 changes: 0 additions & 21 deletions ModularTegustation/tegu_items/representative/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,6 @@
#define AVERAGE_RESEARCH_PRICE 10
#define HIGH_RESEARCH_PRICE 25
#define MAX_RESEARCH_PRICE 50
//-----GENERAL-----

/datum/data/lc13research/ratknife
research_name = "Rat Equipment Stock"
research_desc = "Contribute some energy to request the clerks in charge of stocking our equipment to buy a crate of knives."
cost = LOW_RESEARCH_PRICE
corp = ALL_REP_RESEARCH

/datum/data/lc13research/ratknife/ResearchEffect(obj/structure/representative_console/caller)
ItemUnlock(caller.order_list, "Rat Knife", /obj/item/ego_weapon/city/rats/knife, 100)
ItemUnlock(caller.order_list, "Rat Hammer", /obj/item/ego_weapon/city/rats, 100)
ItemUnlock(caller.order_list, "Brick", /obj/item/ego_weapon/city/rats/brick, 100)
ItemUnlock(caller.order_list, "Metal Pipe", /obj/item/ego_weapon/city/rats/pipe, 100)
..()

/datum/data/lc13research/mobspawner/zwei
research_name = "Zwei Section 6 Team"
research_desc = "For a small slice of funds we can hire the local zwei to assist us."
cost = AVERAGE_RESEARCH_PRICE
corp = ALL_REP_RESEARCH
mobspawner_type = /obj/effect/mob_spawn/human/supplypod/r_corp/zwei_call

/* Unfinished
/datum/data/lc13research/mobspawner/association
Expand Down
60 changes: 60 additions & 0 deletions ModularTegustation/tegu_items/representative/research/generic.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//-----GENERAL-----

/datum/data/lc13research/ratknife
research_name = "Rat Equipment Stock"
research_desc = "Contribute some energy to request the clerks in charge of stocking <br>our equipment to buy a crate of knives."
cost = LOW_RESEARCH_PRICE
corp = ALL_REP_RESEARCH

/datum/data/lc13research/ratknife/ResearchEffect(obj/structure/representative_console/caller)
ItemUnlock(caller.order_list, "Rat Knife", /obj/item/ego_weapon/city/rats/knife, 100)
ItemUnlock(caller.order_list, "Rat Hammer", /obj/item/ego_weapon/city/rats, 100)
ItemUnlock(caller.order_list, "Brick", /obj/item/ego_weapon/city/rats/brick, 100)
ItemUnlock(caller.order_list, "Metal Pipe", /obj/item/ego_weapon/city/rats/pipe, 100)
..()

/datum/data/lc13research/refineryspeed
research_name = "Refinement Process Efficiency Upgrade I"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = LOW_RESEARCH_PRICE
corp = ALL_REP_RESEARCH

/datum/data/lc13research/refineryspeed/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
for(var/obj/structure/refinery/ref in GLOB.lobotomy_devices)
ref.refine_timer -= initial(ref.refine_timer)/10

/datum/data/lc13research/refineryspeed/lvl2
research_name = "Refinement Process Efficiency Upgrade II"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = LOW_RESEARCH_PRICE
corp = ALL_REP_RESEARCH
required_research = /datum/data/lc13research/refineryspeed

/datum/data/lc13research/salesspeed
research_name = "Sales Process Efficiency Upgrade I"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = LOW_RESEARCH_PRICE
corp = ALL_REP_RESEARCH

/datum/data/lc13research/salesspeed/ResearchEffect(obj/structure/representative_console/caller)
. = ..()
for(var/obj/structure/pe_sales/sales in GLOB.lobotomy_devices)
sales.power_timer -= initial(sales.power_timer)/10
sales.crate_timer -= (initial(sales.power_timer)/10)*sales.crates_per_box

/datum/data/lc13research/salesspeed/lvl2
research_name = "Sales Process Efficiency Upgrade II"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = LOW_RESEARCH_PRICE
corp = ALL_REP_RESEARCH
required_research = /datum/data/lc13research/salesspeed

/// MOB SPAWNERS

/datum/data/lc13research/mobspawner/zwei
research_name = "Zwei Section 6 Team"
research_desc = "For a small slice of funds we can hire the local zwei to assist us."
cost = AVERAGE_RESEARCH_PRICE
corp = ALL_REP_RESEARCH
mobspawner_type = /obj/effect/mob_spawn/human/supplypod/r_corp/zwei_call
100 changes: 93 additions & 7 deletions ModularTegustation/tegu_items/representative/research/lcorp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

//Roll stuff
/datum/data/lc13research/reroll
research_name = "Reroll Abno Choices "
research_name = "Reroll Abno Choices"
research_desc = "You can PROBABLY convince HQ Extraction to give you another set of 3 abnos, as you're pretty tight with Big B. "
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
Expand All @@ -14,7 +14,7 @@
..()

/datum/data/lc13research/redroll
research_name = "Enable Red Roll "
research_name = "Enable Red Roll"
research_desc = "HQ Extraction trusts your judgement to let the manager press the big red button. <br>Everyone involved knows that this is a bad idea "
cost = LOW_RESEARCH_PRICE
corp = L_CORP_REP
Expand All @@ -26,23 +26,23 @@

//RAKS overcharge
/datum/data/lc13research/regenerator_overcharge
research_name = "Repeatable: RAK the Regenerator System "
research_name = "Repeatable: RAK the Regenerator System"
research_desc = "The security department blueprints say that all the regenerators <br>healing systems are connected at a junction point. <br>A department clerk offers to take the 10 second trip to the junction <br>and overcharge the whole system at the cost of some refined PE."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP

/datum/data/lc13research/regenerator_overcharge/ResearchEffect(obj/structure/representative_console/caller)
if(repeat_cooldown > world.time)
return
for(var/obj/machinery/regenerator/R in GLOB.regenerators)
for(var/obj/machinery/regenerator/R in GLOB.lobotomy_devices)
R.burst = TRUE
caller.visible_message(span_notice("The [caller] rumbles for a moment soon after your message is delivered."))
repeat_cooldown = world.time + (10 SECONDS)


//PE quota Stuff
/datum/data/lc13research/pe_quota1
research_name = "Alter Facility PE Quota I "
research_name = "Alter Facility PE Quota I"
research_desc = "You think you may be able to remove 1000 PE from the PE quota <br>at the cost of some raw PE. <br>Hopefully the sephirah overlook your tampering with the L corp delivery systems."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
Expand All @@ -54,7 +54,7 @@
..()

/datum/data/lc13research/pe_quota2
research_name = "Alter Facility PE Quota II "
research_name = "Alter Facility PE Quota II"
research_desc = "You think you may be able to remove a further 1000 PE from the PE quota <br>at the cost of some raw PE. <br>This will however forfeit your bonus at the end of the shift."
cost = AVERAGE_RESEARCH_PRICE+5
corp = L_CORP_REP
Expand All @@ -67,7 +67,7 @@
..()

/datum/data/lc13research/pe_quota3
research_name = "Alter Facility PE Quota III "
research_name = "Alter Facility PE Quota III"
research_desc = "You think you may be able to remove a further 1000 PE from the PE quota <br>at the cost of some raw PE. <br>The manager will be contacted about this, but you think you can weasel them out of <br>any issues with the district manager."
cost = AVERAGE_RESEARCH_PRICE+10
corp = L_CORP_REP
Expand Down Expand Up @@ -113,3 +113,89 @@
/datum/data/lc13research/understandingmachine/ResearchEffect(obj/structure/representative_console/caller)
new /obj/item/understandingbooster(get_turf(caller))
..()

//Refinery Upgrades
/datum/data/lc13research/refineryspeed/lvl3
research_name = "Refinement Process Efficiency Upgrade III"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = LOW_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/refineryspeed/lvl2

/datum/data/lc13research/refineryspeed/lvl4
research_name = "Refinement Process Efficiency Upgrade IV"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = LOW_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/refineryspeed/lvl3

/datum/data/lc13research/refineryspeed/lvl5
research_name = "Refinement Process Efficiency Upgrade V"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/refineryspeed/lvl4

/datum/data/lc13research/refineryspeed/lvl6
research_name = "Refinement Process Efficiency Upgrade VI"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/refineryspeed/lvl5

/datum/data/lc13research/refineryspeed/lvl7
research_name = "Refinement Process Efficiency Upgrade VII"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/refineryspeed/lvl6

/datum/data/lc13research/refineryspeed/lvl8
research_name = "Refinement Process Efficiency Upgrade VIII"
research_desc = "Contribute some energy to improve the Refinery's processing speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/refineryspeed/lvl7

//Sales Upgrades
/datum/data/lc13research/salesspeed/lvl3
research_name = "Sales Process Efficiency Upgrade III"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = LOW_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/salesspeed/lvl2

/datum/data/lc13research/salesspeed/lvl4
research_name = "Sales Process Efficiency Upgrade IV"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = LOW_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/salesspeed/lvl3

/datum/data/lc13research/salesspeed/lvl5
research_name = "Sales Process Efficiency Upgrade V"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/salesspeed/lvl4

/datum/data/lc13research/salesspeed/lvl6
research_name = "Sales Process Efficiency Upgrade VI"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/salesspeed/lvl5

/datum/data/lc13research/salesspeed/lvl7
research_name = "Sales Process Efficiency Upgrade VII"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/salesspeed/lvl6

/datum/data/lc13research/salesspeed/lvl8
research_name = "Sales Process Efficiency Upgrade VIII"
research_desc = "Contribute some energy to improve the sales machines' transfer speed."
cost = AVERAGE_RESEARCH_PRICE
corp = L_CORP_REP
required_research = /datum/data/lc13research/salesspeed/lvl7
12 changes: 6 additions & 6 deletions ModularTegustation/tegu_items/representative/research/ncorp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//N Corp sells exp boosters.
///Stat booster line
/datum/data/lc13research/nbuff1
research_name = "N-Corporation Small Experience Ampules (x3) "
research_name = "N-Corporation Small Experience Ampules (x3)"
research_desc = "An order of 3 small experience ampules. <br>We make these dime a dozen so we can ship 3 of them over to Lcorp for cheap."
cost = LOW_RESEARCH_PRICE
corp = N_CORP_REP
Expand All @@ -14,7 +14,7 @@
..()

/datum/data/lc13research/nbuff2
research_name = "N-Corporation Medium Experience Ampules (x3) "
research_name = "N-Corporation Medium Experience Ampules (x3)"
research_desc = "An order of 3 medium experience ampules. <br>These ones are a little pricy, but we're selling them for a lot so it's all good."
cost = AVERAGE_RESEARCH_PRICE
corp = N_CORP_REP
Expand All @@ -27,7 +27,7 @@
..()

/datum/data/lc13research/nbuff3
research_name = "N-Corporation Large Experience Ampules (x3) "
research_name = "N-Corporation Large Experience Ampules (x3)"
research_desc = "An order of 3 large experience ampules. <br>These ones were a pain in the ass to get ahold of, to be honest with you. \
<br> L-Corp is a good partner though, so we can part with these"
cost = HIGH_RESEARCH_PRICE
Expand All @@ -41,7 +41,7 @@
..()

/datum/data/lc13research/nbuff4
research_name = "N-Corporation Extra Large Experience Ampule "
research_name = "N-Corporation Extra Large Experience Ampule"
research_desc = "An order of an extra large experience ampule. <br>These ones were a pain in the ass to get ahold of, to be honest with you. \
<br> L-Corp is a good partner though, so we can part with these"
cost = MAX_RESEARCH_PRICE
Expand All @@ -55,7 +55,7 @@

//Limit Breaker Line
/datum/data/lc13research/nlimit1
research_name = "N-Corporation Limit Breaker Ampule I "
research_name = "N-Corporation Limit Breaker Ampule I"
research_desc = "An order of an ampule to let you increase your maximum stats. <br>These ones are hot off the presses, and don't come cheap."
cost = HIGH_RESEARCH_PRICE
corp = N_CORP_REP
Expand All @@ -65,7 +65,7 @@
..()

/datum/data/lc13research/nlimit2
research_name = "N-Corporation Limit Breaker Ampule II "
research_name = "N-Corporation Limit Breaker Ampule II"
research_desc = "An order of an ampule to let you increase your maximum stats. <br>These ones are hot off the presses, and don't come cheap."
cost = HIGH_RESEARCH_PRICE
corp = N_CORP_REP
Expand Down
Loading
Loading