Skip to content

Commit

Permalink
more fixes+balance goshdamn
Browse files Browse the repository at this point in the history
  • Loading branch information
kiVts committed May 10, 2024
1 parent 0641622 commit 8282be8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion code/game/objects/items/research_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@

/obj/item/research_upgrades/credits
name = "Research Market (Credits)"
desc = "Research points disk for chemical synthesis, insert this into research computer in order to sell the data and acquire two points" //need to balance this out somehow. either nerf passive income or remove grants from groundside
var/credit_value = 2

/obj/item/research_upgrades/credits/Initialize(mapload, ...)
. = ..()
credit_value = rand(2, 3)
desc = "Research points disk for chemical synthesis, insert this into research computer in order to sell the data and acquire [credit_value] points"
4 changes: 3 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/Evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@
xeno_type = /mob/living/carbon/xenomorph/defender
if(XENO_CASTE_BURROWER)
xeno_type = /mob/living/carbon/xenomorph/burrower

var/obj/item/organ/xeno/organ = locate() in src
if(!isnull(organ))
qdel(organ)
var/mob/living/carbon/xenomorph/new_xeno = new xeno_type(get_turf(src), src)

new_xeno.built_structures = built_structures.Copy()
Expand Down
14 changes: 7 additions & 7 deletions code/modules/reagents/chemistry_machinery/xenomorph_analyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
organ = attacked_item
icon_state = "xeno_analyzer_organ_on"
caste_of_organ = organ.caste_origin
playsound(loc, 'sound/machines/fax.ogg', 15, 1)
if(istype(attacked_item, /obj/item/clothing/accessory/health/research_plate))
var/obj/item/clothing/accessory/health/research_plate/plate = attacked_item
if(plate.recyclable_value == 0 && !plate.can_recycle(user))
Expand All @@ -51,9 +52,10 @@
if(!do_after(user, 3 SECONDS, INTERRUPT_ALL, BUSY_ICON_GENERIC))
to_chat(user, SPAN_WARNING("You were interupted!"))
return
to_chat(user, SPAN_NOTICE("You recycle the plate"))
to_chat(user, SPAN_NOTICE("You recycle [attacked_item]"))
biomass_points += plate.recyclable_value
qdel(attacked_item)
playsound(loc, 'sound/machines/fax.ogg', 15, 1)

/obj/structure/machinery/xenoanalyzer/ui_data(mob/user)
var/list/data = list()
Expand Down Expand Up @@ -103,9 +105,10 @@

if("process_organ")
if(!busy)
addtimer(CALLBACK(src, PROC_REF(process_organ)), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(process_organ)), 3 SECONDS)
icon_state = "xeno_analyzer_on_moving"
playsound(loc, 'sound/machines/blender.ogg', 25, TRUE)
QDEL_NULL(organ)
. = TRUE
busy = TRUE
if("produce")
Expand All @@ -124,11 +127,8 @@
organ = null

/obj/structure/machinery/xenoanalyzer/proc/process_organ()
if(isnull(organ))
return
biomass_points += organ.research_value
icon_state = "xeno_analyzer_off"
QDEL_NULL(organ)
busy = FALSE

/obj/structure/machinery/xenoanalyzer/proc/start_print_upgrade(produce_path, mob/user, variation)
Expand All @@ -149,13 +149,13 @@
if(upgrade.value_upgrade > biomass_points)
to_chat(user, SPAN_WARNING("[src] makes a worrying beep and flashes red, theres not enough data processed to build the requested upgrade!"))
return
if(upgrade.clearance_req > GLOB.chemical_data.clearance_level || upgrade.clearance_req == 6 && !GLOB.chemical_data.reached_x_access)
if((upgrade.clearance_req > GLOB.chemical_data.clearance_level && upgrade.clearance_req != 6) || (upgrade.clearance_req == 6 && !GLOB.chemical_data.reached_x_access))
to_chat(user, SPAN_WARNING("[src] makes a annoying hum and flashes red - you don't have access to this upgrade!"))
return
icon_state = "xeno_analyzer_printing"
busy = TRUE
biomass_points -= upgrade.value_upgrade
addtimer(CALLBACK(src, PROC_REF(print_upgrade), produce_path, variation), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(print_upgrade), produce_path, variation), 3 SECONDS)

/obj/structure/machinery/xenoanalyzer/proc/print_upgrade(produce_path, variation)
busy = FALSE
Expand Down

0 comments on commit 8282be8

Please sign in to comment.