Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 96ff7f6

Browse files
fixed some stuff
1 parent b3ee2f6 commit 96ff7f6

File tree

9 files changed

+49
-39
lines changed

9 files changed

+49
-39
lines changed

code/datums/components/bloodysoles.dm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
#define FOOTPRINT_INDEX_FILE 1
2+
#define FOOTPRINT_INDEX_STATE 2
23

34
//Component for clothing items that can pick up blood from decals and spread it around everywhere when walking, such as shoes or suits with integrated shoes.
45

@@ -253,20 +254,19 @@ Like its parent but can be applied to carbon mobs instead of clothing items
253254

254255
/datum/component/bloodysoles/feet/add_parent_to_footprint(obj/effect/decal/cleanable/blood/footprints/FP)
255256
if(ismonkey(wielder))
256-
FP.species_types |= "monkey"
257+
FP.species_types["monkey"] = list(null, FALSE)
257258
return
258259

259260
if(!ishuman(wielder))
260-
FP.species_types |= "unknown"
261+
FP.species_types["unknown"] = list(null, FALSE)
261262
return
262263

263-
// Find any leg of our human and add that to the footprint, instead of the default which is to just add the human type
264-
for(var/X in wielder.bodyparts)
265-
var/obj/item/bodypart/affecting = X
266-
if(affecting.body_part == LEG_RIGHT || affecting.body_part == LEG_LEFT)
267-
if(!affecting.bodypart_disabled)
268-
FP.species_types |= affecting.limb_id
269-
break
264+
// Our limbs code is horribly out of date and won't work the normal way, so we do it like this
265+
for(var/obj/item/bodypart/affecting as anything in wielder.bodyparts)
266+
if((affecting.body_part & (LEG_LEFT|LEG_RIGHT)) && !affecting.bodypart_disabled)
267+
var/image/limb_icon = affecting.get_limb_icon(FALSE)[1]
268+
FP.species_types[affecting.species_id] = list(limb_icon.icon, limb_icon.icon_state)
269+
break
270270

271271

272272
/datum/component/bloodysoles/feet/is_obscured()

code/game/machinery/computer/dna_console.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@
495495
if((newgene == "J") && (jokerready < world.time))
496496
var/truegenes = GET_SEQUENCE(path)
497497
newgene = truegenes[genepos]
498-
jokerready = world.time + JOKER_TIMEOUT - (JOKER_UPGRADE * (connected_scanner.precision_coeff + user.get_skill(SKILL_SCIENCE) - 1))
498+
jokerready = world.time + JOKER_TIMEOUT - (JOKER_UPGRADE * (connected_scanner.precision_coeff + (user.get_skill(SKILL_SCIENCE) / 2) - 1))
499499

500500
// If the gene is an X, we want to update the default genes with the new
501501
// X to allow highlighting logic to work on the tgui interface.

code/game/mecha/equipment/mecha_equipment.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@
248248
return 0
249249

250250
// Is the occupant wearing a pilot suit?
251-
/obj/item/mecha_parts/mecha_equipment/proc/check_eva()
252-
return chassis?.check_eva()
251+
/obj/item/mecha_parts/mecha_equipment/proc/check_eva(mob/pilot)
252+
return chassis?.check_eva(pilot)
253253

254254
// Some equipment can be used as tools
255255
/obj/item/mecha_parts/mecha_equipment/tool_use_check(mob/living/user, amount)

code/game/mecha/mecha.dm

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@
374374
. += span_danger("The capacitor did well in preventing too much damage. Repair will be manageable.")
375375
if(4)
376376
. += span_danger("The capacitor did such a good job in preserving the chassis that you could almost call it functional. But it isn't. Repair should be easy though.")
377-
if(repair_hint && capacitor?.rating)
377+
if(repair_hint && (capacitor?.rating || user.skill_check(SKILL_TECHNICAL, EXP_GENIUS) || user.skill_check(SKILL_MECHANICAL, EXP_GENIUS)))
378378
. += repair_hint
379379

380380
//Armor tag
@@ -1038,7 +1038,7 @@
10381038

10391039
visible_message("[user] starts to climb into [name].")
10401040

1041-
if(do_after(user, round(enter_delay * (check_eva()**2)), src, skill_check = null))
1041+
if(do_after(user, round(enter_delay * (check_eva(user)**2)), src, skill_check = null))
10421042
if(atom_integrity <= 0)
10431043
to_chat(user, span_warning("You cannot get in the [name], it has been destroyed!"))
10441044
else if(occupant)
@@ -1157,7 +1157,7 @@
11571157
/obj/mecha/container_resist(mob/living/user)
11581158
is_currently_ejecting = TRUE
11591159
to_chat(occupant, "<span class='notice'>You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.<span>")
1160-
if(do_after(occupant, exit_delay, src))
1160+
if(do_after(occupant, round(exit_delay * (check_eva(user)**2)), src))
11611161
to_chat(occupant, "<span class='notice'>You exit the mech.<span>")
11621162
go_out()
11631163
else
@@ -1373,8 +1373,10 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
13731373
return
13741374

