merge conflict and job/dept discounts support.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/T = pick(turfs)
|
||||
new /datum/spacevine_controller(T) //spawn a controller at turf
|
||||
new /datum/spacevine_controller(T, pick(subtypesof(/datum/spacevine_mutation)), rand(30,100), rand(5,10), src) //spawn a controller at turf with randomized stats and a single random mutation
|
||||
|
||||
|
||||
/datum/spacevine_mutation
|
||||
@@ -227,13 +227,13 @@
|
||||
quality = NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/thorns/on_cross(obj/structure/spacevine/holder, mob/living/crosser)
|
||||
if(prob(severity) && istype(crosser) && !isvineimmune(holder))
|
||||
if(prob(severity) && istype(crosser) && !isvineimmune(crosser))
|
||||
var/mob/living/M = crosser
|
||||
M.adjustBruteLoss(5)
|
||||
to_chat(M, "<span class='alert'>You cut yourself on the thorny vines.</span>")
|
||||
|
||||
/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
|
||||
if(prob(severity) && istype(hitter) && !isvineimmune(holder))
|
||||
if(prob(severity) && istype(hitter) && !isvineimmune(hitter))
|
||||
var/mob/living/M = hitter
|
||||
M.adjustBruteLoss(5)
|
||||
to_chat(M, "<span class='alert'>You cut yourself on the thorny vines.</span>")
|
||||
@@ -251,7 +251,7 @@
|
||||
holder.obj_integrity = holder.max_integrity
|
||||
|
||||
/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
|
||||
if(I.get_sharpness())
|
||||
if(I?.get_sharpness())
|
||||
. = expected_damage * 0.5
|
||||
else
|
||||
. = expected_damage
|
||||
@@ -344,16 +344,17 @@
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/weapons/slash.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/slash.ogg', 50, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/spacevine/Crossed(mob/crosser)
|
||||
if(isliving(crosser))
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_cross(src, crosser)
|
||||
/obj/structure/spacevine/Crossed(atom/movable/AM)
|
||||
if(!isliving(AM))
|
||||
return
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_cross(src, AM)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/spacevine/attack_hand(mob/user)
|
||||
@@ -378,10 +379,9 @@
|
||||
var/list/vine_mutations_list
|
||||
var/mutativeness = 1
|
||||
|
||||
/datum/spacevine_controller/New(turf/location, list/muts, potency, production)
|
||||
/datum/spacevine_controller/New(turf/location, list/muts, potency, production, datum/round_event/event = null)
|
||||
vines = list()
|
||||
growth_queue = list()
|
||||
spawn_spacevine_piece(location, null, muts)
|
||||
START_PROCESSING(SSobj, src)
|
||||
vine_mutations_list = list()
|
||||
init_subtypes(/datum/spacevine_mutation/, vine_mutations_list)
|
||||
@@ -428,6 +428,7 @@
|
||||
for(var/datum/spacevine_mutation/SM in SV.mutations)
|
||||
SM.on_birth(SV)
|
||||
location.Entered(SV)
|
||||
return SV
|
||||
|
||||
/datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S)
|
||||
S.master = null
|
||||
@@ -531,14 +532,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(isvineimmune(mover))
|
||||
. = TRUE
|
||||
else
|
||||
. = ..()
|
||||
return TRUE
|
||||
|
||||
/proc/isvineimmune(atom/A)
|
||||
. = FALSE
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(("vines" in M.faction) || ("plants" in M.faction))
|
||||
. = TRUE
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -23,6 +23,9 @@
|
||||
/datum/round_event/wormholes/start()
|
||||
for(var/turf/open/floor/T in world)
|
||||
if(is_station_level(T.z))
|
||||
var/area/A = get_area(T)
|
||||
if(A.outdoors)
|
||||
continue
|
||||
pick_turfs += T
|
||||
|
||||
for(var/i = 1, i <= number_of_wormholes, i++)
|
||||
|
||||
Reference in New Issue
Block a user