Merge pull request #16077 from liz-lavenza/cit-fix/upstream-issues-04-13-2024
Upstream a number of fixes from downstream
This commit is contained in:
@@ -260,6 +260,7 @@
|
||||
#define COMPONENT_EXAMINATE_BLIND 3 //outputs the "something is there but you can't see it" message.
|
||||
#define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed)
|
||||
#define COMPONENT_BLOCK_DEATH_BROADCAST 1 //stops the death from being broadcasted in deadchat.
|
||||
#define COMSIG_MOB_STATCHANGE "mob_statchange" //!from base of mob/set_stat(): (new_stat, old_stat)
|
||||
#define COMSIG_MOB_CLICKON "mob_clickon" //from base of mob/clickon(): (atom/A, params)
|
||||
#define COMSIG_MOB_CANCEL_CLICKON 1
|
||||
#define COMSIG_MOB_GHOSTIZE "mob_ghostize" //from base of mob/Ghostize(): (can_reenter_corpse, special, penalize)
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
Remove(owner)
|
||||
owner = M
|
||||
RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(clear_ref), override = TRUE)
|
||||
// Register some signals based on our check_flags
|
||||
// so that our button icon updates when relevant
|
||||
if(check_flags & AB_CHECK_CONSCIOUS)
|
||||
RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(update_status_on_signal))
|
||||
|
||||
GiveAction(M)
|
||||
|
||||
@@ -68,7 +72,10 @@
|
||||
viewers = list()
|
||||
|
||||
if(owner)
|
||||
UnregisterSignal(owner, COMSIG_PARENT_QDELETING)
|
||||
UnregisterSignal(owner, list(
|
||||
COMSIG_PARENT_QDELETING,
|
||||
COMSIG_MOB_STATCHANGE
|
||||
))
|
||||
if(target == owner)
|
||||
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clear_ref))
|
||||
owner = null
|
||||
@@ -218,6 +225,11 @@
|
||||
our_button.id = bitflag
|
||||
return
|
||||
|
||||
/// A general use signal proc that reacts to an event and updates JUST our button's status
|
||||
/datum/action/proc/update_status_on_signal(datum/source, new_stat, old_stat)
|
||||
SIGNAL_HANDLER
|
||||
UpdateButton(status_only = TRUE)
|
||||
|
||||
//Presets for item actions
|
||||
/datum/action/item_action
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
C.set_species(selected)
|
||||
C.set_resting(TRUE, TRUE)
|
||||
// Don't want to cause it to deathgasp..
|
||||
C.stat = DEAD
|
||||
C.set_stat(DEAD)
|
||||
C.adjustOxyLoss(200)
|
||||
// Limb replacement causes toxloss, which can cause too much suffering for the doctor that I don't want
|
||||
C.adjustCloneLoss(45)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
var/icon_door = null
|
||||
var/icon_door_override = FALSE //override to have open overlay use icon different to its base's
|
||||
var/has_door_icon = TRUE // Set to false to skip trying to draw a door icon.
|
||||
var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights
|
||||
var/opened = FALSE
|
||||
var/welded = FALSE
|
||||
@@ -76,7 +77,7 @@
|
||||
. += "[icon_door_override ? icon_door : icon_state]_open"
|
||||
return
|
||||
|
||||
if(icon_door)
|
||||
if(has_door_icon)
|
||||
. += "[icon_door || icon_state]_door"
|
||||
if(welded)
|
||||
. += icon_welded
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "large cardboard box"
|
||||
desc = "Just a box..."
|
||||
icon_state = "cardboard"
|
||||
icon_door = null
|
||||
has_door_icon = FALSE
|
||||
mob_storage_capacity = 1
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 70
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
owner.current.Unconscious(20, 1)
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/Torpor_Begin(amInCoffin = FALSE)
|
||||
owner.current.stat = UNCONSCIOUS
|
||||
owner.current.set_stat(UNCONSCIOUS)
|
||||
owner.current.apply_status_effect(STATUS_EFFECT_UNCONSCIOUS)
|
||||
ADD_TRAIT(owner.current, TRAIT_FAKEDEATH, "bloodsucker") // Come after UNCONSCIOUS or else it fails
|
||||
ADD_TRAIT(owner.current, TRAIT_NODEATH, "bloodsucker") // Without this, you'll just keep dying while you recover.
|
||||
@@ -260,7 +260,7 @@
|
||||
to_chat(owner.current, "<span class='warning'>Your body keeps you going, even as you try to end yourself.</span>")
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/Torpor_End()
|
||||
owner.current.stat = SOFT_CRIT
|
||||
owner.current.set_stat(SOFT_CRIT)
|
||||
owner.current.remove_status_effect(STATUS_EFFECT_UNCONSCIOUS)
|
||||
REMOVE_TRAIT(owner.current, TRAIT_FAKEDEATH, "bloodsucker")
|
||||
REMOVE_TRAIT(owner.current, TRAIT_NODEATH, "bloodsucker")
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
// click.dm <--- Where we can take over mouse clicks
|
||||
// spells.dm /add_ranged_ability() <--- How we take over the mouse click to use a power on a target.
|
||||
|
||||
// TODO: Refactor this to use /Activate().
|
||||
/datum/action/cooldown/bloodsucker/Trigger()
|
||||
// Active? DEACTIVATE AND END!
|
||||
if(active && CheckCanDeactivate(TRUE))
|
||||
@@ -130,7 +131,7 @@
|
||||
/datum/action/cooldown/bloodsucker/proc/CheckCanDeactivate(display_error)
|
||||
return TRUE
|
||||
|
||||
/datum/action/cooldown/bloodsucker/UpdateButton(atom/movable/screen/movable/action_button/button, force = FALSE)
|
||||
/datum/action/cooldown/bloodsucker/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force = FALSE)
|
||||
background_icon_state = active? background_icon_state_on : background_icon_state_off
|
||||
..()//UpdateButton()
|
||||
|
||||
@@ -179,6 +180,7 @@
|
||||
bs_proc_holder = new ()
|
||||
bs_proc_holder.linked_power = src
|
||||
|
||||
// TODO: Refactor this to use /Activate() and click_to_activate = TRUE.
|
||||
// Click power: Begin Aim
|
||||
/datum/action/cooldown/bloodsucker/targeted/Trigger()
|
||||
if(active && CheckCanDeactivate(TRUE))
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
mind.announce_objectives()
|
||||
|
||||
/mob/living/carbon/true_devil/death(gibbed)
|
||||
stat = DEAD
|
||||
set_stat(DEAD)
|
||||
..(gibbed)
|
||||
drop_all_held_items()
|
||||
INVOKE_ASYNC(mind.has_antag_datum(/datum/antagonist/devil), TYPE_PROC_REF(/datum/antagonist/devil, beginResurrectionCheck), src)
|
||||
|
||||
@@ -169,9 +169,7 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
desc = "Force the host you are following to cough with extra force, spreading your infection to those within two meters of your host even if your transmissibility is low.<br>Cooldown: 10 seconds"
|
||||
cooldown_time = 100
|
||||
|
||||
/datum/action/cooldown/disease_cough/Trigger()
|
||||
if(!..())
|
||||
return FALSE
|
||||
/datum/action/cooldown/disease_cough/Activate()
|
||||
var/mob/camera/disease/D = owner
|
||||
var/mob/living/L = D.following_host
|
||||
if(!L)
|
||||
@@ -201,9 +199,7 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
desc = "Force the host you are following to sneeze with extra force, spreading your infection to any victims in a 4 meter cone in front of your host even if your transmissibility is low.<br>Cooldown: 20 seconds"
|
||||
cooldown_time = 200
|
||||
|
||||
/datum/action/cooldown/disease_sneeze/Trigger()
|
||||
if(!..())
|
||||
return FALSE
|
||||
/datum/action/cooldown/disease_sneeze/Activate()
|
||||
var/mob/camera/disease/D = owner
|
||||
var/mob/living/L = D.following_host
|
||||
if(!L)
|
||||
@@ -237,9 +233,7 @@ new /datum/disease_ability/symptom/powerful/youth
|
||||
desc = "Cause the host you are following to excrete an infective substance from their pores, causing all objects touching their skin to transmit your infection to anyone who touches them for the next 30 seconds.<br>Cooldown: 40 seconds"
|
||||
cooldown_time = 400
|
||||
|
||||
/datum/action/cooldown/disease_infect/Trigger()
|
||||
if(!..())
|
||||
return FALSE
|
||||
/datum/action/cooldown/disease_infect/Activate()
|
||||
var/mob/camera/disease/D = owner
|
||||
var/mob/living/carbon/human/H = D.following_host
|
||||
if(!H)
|
||||
|
||||
@@ -226,19 +226,11 @@
|
||||
/// The family antagonist datum of the "owner" of this action.
|
||||
var/datum/antagonist/gang/my_gang_datum
|
||||
|
||||
/datum/action/cooldown/spawn_induction_package/Trigger()
|
||||
if(!..())
|
||||
return FALSE
|
||||
if(!IsAvailable())
|
||||
return FALSE
|
||||
/datum/action/cooldown/spawn_induction_package/Activate()
|
||||
if(!my_gang_datum)
|
||||
return FALSE
|
||||
if(!istype(owner, /mob/living/carbon/human))
|
||||
if(!ishuman(owner))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.stat)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/slapper/secret_handshake/secret_handshake_item = new(owner)
|
||||
if(owner.put_in_hands(secret_handshake_item))
|
||||
to_chat(owner, span_notice("You ready your secret handshake."))
|
||||
@@ -248,14 +240,15 @@
|
||||
return FALSE
|
||||
owner.visible_message(span_notice("[owner] is offering to induct people into the Family."),
|
||||
span_notice("You offer to induct people into the Family."), null, 2)
|
||||
if(H.has_status_effect(STATUS_EFFECT_HANDSHAKE))
|
||||
var/mob/living/living_owner = owner
|
||||
if(living_owner.has_status_effect(STATUS_EFFECT_HANDSHAKE))
|
||||
return FALSE
|
||||
if(!(locate(/mob/living/carbon) in orange(1, owner)))
|
||||
owner.visible_message(span_danger("[owner] offers to induct people into the Family, but nobody was around."), \
|
||||
span_warning("You offer to induct people into the Family, but nobody is around."), null, 2)
|
||||
return FALSE
|
||||
|
||||
H.apply_status_effect(STATUS_EFFECT_HANDSHAKE, secret_handshake_item)
|
||||
living_owner.apply_status_effect(STATUS_EFFECT_HANDSHAKE, secret_handshake_item)
|
||||
StartCooldown()
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -87,10 +87,7 @@
|
||||
button_icon_state = "slam"
|
||||
cooldown_time = 45 SECONDS
|
||||
|
||||
/datum/action/cooldown/slam/Trigger()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
/datum/action/cooldown/slam/Activate()
|
||||
var/mob/living/simple_animal/slaughter/user = owner
|
||||
user.slam_mode = !user.slam_mode
|
||||
to_chat(user, user.slam_mode ? "Ready to slam!" : "Maybe not now.")
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
brainmob.forceMove(src)
|
||||
brainmob.container = src
|
||||
if(!(newbrain.organ_flags & ORGAN_FAILING)) // the brain organ hasn't been beaten to death.
|
||||
brainmob.stat = CONSCIOUS //we manually revive the brain mob
|
||||
brainmob.set_stat(CONSCIOUS) //we manually revive the brain mob
|
||||
brainmob.remove_from_dead_mob_list()
|
||||
brainmob.add_to_alive_mob_list()
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
if(brain.brainmob)
|
||||
brainmob.container = null //Reset brainmob mmi var.
|
||||
brainmob.forceMove(brain) //Throw mob into brain.
|
||||
brainmob.stat = DEAD
|
||||
brainmob.set_stat(DEAD)
|
||||
brainmob.emp_damage = 0
|
||||
brainmob.reset_perspective() //so the brainmob follows the brain organ instead of the mmi. And to update our vision
|
||||
brain.brainmob = brainmob //Set the brain to use the brainmob
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/brain/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
set_stat(DEAD)
|
||||
|
||||
if(!gibbed && container)//If not gibbed but in a container.
|
||||
var/obj/item/mmi = container
|
||||
|
||||
@@ -135,7 +135,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
|
||||
brainmob.stored_dna = new /datum/dna/stored(brainmob)
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
brainmob.timeofhostdeath = C.timeofdeath
|
||||
brainmob.stat = CONSCIOUS
|
||||
brainmob.set_stat(CONSCIOUS)
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.assigned_role = new_role
|
||||
if(C.mind)
|
||||
@@ -158,7 +158,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
|
||||
name = "[initial(name)] ([brainmob.name])"
|
||||
to_chat(brainmob, welcome_message)
|
||||
brainmob.mind.assigned_role = new_role
|
||||
brainmob.stat = CONSCIOUS
|
||||
brainmob.set_stat(CONSCIOUS)
|
||||
brainmob.remove_from_dead_mob_list()
|
||||
brainmob.add_to_alive_mob_list()
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
return
|
||||
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || health <= crit_threshold)
|
||||
if(stat == CONSCIOUS)
|
||||
stat = UNCONSCIOUS
|
||||
set_stat(UNCONSCIOUS)
|
||||
if(!eye_blind)
|
||||
blind_eyes(1)
|
||||
update_mobility()
|
||||
else if(stat == UNCONSCIOUS)
|
||||
stat = CONSCIOUS
|
||||
set_stat(CONSCIOUS)
|
||||
if(!(combat_flags & COMBAT_FLAG_HARD_STAMCRIT))
|
||||
set_resting(FALSE, TRUE)
|
||||
if(eye_blind <= 1)
|
||||
|
||||
@@ -807,16 +807,16 @@
|
||||
death()
|
||||
return
|
||||
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
|
||||
stat = UNCONSCIOUS
|
||||
set_stat(UNCONSCIOUS)
|
||||
SEND_SIGNAL(src, COMSIG_DISABLE_COMBAT_MODE)
|
||||
if(!eye_blind)
|
||||
blind_eyes(1)
|
||||
else
|
||||
if(health <= crit_threshold && !HAS_TRAIT(src, TRAIT_NOSOFTCRIT))
|
||||
stat = SOFT_CRIT
|
||||
set_stat(SOFT_CRIT)
|
||||
SEND_SIGNAL(src, COMSIG_DISABLE_COMBAT_MODE)
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
set_stat(CONSCIOUS)
|
||||
if(eye_blind <= 1)
|
||||
adjust_blindness(-1)
|
||||
update_mobility()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/mob/living/death(gibbed)
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_PREDEATH, gibbed)
|
||||
|
||||
stat = DEAD
|
||||
set_stat(DEAD)
|
||||
unset_machine()
|
||||
timeofdeath = world.time
|
||||
tod = STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
remove_from_dead_mob_list()
|
||||
add_to_alive_mob_list()
|
||||
suiciding = 0
|
||||
stat = UNCONSCIOUS //the mob starts unconscious,
|
||||
set_stat(UNCONSCIOUS) //the mob starts unconscious,
|
||||
if(!eye_blind)
|
||||
blind_eyes(1)
|
||||
updatehealth() //then we check if the mob should wake up.
|
||||
|
||||
@@ -413,7 +413,7 @@
|
||||
else
|
||||
the_mmi.forceMove(get_turf(src))
|
||||
if(the_mmi.brainmob.stat == DEAD && !suiciding)
|
||||
the_mmi.brainmob.stat = CONSCIOUS
|
||||
the_mmi.brainmob.set_stat(CONSCIOUS)
|
||||
if(mind)
|
||||
mind.transfer_to(the_mmi.brainmob)
|
||||
the_mmi.update_appearance()
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
death()
|
||||
return
|
||||
else if(stat == UNCONSCIOUS)
|
||||
stat = CONSCIOUS
|
||||
set_stat(CONSCIOUS)
|
||||
adjust_blindness(-1)
|
||||
diag_hud_set_status()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/silicon/pai/death(gibbed)
|
||||
if(stat == DEAD)
|
||||
return
|
||||
stat = DEAD
|
||||
set_stat(DEAD)
|
||||
update_mobility()
|
||||
update_sight()
|
||||
wipe_fullscreens()
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
mmi.forceMove(T)
|
||||
if(mmi.brainmob)
|
||||
if(mmi.brainmob.stat == DEAD)
|
||||
mmi.brainmob.stat = CONSCIOUS
|
||||
mmi.brainmob.set_stat(CONSCIOUS)
|
||||
mmi.brainmob.remove_from_dead_mob_list()
|
||||
mmi.brainmob.add_to_alive_mob_list()
|
||||
mind.transfer_to(mmi.brainmob)
|
||||
@@ -922,9 +922,9 @@
|
||||
toggle_headlamp(1)
|
||||
return
|
||||
if(IsUnconscious() || IsStun() || IsKnockdown() || IsParalyzed() || getOxyLoss() > maxHealth * 0.5)
|
||||
stat = UNCONSCIOUS
|
||||
set_stat(UNCONSCIOUS)
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
set_stat(CONSCIOUS)
|
||||
update_mobility()
|
||||
diag_hud_set_status()
|
||||
diag_hud_set_health()
|
||||
|
||||
@@ -112,7 +112,7 @@ Difficulty: Normal
|
||||
if(health > 0 || stat == DEAD)
|
||||
return
|
||||
else
|
||||
stat = DEAD
|
||||
set_stat(DEAD)
|
||||
blinking = TRUE //we do a fancy animation, release a huge burst(), and leave our staff.
|
||||
burst_range = 10
|
||||
visible_message("<span class='hierophant'>\"Mrmxmexmrk wipj-hiwxvygx wiuyirgi...\"</span>")
|
||||
|
||||
@@ -167,10 +167,7 @@ GLOBAL_LIST_EMPTY(plague_rats)
|
||||
button_icon_state = "coffer"
|
||||
cooldown_time = 50
|
||||
|
||||
/datum/action/cooldown/scavenge/Trigger()
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
/datum/action/cooldown/scavenge/Activate()
|
||||
var/turf/T = get_turf(owner)
|
||||
var/loot = rand(1,100)
|
||||
switch(loot)
|
||||
|
||||
@@ -87,11 +87,9 @@
|
||||
background_icon_state = "bg_clock"
|
||||
button_icon_state = "coffer"
|
||||
cooldown_time = 50
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
/datum/action/cooldown/coffer/Trigger()
|
||||
. = ..()
|
||||
if(!. || owner.stat != CONSCIOUS)
|
||||
return
|
||||
/datum/action/cooldown/coffer/Activate()
|
||||
var/turf/T = get_turf(owner)
|
||||
var/loot = rand(1,100)
|
||||
switch(loot)
|
||||
@@ -131,12 +129,10 @@
|
||||
button_icon_state = "riot"
|
||||
background_icon_state = "bg_clock"
|
||||
cooldown_time = 80
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
///Checks to see if there are any nearby mice. Does not count Rats.
|
||||
|
||||
/datum/action/cooldown/riot/Trigger()
|
||||
. = ..()
|
||||
if(!. || owner.stat != CONSCIOUS)
|
||||
return
|
||||
/datum/action/cooldown/riot/Activate()
|
||||
var/cap = CONFIG_GET(number/ratcap)
|
||||
var/something_from_nothing = FALSE
|
||||
for(var/mob/living/simple_animal/mouse/M in oview(owner, 5))
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
if(health <= 0)
|
||||
death()
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
set_stat(CONSCIOUS)
|
||||
med_hud_set_status()
|
||||
|
||||
/mob/living/simple_animal/proc/handle_automated_action()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(buckled)
|
||||
Feedstop(silent = TRUE) //releases ourselves from the mob we fed on.
|
||||
|
||||
stat = DEAD
|
||||
set_stat(DEAD)
|
||||
cut_overlays()
|
||||
|
||||
update_mobility()
|
||||
|
||||
@@ -134,14 +134,14 @@
|
||||
|
||||
if(stat == CONSCIOUS && stasis)
|
||||
to_chat(src, "<span class='danger'>Nerve gas in the air has put you in stasis!</span>")
|
||||
stat = UNCONSCIOUS
|
||||
set_stat(UNCONSCIOUS)
|
||||
powerlevel = 0
|
||||
rabid = 0
|
||||
update_mobility()
|
||||
regenerate_icons()
|
||||
else if(stat == UNCONSCIOUS && !stasis)
|
||||
to_chat(src, "<span class='notice'>You wake up from the stasis.</span>")
|
||||
stat = CONSCIOUS
|
||||
set_stat(CONSCIOUS)
|
||||
update_mobility()
|
||||
regenerate_icons()
|
||||
|
||||
|
||||
@@ -1009,3 +1009,15 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
*/
|
||||
/mob/proc/on_item_dropped(obj/item/I)
|
||||
return
|
||||
|
||||
/**
|
||||
* Used to wrap stat setting to trigger on-stat-change functionality.
|
||||
* Must be used instead of directly setting a mob's stat var,
|
||||
* so that the signal is sent properly.
|
||||
*/
|
||||
/mob/proc/set_stat(new_stat)
|
||||
if(new_stat == stat)
|
||||
return
|
||||
. = stat
|
||||
stat = new_stat
|
||||
SEND_SIGNAL(src, COMSIG_MOB_STATCHANGE, new_stat, .)
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
icon_state = "cell_mini"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
maxcharge = 750
|
||||
has_charge_overlay = FALSE
|
||||
|
||||
/obj/item/stock_parts/cell/computer/advanced
|
||||
name = "advanced battery"
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
var/ratingdesc = TRUE
|
||||
///If it's a grown that acts as a battery, add a wire overlay to it.
|
||||
var/grown_battery = FALSE
|
||||
/// If true, add the o1 and o2 overlays based on charge level.
|
||||
var/has_charge_overlay = TRUE
|
||||
rad_flags = RAD_NO_CONTAMINATE // Prevent the same cheese as with the stock parts
|
||||
|
||||
/obj/item/stock_parts/cell/get_cell()
|
||||
@@ -64,7 +66,7 @@
|
||||
if(grown_battery)
|
||||
. += image('icons/obj/power.dmi', "grown_wires")
|
||||
return
|
||||
if(charge < 0.01)
|
||||
if(!has_charge_overlay || charge < 0.01)
|
||||
return
|
||||
else if(charge/maxcharge >=0.995)
|
||||
. += "cell-o2"
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
|
||||
var/obj/item/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/stock_parts/cell
|
||||
var/modifystate = 0
|
||||
var/modifystate = FALSE
|
||||
/// If TRUE, when modifystate is TRUE this energy gun gets an overlay based on its selected shot type, like "[icon_state]_disable".
|
||||
var/shot_type_overlay = TRUE
|
||||
/// = TRUE/FALSE decides if the user can switch to it of their own accord
|
||||
var/list/ammo_type = list(/obj/item/ammo_casing/energy = TRUE)
|
||||
/// The index of the ammo_types/firemodes which we're using right now
|
||||
@@ -259,7 +261,11 @@
|
||||
var/ratio = get_charge_ratio()
|
||||
if (modifystate)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
|
||||
. += "[icon_state]_[shot.select_name]"
|
||||
// Some guns, like the mini egun, don't have non-charge mode states. Remove or rework this check when that's fixed.
|
||||
// Currently, it's entirely too hyperspecific; there's no way to have the non-charge overlay without the charge overlay, for example.
|
||||
// Oh, well.
|
||||
if (shot_type_overlay)
|
||||
. += "[icon_state]_[shot.select_name]"
|
||||
overlay_icon_state += "_[shot.select_name]"
|
||||
if(ratio == 0)
|
||||
. += "[icon_state]_empty"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
charge_sections = 3
|
||||
gunlight_state = "mini-light"
|
||||
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
|
||||
shot_type_overlay = FALSE
|
||||
|
||||
/obj/item/gun/energy/e_gun/mini/Initialize(mapload)
|
||||
gun_light = new /obj/item/flashlight/seclite(src)
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
item_state = "laser"
|
||||
desc = "An industrial-grade heavy-duty laser rifle with a modified laser lens to scatter its shot into multiple smaller lasers. The inner-core can self-charge for theoretically infinite use."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
shaded_charge = FALSE
|
||||
|
||||
/obj/item/gun/energy/laser/cyborg
|
||||
can_charge = FALSE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
name = "mounted laser"
|
||||
desc = "An arm mounted cannon that fires lethal lasers."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
icon_state = "laser"
|
||||
icon_state = "laser_cyborg"
|
||||
item_state = "armcannonlase"
|
||||
force = 5
|
||||
selfcharge = EGUN_SELFCHARGE
|
||||
|
||||
@@ -334,6 +334,7 @@
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill)
|
||||
force = 60
|
||||
automatic_charge_overlays = FALSE // This has no charge overlays.
|
||||
|
||||
/obj/item/gun/energy/laser/instakill/red
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon_state = "nanite_cloud_controller"
|
||||
circuit = /obj/item/circuitboard/computer/nanite_cloud_controller
|
||||
icon_screen = "nanite_cloud_controller_screen"
|
||||
icon_keyboard = null
|
||||
|
||||
var/obj/item/disk/nanite_program/disk
|
||||
var/list/datum/nanite_cloud_backup/cloud_backups = list()
|
||||
|
||||
@@ -271,7 +271,7 @@ Charged extracts:
|
||||
if(M.maxHealth <= 0)
|
||||
to_chat(user, "<span class='warning'>The slime is too unstable to return!</span>")
|
||||
M.revive(full_heal = 1)
|
||||
M.stat = CONSCIOUS
|
||||
M.set_stat(CONSCIOUS)
|
||||
M.visible_message("<span class='notice'>[M] is filled with renewed vigor and blinks awake!</span>")
|
||||
M.maxHealth -= 10 //Revival isn't healthy.
|
||||
M.health -= 10
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
circuit = /obj/item/circuitboard/computer/bsa_control
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
icon_state = "control_boxp"
|
||||
icon_keyboard = null
|
||||
|
||||
var/obj/machinery/bsa/full/cannon
|
||||
var/notice
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
LB.brainmob = brainmob
|
||||
brainmob = null
|
||||
LB.brainmob.forceMove(LB)
|
||||
LB.brainmob.stat = DEAD
|
||||
LB.brainmob.set_stat(DEAD)
|
||||
|
||||
/obj/item/organ/eyes/transfer_to_limb(obj/item/bodypart/head/LB, mob/living/carbon/human/C)
|
||||
LB.eyes = src
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -451,7 +451,7 @@
|
||||
if(H.InCritical())
|
||||
perma = TRUE
|
||||
volume = 5
|
||||
H.stat = DEAD
|
||||
H.set_stat(DEAD)
|
||||
catto.origin = H
|
||||
|
||||
/datum/reagent/fermi/secretcatchem/on_mob_life(mob/living/carbon/H)
|
||||
@@ -488,7 +488,7 @@
|
||||
var/mob/living/simple_animal/pet/cat/custom_cat/catto = L
|
||||
if(catto.origin)
|
||||
var/mob/living/carbon/human/H = catto.origin
|
||||
H.stat = CONSCIOUS
|
||||
H.set_stat(CONSCIOUS)
|
||||
log_reagent("FERMICHEM: [catto] ckey: [catto.key] has returned to normal.")
|
||||
to_chat(catto, "<span class='notice'>Your body shifts back to normal!</span>")
|
||||
H.forceMove(catto.loc)
|
||||
|
||||
Reference in New Issue
Block a user