better, there, happy now github

This commit is contained in:
Seris02
2020-01-20 14:51:53 +08:00
186 changed files with 1031 additions and 580 deletions
+2
View File
@@ -585,6 +585,8 @@
return
apc.ui_interact(owner)
/datum/action/item_action/flash
name = "Flash"
//Preset for spells
/datum/action/spell_action
+49
View File
@@ -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)
@@ -22,6 +22,8 @@
if(!(M.ckey in timeouts))
timeouts += M.ckey
timeouts[M.ckey] = 0
else if(timeouts[M.ckey] == CANT_REENTER_ROUND)
return
timeouts[M.ckey] = max(timeouts[M.ckey],penalty)
/datum/element/ghost_role_eligibility/Detach(mob/M)
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -615,7 +615,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)