Merge remote-tracking branch 'citadel/master' into mobility_flags
This commit is contained in:
@@ -548,6 +548,9 @@
|
||||
cooldown = world.time
|
||||
owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
||||
|
||||
/datum/action/item_action/flash
|
||||
name = "Flash"
|
||||
|
||||
//Preset for spells
|
||||
/datum/action/spell_action
|
||||
check_flags = 0
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
/datum/component/nanites/RegisterWithParent()
|
||||
. = ..()
|
||||
RegisterSignal(parent, COMSIG_HAS_NANITES, .proc/confirm_nanites)
|
||||
RegisterSignal(parent, COMSIG_NANITE_IS_STEALTHY, .proc/check_stealth)
|
||||
RegisterSignal(parent, COMSIG_NANITE_UI_DATA, .proc/nanite_ui_data)
|
||||
RegisterSignal(parent, COMSIG_NANITE_GET_PROGRAMS, .proc/get_programs)
|
||||
RegisterSignal(parent, COMSIG_NANITE_SET_VOLUME, .proc/set_volume)
|
||||
@@ -57,10 +58,12 @@
|
||||
RegisterSignal(parent, COMSIG_LIVING_MINOR_SHOCK, .proc/on_minor_shock)
|
||||
RegisterSignal(parent, COMSIG_SPECIES_GAIN, .proc/check_viable_biotype)
|
||||
RegisterSignal(parent, COMSIG_NANITE_SIGNAL, .proc/receive_signal)
|
||||
RegisterSignal(parent, COMSIG_NANITE_COMM_SIGNAL, .proc/receive_comm_signal)
|
||||
|
||||
/datum/component/nanites/UnregisterFromParent()
|
||||
. = ..()
|
||||
UnregisterSignal(parent, list(COMSIG_HAS_NANITES,
|
||||
COMSIG_NANITE_IS_STEALTHY,
|
||||
COMSIG_NANITE_UI_DATA,
|
||||
COMSIG_NANITE_GET_PROGRAMS,
|
||||
COMSIG_NANITE_SET_VOLUME,
|
||||
@@ -79,7 +82,8 @@
|
||||
COMSIG_LIVING_MINOR_SHOCK,
|
||||
COMSIG_MOVABLE_HEAR,
|
||||
COMSIG_SPECIES_GAIN,
|
||||
COMSIG_NANITE_SIGNAL))
|
||||
COMSIG_NANITE_SIGNAL,
|
||||
COMSIG_NANITE_COMM_SIGNAL))
|
||||
|
||||
/datum/component/nanites/Destroy()
|
||||
STOP_PROCESSING(SSnanites, src)
|
||||
@@ -188,6 +192,9 @@
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.on_minor_shock()
|
||||
|
||||
/datum/component/nanites/proc/check_stealth(datum/source)
|
||||
return stealth
|
||||
|
||||
/datum/component/nanites/proc/on_death(datum/source, gibbed)
|
||||
for(var/X in programs)
|
||||
var/datum/nanite_program/NP = X
|
||||
@@ -198,6 +205,12 @@
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.receive_signal(code, source)
|
||||
|
||||
/datum/component/nanites/proc/receive_comm_signal(datum/source, comm_code, comm_message, comm_source = "an unidentified source")
|
||||
for(var/X in programs)
|
||||
if(istype(X, /datum/nanite_program/triggered/comm))
|
||||
var/datum/nanite_program/triggered/comm/NP = X
|
||||
NP.receive_comm_signal(comm_code, comm_message, comm_source)
|
||||
|
||||
/datum/component/nanites/proc/check_viable_biotype()
|
||||
if(!(MOB_ORGANIC in host_mob.mob_biotypes) && !(MOB_UNDEAD in host_mob.mob_biotypes))
|
||||
qdel(src) //bodytype no longer sustains nanites
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/datum/component/spawner
|
||||
var/mob_types = list(/mob/living/simple_animal/hostile/carp)
|
||||
var/spawn_time = 300 //30 seconds default
|
||||
var/list/spawned_mobs = list()
|
||||
var/spawn_delay = 0
|
||||
var/max_mobs = 5
|
||||
var/spawn_text = "emerges from"
|
||||
var/list/faction = list("mining")
|
||||
|
||||
/datum/component/spawner/Initialize(_mob_types, _spawn_time, _faction, _spawn_text, _max_mobs)
|
||||
if(_spawn_time)
|
||||
spawn_time=_spawn_time
|
||||
if(_mob_types)
|
||||
mob_types=_mob_types
|
||||
if(_faction)
|
||||
faction=_faction
|
||||
if(_spawn_text)
|
||||
spawn_text=_spawn_text
|
||||
if(_max_mobs)
|
||||
max_mobs=_max_mobs
|
||||
|
||||
RegisterSignal(parent, list(COMSIG_PARENT_QDELETING), .proc/stop_spawning)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/component/spawner/process()
|
||||
try_spawn_mob()
|
||||
|
||||
|
||||
/datum/component/spawner/proc/stop_spawning(force, hint)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
for(var/mob/living/simple_animal/L in spawned_mobs)
|
||||
if(L.nest == src)
|
||||
L.nest = null
|
||||
spawned_mobs = null
|
||||
|
||||
/datum/component/spawner/proc/try_spawn_mob()
|
||||
var/atom/P = parent
|
||||
if(spawned_mobs.len >= max_mobs)
|
||||
return 0
|
||||
if(spawn_delay > world.time)
|
||||
return 0
|
||||
spawn_delay = world.time + spawn_time
|
||||
var/chosen_mob_type = pick(mob_types)
|
||||
var/mob/living/simple_animal/L = new chosen_mob_type(P.loc)
|
||||
L.flags_1 |= (P.flags_1 & ADMIN_SPAWNED_1)
|
||||
spawned_mobs += L
|
||||
L.nest = src
|
||||
L.faction = src.faction
|
||||
P.visible_message("<span class='danger'>[L] [spawn_text] [P].</span>")
|
||||
@@ -0,0 +1,26 @@
|
||||
/datum/element/dusts_on_catatonia
|
||||
element_flags = ELEMENT_DETACH
|
||||
var/list/mob/attached_mobs = list()
|
||||
|
||||
/datum/element/dusts_on_catatonia/Attach(datum/target,penalize = FALSE)
|
||||
. = ..()
|
||||
if(!ismob(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
var/mob/M = target
|
||||
if(!(M in attached_mobs))
|
||||
attached_mobs += M
|
||||
START_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/element/dusts_on_catatonia/Detach(mob/M)
|
||||
. = ..()
|
||||
if(M in attached_mobs)
|
||||
attached_mobs -= M
|
||||
if(!attached_mobs.len)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/element/dusts_on_catatonia/process()
|
||||
for(var/m in attached_mobs)
|
||||
var/mob/M = m
|
||||
if(!M.key && !M.get_ghost())
|
||||
M.dust(force = TRUE)
|
||||
Detach(M)
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
var/area/A = get_area(curturf)
|
||||
var/area/B = get_area(destturf)
|
||||
if(!forced && (A.noteleport || B.noteleport))
|
||||
if(!forced && (HAS_TRAIT(teleatom, TRAIT_NO_TELEPORT) || A.noteleport || B.noteleport))
|
||||
return FALSE
|
||||
|
||||
if(SEND_SIGNAL(destturf, COMSIG_ATOM_INTERCEPT_TELEPORT, channel, curturf, destturf))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(A.grab_state >= GRAB_AGGRESSIVE)
|
||||
D.grabbedby(A, 1)
|
||||
else
|
||||
A.start_pulling(D, 1)
|
||||
A.start_pulling(D, supress_message = TRUE)
|
||||
if(A.pulling)
|
||||
D.drop_all_held_items()
|
||||
D.stop_pulling()
|
||||
|
||||
@@ -239,7 +239,14 @@
|
||||
mood_change = -3
|
||||
timeout = 1000
|
||||
|
||||
/datum/mood_event/nanite_sadness
|
||||
description = "<span class='warning robot'>+++++++HAPPINESS SUPPRESSION+++++++</span>\n"
|
||||
mood_change = -7
|
||||
/datum/mood_event/daylight_2
|
||||
description = "<span class='boldwarning'>I have been scorched by the unforgiving rays of the sun.</span>\n"
|
||||
mood_change = -6
|
||||
timeout = 1200
|
||||
|
||||
/datum/mood_event/nanite_sadness/add_effects(message)
|
||||
description = "<span class='warning robot'>+++++++[message]+++++++</span>\n"
|
||||
|
||||
|
||||
@@ -142,6 +142,16 @@
|
||||
mood_change = 2
|
||||
timeout = 15 MINUTES
|
||||
|
||||
/datum/mood_event/nanite_happiness
|
||||
description = "<span class='nicegreen robot'>+++++++HAPPINESS ENHANCEMENT+++++++</span>\n"
|
||||
mood_change = 7
|
||||
|
||||
/datum/mood_event/nanite_happiness/add_effects(message)
|
||||
description = "<span class='nicegreen robot'>+++++++[message]+++++++</span>\n"
|
||||
|
||||
/datum/mood_event/area
|
||||
description = "" //Fill this out in the area
|
||||
mood_change = 0
|
||||
//Power gamer stuff below
|
||||
/datum/mood_event/drankblood
|
||||
description = "<span class='nicegreen'>I have fed greedly from that which nourishes me.</span>\n"
|
||||
|
||||
@@ -131,6 +131,10 @@
|
||||
port_id = "mining"
|
||||
can_be_bought = FALSE
|
||||
|
||||
/datum/map_template/shuttle/mining_common
|
||||
port_id = "mining_common"
|
||||
can_be_bought = FALSE
|
||||
|
||||
/datum/map_template/shuttle/cargo
|
||||
port_id = "cargo"
|
||||
can_be_bought = FALSE
|
||||
@@ -493,6 +497,10 @@
|
||||
suffix = "delta"
|
||||
name = "labour shuttle (Delta)"
|
||||
|
||||
/datum/map_template/shuttle/mining_common/meta
|
||||
suffix = "meta"
|
||||
name = "lavaland shuttle (Meta)"
|
||||
|
||||
/datum/map_template/shuttle/arrival/delta
|
||||
suffix = "delta"
|
||||
name = "arrival shuttle (Delta)"
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
if(do_after(mob_viewer, 35, null, mob_viewer))
|
||||
if(isliving(mob_viewer))
|
||||
var/mob/living/L = mob_viewer
|
||||
to_chat(mob_viewer, "<span class='notice'>You succesfuly remove the durathread strand.</span>")
|
||||
to_chat(mob_viewer, "<span class='notice'>You successfully remove the durathread strand.</span>")
|
||||
L.remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user