Merge branch 'wound-port' of https://github.com/timothyteakettle/Citadel-Station-13 into wound-port
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
status_flags = CANUNCONSCIOUS|CANPUSH
|
||||
|
||||
var/heat_protection = 0.5
|
||||
heat_protection = 0.5
|
||||
var/leaping = 0
|
||||
gib_type = /obj/effect/decal/cleanable/blood/gibs/xeno
|
||||
unique_name = 1
|
||||
|
||||
@@ -69,3 +69,12 @@
|
||||
var/list/all_wounds
|
||||
/// All of the scars a carbon has afflicted throughout their limbs
|
||||
var/list/all_scars
|
||||
|
||||
/// Protection (insulation) from the heat, Value 0-1 corresponding to the percentage of protection
|
||||
var/heat_protection = 0 // No heat protection
|
||||
/// Protection (insulation) from the cold, Value 0-1 corresponding to the percentage of protection
|
||||
var/cold_protection = 0 // No cold protection
|
||||
|
||||
/// Timer id of any transformation
|
||||
var/transformation_timer
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
enable_intentional_sprint_mode()
|
||||
|
||||
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_ACT, /atom.proc/clean_blood)
|
||||
GLOB.human_list += src
|
||||
|
||||
|
||||
/mob/living/carbon/human/ComponentInitialize()
|
||||
@@ -47,6 +48,7 @@
|
||||
/mob/living/carbon/human/Destroy()
|
||||
QDEL_NULL(physiology)
|
||||
QDEL_NULL_LIST(vore_organs) // CITADEL EDIT belly stuff
|
||||
GLOB.human_list -= src
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/prepare_data_huds()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
. = ..()
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_move(NewLoc)
|
||||
if(. && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) && !(movement_type & FLYING) && CHECK_ALL_MOBILITY(src, MOBILITY_MOVE|MOBILITY_STAND) && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && !pulledby)
|
||||
if(. && (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) && !(movement_type & FLYING) && CHECK_ALL_MOBILITY(src, MOBILITY_MOVE|MOBILITY_STAND) && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && (!pulledby || (pulledby.pulledby == src)))
|
||||
if(!HAS_TRAIT(src, TRAIT_FREESPRINT))
|
||||
doSprintLossTiles(1)
|
||||
if((oldpseudoheight - pseudo_z_axis) >= 8)
|
||||
|
||||
@@ -382,7 +382,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
//keep it at the right spot, so we can't have people taking shortcuts
|
||||
var/location = C.dna.mutation_index.Find(inert_mutation)
|
||||
C.dna.mutation_index[location] = new_species.inert_mutation
|
||||
C.dna.default_mutation_genes[location] = C.dna.mutation_index[location]
|
||||
C.dna.mutation_index[new_species.inert_mutation] = create_sequence(new_species.inert_mutation)
|
||||
C.dna.default_mutation_genes[new_species.inert_mutation] = C.dna.mutation_index[new_species.inert_mutation]
|
||||
|
||||
if(!new_species.has_field_of_vision && has_field_of_vision && ishuman(C) && CONFIG_GET(flag/use_field_of_vision))
|
||||
var/datum/component/field_of_vision/F = C.GetComponent(/datum/component/field_of_vision)
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "slime_swap_body", name, 400, 400, master_ui, state)
|
||||
ui = new(user, src, ui_key, "SlimeBodySwapper", name, 400, 400, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/datum/action/innate/swap_body/ui_data(mob/user)
|
||||
|
||||
@@ -1196,30 +1196,29 @@
|
||||
|
||||
/mob/living/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if ("maxHealth")
|
||||
if (NAMEOF(src, maxHealth))
|
||||
if (!isnum(var_value) || var_value <= 0)
|
||||
return FALSE
|
||||
if("stat")
|
||||
if(NAMEOF(src, stat))
|
||||
if((stat == DEAD) && (var_value < DEAD))//Bringing the dead back to life
|
||||
GLOB.dead_mob_list -= src
|
||||
GLOB.alive_mob_list += src
|
||||
if((stat < DEAD) && (var_value == DEAD))//Kill he
|
||||
GLOB.alive_mob_list -= src
|
||||
GLOB.dead_mob_list += src
|
||||
if(NAMEOF(src, health)) //this doesn't work. gotta use procs instead.
|
||||
return FALSE
|
||||
. = ..()
|
||||
switch(var_name)
|
||||
if("eye_blind")
|
||||
if(NAMEOF(src, eye_blind))
|
||||
set_blindness(var_value)
|
||||
if("eye_damage")
|
||||
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
|
||||
E?.setOrganDamage(var_value)
|
||||
if("eye_blurry")
|
||||
if(NAMEOF(src, eye_blurry))
|
||||
set_blurriness(var_value)
|
||||
if("maxHealth")
|
||||
if(NAMEOF(src, maxHealth))
|
||||
updatehealth()
|
||||
if("resize")
|
||||
if(NAMEOF(src, resize))
|
||||
update_transform()
|
||||
if("lighting_alpha")
|
||||
if(NAMEOF(src, lighting_alpha))
|
||||
sync_lighting_plane_alpha()
|
||||
|
||||
/mob/living/proc/do_adrenaline(
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/datum/robot_control
|
||||
var/mob/living/silicon/ai/owner
|
||||
|
||||
/datum/robot_control/New(mob/living/silicon/ai/new_owner)
|
||||
if(!istype(new_owner))
|
||||
qdel(src)
|
||||
owner = new_owner
|
||||
|
||||
/datum/robot_control/proc/is_interactable(mob/user)
|
||||
if(user != owner || owner.incapacitated())
|
||||
return FALSE
|
||||
if(owner.control_disabled)
|
||||
to_chat(user, "<span class='warning'>Wireless control is disabled.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/robot_control/ui_status(mob/user)
|
||||
if(is_interactable(user))
|
||||
return ..()
|
||||
return UI_CLOSE
|
||||
|
||||
/datum/robot_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.always_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "RemoteRobotControl", "Remote Robot Control", 500, 500, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/datum/robot_control/ui_data(mob/user)
|
||||
if(!owner || user != owner)
|
||||
return
|
||||
var/list/data = list()
|
||||
var/turf/ai_current_turf = get_turf(owner)
|
||||
var/ai_zlevel = ai_current_turf.z
|
||||
|
||||
data["robots"] = list()
|
||||
for(var/mob/living/simple_animal/bot/B in GLOB.bots_list)
|
||||
if(B.z != ai_zlevel || B.remote_disabled) //Only non-emagged bots on the same Z-level are detected!
|
||||
continue
|
||||
var/list/robot_data = list(
|
||||
name = B.name,
|
||||
model = B.model,
|
||||
mode = B.get_mode(),
|
||||
hacked = B.hacked,
|
||||
location = get_area_name(B, TRUE),
|
||||
ref = REF(B)
|
||||
)
|
||||
data["robots"] += list(robot_data)
|
||||
|
||||
return data
|
||||
|
||||
/datum/robot_control/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!is_interactable(usr))
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("callbot") //Command a bot to move to a selected location.
|
||||
if(owner.call_bot_cooldown > world.time)
|
||||
to_chat(usr, "<span class='danger'>Error: Your last call bot command is still processing, please wait for the bot to finish calculating a route.</span>")
|
||||
return
|
||||
owner.Bot = locate(params["ref"]) in GLOB.bots_list
|
||||
if(!owner.Bot || owner.Bot.remote_disabled || owner.control_disabled)
|
||||
return
|
||||
owner.waypoint_mode = TRUE
|
||||
to_chat(usr, "<span class='notice'>Set your waypoint by clicking on a valid location free of obstructions.</span>")
|
||||
. = TRUE
|
||||
if("interface") //Remotely connect to a bot!
|
||||
owner.Bot = locate(params["ref"]) in GLOB.bots_list
|
||||
if(!owner.Bot || owner.Bot.remote_disabled || owner.control_disabled)
|
||||
return
|
||||
owner.Bot.attack_ai(usr)
|
||||
. = TRUE
|
||||
@@ -2,7 +2,18 @@
|
||||
//as they handle all relevant stuff like adding it to the player's screen and such
|
||||
|
||||
//Returns the thing in our active hand (whatever is in our active module-slot, in this case)
|
||||
//This proc has been butchered into a proc that overrides borg item holding for the sake of making grippers work.
|
||||
//I'd be immensely thankful if anyone can figure out a less obtuse way of making grippers work without breaking functionality.
|
||||
/mob/living/silicon/robot/get_active_held_item()
|
||||
var/item = module_active
|
||||
if(istype(item, /obj/item/weapon/gripper))
|
||||
var/obj/item/weapon/gripper/G = item
|
||||
if(G.wrapped)
|
||||
if(G.wrapped.loc != G)
|
||||
G.wrapped = null
|
||||
return module_active
|
||||
item = G.wrapped
|
||||
return item
|
||||
return module_active
|
||||
|
||||
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
/obj/item/t_scanner,
|
||||
/obj/item/analyzer,
|
||||
/obj/item/storage/part_replacer/cyborg,
|
||||
/obj/item/holosign_creator/atmos,
|
||||
/obj/item/holosign_creator/combifan,
|
||||
/obj/item/weapon/gripper,
|
||||
/obj/item/lightreplacer/cyborg,
|
||||
/obj/item/geiger_counter/cyborg,
|
||||
|
||||
@@ -115,6 +115,19 @@
|
||||
else
|
||||
return "<span class='average'>[mode_name[mode]]</span>"
|
||||
|
||||
/**
|
||||
* Returns a status string about the bot's current status, if it's moving, manually controlled, or idle.
|
||||
*/
|
||||
/mob/living/simple_animal/bot/proc/get_mode_ui()
|
||||
if(client) //Player bots do not have modes, thus the override. Also an easy way for PDA users/AI to know when a bot is a player.
|
||||
return paicard ? "pAI Controlled" : "Autonomous"
|
||||
else if(!on)
|
||||
return "Inactive"
|
||||
else if(!mode)
|
||||
return "Idle"
|
||||
else
|
||||
return "[mode_name[mode]]"
|
||||
|
||||
/mob/living/simple_animal/bot/proc/turn_on()
|
||||
if(stat)
|
||||
return FALSE
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "mulebot", name, ui_x, ui_y, master_ui, state)
|
||||
ui = new(user, src, ui_key, "Mule", name, ui_x, ui_y, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/ui_data(mob/user)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
//funniest shit i've ever seen
|
||||
|
||||
/mob/living/simple_animal/pickle
|
||||
name = "pickle"
|
||||
desc = "It's a pickle. It might just be the funniest thing you have ever seen."
|
||||
health = 100
|
||||
maxHealth = 100
|
||||
icon = 'icons/mob/32x64.dmi'
|
||||
icon_state = "pickle"
|
||||
deathmessage = "The pickle implodes into its own existential dread and disappears!"
|
||||
friendly_verb_continuous = "tickles"
|
||||
friendly_verb_simple = "tickle"
|
||||
del_on_death = TRUE
|
||||
var/mob/living/original_body
|
||||
|
||||
/mob/living/simple_animal/pickle/UnarmedAttack(atom/A)
|
||||
..() //we want the tickle emote to go before the laugh
|
||||
if(ismob(A))
|
||||
var/mob/laugher = A
|
||||
laugher.emote("laugh")
|
||||
|
||||
/mob/living/simple_animal/pickle/death()
|
||||
..()
|
||||
if(original_body)
|
||||
original_body.adjustOrganLoss(ORGAN_SLOT_BRAIN, 200) //to be fair, you have to have a very high iq to understand-
|
||||
original_body.forceMove(get_turf(src))
|
||||
if(mind)
|
||||
mind.transfer_to(original_body)
|
||||
|
||||
/mob/living/simple_animal/pickle/wabbajack_act() //restore users name before its used on the new mob
|
||||
if(original_body)
|
||||
real_name = original_body.real_name
|
||||
Reference in New Issue
Block a user