Merge remote-tracking branch 'citadel/master' into mobility_flags

This commit is contained in:
kevinz000
2020-03-03 03:08:41 -07:00
485 changed files with 2456 additions and 2614 deletions
+5 -1
View File
@@ -32,6 +32,7 @@
/datum/action/proc/link_to(Target)
target = Target
RegisterSignal(Target, COMSIG_ATOM_UPDATED_ICON, .proc/OnUpdatedIcon)
/datum/action/Destroy()
if(owner)
@@ -157,6 +158,9 @@
var/mob/M = target
M.ghostize(1)
/datum/action/proc/OnUpdatedIcon()
UpdateButtonIcon()
//Presets for item actions
/datum/action/item_action
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
@@ -829,4 +833,4 @@
for(var/datum/action/A in M.actions)
if(istype(A, action_type))
return A
return
return
+12 -1
View File
@@ -12,6 +12,8 @@
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate)
RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/dropplates)
if(istype(parent, /obj/mecha/working/ripley))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_mech_overlays)
if(_maxamount)
maxamount = _maxamount
@@ -75,4 +77,13 @@
/datum/component/armor_plate/proc/dropplates(datum/source, force)
if(ismecha(parent)) //items didn't drop the plates before and it causes erroneous behavior for the time being with collapsible helmets
for(var/i in 1 to amount)
new upgrade_item(get_turf(parent))
new upgrade_item(get_turf(parent))
/datum/component/armor_plate/proc/apply_mech_overlays(obj/mecha/mech, list/overlays)
if(amount)
var/overlay_string = "ripley-g"
if(amount >= 3)
overlay_string += "-full"
if(!mech.occupant)
overlay_string += "-open"
overlays += overlay_string
+1 -1
View File
@@ -21,7 +21,7 @@
return FALSE
if(!(type in D.viable_mobtypes))
if(!D.viable_mobtypes[type])
return FALSE
return TRUE
+5 -1
View File
@@ -18,7 +18,7 @@
var/stage_prob = 4
//Other
var/list/viable_mobtypes = list() //typepaths of viable mobs
var/list/viable_mobtypes = list() //typecache of viable mobs
var/mob/living/carbon/affected_mob = null
var/list/cures = list() //list of cures if the disease has the CURABLE flag, these are reagent ids
var/infectivity = 65
@@ -34,6 +34,10 @@
var/process_dead = FALSE //if this ticks while the host is dead
var/copy_type = null //if this is null, copies will use the type of the instance being copied
/datum/disease/New(make_typecache = TRUE)
if(make_typecache && length(viable_mobtypes))
viable_mobtypes = typecacheof(viable_mobtypes)
/datum/disease/Destroy()
. = ..()
if(affected_mob)
+2 -1
View File
@@ -80,7 +80,8 @@
*/
/datum/disease/advance/New()
/datum/disease/advance/New(make_typecache = TRUE)
..()
Refresh()
/datum/disease/advance/Destroy()
+5 -5
View File
@@ -2,7 +2,7 @@
/datum/disease/advance/cold
copy_type = /datum/disease/advance
/datum/disease/advance/cold/New()
/datum/disease/advance/cold/New(make_typecache = TRUE)
name = "Cold"
symptoms = list(new/datum/symptom/sneeze)
..()
@@ -11,7 +11,7 @@
/datum/disease/advance/flu
copy_type = /datum/disease/advance
/datum/disease/advance/flu/New()
/datum/disease/advance/flu/New(make_typecache = TRUE)
name = "Flu"
symptoms = list(new/datum/symptom/cough)
..()
@@ -21,7 +21,7 @@
name = "Experimental Disease"
copy_type = /datum/disease/advance
/datum/disease/advance/random/New(max_symptoms, max_level = 8)
/datum/disease/advance/random/New(make_typecache = TRUE, max_symptoms, max_level = 8)
if(!max_symptoms)
max_symptoms = rand(1, VIRUS_SYMPTOM_LIMIT)
var/list/datum/symptom/possible_symptoms = list()
@@ -37,6 +37,6 @@
if(chosen_symptom)
var/datum/symptom/S = new chosen_symptom
symptoms += S
Refresh()
name = "Sample #[rand(1,10000)]"
name = "Sample #[rand(1,10000)]"
..()
+1 -1
View File
@@ -13,7 +13,7 @@
stage_prob = 2
var/restcure = 0
/datum/disease/dna_retrovirus/New()
/datum/disease/dna_retrovirus/New(make_typecache = TRUE)
..()
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
if(prob(40))
+2 -1
View File
@@ -150,7 +150,8 @@
L.forceMove(get_turf(L))
L.reset_perspective()
L.setDir(SOUTH)
qdel(src)
if(!QDELETED(src))
qdel(src)
/obj/item/clothing/head/mob_holder/relaymove(mob/user)
return
@@ -0,0 +1,10 @@
//Prevents calling anything in update_icon() like update_icon_state() or update_overlays()
/datum/element/update_icon_blocker/Attach(datum/target)
. = ..()
if(!istype(target, /atom))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_ATOM_UPDATE_ICON, .proc/block_update_icon)
/datum/element/update_icon_blocker/proc/block_update_icon()
return COMSIG_ATOM_NO_UPDATE_ICON_STATE | COMSIG_ATOM_NO_UPDATE_OVERLAYS
@@ -0,0 +1,16 @@
//update_icon() may change the onmob icons
//Very good name, I know
/datum/element/update_icon_updates_onmob/Attach(datum/target)
. = ..()
if(!istype(target, /obj/item))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_ATOM_UPDATED_ICON, .proc/update_onmob)
/datum/element/update_icon_updates_onmob/proc/update_onmob(obj/item/target)
if(ismob(target.loc))
var/mob/M = target.loc
if(M.is_holding(target))
M.update_inv_hands()
else
M.regenerate_icons() //yeah this is shit, but we don't know which update_foo() proc to call instead so we'll call them all
@@ -243,6 +243,11 @@
description = "<span class='boldwarning'>I have been scorched by the unforgiving rays of the sun.</span>\n"
mood_change = -6
timeout = 15 MINUTES
/datum/mood_event/bloodsucker_disgust
description = "<span class='boldwarning'>Something I recently ate was horrifyingly disgusting.</span>\n"
mood_change = -5
timeout = 5 MINUTES
/datum/mood_event/nanite_sadness
description = "<span class='warning robot'>+++++++HAPPINESS SUPPRESSION+++++++</span>\n"