13751375
// Check the pilot for mech piloting skill
1376-
/obj/mecha/proc/check_eva()
1377-
var/effective_skill = occupant.get_skill(SKILL_TECHNICAL)
1378-
if(effective_skill < EXP_MASTER && HAS_TRAIT(occupant, TRAIT_SKILLED_PILOT))
1376+
/obj/mecha/proc/check_eva(mob/pilot)
1377+
if(!pilot)
1378+
pilot = occupant
1379+
var/effective_skill = pilot.get_skill(SKILL_TECHNICAL)
1380+
if(effective_skill < EXP_MASTER && HAS_TRAIT(pilot, TRAIT_SKILLED_PILOT))
13791381
effective_skill += EXP_LOW // mech pilot suit adds extra pilot skill, up to EXP_MASTER
13801382
return (12 - effective_skill) / 10

code/game/objects/effects/decals/cleanable/humans.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,22 +284,22 @@
284284

285285
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
286286
. = ..()
287-
if((shoe_types.len + species_types.len) > 0)
287+
if((species_types.len ||shoe_types.len) && user.skill_check(SKILL_PHYSIOLOGY, EXP_MID))
288288
. += "You recognise the [name] as belonging to:"
289289
for(var/sole in shoe_types)
290290
var/obj/item/clothing/item = sole
291291
var/article = initial(item.gender) == PLURAL ? "Some" : "A"
292292
. += "[icon2html(initial(item.icon), user, initial(item.icon_state))] [article] <B>[initial(item.name)]</B>."
293293
for(var/species in species_types)
294294
// god help me
295-
if(species == "unknown")
295+
if(!species || species == "unknown")
296296
. += "Some <B>feet</B>."
297297
else if(species == "monkey")
298298
. += "[icon2html('icons/mob/monkey.dmi', user, "monkey1")] Some <B>monkey paws</B>."
299299
else if(species == SPECIES_HUMAN)
300300
. += "[icon2html('icons/mob/human_parts.dmi', user, "default_human_l_leg")] Some <B>human feet</B>."
301301
else
302-
. += "[icon2html('icons/mob/human_parts.dmi', user, "[species]_l_leg")] Some <B>[species] feet</B>."
302+
. += "[icon2html(species_types[species][FOOTPRINT_INDEX_FILE], user, species_types[species][FOOTPRINT_INDEX_STATE])] Some <B>[species] feet</B>."
303303

304304
/obj/effect/decal/cleanable/blood/footprints/replace_decal(obj/effect/decal/cleanable/blood/blood_decal)
305305
if(blood_state != blood_decal.blood_state || footprint_sprite != blood_decal.footprint_sprite) //We only replace footprints of the same type as us

