Skip to content

Commit

Permalink
Отработки по ревью
Browse files Browse the repository at this point in the history
  • Loading branch information
msw7007 committed Oct 13, 2024
1 parent a338182 commit a9c38a8
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 86 deletions.
17 changes: 9 additions & 8 deletions modular_ss220/species/serpentids/code/common/serpentids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@

dietflags = DIET_OMNI
taste_sensitivity = TASTE_SENSITIVITY_SHARP
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken,
/mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/hostile/poison/bees)
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse,
/mob/living/simple_animal/lizard,
/mob/living/simple_animal/chick,
/mob/living/simple_animal/chicken,
/mob/living/simple_animal/crab,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/parrot,
/mob/living/simple_animal/hostile/poison/bees)

bodyflags = HAS_SKIN_COLOR | BALD | SHAVED
skinned_type = /obj/item/stack/sheet/animalhide/lizard
Expand Down Expand Up @@ -106,14 +112,13 @@
"пытается откусить себе усики!",
"вонзает когти в свои глазницы!",
"сворачивает себе шею!",
"разбивает себе панцирь",
"разбивает себе панцирь!",
"протыкает себя клинками!",
"задерживает дыхание!")

can_buckle = TRUE
buckle_lying = FALSE
var/can_stealth = TRUE
var/list/valid_limbs = list()
var/gene_lastcall = 0

/datum/species/serpentid/handle_reagents(mob/living/carbon/human/H, datum/reagent/R)
Expand All @@ -124,7 +129,6 @@

//Перенести на карапас/грудь
/datum/species/serpentid/handle_life(mob/living/carbon/human/H)

var/armor_count = 0
var/gene_degradation = 0
for(var/obj/item/organ/external/limb in H.bodyparts)
Expand All @@ -143,7 +147,6 @@

/datum/species/serpentid/on_species_gain(mob/living/carbon/human/H)
..()
H.resize = 1
H.can_buckle = can_buckle
H.buckle_lying = buckle_lying
H.update_transform()
Expand All @@ -156,8 +159,6 @@
H.verbs += /mob/living/carbon/human/proc/emote_gbswiggles
H.chat_message_y_offset = 11
SEND_SIGNAL(H, COMSIG_MOB_OVERLAY_SHIFT_UPDATE)
for(var/limb_name in has_limbs)
valid_limbs += has_limbs[limb_name]["path"]

/datum/species/moth/on_species_loss(mob/living/carbon/human/H)
..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define COMSIG_CARAPACE_HEAL_DAMAGE "heal_damage"

#define COMSIG_CARAPACE_SURGERY_CAN_START "block_operation"
#define CARAPACE_STOP_SURGERY_STEP (1<<0)
#define CARAPACE_STOP_SURGERY_STEP (1<<0)

/datum/component/carapace
var/obj/item/organ/external/limb
Expand Down Expand Up @@ -58,7 +58,7 @@
/datum/component/carapace/proc/receive_damage(affected_limb, brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE)
if(limb.get_damage() > broken_treshold)
limb.fracture()
if(limb.internal_organs.len > 0)
if(length(limb.internal_organs) > 0)
var/obj/item/organ/internal/O = pick(limb.internal_organs)
O.receive_damage(burn * limb.burn_dam)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define COMSIG_GADOM_UNMOB_UNLOAD "try_unload_cargo"

#define COMSIG_GADOM_UNMOB_CAN_GRAB "block_operation"
#define GADOM_UNMOB_ALLOW_TO_GRAB (1<<0)
#define GADOM_UNMOB_ALLOW_TO_GRAB (1<<0)

//Для отслеживания кто несет объект
/atom/movable
Expand Down Expand Up @@ -77,12 +77,11 @@
if((user.a_intent == "grab") && (spiece.type in allowed_races))
if(user.incapacitated() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || get_dist(user, AM) > 1)
return

if(!istype(AM))
return

if(do_after(user, 20 * user.dna.species.action_mult, FALSE, AM))
load(AM)
if(!do_after(user, 20 * user.dna.species.action_mult, FALSE, AM))
return
load(AM)

/datum/component/gadom_cargo/proc/load(atom/movable/AM)
if(carrier.loaded || AM.anchored || get_dist(carrier, AM) > 1)
Expand All @@ -93,11 +92,11 @@
if(!isturf(AM.loc))
return

var/obj/structure/closet/crate/CRATE
if(istype(AM,/obj/structure/closet/crate))
CRATE = AM
if(CRATE)
CRATE.close()
var/obj/structure/closet/crate/holding_crate
if(istype(AM,/obj/structure/closet/crate))

Check failure on line 96 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:96: Space indentation detected, please use tab indentation.
holding_crate = AM

