This commit is contained in:
kevinz000
2020-01-24 14:39:19 -07:00
parent e13b3352bf
commit b5430eb68c
2 changed files with 3 additions and 31 deletions
@@ -1712,19 +1712,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
// clear any hot moods and apply cold mood
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot")
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold)
<<<<<<< HEAD
//Sorry for the nasty oneline but I don't want to assign a variable on something run pretty frequently
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = ((BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR))
=======
// Apply cold slow down
H.add_movespeed_modifier(MOVESPEED_ID_COLD, override = TRUE, \
multiplicative_slowdown = ((bodytemp_cold_damage_limit - H.bodytemperature) / COLD_SLOWDOWN_FACTOR), \
blacklisted_movetypes = FLOATING)
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/cold, multiplicative_slowdown = ((bodytemp_cold_damage_limit - H.bodytemperature) / COLD_SLOWDOWN_FACTOR))
// Display alerts based on the amount of cold damage being taken
// Apply more damage based on how cold you are
>>>>>>> tgstation/master
switch(H.bodytemperature)
if(200 to bodytemp_cold_damage_limit)
H.throw_alert("temp", /obj/screen/alert/cold, 1)
+2 -21
View File
@@ -84,27 +84,8 @@ GLOBAL_LIST_EMPTY(movespeed_modification_cache)
if(existing == type_or_datum) //same thing don't need to touch
return TRUE
remove_movespeed_modifier(existing, FALSE)
LAZYINITLIST(movespeed_modification)
var/listlen = length(movespeed_modification)
if(!listlen)
movespeed_modification[type_or_datum.id] = type_or_datum
else
var/left = 1
var/right = listlen
var/mid = (left + right) >> 1
var/datum/movespeed_modifier/curr
while(left < right)
var/id = movespeed_modification[mid]
curr = movespeed_modification[id]
if(curr.priority <= type_or_datum.priority)
left = mid + 1
else
right = mid
mid = (left + right) >> 1
curr = movespeed_modification[mid]
mid = curr.priority > type_or_datum.priority? mid : mid + 1
movespeed_modification.Insert(mid, type_or_datum.id)
movespeed_modification[type_or_datum.id] = type_or_datum
if(length(movespeed_modification))
BINARY_INSERT(type_or_datum.id, movespeed_modification, datum/movespeed_modifier, type_or_datum, priority, __BIN_LIST[__BIN_LIST[__BIN_MID]])
LAZYSET(movespeed_modification, type_or_datum.id, type_or_datum)
if(update)
update_movespeed()