code/modules/hydroponics/seeds.dm

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/// Randomized plant stat with a set amount of inaccuracy
2-
#define RANDOMIZE_PLANT_STAT(plant_stat, inaccuracy) ((inaccuracy && plant_stat >= round(1 / inaccuracy, 1)) ? \
3-
("[plant_stat + rand(inaccuracy)*plant_stat - inaccuracy]-[plant_stat + rand(inaccuracy)*plant_stat]") : plant_stat)
4-
51
// ********************************************************
62
// Here's all the seeds (plants) that can be used in hydro
73
// ********************************************************
@@ -304,18 +300,18 @@
304300
if(get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
305301
text += "- Plant type: [span_warning("UNKNOWN")] \n"
306302
if(!check_skills || user.skill_check(SKILL_SCIENCE, EXP_HIGH))
307-
var/inaccuracy = check_skills ? (EXP_GENIUS - user.get_skill(SKILL_SCIENCE)) / (EXP_GENIUS * 4) : 0
303+
var/inaccuracy = check_skills ? (EXP_GENIUS - user.get_skill(SKILL_SCIENCE)) / (EXP_GENIUS * 2) : 0
308304
if(potency != -1)
309-
text += "- Potency: [RANDOMIZE_PLANT_STAT(potency, inaccuracy)]\n"
305+
text += "- Potency: [randomize_plant_stat(potency, inaccuracy * 100, 0)]\n"
310306
if(yield != -1)
311-
text += "- Yield: [RANDOMIZE_PLANT_STAT(yield, inaccuracy)]\n"
312-
text += "- Maturation speed: [RANDOMIZE_PLANT_STAT(maturation, inaccuracy)]\n"
307+
text += "- Yield: [randomize_plant_stat(yield, inaccuracy * 10, 2)]\n"
308+
text += "- Maturation speed: [randomize_plant_stat(maturation, inaccuracy * 10, 4)]\n"
313309
if(yield != -1)
314-
text += "- Production speed: [RANDOMIZE_PLANT_STAT(production, inaccuracy)]\n"
315-
text += "- Endurance: [RANDOMIZE_PLANT_STAT(endurance, inaccuracy)]\n"
316-
text += "- Lifespan: [RANDOMIZE_PLANT_STAT(lifespan, inaccuracy)]\n"
317-
text += "- Weed Growth Rate: [RANDOMIZE_PLANT_STAT(weed_rate, inaccuracy)]\n"
318-
text += "- Weed Vulnerability: [RANDOMIZE_PLANT_STAT(weed_chance, inaccuracy)]\n"
310+
text += "- Production speed: [randomize_plant_stat(production, inaccuracy * 10, 6)]\n"
311+
text += "- Endurance: [randomize_plant_stat(endurance, inaccuracy * 100, 8)]\n"
312+
text += "- Lifespan: [randomize_plant_stat(lifespan, inaccuracy * 100, 10)]\n"
313+
text += "- Weed Growth Rate: [randomize_plant_stat(weed_rate, inaccuracy * 10, 12)]\n"
314+
text += "- Weed Vulnerability: [randomize_plant_stat(weed_chance, inaccuracy * 10, 14)]\n"
319315
if(rarity)
320316
text += "- Species Discovery Value: [rarity]\n"
321317
if(!check_skills || user.skill_check(SKILL_SCIENCE, EXP_MID))
@@ -330,6 +326,18 @@
330326

331327
return text
332328

329+
/// Randomizes and displays a plant stat.
330+
/obj/item/seeds/proc/randomize_plant_stat(plant_stat, inaccuracy = 0, hash_offset = 0)
331+
if(!inaccuracy)
332+
return plant_stat
333+
hash_offset += 1 + (GLOB.round_id % 16)
334+
var/raw_hash = copytext(md5("[potency]/[yield]/[maturation]/[production]/[endurance]/[lifespan]/[weed_rate]/[weed_chance]/[inaccuracy]/[REF(src)]"), \
335+
hash_offset, hash_offset + 2)
336+
var/random_offset = round(inaccuracy * hex2num(raw_hash) / 255)
337+
if(plant_stat + random_offset - inaccuracy < 0) // keep it in bounds
338+
random_offset += -(plant_stat + random_offset - inaccuracy)
339+
return "[plant_stat + random_offset - inaccuracy]-[plant_stat + random_offset + inaccuracy]"
340+
333341
/obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) //in case seeds have some special interaction with special chems
334342
return
335343

code/modules/jobs/job_types/detective.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
minimal_character_age = 22 //Understanding of forensics, crime analysis, and theory. Less of a grunt officer and more of an intellectual, theoretically, despite how this is never reflected in-game
2828

2929
base_skills = list(
30-
SKILL_PHYSIOLOGY = EXP_NONE,
30+
SKILL_PHYSIOLOGY = EXP_MID,
3131
SKILL_MECHANICAL = EXP_NONE,
3232
SKILL_TECHNICAL = EXP_NONE,
33-
SKILL_SCIENCE = EXP_MID,
33+
SKILL_SCIENCE = EXP_NONE,
3434
SKILL_FITNESS = EXP_MID,
3535
)
3636
skill_points = 2

code/modules/jobs/job_types/scientist.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
SKILL_PHYSIOLOGY = EXP_NONE,
2929
SKILL_MECHANICAL = EXP_NONE,
3030
SKILL_TECHNICAL = EXP_NONE,
31-
SKILL_SCIENCE = EXP_MID,
31+
SKILL_SCIENCE = EXP_HIGH,
3232
SKILL_FITNESS = EXP_NONE,
3333
)
3434
skill_points = 3

code/modules/mob/living/carbon/human/examine.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361

362362
if(!appears_dead)
363363
if(src != user)
364-
if(HAS_TRAIT(user, TRAIT_EMPATH))
364+
if(HAS_TRAIT(user, TRAIT_EMPATH) || user.skill_check(SKILL_PHYSIOLOGY, EXP_MID))
365365
if (combat_mode)
366366
msg += "[t_He] seem[p_s()] to be on guard.\n"
367367
if (getOxyLoss() >= 10)

0 commit comments

Comments
 (0)