mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Merge remote-tracking branch 'upstream/dev' into viro
This commit is contained in:
@@ -159,4 +159,4 @@
|
||||
desc = "You can hear the distant sounds of rhythmic electronica."
|
||||
icon_state = "richard"
|
||||
body_parts_covered = HEAD|FACE
|
||||
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
|
||||
flags = HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
|
||||
@@ -1,18 +1,14 @@
|
||||
/mob/living/carbon/verb/give()
|
||||
mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr)
|
||||
set category = "IC"
|
||||
set name = "Give"
|
||||
set src in view(1)
|
||||
if(src.stat == 2 || usr.stat == 2 || src.client == null)
|
||||
return
|
||||
if(src == usr)
|
||||
usr << "\red I feel stupider, suddenly."
|
||||
if(target.stat == 2 || usr.stat == 2|| target.client == null)
|
||||
return
|
||||
var/obj/item/I
|
||||
if(!usr.hand && usr.r_hand == null)
|
||||
usr << "\red You don't have anything in your right hand to give to [src.name]"
|
||||
usr << "<span class='warning'>You don't have anything in your right hand to give to [target.name]</span>"
|
||||
return
|
||||
if(usr.hand && usr.l_hand == null)
|
||||
usr << "\red You don't have anything in your left hand to give to [src.name]"
|
||||
usr << "<span class='warning'>You don't have anything in your left hand to give to [target.name]</span>"
|
||||
return
|
||||
if(usr.hand)
|
||||
I = usr.l_hand
|
||||
@@ -20,38 +16,38 @@
|
||||
I = usr.r_hand
|
||||
if(!I)
|
||||
return
|
||||
if(src.r_hand == null || src.l_hand == null)
|
||||
switch(alert(src,"[usr] wants to give you \a [I]?",,"Yes","No"))
|
||||
if(target.r_hand == null || target.l_hand == null)
|
||||
switch(alert(target,"[usr] wants to give you \a [I]?",,"Yes","No"))
|
||||
if("Yes")
|
||||
if(!I)
|
||||
return
|
||||
if(!Adjacent(usr))
|
||||
usr << "\red You need to stay in reaching distance while giving an object."
|
||||
src << "\red [usr.name] moved too far away."
|
||||
usr << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
|
||||
target << "<span class='warning'>[usr.name] moved too far away.</span>"
|
||||
return
|
||||
if((usr.hand && usr.l_hand != I) || (!usr.hand && usr.r_hand != I))
|
||||
usr << "\red You need to keep the item in your active hand."
|
||||
src << "\red [usr.name] seem to have given up on giving \the [I.name] to you."
|
||||
usr << "<span class='warning'>You need to keep the item in your active hand.</span>"
|
||||
target << "<span class='warning'>[usr.name] seem to have given up on giving \the [I.name] to you.</span>"
|
||||
return
|
||||
if(src.r_hand != null && src.l_hand != null)
|
||||
src << "\red Your hands are full."
|
||||
usr << "\red Their hands are full."
|
||||
if(target.r_hand != null && target.l_hand != null)
|
||||
target << "<span class='warning'>Your hands are full.</span>"
|
||||
usr << "<span class='warning'>Their hands are full.</span>"
|
||||
return
|
||||
else
|
||||
usr.drop_item()
|
||||
if(src.r_hand == null)
|
||||
src.r_hand = I
|
||||
if(target.r_hand == null)
|
||||
target.r_hand = I
|
||||
else
|
||||
src.l_hand = I
|
||||
I.loc = src
|
||||
target.l_hand = I
|
||||
I.loc = target
|
||||
I.layer = 20
|
||||
I.add_fingerprint(src)
|
||||
src.update_inv_l_hand()
|
||||
src.update_inv_r_hand()
|
||||
I.add_fingerprint(target)
|
||||
target.update_inv_l_hand()
|
||||
target.update_inv_r_hand()
|
||||
usr.update_inv_l_hand()
|
||||
usr.update_inv_r_hand()
|
||||
src.visible_message("\blue [usr.name] handed \the [I.name] to [src.name].")
|
||||
target.visible_message("<span class='notice'>[usr.name] handed \the [I.name] to [target.name].</span>")
|
||||
if("No")
|
||||
src.visible_message("\red [usr.name] tried to hand [I.name] to [src.name] but [src.name] didn't want it.")
|
||||
target.visible_message("<span class='warning'>[usr.name] tried to hand [I.name] to [target.name] but [target.name] didn't want it.</span>")
|
||||
else
|
||||
usr << "\red [src.name]'s hands are full."
|
||||
usr << "<span class='warning'>[target.name]'s hands are full.</span>"
|
||||
|
||||
@@ -223,7 +223,10 @@
|
||||
usr << "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>"
|
||||
else
|
||||
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
|
||||
|
||||
if(fire_stacks)
|
||||
msg += "[t_He] [t_is] covered in some liquid.\n"
|
||||
if(on_fire)
|
||||
msg += "<span class='warning'>[t_He] [t_is] on fire!.</span>\n"
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
if(nutrition < 100)
|
||||
|
||||
@@ -110,6 +110,9 @@
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment(environment) //Optimized a good bit.
|
||||
|
||||
//Check if we're on fire
|
||||
handle_fire()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates() //Optimized a bit
|
||||
update_canmove()
|
||||
@@ -786,6 +789,8 @@
|
||||
|
||||
if (abs(body_temperature_difference) < 0.5)
|
||||
return //fuck this precision
|
||||
if (on_fire)
|
||||
return //too busy for pesky convection
|
||||
|
||||
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
|
||||
@@ -1732,5 +1737,15 @@
|
||||
speech_problem_flag = 1
|
||||
return stuttering
|
||||
|
||||
/mob/living/carbon/human/handle_fire()
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/burn_temperature = fire_burn_temperature()
|
||||
var/thermal_protection = get_heat_protection(burn_temperature)
|
||||
|
||||
if (thermal_protection < 1 && bodytemperature < burn_temperature)
|
||||
bodytemperature += round(BODYTEMP_HEATING_MAX*(1-thermal_protection), 1)
|
||||
|
||||
#undef HUMAN_MAX_OXYLOSS
|
||||
#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
@@ -126,8 +126,9 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
#define LEGCUFF_LAYER 19
|
||||
#define L_HAND_LAYER 20
|
||||
#define R_HAND_LAYER 21
|
||||
#define TARGETED_LAYER 22 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 22
|
||||
#define FIRE_LAYER 22 //If you're on fire
|
||||
#define TARGETED_LAYER 23 //BS12: Layer for the target overlay from weapon targeting system
|
||||
#define TOTAL_LAYERS 23
|
||||
//////////////////////////////////
|
||||
|
||||
/mob/living/carbon/human
|
||||
@@ -508,6 +509,7 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
update_inv_handcuffed(0)
|
||||
update_inv_legcuffed(0)
|
||||
update_inv_pockets(0)
|
||||
update_fire(0)
|
||||
UpdateDamageIcon()
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
@@ -911,6 +913,13 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
if(update_icons) update_icons()
|
||||
|
||||
|
||||
/mob/living/carbon/human/update_fire(var/update_icons=1)
|
||||
overlays_standing[FIRE_LAYER] = null
|
||||
if(on_fire)
|
||||
overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
|
||||
|
||||
if(update_icons) update_icons()
|
||||
|
||||
// Used mostly for creating head items
|
||||
/mob/living/carbon/human/proc/generate_head_icon()
|
||||
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
|
||||
@@ -969,4 +978,5 @@ proc/get_damage_icon_part(damage_state, body_part)
|
||||
#undef L_HAND_LAYER
|
||||
#undef R_HAND_LAYER
|
||||
#undef TARGETED_LAYER
|
||||
#undef FIRE_LAYER
|
||||
#undef TOTAL_LAYERS
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
if(environment) // More error checking -- TLE
|
||||
handle_environment(environment)
|
||||
|
||||
//Check if we're on fire
|
||||
handle_fire()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates()
|
||||
update_canmove()
|
||||
@@ -585,3 +588,9 @@
|
||||
proc/handle_changeling()
|
||||
if(mind && mind.changeling)
|
||||
mind.changeling.regenerate()
|
||||
|
||||
/mob/living/carbon/monkey/handle_fire()
|
||||
if(..())
|
||||
return
|
||||
adjustFireLoss(6)
|
||||
return
|
||||
@@ -5,7 +5,8 @@
|
||||
#define M_L_HAND_LAYER 4
|
||||
#define M_R_HAND_LAYER 5
|
||||
#define TARGETED_LAYER 6
|
||||
#define M_TOTAL_LAYERS 6
|
||||
#define M_FIRE_LAYER 6
|
||||
#define M_TOTAL_LAYERS 7
|
||||
/////////////////////////////////
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
@@ -19,6 +20,7 @@
|
||||
update_inv_r_hand(0)
|
||||
update_inv_l_hand(0)
|
||||
update_inv_handcuffed(0)
|
||||
update_fire(0)
|
||||
update_icons()
|
||||
//Hud Stuff
|
||||
update_hud()
|
||||
@@ -109,6 +111,12 @@
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
/mob/living/carbon/monkey/update_fire(var/update_icons=1)
|
||||
if(on_fire)
|
||||
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
|
||||
else
|
||||
overlays_standing[M_FIRE_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
//Monkey Overlays Indexes////////
|
||||
#undef M_MASK_LAYER
|
||||
#undef M_BACK_LAYER
|
||||
@@ -116,5 +124,6 @@
|
||||
#undef M_L_HAND_LAYER
|
||||
#undef M_R_HAND_LAYER
|
||||
#undef TARGETED_LAYER
|
||||
#undef M_FIRE_LAYER
|
||||
#undef M_TOTAL_LAYERS
|
||||
|
||||
|
||||
@@ -281,6 +281,8 @@
|
||||
C.legcuffed = initial(C.legcuffed)
|
||||
hud_updateflag |= 1 << HEALTH_HUD
|
||||
hud_updateflag |= 1 << STATUS_HUD
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
|
||||
/mob/living/proc/rejuvenate()
|
||||
|
||||
@@ -628,9 +630,21 @@
|
||||
BD.attack_hand(usr)
|
||||
C.open()
|
||||
|
||||
//breaking out of handcuffs
|
||||
//drop && roll or breaking out of handcuffs
|
||||
else if(iscarbon(L))
|
||||
var/mob/living/carbon/CM = L
|
||||
if(CM.on_fire && CM.canmove)
|
||||
CM.fire_stacks -= 5
|
||||
CM.Weaken(3)
|
||||
CM.spin(32,2)
|
||||
CM.visible_message("<span class='danger'>[CM] rolls on the floor, trying to put themselves out!</span>", \
|
||||
"<span class='notice'>You stop, drop, and roll!</span>")
|
||||
sleep(30)
|
||||
if(fire_stacks <= 0)
|
||||
CM.visible_message("<span class='danger'>[CM] has successfully extinguished themselves!</span>", \
|
||||
"<span class='notice'>You extinguish yourself.</span>")
|
||||
ExtinguishMob()
|
||||
return
|
||||
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
|
||||
CM.next_move = world.time + 100
|
||||
CM.last_special = world.time + 100
|
||||
@@ -843,4 +857,22 @@
|
||||
return 1
|
||||
|
||||
/mob/living/proc/slip(var/slipped_on,stun_duration=8)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/proc/spin(spintime, speed)
|
||||
spawn()
|
||||
var/D = dir
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
set_dir(D)
|
||||
spintime -= speed
|
||||
return
|
||||
|
||||
@@ -191,3 +191,52 @@
|
||||
src.visible_message("<span class='danger'>[user] has [attack_message] [src]!</span>")
|
||||
spawn(1) updatehealth()
|
||||
return 1
|
||||
|
||||
/mob/living/proc/IgniteMob()
|
||||
if(fire_stacks > 0 && !on_fire)
|
||||
on_fire = 1
|
||||
src.AddLuminosity(3)
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/ExtinguishMob()
|
||||
if(on_fire)
|
||||
on_fire = 0
|
||||
fire_stacks = 0
|
||||
src.AddLuminosity(-3)
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/update_fire()
|
||||
return
|
||||
|
||||
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
|
||||
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = FIRE_MIN_STACKS, max = FIRE_MAX_STACKS)
|
||||
|
||||
/mob/living/proc/handle_fire()
|
||||
if(fire_stacks < 0)
|
||||
fire_stacks = max(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly
|
||||
|
||||
if(!on_fire)
|
||||
return 1
|
||||
else if(fire_stacks <= 0)
|
||||
ExtinguishMob() //Fire's been put out.
|
||||
return 1
|
||||
|
||||
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
|
||||
if(G.gas["oxygen"] < 1)
|
||||
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
|
||||
return 1
|
||||
|
||||
var/turf/location = get_turf(src)
|
||||
location.hotspot_expose(fire_burn_temperature(), 50, 1)
|
||||
|
||||
/mob/living/fire_act()
|
||||
adjust_fire_stacks(0.5)
|
||||
IgniteMob()
|
||||
|
||||
//Finds the effective temperature that the mob is burning at.
|
||||
/mob/living/proc/fire_burn_temperature()
|
||||
if (fire_stacks <= 0)
|
||||
return 0
|
||||
|
||||
//Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
|
||||
return round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2)
|
||||
|
||||
@@ -38,4 +38,6 @@
|
||||
var/tod = null // Time of death
|
||||
var/update_slimes = 1
|
||||
var/silent = null // Can't talk. Value goes down every life proc.
|
||||
var/mob_size // Used by lockers.
|
||||
var/mob_size // Used by lockers.
|
||||
var/on_fire = 0 //The "Are we on fire?" var
|
||||
var/fire_stacks
|
||||
|
||||
@@ -258,10 +258,15 @@ datum
|
||||
if(!cube.wrapped)
|
||||
cube.Expand()
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
|
||||
if (istype(M, /mob/living/carbon/slime))
|
||||
var/mob/living/carbon/slime/S = M
|
||||
S.apply_water()
|
||||
if(method == TOUCH && isliving(M))
|
||||
M.adjust_fire_stacks(-(volume / 10))
|
||||
if(M.fire_stacks <= 0)
|
||||
M.ExtinguishMob()
|
||||
return
|
||||
|
||||
water/holywater
|
||||
name = "Holy Water"
|
||||
@@ -909,6 +914,12 @@ datum
|
||||
M.adjustToxLoss(1)
|
||||
..()
|
||||
return
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with welding fuel to make them easy to ignite!
|
||||
if(!istype(M, /mob/living))
|
||||
return
|
||||
if(method == TOUCH)
|
||||
M.adjust_fire_stacks(volume / 10)
|
||||
return
|
||||
|
||||
space_cleaner
|
||||
name = "Space cleaner"
|
||||
@@ -1663,6 +1674,12 @@ datum
|
||||
src = null
|
||||
T.assume_gas("volatile_fuel", volume, T20C)
|
||||
return
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel!
|
||||
if(!istype(M, /mob/living))
|
||||
return
|
||||
if(method == TOUCH)
|
||||
M.adjust_fire_stacks(volume / 5)
|
||||
return
|
||||
|
||||
toxin/lexorin
|
||||
name = "Lexorin"
|
||||
@@ -3333,6 +3350,12 @@ datum
|
||||
usr << "It wasn't enough..."
|
||||
return
|
||||
|
||||
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with ethanol isn't quite as good as fuel.
|
||||
if(!istype(M, /mob/living))
|
||||
return
|
||||
if(method == TOUCH)
|
||||
M.adjust_fire_stacks(volume / 15)
|
||||
return
|
||||
ethanol/beer
|
||||
name = "Beer"
|
||||
id = "beer"
|
||||
|
||||
Reference in New Issue
Block a user