Check failure on line 97 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:97: Space indentation detected, please use tab indentation.
if(holding_crate)

Check failure on line 98 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:98: Space indentation detected, please use tab indentation.
holding_crate.close()

Check failure on line 99 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:99: Space indentation detected, please use tab indentation.

if(isobj(AM))
var/obj/O = AM
Expand All @@ -118,19 +117,18 @@
return

if(carrier.loaded)
carrier.loaded.forceMove(carrier.loc)
carrier.loaded.pixel_y = initial(carrier.loaded.pixel_y)
carrier.loaded.layer = initial(carrier.loaded.layer)
carrier.loaded.plane = initial(carrier.loaded.plane)
if(dirn)
var/turf/T = carrier.loc
var/turf/newT = get_step(T,dirn)
if(carrier.loaded.CanPass(carrier.loaded, newT))
step(carrier.loaded, dirn)
carrier.loaded.crate_carrying_person = null
carrier.loaded = null

carrier.update_icon(UPDATE_OVERLAYS)
carrier.loaded.forceMove(carrier.loc)

Check failure on line 120 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:120: Space indentation detected, please use tab indentation.
carrier.loaded.pixel_y = initial(carrier.loaded.pixel_y)

Check failure on line 121 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:121: Space indentation detected, please use tab indentation.
carrier.loaded.layer = initial(carrier.loaded.layer)

Check failure on line 122 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:122: Space indentation detected, please use tab indentation.
carrier.loaded.plane = initial(carrier.loaded.plane)

Check failure on line 123 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:123: Space indentation detected, please use tab indentation.
if(dirn)

Check failure on line 124 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:124: Space indentation detected, please use tab indentation.
var/turf/T = carrier.loc

Check failure on line 125 in modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm

View workflow job for this annotation

GitHub Actions / Run Linters

Check Grep

modular_ss220/species/serpentids/code/components/carrying/grab_and_drag_on_mob_crates.dm:125: Space indentation detected, please use tab indentation.
var/turf/newT = get_step(T,dirn)
if(carrier.loaded.CanPass(carrier.loaded, newT))
step(carrier.loaded, dirn)
carrier.loaded.crate_carrying_person = null
carrier.loaded = null
carrier.update_icon(UPDATE_OVERLAYS)

//Расширение прока для переноса ящика на моба
/mob/living/carbon/human/MouseDrop_T(atom/movable/AM, mob/user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define COMSIG_GADOM_MOB_UNLOAD "try_unload_mob"

#define COMSIG_GADOM_MOB_CAN_GRAB "block_operation"
#define GADOM_MOB_ALLOW_TO_GRAB (1<<0)
#define GADOM_MOB_ALLOW_TO_GRAB (1<<0)

/mob/living/carbon/human
var/atom/movable/loaded = null
Expand Down Expand Up @@ -44,7 +44,7 @@
return
if(!istype(target))
return
if(do_after(puppet, 20 * puppet.dna.species.action_mult, FALSE, target))
if(do_after(puppet, 2 SECONDS * puppet.dna.species.action_mult, FALSE, target))
load(puppet, target)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define COMSIG_DOUBLEATTACK_PROCESS "hand_pre_attack"
#define COMSIG_DOUBLEATTACK_SYNC "sync_states"
#define COMSIG_DOUBLEATTACK_CHECK "check_state"
#define DOUBLEATTACK_CHECK_ACTIVE (1<<0)
#define DOUBLEATTACK_CHECK_ACTIVE (1<<0)

/datum/component/double_attack
var/obj/item/hand_item = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define COMSIG_MOB_OVERLAY_SHIFT_CALL "shift_call"
#define COMSIG_MOB_OVERLAY_SHIFT_UPDATE "update_call"
#define COMSIG_MOB_OVERLAY_SHIFT_CHECK "module_available"
#define MOB_OVERLAY_SHIFT_CHECK (1<<0)
#define MOB_OVERLAY_SHIFT_CHECK (1<<0)

/datum/component/mob_overlay_shift
var/mob/living/carbon/human/mob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
var/is_destroying = (is_dead || (is_no_owner && !organ.is_in_freezer))
if(is_destroying)
organ.receive_damage(decay_rate, 1)
if((organ.damage <= (organ.max_damage/4)) && (organ.damage > 0) && !is_destroying)
if((organ.damage <= (organ.max_damage / 4)) && (organ.damage > 0) && !is_destroying)
organ.heal_internal_damage(recover_rate, FALSE)
20 changes: 16 additions & 4 deletions modular_ss220/species/serpentids/code/components/reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
taste_description = "awful but healthy"
goal_department = "Science"
goal_difficulty = REAGENT_GOAL_SKIP
var/clone_damage_heal = -0.02

/datum/reagent/cabbagilium/on_mob_life(mob/living/M)
var/update_flags = STATUS_UPDATE_NONE
update_flags |= M.adjustCloneLoss(-0.02*REAGENTS_EFFECT_MULTIPLIER, FALSE)
update_flags |= M.adjustCloneLoss(clone_damage_heal * REAGENTS_EFFECT_MULTIPLIER, FALSE)

//Расширение на химикаты - новый химикат для серпентидов
//Химикат позволяет ускорять в 2 раза действия серпентидов (погрузка людей/ящиков, активация клинков)
Expand Down Expand Up @@ -49,7 +50,10 @@
if(!L.hud_used)
return
var/atom/movable/plane_master_controller/game_plane_master_controller = L.hud_used?.plane_master_controllers[PLANE_MASTERS_GAME]
var/static/list/col_filter_green = list(1,0,0,0, 0,0.66,0,0, 0,0,0.66,0, 0,0,0,1)
var/static/list/col_filter_green = list(1,0,0,0, /
0, 0.66, 0, 0, /
0, 0, 0.66, 0, /
0, 0, 0, 1)
game_plane_master_controller.add_filter(SERPADRONE_SCREEN_FILTER, 10, color_matrix_filter(col_filter_green, FILTER_COLOR_RGB))
game_plane_master_controller.add_filter(SERPADRONE_SCREEN_BLUR, 1, list("type" = "radial_blur", "size" = 0.02))
last_move_count = 0
Expand Down Expand Up @@ -137,9 +141,17 @@
/obj/effect/temp_visual/decoy/serpadrone_afterimage
duration = 0.75 SECONDS
/// The color matrix it should be at spawn
var/list/matrix_start = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0.8,0,0.1,0)
var/list/matrix_start = list(1, 0, 0, 0, /
0, 1, 0, 0, /
0, 0, 1, 0, /
0, 0, 0, 1, /
0.8, 0, 0.1, 0)
/// The color matrix it should be by the time it despawns
var/list/matrix_end = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0.75,0,0.75,0)
var/list/matrix_end = list(1, 0, 0, 0, /
0, 1, 0, 0, /
0, 0, 1, 0, /
0, 0, 0, 1, /
0.75, 0, 0.75, 0)

