From 2c61ae8e1294d51928b19c9cfff01be0a1cc3c68 Mon Sep 17 00:00:00 2001 From: Dragor Date: Sun, 5 Jul 2015 00:07:55 +0200 Subject: [PATCH 1/6] Rewording of maintenance drones Just slight rewording of a law to make clearer that they shouldn't interact with crew at all. --- code/datums/ai_laws.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 8c0db1ebd3..f3b6f53666 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -83,7 +83,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen ..() add_inherent_law("Preserve, repair and improve the station to the best of your abilities.") add_inherent_law("Cause no harm to the station or anything on it.") - add_inherent_law("Interfere with no being that is not a fellow drone.") + add_inherent_law("Interact with no being that is not a fellow maintenance drone.") /* General ai_law functions */ From 8925a5b23ee6937466a495ef349679cfc0705f19 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sun, 5 Jul 2015 20:59:23 -0400 Subject: [PATCH 2/6] Stops sampling from being a means of fighting vines Vines can now only be sampled once mature, can only be sampled periodically, and take less damage from sampling. --- code/modules/hydroponics/spreading/spreading.dm | 12 ++++++++++-- .../hydroponics/spreading/spreading_growth.dm | 6 ++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 8d22fc546d..bb9b0e8b30 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -61,6 +61,7 @@ var/list/neighbors = list() var/obj/effect/plant/parent var/datum/seed/seed + var/sampled = 0 var/floor = 0 var/spread_chance = 40 var/spread_distance = 3 @@ -234,11 +235,18 @@ plant_controller.add_plant(src) if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel)) + if(sampled) + user << "\The [src] has already been sampled recently." + return + if(!is_mature()) + user << "\The [src] is not mature enough to yield a sample yet." + return if(!seed) - user << "There is nothing to take a sample from." + user << "There is nothing to take a sample from." return seed.harvest(user,0,1) - health -= (rand(3,5)*10) + health -= (rand(3,5)*5) + sampled = 1 else ..() if(W.force) diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index 716d58c645..32ca7ed33e 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -69,6 +69,12 @@ last_tick = world.time update_neighbors() + if(sampled) + //Should be between 2-7 for given the default range of values for TRAIT_PRODUCTION + var/chance = max(1, round(30/seed.get_trait(TRAIT_PRODUCTION))) + if(prob(chance)) + sampled = 0 + if(is_mature() && neighbors.len && prob(spread_chance)) //spread to 1-3 adjacent turfs depending on yield trait. var/max_spread = between(1, round(seed.get_trait(TRAIT_YIELD)*3/14), 3) From 27911bb7ad0329028469bdeab84b439d8ecd6d29 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 7 Jul 2015 18:02:59 +0100 Subject: [PATCH 3/6] Fixes num2hex --- code/__HELPERS/type2type.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 216a45ee1c..36fa534fa9 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -49,7 +49,7 @@ var/n = 1 // Figure out power. (power of 2) - while (n < num) + while (n <= num) power += 4 n *= 16 @@ -60,7 +60,7 @@ power -= 4 // Append zeroes to make sure that hex is atleast digits long. - var/left = length(hex) - digits + var/left = digits - length(hex) while (left-- > 0) hex = text("0[]", hex) From 89f93d4aacbb0f6d8cabede3bf814383e0fce2d4 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Wed, 8 Jul 2015 16:08:59 +0930 Subject: [PATCH 4/6] Fixes an issue with plants. --- code/modules/hydroponics/trays/tray.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 22c227a8d4..4e1853b76e 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -260,7 +260,6 @@ seed.harvest(user,yield_mod) else seed.harvest(get_turf(src),yield_mod) - // Reset values. harvest = 0 lastproduce = age @@ -292,6 +291,7 @@ mutation_mod = 0 user << "You remove the dead plant." + lastproduce = 0 check_health() return @@ -461,6 +461,7 @@ return user << "You plant the [S.seed.seed_name] [S.seed.seed_noun]." + lastproduce = 0 seed = S.seed //Grab the seed datum. dead = 0 age = 1 From 16abe8148a15505d59e3786f671d01dd33f87503 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 8 Jul 2015 08:58:38 +0200 Subject: [PATCH 5/6] Relocates drone law update to the new law set location. --- code/datums/ai_law_sets.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index 6a3bd7f190..512751b12a 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -96,7 +96,7 @@ /datum/ai_laws/drone/New() add_inherent_law("Preserve, repair and improve the station to the best of your abilities.") add_inherent_law("Cause no harm to the station or anything on it.") - add_inherent_law("Interfere with no being that is not a fellow drone.") + add_inherent_law("Interact with no being that is not a fellow maintenance drone.") ..() /datum/ai_laws/construction_drone From f1a790f16238ac7b4a490b82a32516e4db7861fe Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 8 Jul 2015 09:05:55 +0200 Subject: [PATCH 6/6] Fixes duplicate var definition. --- code/modules/hydroponics/spreading/spreading.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index cea1353573..07d83e6f64 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -58,7 +58,6 @@ var/growth_threshold = 0 var/growth_type = 0 var/max_growth = 0 - var/sampled var/list/neighbors = list() var/obj/effect/plant/parent var/datum/seed/seed