This commit is contained in:
Enric Gabriel
2020-06-26 00:28:33 -03:00
14 changed files with 82 additions and 21 deletions
+3
View File
@@ -254,6 +254,9 @@
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
#define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag)
#define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value)
#define COMSIG_OBJ_ATTACK_GENERIC "obj_attack_generic" //from base of atom/animal_attack(): (/mob/user)
#define COMPONENT_STOP_GENERIC_ATTACK 1
// /machinery signals
#define COMSIG_MACHINE_EJECT_OCCUPANT "eject_occupant" //from base of obj/machinery/dropContents() (occupant)
+1 -1
View File
@@ -3,7 +3,7 @@
for(var/file in args)
src << browse_rsc(file)
/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list("txt","log","htm", "html", "md"))
/client/proc/browse_files(root="data/logs/", max_iterations=10, list/valid_extensions=list("txt","log","htm", "html", "md", "json"))
var/path = root
for(var/i=0, i<max_iterations, i++)
+10 -3
View File
@@ -8,6 +8,8 @@
var/list/faction = list("mining")
/datum/component/spawner/Initialize(_mob_types, _spawn_time, _faction, _spawn_text, _max_mobs)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
if(_spawn_time)
spawn_time=_spawn_time
if(_mob_types)
@@ -19,20 +21,25 @@
if(_max_mobs)
max_mobs=_max_mobs
RegisterSignal(parent, list(COMSIG_PARENT_QDELETING), .proc/stop_spawning)
RegisterSignal(parent, COMSIG_PARENT_QDELETING, .proc/stop_spawning)
RegisterSignal(parent, COMSIG_OBJ_ATTACK_GENERIC, .proc/on_attack_generic)
START_PROCESSING(SSprocessing, src)
/datum/component/spawner/process()
try_spawn_mob()
/datum/component/spawner/proc/stop_spawning(force, hint)
/datum/component/spawner/proc/stop_spawning(datum/source, 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
// Stopping clientless simple mobs' from indiscriminately bashing their own spawners due DestroySurroundings() et similars.
/datum/component/spawner/proc/on_attack_generic(datum/source, mob/user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration)
if(!user.client && ((user.faction & faction) || (user in spawned_mobs)))
return COMPONENT_STOP_GENERIC_ATTACK
/datum/component/spawner/proc/try_spawn_mob()
var/atom/P = parent
if(spawned_mobs.len >= max_mobs)
+3 -5
View File
@@ -9,7 +9,6 @@
/datum/status_effect/incapacitating/on_creation(mob/living/new_owner, set_duration, updating_canmove)
if(isnum(set_duration))
duration = set_duration
tick_interval = max(world.tick_lag, round(tick_interval, world.tick_lag))
. = ..()
if(.)
if(updating_canmove)
@@ -82,11 +81,10 @@
owner.adjustStaminaLoss(-0.5) //reduce stamina loss by 0.5 per tick, 10 per 2 seconds
if(human_owner && human_owner.drunkenness)
human_owner.drunkenness *= 0.997 //reduce drunkenness by 0.3% per tick, 6% per 2 seconds
if(prob(20))
if(carbon_owner)
carbon_owner.handle_dreams()
if(carbon_owner && !carbon_owner.dreaming && prob(2))
carbon_owner.dream()
// 2% per second, tick interval is in deciseconds
if(prob(tick_interval * 0.2) && owner.health > owner.crit_threshold)
if(prob((tick_interval+1) * 0.2) && owner.health > owner.crit_threshold)
owner.emote("snore")
/datum/status_effect/staggered
+5 -4
View File
@@ -6,6 +6,7 @@
var/id = "effect" //Used for screen alerts.
var/duration = -1 //How long the status effect lasts in DECISECONDS. Enter -1 for an effect that never ends unless removed through some means.
var/tick_interval = 10 //How many deciseconds between ticks, approximately. Leave at 10 for every second.
var/next_tick //The scheduled time for the next tick.
var/mob/living/owner //The mob affected by the status effect.
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
@@ -31,7 +32,7 @@
return
if(duration != -1)
duration = world.time + duration
tick_interval = world.time + tick_interval
next_tick = world.time + tick_interval
if(alert_type)
var/obj/screen/alert/status_effect/A = owner.throw_alert(id, alert_type)
A.attached_effect = src //so the alert can reference us, if it needs to
@@ -52,9 +53,9 @@
if(!owner)
qdel(src)
return
if(tick_interval < world.time)
if(next_tick < world.time)
tick()
tick_interval = world.time + initial(tick_interval)
next_tick = world.time + tick_interval
if(duration != -1 && duration < world.time)
qdel(src)
@@ -221,7 +222,7 @@
threshold_crossed = FALSE //resets threshold effect if we fall below threshold so threshold effect can trigger again
on_threshold_drop()
if(stacks_added > 0)
tick_interval += delay_before_decay //refreshes time until decay
next_tick += delay_before_decay //refreshes time until decay
stacks = min(stacks, max_stacks)
status_overlay.icon_state = "[overlay_state][stacks]"
status_underlay.icon_state = "[underlay_state][stacks]"
+2 -1
View File
@@ -88,6 +88,7 @@
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
target.clean_blood()
SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
target.wash_cream()
return
@@ -180,4 +181,4 @@
name = "Canned Laughter"
desc = "Just looking at this makes you want to giggle."
icon_state = "laughter"
list_reagents = list(/datum/reagent/consumable/laughter = 50)
list_reagents = list(/datum/reagent/consumable/laughter = 50)
+2
View File
@@ -103,6 +103,8 @@
take_damage(400, BRUTE, "melee", 0, get_dir(src, B))
/obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0) //used by attack_alien, attack_animal, and attack_slime
if(SEND_SIGNAL(src, COMSIG_OBJ_ATTACK_GENERIC, user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration) & COMPONENT_STOP_GENERIC_ATTACK)
return FALSE
user.do_attack_animation(src)
user.changeNext_move(CLICK_CD_MELEE)
return take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user), armor_penetration)
@@ -134,6 +134,8 @@
if(!ishuman(pushed_mob))
return
var/mob/living/carbon/human/H = pushed_mob
if(iscatperson(H))
H.emote("nya")
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
-4
View File
@@ -1,7 +1,3 @@
/mob/living/carbon/proc/handle_dreams()
if(prob(10) && !dreaming)
dream()
/mob/living/carbon/proc/dream()
set waitfor = FALSE
var/list/dream_fragments = list()
+2 -2
View File
@@ -1,8 +1,8 @@
/mob/living/carbon/BiologicalLife(seconds, times_fired)
if(stat == DEAD)
return FALSE
//Reagent processing needs to come before breathing, to prevent edge cases.
handle_organs()
if(stat == DEAD)
return FALSE
if(!(. = ..()))
return
handle_blood()
+19
View File
@@ -50,6 +50,17 @@
-->
<div class="commit sansserif">
<h2 class="date">26 June 2020</h2>
<h3 class="author">Ghommie updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Snore spam.</li>
<li class="bugfix">Hostile mobs shouldn't hit their original spawner structures or thoses of the same faction.</li>
</ul>
<h3 class="author">silicons updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">soap cleans blood again</li>
</ul>
<h2 class="date">25 June 2020</h2>
<h3 class="author">Anonymous updated:</h3>
<ul class="changes bgimages16">
@@ -69,6 +80,14 @@
<h3 class="author">Linzolle updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">analyze function on chem master is no longer broken</li>
<h3 class="author">Funce updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Mentor SQL queries are now deleted properly.</li>
</ul>
<h3 class="author">Linzolle updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">analyze function on chem master is no longer broken</li>
<li class="bugfix">organs now decay inside dead bodies again</li>
</ul>
<h3 class="author">dapnee updated:</h3>
<ul class="changes bgimages16">
+10
View File
@@ -26069,8 +26069,18 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- bugfix: SMESes can now properly use self charging cells
- rscadd: ghosts now show up when the round ends
- balance: away missions
Funce:
- bugfix: Mentor SQL queries are now deleted properly.
Linzolle:
- bugfix: analyze function on chem master is no longer broken
- bugfix: organs now decay inside dead bodies again
dapnee:
- rscadd: wataur bottle item
- imageadd: wataur bottle and overlay
2020-06-26:
Ghommie:
- bugfix: Snore spam.
- bugfix: Hostile mobs shouldn't hit their original spawner structures or thoses
of the same faction.
silicons:
- bugfix: soap cleans blood again
@@ -0,0 +1,4 @@
author: "timothyteakettle"
delete-after: True
changes:
- rscadd: "felinids now nya when tabled"
@@ -33,11 +33,14 @@
var/datum/DBQuery/query_memocheck = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("mentor_memo")] WHERE ckey = '[sql_ckey]'")
if(!query_memocheck.Execute())
var/err = query_memocheck.ErrorMsg()
qdel(query_memocheck)
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
return
if(query_memocheck.NextRow())
qdel(query_memocheck)
to_chat(src, "You already have set a memo.")
return
qdel(query_memocheck)
var/memotext = input(src,"Write your Memo","Memo") as message
if(!memotext)
return
@@ -46,20 +49,24 @@
var/datum/DBQuery/query_memoadd = SSdbcore.NewQuery("INSERT INTO [format_table_name("mentor_memo")] (ckey, memotext, timestamp) VALUES ('[sql_ckey]', '[memotext]', '[timestamp]')")
if(!query_memoadd.Execute())
var/err = query_memoadd.ErrorMsg()
qdel(query_memoadd)
log_game("SQL ERROR adding new memo. Error : \[[err]\]\n")
return
log_admin("[key_name(src)] has set a mentor memo: [memotext]")
message_admins("[key_name_admin(src)] has set a mentor memo:<br>[memotext]")
qdel(query_memoadd)
if("Edit")
var/datum/DBQuery/query_memolist = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("mentor_memo")]")
if(!query_memolist.Execute())
var/err = query_memolist.ErrorMsg()
qdel(query_memolist)
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
return
var/list/memolist = list()
while(query_memolist.NextRow())
var/lkey = query_memolist.item[1]
memolist += "[lkey]"
qdel(query_memolist)
if(!memolist.len)
to_chat(src, "No memos found in database.")
return
@@ -70,10 +77,12 @@
var/datum/DBQuery/query_memofind = SSdbcore.NewQuery("SELECT memotext FROM [format_table_name("mentor_memo")] WHERE ckey = '[target_sql_ckey]'")
if(!query_memofind.Execute())
var/err = query_memofind.ErrorMsg()
qdel(query_memofind)
log_game("SQL ERROR obtaining memotext from memo table. Error : \[[err]\]\n")
return
if(query_memofind.NextRow())
var/old_memo = query_memofind.item[1]
qdel(query_memofind)
var/new_memo = input("Input new memo", "New Memo", "[old_memo]", null) as message
if(!new_memo)
return
@@ -83,6 +92,7 @@
var/datum/DBQuery/update_query = SSdbcore.NewQuery("UPDATE [format_table_name("mentor_memo")] SET memotext = '[new_memo]', last_editor = '[sql_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE ckey = '[target_sql_ckey]'")
if(!update_query.Execute())
var/err = update_query.ErrorMsg()
qdel(update_query)
log_game("SQL ERROR editing memo. Error : \[[err]\]\n")
return
if(target_sql_ckey == sql_ckey)
@@ -91,10 +101,14 @@
else
log_admin("[key_name(src)] has edited [target_sql_ckey]'s mentor memo from [old_memo] to [new_memo]")
message_admins("[key_name_admin(src)] has edited [target_sql_ckey]'s mentor memo from<br>[old_memo]<br>to<br>[new_memo]")
qdel(update_query)
else
qdel(query_memofind)
if("Show")
var/datum/DBQuery/query_memoshow = SSdbcore.NewQuery("SELECT ckey, memotext, timestamp, last_editor FROM [format_table_name("mentor_memo")]")
if(!query_memoshow.Execute())
var/err = query_memoshow.ErrorMsg()
qdel(query_memoshow)
log_game("SQL ERROR obtaining ckey, memotext, timestamp, last_editor from memo table. Error : \[[err]\]\n")
return
var/output = null
@@ -107,6 +121,7 @@
if(last_editor)
output += "<br><span class='memoedit'>Last edit by [last_editor] <A href='?_src_=holder;mentormemoeditlist=[ckey]'>(Click here to see edit log)</A></span>"
output += "<br>[memotext]</span><br>"
qdel(query_memoshow)
if(!output)
to_chat(src, "No memos found in database.")
return
@@ -115,12 +130,14 @@
var/datum/DBQuery/query_memodellist = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("mentor_memo")]")
if(!query_memodellist.Execute())
var/err = query_memodellist.ErrorMsg()
qdel(query_memodellist)
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
return
var/list/memolist = list()
while(query_memodellist.NextRow())
var/ckey = query_memodellist.item[1]
memolist += "[ckey]"
qdel(query_memodellist)
if(!memolist.len)
to_chat(src, "No memos found in database.")
return
@@ -131,6 +148,7 @@
var/datum/DBQuery/query_memodel = SSdbcore.NewQuery("DELETE FROM [format_table_name("memo")] WHERE ckey = '[target_sql_ckey]'")
if(!query_memodel.Execute())
var/err = query_memodel.ErrorMsg()
qdel(query_memodel)
log_game("SQL ERROR removing memo. Error : \[[err]\]\n")
return
if(target_sql_ckey == sql_ckey)
@@ -138,4 +156,4 @@
message_admins("[key_name_admin(src)] has removed their mentor memo.")
else
log_admin("[key_name(src)] has removed [target_sql_ckey]'s mentor memo.")
message_admins("[key_name_admin(src)] has removed [target_sql_ckey]'s mentor memo.")
message_admins("[key_name_admin(src)] has removed [target_sql_ckey]'s mentor memo.")