Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit

This commit is contained in:
SandPoot
2024-03-08 19:10:22 -03:00
810 changed files with 140372 additions and 5523 deletions
+1 -1
View File
@@ -25,4 +25,4 @@
if(surgery.operated_bodypart)
var/obj/item/bodypart/target_limb = surgery.operated_bodypart
target_limb.drop_limb()
return 1
return TRUE
+2 -2
View File
@@ -94,10 +94,10 @@
//sometimes we want to ignore that we don't have the required amount of arms.
/mob/proc/get_arm_ignore()
return 0
return FALSE
/mob/living/carbon/alien/larva/get_arm_ignore()
return 1 //so we can still handcuff larvas.
return TRUE //so we can still handcuff larvas.
/mob/proc/get_num_legs(check_disabled = TRUE)
+4 -4
View File
@@ -38,14 +38,14 @@
if(tool)
if(IC || tool.w_class > WEIGHT_CLASS_NORMAL || HAS_TRAIT(tool, TRAIT_NODROP) || istype(tool, /obj/item/organ))
to_chat(user, "<span class='warning'>You can't seem to fit [tool] in [target]'s [target_zone]!</span>")
return 0
return FALSE
else
display_results(user, target, "<span class='notice'>You stuff [tool] into [target]'s [target_zone].</span>",
"[user] stuffs [tool] into [target]'s [target_zone]!",
"[user] stuffs [tool.w_class > WEIGHT_CLASS_SMALL ? tool : "something"] into [target]'s [target_zone].")
user.transferItemToLoc(tool, target, TRUE)
CH.cavity_item = tool
return 1
return TRUE
else
if(IC)
display_results(user, target, "<span class='notice'>You pull [IC] out of [target]'s [target_zone].</span>",
@@ -53,7 +53,7 @@
"[user] pulls [IC.w_class > WEIGHT_CLASS_SMALL ? IC : "something"] out of [target]'s [target_zone].")
user.put_in_hands(IC)
CH.cavity_item = null
return 1
return TRUE
else
to_chat(user, "<span class='warning'>You don't find anything in [target]'s [target_zone].</span>")
return 0
return FALSE
+5 -5
View File
@@ -8,8 +8,8 @@
/datum/surgery/core_removal/can_start(mob/user, mob/living/target, obj/item/tool)
if(target.stat == DEAD)
return 1
return 0
return TRUE
return FALSE
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
@@ -33,9 +33,9 @@
if(slime.cores <= 0)
slime.icon_state = "[slime.colour] baby slime dead-nocore"
return 1
return TRUE
else
return 0
return FALSE
else
to_chat(user, "<span class='warning'>There aren't any cores left in [target]!</span>")
return 1
return TRUE
+9 -8
View File
@@ -14,28 +14,29 @@
/datum/surgery_step/insert_pill/success(mob/user, mob/living/carbon/target, target_zone, var/obj/item/reagent_containers/pill/tool, datum/surgery/surgery)
if(!istype(tool))
return 0
return FALSE
user.transferItemToLoc(tool, target, TRUE)
var/datum/action/item_action/hands_free/activate_pill/P = new(tool)
P.button.name = "Activate [tool.name]"
P.target = tool
P.Grant(target) //The pill never actually goes in an inventory slot, so the owner doesn't inherit actions from it
var/datum/action/item_action/hands_free/activate_pill/pill_action = new(tool)
pill_action.name = "Activate [tool.name]"
pill_action.UpdateButtons()
pill_action.target = tool
pill_action.Grant(target) //The pill never actually goes in an inventory slot, so the owner doesn't inherit actions from it
user.visible_message("[user] wedges \the [tool] into [target]'s [parse_zone(target_zone)]!", "<span class='notice'>You wedge [tool] into [target]'s [parse_zone(target_zone)].</span>")
return 1
return TRUE
/datum/action/item_action/hands_free/activate_pill
name = "Activate Pill"
/datum/action/item_action/hands_free/activate_pill/Trigger()
if(!..())
return 0
return FALSE
to_chat(owner, "<span class='caution'>You grit your teeth and burst the implanted [target.name]!</span>")
log_combat(owner, null, "swallowed an implanted pill", target)
if(target.reagents.total_volume)
target.reagents.reaction(owner, INGEST)
target.reagents.trans_to(owner, target.reagents.total_volume, log = "dental pill swallow")
qdel(target)
return 1
return TRUE
+16 -16
View File
@@ -97,7 +97,7 @@
else if(!current_surgery.step_in_progress)
attempt_cancel_surgery(current_surgery, I, M, user)
return 1
return TRUE
/proc/attempt_cancel_surgery(datum/surgery/S, obj/item/I, mob/living/M, mob/user)
var/selected_zone = user.zone_selected
@@ -128,7 +128,7 @@
/proc/get_location_modifier(mob/M)
var/turf/T = get_turf(M)
if(locate(/obj/structure/table/optable, T))
return 1
return TRUE
else if(locate(/obj/structure/table, T))
return 0.8
else if(locate(/obj/structure/bed, T))
@@ -157,42 +157,42 @@
switch(location)
if(BODY_ZONE_HEAD)
if(covered_locations & HEAD)
return 0
return FALSE
if(BODY_ZONE_PRECISE_EYES)
if(covered_locations & HEAD || face_covered & HIDEEYES || eyesmouth_covered & GLASSESCOVERSEYES)
return 0
return FALSE
if(BODY_ZONE_PRECISE_MOUTH)
if(covered_locations & HEAD || face_covered & HIDEFACE || eyesmouth_covered & MASKCOVERSMOUTH || eyesmouth_covered & HEADCOVERSMOUTH)
return 0
return FALSE
if(BODY_ZONE_CHEST)
if(covered_locations & CHEST)
return 0
return FALSE
if(BODY_ZONE_PRECISE_GROIN)
if(covered_locations & GROIN)
return 0
return FALSE
if(BODY_ZONE_L_ARM)
if(covered_locations & ARM_LEFT)
return 0
return FALSE
if(BODY_ZONE_R_ARM)
if(covered_locations & ARM_RIGHT)
return 0
return FALSE
if(BODY_ZONE_L_LEG)
if(covered_locations & LEG_LEFT)
return 0
return FALSE
if(BODY_ZONE_R_LEG)
if(covered_locations & LEG_RIGHT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_L_HAND)
if(covered_locations & HAND_LEFT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_R_HAND)
if(covered_locations & HAND_RIGHT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_L_FOOT)
if(covered_locations & FOOT_LEFT)
return 0
return FALSE
if(BODY_ZONE_PRECISE_R_FOOT)
if(covered_locations & FOOT_RIGHT)
return 0
return FALSE
return 1
return TRUE
+1 -1
View File
@@ -50,7 +50,7 @@
else
to_chat(user, "<span class='warning'>You can't find anything in [target]'s [target_zone]!</span>")
return 1
return TRUE
/datum/surgery/implant_removal/mechanic
name = "implant removal"
+4 -4
View File
@@ -6,8 +6,8 @@
/datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
if(HAS_TRAIT(target, TRAIT_FAT))
return 1
return 0
return TRUE
return FALSE
//cut fat
/datum/surgery_step/cut_fat
@@ -24,7 +24,7 @@
display_results(user, target, "<span class='notice'>You cut [target]'s excess fat loose.</span>",
"[user] cuts [target]'s excess fat loose!",
"[user] finishes the cut on [target]'s [target_zone].")
return 1
return TRUE
//remove fat
/datum/surgery_step/remove_fat
@@ -56,4 +56,4 @@
newmeat.subjectjob = H.job
newmeat.reagents.add_reagent (/datum/reagent/consumable/nutriment, (removednutriment / 15)) //To balance with nutriment_factor of nutriment
newmeat.forceMove(target.loc)
return 1
return TRUE
+1 -1
View File
@@ -157,4 +157,4 @@
display_results(user, target, "<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>",
"[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!",
"[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!")
return 1
return TRUE
+2 -2
View File
@@ -120,7 +120,7 @@
display_results(user, target, "<span class='notice'>You saw [target]'s [parse_zone(target_zone)] open.</span>",
"[user] saws [target]'s [parse_zone(target_zone)] open!",
"[user] saws [target]'s [parse_zone(target_zone)] open!")
return 1
return TRUE
//drill bone
/datum/surgery_step/drill
@@ -137,4 +137,4 @@
display_results(user, target, "<span class='notice'>You drill into [target]'s [parse_zone(target_zone)].</span>",
"[user] drills into [target]'s [parse_zone(target_zone)]!",
"[user] drills into [target]'s [parse_zone(target_zone)]!")
return 1
return TRUE
@@ -166,7 +166,7 @@
if(crit_fail || (organ_flags & ORGAN_FAILING))
if(!silent)
to_chat(owner, "<span class='warning'>Your thrusters set seems to be broken!</span>")
return 0
return FALSE
on = TRUE
if(allow_thrust(0.01))
ion_trail.start()
@@ -195,28 +195,28 @@
/obj/item/organ/cyberimp/chest/thrusters/proc/allow_thrust(num)
if(!on || !owner)
return 0
return FALSE
var/turf/T = get_turf(owner)
if(!T) // No more runtimes from being stuck in nullspace.
return 0
return FALSE
// Priority 1: use air from environment.
var/datum/gas_mixture/environment = T.return_air()
if(environment && environment.return_pressure() > 30)
return 1
return TRUE
// Priority 2: use plasma from internal plasma storage.
// (just in case someone would ever use this implant system to make cyber-alien ops with jetpacks and taser arms)
if(owner.getPlasma() >= num*100)
owner.adjustPlasma(-num*100)
return 1
return TRUE
// Priority 3: use internals tank.
var/obj/item/tank/I = owner.internal
if(I && I.air_contents && I.air_contents.total_moles() >= num)
T.assume_air_moles(I.air_contents, num)
return 1
return TRUE
toggle(silent = TRUE)
return 0
return FALSE
+2 -2
View File
@@ -49,12 +49,12 @@
/obj/item/organ/heart/proc/Stop()
beating = 0
update_icon()
return 1
return TRUE
/obj/item/organ/heart/proc/Restart()
beating = 1
update_icon()
return 1
return TRUE
/obj/item/organ/heart/proc/HeartStrengthMessage()
if(beating)
@@ -245,7 +245,7 @@
//Try code/modules/mob/living/carbon/brain/brain_item.dm
/mob/living/proc/regenerate_organs()
return 0
return FALSE
/mob/living/carbon/regenerate_organs(only_one = FALSE)
var/breathes = TRUE
+5 -5
View File
@@ -134,7 +134,7 @@
var/cooldown = 0
if(!user || !user.can_speak() || user.stat)
return 0 //no cooldown
return FALSE //no cooldown
var/log_message = uppertext(message)
if(iscultist(user))
@@ -597,7 +597,7 @@
var/special_check = get_vog_special(user)
if(!special_check)
return 0
return FALSE
. = min(base_multiplier * special_check, VOG_MAX_STANDARD_POWER) // anything above should require conscious admin fuckery, as things are balanced around 3 multiplier tops (see: damage being 15*3)
if(!specific_listeners.len)
@@ -617,7 +617,7 @@
return 0.5
if(user.mind.assigned_role in GLOB.command_positions)
return 1.4 // heads are great at speaking with authority
return 1
return TRUE
//////////////////////////////////////
///////ENTHRAL VELVET CHORDS//////////
@@ -665,7 +665,7 @@
/proc/velvetspeech(message, mob/living/user, base_multiplier = 1, message_admins = FALSE, debug = FALSE)
if(!user || !user.can_speak() || user.stat)
return 0 //no cooldown
return FALSE //no cooldown
var/log_message = message
@@ -688,7 +688,7 @@
listeners += L
if(!listeners.len)
return 0
return FALSE
//POWER CALCULATIONS
@@ -7,10 +7,10 @@
requires_bodypart_type = 0
/datum/surgery/prosthetic_replacement/can_start(mob/user, mob/living/carbon/target, obj/item/tool)
if(!iscarbon(target))
return 0
return FALSE
var/mob/living/carbon/C = target
if(!C.get_bodypart(user.zone_selected)) //can only start if limb is missing
return 1
return TRUE
/datum/surgery_step/add_prosthetic
name = "add prosthetic"
implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100, /obj/item/chainsaw = 100, /obj/item/melee/synthetic_arm_blade = 100)
@@ -70,7 +70,7 @@
display_results(user, target, "<span class='notice'>You succeed in replacing [target]'s [parse_zone(target_zone)].</span>",
"[user] successfully replaces [target]'s [parse_zone(target_zone)] with [tool]!",
"[user] successfully replaces [target]'s [parse_zone(target_zone)]!")
return 1
return TRUE
else
var/obj/item/bodypart/L = target.newBodyPart(target_zone, FALSE, FALSE)
L.is_pseudopart = TRUE
@@ -82,8 +82,8 @@
if(istype(tool, /obj/item/chainsaw))
var/obj/item/mounted_chainsaw/new_arm = new(target)
target_zone == BODY_ZONE_R_ARM ? target.put_in_r_hand(new_arm) : target.put_in_l_hand(new_arm)
return 1
return TRUE
else if(istype(tool, /obj/item/melee/synthetic_arm_blade))
var/obj/item/melee/arm_blade/new_arm = new(target,TRUE,TRUE)
target_zone == BODY_ZONE_R_ARM ? target.put_in_r_hand(new_arm) : target.put_in_l_hand(new_arm)
return 1
return TRUE
@@ -40,4 +40,4 @@
else
to_chat(user, "<span class='warning'>You can't find [target]'s [parse_zone(user.zone_selected)], let alone any objects embedded in it!</span>")
return 1
return TRUE
+1 -1
View File
@@ -94,7 +94,7 @@
/datum/surgery/proc/next_step(mob/user, intent)
if(step_in_progress)
return 1
return TRUE
var/try_to_fail = FALSE
if(intent == INTENT_DISARM)