/obj/effect/temp_visual/decoy/serpadrone_afterimage/Initialize(mapload, atom/mimiced_atom, our_duration = 0.75 SECONDS)
duration = our_duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define COMSIG_PAIRATTACK_PROCESS "offhand_pre_attack"
#define COMSIG_PAIRATTACK_SYNC "sync_states"
#define COMSIG_PAIRATTACK_CHECK "check_state"
#define PAIRATTACK_CHECK_ACTIVE (1<<0)
#define PAIRATTACK_CHECK_ACTIVE (1<<0)

/datum/component/pair_attack
var/obj/item/mainhand_item = null
Expand Down
38 changes: 3 additions & 35 deletions modular_ss220/species/serpentids/code/copy_butt.dm
Original file line number Diff line number Diff line change
@@ -1,41 +1,9 @@
/obj/machinery/photocopier/copyass(scanning = FALSE)
if(!scanning) //If we're just storing this as a file inside the copier then we don't expend toner
if(toner < 5)
visible_message("<span class='notice'>A yellow light on [src] flashes, indicating there's not enough toner to finish the operation.</span>")
return null
total_copies++

var/icon/temp_img

if(emagged)
if(ishuman(copymob))
var/mob/living/carbon/human/H = copymob
var/obj/item/organ/external/G = H.get_organ("groin")
G.receive_damage(0, 30)
H.emote("scream")
else
copymob.apply_damage(30, BURN)
to_chat(copymob, "<span class='notice'>Something smells toasty...</span>")
. = .. ()
if(ishuman(copymob)) //Suit checks are in check_mob
var/mob/living/carbon/human/H = copymob
temp_img = icon(H.dna.species.butt_sprite_icon, H.dna.species.butt_sprite)
else if(isdrone(copymob))
temp_img = icon('icons/obj/butts.dmi', "drone")
else if(isnymph(copymob))
temp_img = icon('icons/obj/butts.dmi', "nymph")
else if(isalien(copymob) || istype(copymob,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon('icons/obj/butts.dmi', "xeno")
else
return
var/obj/item/photo/p = new /obj/item/photo (loc)
if(scanning)
p.forceMove(src)
else if(folder)
p.forceMove(folder)
p.desc = "You see [copymob]'s ass on the photo."
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.img = temp_img
var/temp_img = icon(H.dna.species.butt_sprite_icon, H.dna.species.butt_sprite)
..img = temp_img
var/icon/small_img = icon(temp_img) //Icon() is needed or else temp_img will be rescaled too >.>
var/icon/ic = icon('icons/obj/items.dmi',"photo")
small_img.Scale(8, 8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
force = 7
armour_penetration_flat = 3
tool_behaviour = TOOL_SAW
var/stamina_constant = 2
var/stamina_coefficient = 0.5

/obj/item/kitchen/knife/combat/serpentblade/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_ADVANCED_SURGICAL, ROUNDSTART_TRAIT)
ADD_TRAIT(src, TRAIT_FORCES_OPEN_DOORS_ITEM, ROUNDSTART_TRAIT)
AddComponent(/datum/component/parry, _stamina_constant = 2, _stamina_coefficient = 0.5, _parryable_attack_types = NON_PROJECTILE_ATTACKS)
AddComponent(/datum/component/parry, _stamina_constant = stamina_constant, _stamina_coefficient = stamina_coefficient, _parryable_attack_types = NON_PROJECTILE_ATTACKS)
AddComponent(/datum/component/double_attack, weapon = src)

/obj/item/melee/serpentblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
var/extended = holder_l && !(holder_l in src) && holder_r && !(holder_r in src)
if(extended)
Retract()
else if(do_after(owner, 20*(owner.dna.species.action_mult), FALSE, owner))
else if(do_after(owner, 2 SECONDS * (owner.dna.species.action_mult), FALSE, owner))
holder_l = null
holder_r = null
Extend(contents[1],contents[2])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
sense_creatures()

/obj/item/organ/internal/ears/serpentid/proc/sense_creatures()
var/last_movement_threshold = 5 SECONDS
for(var/mob/living/creature in range(9, owner))
var/last_movement_timer = world.time - creature.l_move_time
if(creature == owner || creature.stat == DEAD || last_movement_timer > 50)
if(creature == owner || creature.stat == DEAD || last_movement_timer > last_movement_threshold)
continue
new /obj/effect/temp_visual/sonar_ping(owner.loc, owner, creature)
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
icon = 'modular_ss220/species/serpentids/icons/organs.dmi'
desc = "A large looking eyes with some chemical enchanments."
icon_state = "eyes01"
see_in_dark = 0
see_in_dark = 8
flash_protect = FLASH_PROTECTION_EXTRA_SENSITIVE
tint = FLASH_PROTECTION_NONE
var/chemical_id = SERPENTID_CHEM_REAGENT_ID
var/decay_rate = 1
var/decay_recovery = BASIC_RECOVER_VALUE
var/organ_process_toxins = 0.35
var/chemical_consuption = GAS_ORGAN_CHEMISTRY_EYES
var/vision_ajust_coefficient = 0.4
var/update_time_client_colour = 10


/obj/item/organ/internal/eyes/serpentid/Initialize(mapload)
Expand All @@ -34,16 +36,15 @@
. = ..()
if(!isnull(owner))
var/mob/mob = owner
mob.update_client_colour(time = 10)
mob.update_client_colour(time = update_time_client_colour)
switch_mode()

/obj/item/organ/internal/eyes/serpentid/get_colourmatrix()
var/chem_value = (owner.get_chemical_value(chemical_id) + GAS_ORGAN_CHEMISTRY_MAX/2)/GAS_ORGAN_CHEMISTRY_MAX
var/vision_chem = clamp(chem_value, SERPENTID_EYES_LOW_VISIBLE_VALUE, SERPENTID_EYES_MAX_VISIBLE_VALUE)
var/vision_concentration = (1 - vision_chem/SERPENTID_EYES_MAX_VISIBLE_VALUE)*SERPENTID_EYES_LOW_VISIBLE_VALUE

var/k = 0.4
vision_concentration = SERPENTID_EYES_LOW_VISIBLE_VALUE * (1 - chem_value**k)
vision_concentration = SERPENTID_EYES_LOW_VISIBLE_VALUE * (1 - chem_value ** vision_ajust_coefficient)
var/vision_adjust = clamp(vision_concentration, 0, SERPENTID_EYES_LOW_VISIBLE_VALUE/2)

var/vision_matrix = list(vision_chem, vision_adjust, vision_adjust,\
Expand All @@ -54,7 +55,7 @@
/obj/item/organ/internal/eyes/serpentid/switch_mode(force_off = FALSE)
.=..()
if(!force_off && owner.get_chemical_value(chemical_id) >= chemical_consuption && !(status & ORGAN_DEAD))
see_in_dark = 8
see_in_dark = initial(see_in_dark)
chemical_consuption = GAS_ORGAN_CHEMISTRY_EYES + GAS_ORGAN_CHEMISTRY_EYES * (max_damage - damage / max_damage)
else
see_in_dark = 0
Expand Down

0 comments on commit a9c38a8

Please sign in to comment.