mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Atomic Gardening (#28657)
* adds rad_act to hydro trays * small adjustments
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
pixel_y = 8
|
||||
rad_insulation_beta = RAD_MOB_INSULATION
|
||||
rad_insulation_gamma = RAD_MOB_INSULATION
|
||||
/// The amount of water in the tray (max 100)
|
||||
var/waterlevel = 100
|
||||
/// The maximum amount of water in the tray
|
||||
@@ -1112,3 +1114,26 @@
|
||||
return
|
||||
if(user.plant_analyzer)
|
||||
send_plant_details(user)
|
||||
|
||||
/obj/machinery/hydroponics/rad_act(atom/source, amount, emission_type)
|
||||
if(!myseed)
|
||||
return
|
||||
// adjust radiation value according to type
|
||||
switch(emission_type)
|
||||
if(GAMMA_RAD)
|
||||
amount /= ((1 - rad_insulation_gamma) / 2)
|
||||
if(BETA_RAD)
|
||||
amount /= (1 - rad_insulation_beta)
|
||||
if(ALPHA_RAD)
|
||||
amount /= 2
|
||||
|
||||
var/top_range = 100 * amount / (amount + 50)
|
||||
var/roll = rand(0, top_range)
|
||||
|
||||
// Do the rad stuff
|
||||
if(prob(roll / 20))
|
||||
adjustHealth(-roll / 20)
|
||||
if(prob(roll / 7))
|
||||
myseed.mutate(roll / 2, get_mutation_focus())
|
||||
if(top_range > 30 && prob(roll / 10))
|
||||
mut_beamed = TRUE
|
||||
|
||||
Reference in New Issue
Block a user