mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge pull request #11376 from NullSnapshot/dev-freeze
Bunch of IPC fixes.
This commit is contained in:
@@ -30,15 +30,15 @@
|
|||||||
#define AIR_DAMAGE_MODIFIER 2.025 // More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
|
#define AIR_DAMAGE_MODIFIER 2.025 // More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
|
||||||
|
|
||||||
// Organ defines.
|
// Organ defines.
|
||||||
#define ORGAN_CUT_AWAY 1<<0
|
#define ORGAN_CUT_AWAY (1<<0)
|
||||||
#define ORGAN_BLEEDING 1<<1
|
#define ORGAN_BLEEDING (1<<1)
|
||||||
#define ORGAN_BROKEN 1<<2
|
#define ORGAN_BROKEN (1<<2)
|
||||||
#define ORGAN_DESTROYED 1<<3
|
#define ORGAN_DESTROYED (1<<3)
|
||||||
#define ORGAN_ROBOT 1<<4
|
#define ORGAN_ROBOT (1<<4)
|
||||||
#define ORGAN_SPLINTED 1<<5
|
#define ORGAN_SPLINTED (1<<5)
|
||||||
#define ORGAN_DEAD 1<<6
|
#define ORGAN_DEAD (1<<6)
|
||||||
#define ORGAN_MUTATED 1<<7
|
#define ORGAN_MUTATED (1<<7)
|
||||||
#define ORGAN_ASSISTED 1<<8
|
#define ORGAN_ASSISTED (1<<8)
|
||||||
|
|
||||||
#define DROPLIMB_EDGE 0
|
#define DROPLIMB_EDGE 0
|
||||||
#define DROPLIMB_BLUNT 1
|
#define DROPLIMB_BLUNT 1
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
//Processes the occupant, drawing from the internal power cell if needed.
|
//Processes the occupant, drawing from the internal power cell if needed.
|
||||||
/obj/machinery/recharge_station/proc/process_occupant()
|
/obj/machinery/recharge_station/proc/process_occupant()
|
||||||
if(istype(occupant, /mob/living/silicon/robot))
|
if(isrobot(occupant))
|
||||||
var/mob/living/silicon/robot/R = occupant
|
var/mob/living/silicon/robot/R = occupant
|
||||||
|
|
||||||
if(R.module)
|
if(R.module)
|
||||||
@@ -103,6 +103,12 @@
|
|||||||
R.adjustBruteLoss(-weld_rate)
|
R.adjustBruteLoss(-weld_rate)
|
||||||
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE))
|
if(wire_rate && R.getFireLoss() && cell.checked_use(wire_power_use * wire_rate * CELLRATE))
|
||||||
R.adjustFireLoss(-wire_rate)
|
R.adjustFireLoss(-wire_rate)
|
||||||
|
else if(ishuman(occupant))
|
||||||
|
var/mob/living/carbon/human/H = occupant
|
||||||
|
if(!isnull(H.internal_organs_by_name["cell"]) && H.nutrition < 450)
|
||||||
|
H.nutrition = min(H.nutrition+10, 450)
|
||||||
|
cell.use(7000/450*10)
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/recharge_station/examine(mob/user)
|
/obj/machinery/recharge_station/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
@@ -199,24 +205,30 @@
|
|||||||
/obj/machinery/recharge_station/Bumped(var/mob/living/silicon/robot/R)
|
/obj/machinery/recharge_station/Bumped(var/mob/living/silicon/robot/R)
|
||||||
go_in(R)
|
go_in(R)
|
||||||
|
|
||||||
/obj/machinery/recharge_station/proc/go_in(var/mob/living/silicon/robot/R)
|
/obj/machinery/recharge_station/proc/go_in(var/mob/M)
|
||||||
if(!istype(R))
|
|
||||||
return
|
|
||||||
if(occupant)
|
if(occupant)
|
||||||
return
|
return
|
||||||
|
if(!hascell(M))
|
||||||
if(R.incapacitated())
|
|
||||||
return
|
|
||||||
if(!R.cell)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
add_fingerprint(R)
|
add_fingerprint(M)
|
||||||
R.reset_view(src)
|
M.reset_view(src)
|
||||||
R.forceMove(src)
|
M.forceMove(src)
|
||||||
occupant = R
|
occupant = M
|
||||||
update_icon()
|
update_icon()
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/machinery/recharge_station/proc/hascell(var/mob/M)
|
||||||
|
if(isrobot(M))
|
||||||
|
var/mob/living/silicon/robot/R = M
|
||||||
|
if(R.cell)
|
||||||
|
return 1
|
||||||
|
if(ishuman(M))
|
||||||
|
var/mob/living/carbon/human/H = M
|
||||||
|
if(!isnull(H.internal_organs_by_name["cell"]))
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
/obj/machinery/recharge_station/proc/go_out()
|
/obj/machinery/recharge_station/proc/go_out()
|
||||||
if(!occupant)
|
if(!occupant)
|
||||||
return
|
return
|
||||||
@@ -243,4 +255,6 @@
|
|||||||
set name = "Enter Recharger"
|
set name = "Enter Recharger"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
|
|
||||||
|
if(!usr.incapacitated())
|
||||||
|
return
|
||||||
go_in(usr)
|
go_in(usr)
|
||||||
|
|||||||
@@ -1183,7 +1183,12 @@ datum/preferences
|
|||||||
if("name")
|
if("name")
|
||||||
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
|
var/raw_name = input(user, "Choose your character's name:", "Character Preference") as text|null
|
||||||
if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
|
if (!isnull(raw_name)) // Check to ensure that the user entered text (rather than cancel.)
|
||||||
var/new_name = sanitizeName(raw_name)
|
var/new_name
|
||||||
|
var/datum/species/S = all_species[species]
|
||||||
|
if(istype(S))
|
||||||
|
new_name = S.sanitize_name(raw_name)
|
||||||
|
else
|
||||||
|
new_name = sanitizeName(raw_name)
|
||||||
if(new_name)
|
if(new_name)
|
||||||
real_name = new_name
|
real_name = new_name
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -188,11 +188,16 @@
|
|||||||
|
|
||||||
//Sanitize
|
//Sanitize
|
||||||
metadata = sanitize_text(metadata, initial(metadata))
|
metadata = sanitize_text(metadata, initial(metadata))
|
||||||
real_name = sanitizeName(real_name)
|
|
||||||
|
|
||||||
if(isnull(species) || !(species in playable_species))
|
if(isnull(species) || !(species in playable_species))
|
||||||
species = "Human"
|
species = "Human"
|
||||||
|
|
||||||
|
var/datum/species/cur_species = all_species[species]
|
||||||
|
if(istype(cur_species))
|
||||||
|
real_name = cur_species.sanitize_name(real_name)
|
||||||
|
else
|
||||||
|
real_name = sanitizeName(real_name)
|
||||||
|
|
||||||
if(isnum(underwear))
|
if(isnum(underwear))
|
||||||
var/list/undies = gender == MALE ? underwear_m : underwear_f
|
var/list/undies = gender == MALE ? underwear_m : underwear_f
|
||||||
underwear = undies[undies[underwear]]
|
underwear = undies[undies[underwear]]
|
||||||
|
|||||||
@@ -108,10 +108,9 @@
|
|||||||
|
|
||||||
/datum/language/machine/get_random_name()
|
/datum/language/machine/get_random_name()
|
||||||
if(prob(70))
|
if(prob(70))
|
||||||
name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
return "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
|
||||||
else
|
else
|
||||||
name = pick(ai_names)
|
return pick(ai_names)
|
||||||
return name
|
|
||||||
|
|
||||||
//Syllable Lists
|
//Syllable Lists
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -157,6 +157,9 @@
|
|||||||
for(var/u_type in unarmed_types)
|
for(var/u_type in unarmed_types)
|
||||||
unarmed_attacks += new u_type()
|
unarmed_attacks += new u_type()
|
||||||
|
|
||||||
|
/datum/species/proc/sanitize_name(var/new_name)
|
||||||
|
return sanitizeName(new_name)
|
||||||
|
|
||||||
/datum/species/proc/get_station_variant()
|
/datum/species/proc/get_station_variant()
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
|||||||
@@ -250,7 +250,7 @@
|
|||||||
halloss_message_self = "ERROR: Unrecoverable machine check exception.<BR>System halted, rebooting..."
|
halloss_message_self = "ERROR: Unrecoverable machine check exception.<BR>System halted, rebooting..."
|
||||||
|
|
||||||
warning_low_pressure = 50
|
warning_low_pressure = 50
|
||||||
hazard_low_pressure = 0
|
hazard_low_pressure = -1
|
||||||
|
|
||||||
cold_level_1 = 50
|
cold_level_1 = 50
|
||||||
cold_level_2 = -1
|
cold_level_2 = -1
|
||||||
@@ -292,8 +292,17 @@
|
|||||||
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
|
"r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
heat_discomfort_level = 373.15
|
||||||
|
heat_discomfort_strings = list(
|
||||||
|
"Your CPU temperature probes warn you that you are approaching critical heat levels!"
|
||||||
|
)
|
||||||
|
|
||||||
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
|
/datum/species/machine/handle_death(var/mob/living/carbon/human/H)
|
||||||
..()
|
..()
|
||||||
H.h_style = ""
|
H.h_style = ""
|
||||||
spawn(100)
|
spawn(100)
|
||||||
if(H) H.update_hair()
|
if(H) H.update_hair()
|
||||||
|
|
||||||
|
/datum/species/machine/sanitize_name(var/new_name)
|
||||||
|
return sanitizeName(new_name,allow_numbers=1)
|
||||||
|
|||||||
Reference in New Issue
Block a user