Merge remote-tracking branch 'citadel/master' into 91-files-changed-fml
This commit is contained in:
@@ -429,6 +429,10 @@
|
||||
for(var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset)
|
||||
dat += {"<A href='?src=[REF(src)];[HrefToken()];f_dynamic_roundstart_remove=\ref[rule]'>-> [rule.name] <-</A><br>"}
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];f_dynamic_roundstart_clear=1'>(Clear Rulesets)</A><br>"
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];f_dynamic_storyteller=1'>(Force Storyteller)</A><br>"
|
||||
if (GLOB.dynamic_forced_storyteller)
|
||||
var/datum/dynamic_storyteller/S = GLOB.dynamic_forced_storyteller
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];f_dynamic_storyteller_clear=1'>-> [initial(S.name)] <-</A><br>"
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];f_dynamic_options=1'>(Dynamic mode options)</A><br>"
|
||||
else if (SSticker.IsRoundInProgress())
|
||||
dat += "<A href='?src=[REF(src)];[HrefToken()];f_dynamic_latejoin=1'>(Force Next Latejoin Ruleset)</A><br>"
|
||||
@@ -690,7 +694,7 @@
|
||||
var/prev_dynamic_voting = CONFIG_GET(flag/dynamic_voting)
|
||||
CONFIG_SET(flag/dynamic_voting,!prev_dynamic_voting)
|
||||
if (!prev_dynamic_voting)
|
||||
to_chat(world, "<B>Vote is now a ranked choice of dynamic storytellers.</B>")
|
||||
to_chat(world, "<B>Vote is now between dynamic storytellers.</B>")
|
||||
else
|
||||
to_chat(world, "<B>Vote is now between extended and secret.</B>")
|
||||
log_admin("[key_name(usr)] [prev_dynamic_voting ? "disabled" : "enabled"] dynamic voting.")
|
||||
|
||||
@@ -364,7 +364,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
log_admin("[key_name(usr)] admin ghosted.")
|
||||
message_admins("[key_name_admin(usr)] admin ghosted.")
|
||||
var/mob/body = mob
|
||||
body.ghostize(1)
|
||||
body.ghostize(1, voluntary = TRUE)
|
||||
if(body && !body.key)
|
||||
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Ghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -104,7 +104,7 @@ GLOBAL_VAR(antag_prototypes)
|
||||
|
||||
var/special_statuses = get_special_statuses()
|
||||
if(length(special_statuses))
|
||||
out += get_special_statuses() + "<br>"
|
||||
out += special_statuses + "<br>"
|
||||
|
||||
if(!GLOB.antag_prototypes)
|
||||
GLOB.antag_prototypes = list()
|
||||
|
||||
@@ -120,7 +120,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
//adv proc call this, ya nerds
|
||||
/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
|
||||
if(target == GLOBAL_PROC)
|
||||
return call(procname)(arglist(arguments))
|
||||
return call(text2path("/proc/[procname]"))(arglist(arguments))
|
||||
else if(target != world)
|
||||
return call(target, procname)(arglist(arguments))
|
||||
else
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
|
||||
if(isnull(new_volume))
|
||||
return
|
||||
new_volume = CLAMP(new_volume, 0, 100)
|
||||
new_volume = clamp(new_volume, 0, 100)
|
||||
sound_volume = new_volume
|
||||
to_chat(user, "<span class='notice'>Volume set to [sound_volume]%.</span>")
|
||||
if(href_list["edit_mode"])
|
||||
@@ -118,7 +118,7 @@
|
||||
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
|
||||
if(isnull(new_radius))
|
||||
return
|
||||
new_radius = CLAMP(new_radius, 0, 127)
|
||||
new_radius = clamp(new_radius, 0, 127)
|
||||
play_radius = new_radius
|
||||
to_chat(user, "<span class='notice'>Audible radius set to [play_radius].</span>")
|
||||
if(href_list["play"])
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
var/nsd = CONFIG_GET(number/note_stale_days)
|
||||
var/nfd = CONFIG_GET(number/note_fresh_days)
|
||||
if (agegate && type == "note" && isnum(nsd) && isnum(nfd) && nsd > nfd)
|
||||
var/alpha = CLAMP(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
|
||||
var/alpha = clamp(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
|
||||
if (alpha < 100)
|
||||
if (alpha <= 15)
|
||||
if (skipped)
|
||||
|
||||
@@ -1394,6 +1394,32 @@
|
||||
log_admin("[key_name(usr)] removed [rule] from the forced roundstart rulesets.")
|
||||
message_admins("[key_name(usr)] removed [rule] from the forced roundstart rulesets.", 1)
|
||||
|
||||
else if(href_list["f_dynamic_storyteller"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
if(GLOB.master_mode != "dynamic")
|
||||
return alert(usr, "The game mode has to be dynamic mode.", null, null, null, null)
|
||||
var/list/choices = list()
|
||||
for(var/T in config.storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
choices[initial(S.name)] = T
|
||||
var/choice = choices[input("Select storyteller:", "Storyteller", "Classic") as null|anything in choices]
|
||||
if(choice)
|
||||
GLOB.dynamic_forced_storyteller = choice
|
||||
log_admin("[key_name(usr)] forced the storyteller to [GLOB.dynamic_forced_storyteller].")
|
||||
message_admins("[key_name(usr)] forced the storyteller to [GLOB.dynamic_forced_storyteller].")
|
||||
Game()
|
||||
|
||||
else if(href_list["f_dynamic_storyteller_clear"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
GLOB.dynamic_forced_storyteller = null
|
||||
Game()
|
||||
log_admin("[key_name(usr)] cleared the forced storyteller. The mode will pick one as normal.")
|
||||
message_admins("[key_name(usr)] cleared the forced storyteller. The mode will pick one as normal.", 1)
|
||||
|
||||
else if(href_list["f_dynamic_latejoin"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -2363,7 +2389,7 @@
|
||||
return
|
||||
|
||||
var/list/offset = splittext(href_list["offset"],",")
|
||||
var/number = CLAMP(text2num(href_list["object_count"]), 1, 100)
|
||||
var/number = clamp(text2num(href_list["object_count"]), 1, 100)
|
||||
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
||||
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
||||
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if ("set_charge")
|
||||
var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null
|
||||
if (newcharge)
|
||||
borg.cell.charge = CLAMP(newcharge, 0, borg.cell.maxcharge)
|
||||
borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
|
||||
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
|
||||
log_admin("[key_name(user)] set the charge of [key_name(borg)] to [borg.cell.charge].")
|
||||
if ("remove_cell")
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/freq = input(usr, "What frequency would you like the sound to play at?",, 1) as null|num
|
||||
if(!freq)
|
||||
freq = 1
|
||||
vol = CLAMP(vol, 1, 100)
|
||||
vol = clamp(vol, 1, 100)
|
||||
|
||||
var/sound/admin_sound = new()
|
||||
admin_sound.file = S
|
||||
|
||||
@@ -1379,3 +1379,47 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
else
|
||||
message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]")
|
||||
log_admin("[key_name(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name(C)]")
|
||||
|
||||
/// Allow admin to add or remove traits of datum
|
||||
/datum/admins/proc/modify_traits(datum/D)
|
||||
if(!D)
|
||||
return
|
||||
|
||||
var/add_or_remove = input("Remove/Add?", "Trait Remove/Add") as null|anything in list("Add","Remove")
|
||||
if(!add_or_remove)
|
||||
return
|
||||
var/list/availible_traits = list()
|
||||
|
||||
switch(add_or_remove)
|
||||
if("Add")
|
||||
for(var/key in GLOB.traits_by_type)
|
||||
if(istype(D,key))
|
||||
availible_traits += GLOB.traits_by_type[key]
|
||||
if("Remove")
|
||||
if(!GLOB.trait_name_map)
|
||||
GLOB.trait_name_map = generate_trait_name_map()
|
||||
for(var/trait in D.status_traits)
|
||||
var/name = GLOB.trait_name_map[trait] || trait
|
||||
availible_traits[name] = trait
|
||||
|
||||
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits)
|
||||
if(!chosen_trait)
|
||||
return
|
||||
chosen_trait = availible_traits[chosen_trait]
|
||||
|
||||
var/source = "adminabuse"
|
||||
switch(add_or_remove)
|
||||
if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it.
|
||||
ADD_TRAIT(D,chosen_trait,source)
|
||||
if("Remove")
|
||||
var/specific = input("All or specific source ?", "Trait Remove/Add") as null|anything in list("All","Specific")
|
||||
if(!specific)
|
||||
return
|
||||
switch(specific)
|
||||
if("All")
|
||||
source = null
|
||||
if("Specific")
|
||||
source = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait])
|
||||
if(!source)
|
||||
return
|
||||
REMOVE_TRAIT(D,chosen_trait,source)
|
||||
|
||||
@@ -194,9 +194,10 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
else
|
||||
variable = L[index]
|
||||
//EXPERIMENTAL - Keep old associated value while modifying key, if any
|
||||
var/found = L[variable]
|
||||
if(!isnull(found))
|
||||
old_assoc_value = found
|
||||
if(IS_VALID_ASSOC_KEY(variable))
|
||||
var/found = L[variable]
|
||||
if(!isnull(found))
|
||||
old_assoc_value = found
|
||||
//
|
||||
|
||||
default = vv_get_class(objectvar, variable)
|
||||
|
||||
@@ -47,5 +47,33 @@
|
||||
usr.client.debug_variables(src)
|
||||
if(href_list[VV_HK_MARK])
|
||||
usr.client.mark_datum(target)
|
||||
if(href_list[VV_HK_ADDCOMPONENT])
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
var/list/names = list()
|
||||
var/list/componentsubtypes = subtypesof(/datum/component)
|
||||
names += "---Components---"
|
||||
names += componentsubtypes
|
||||
names += "---Elements---"
|
||||
names += subtypesof(/datum/element)
|
||||
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
|
||||
if(!usr || !result || result == "---Components---" || result == "---Elements---")
|
||||
return
|
||||
if(QDELETED(src))
|
||||
to_chat(usr, "That thing doesn't exist anymore!")
|
||||
return
|
||||
var/list/lst = get_callproc_args()
|
||||
if(!lst)
|
||||
return
|
||||
var/datumname = "error"
|
||||
lst.Insert(1, result)
|
||||
if(result in componentsubtypes)
|
||||
datumname = "component"
|
||||
target._AddComponent(lst)
|
||||
else
|
||||
datumname = "element"
|
||||
target._AddElement(lst)
|
||||
log_admin("[key_name(usr)] has added [result] [datumname] to [key_name(src)].")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has added [result] [datumname] to [key_name_admin(src)].</span>")
|
||||
if(href_list[VV_HK_CALLPROC])
|
||||
usr.client.callproc_datum(target)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
status = ORGAN_ROBOTIC
|
||||
beating = TRUE
|
||||
organ_flags = ORGAN_NO_SPOIL
|
||||
no_pump = TRUE
|
||||
var/true_name = "baseline placebo referencer"
|
||||
var/cooldown_low = 300
|
||||
var/cooldown_high = 300
|
||||
@@ -92,6 +93,7 @@
|
||||
update_gland_hud()
|
||||
|
||||
/obj/item/organ/heart/gland/on_life()
|
||||
. = ..()
|
||||
if(!beating)
|
||||
// alien glands are immune to stopping.
|
||||
beating = TRUE
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/mob/living/simple_animal/hostile/blob/fire_act(exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature)
|
||||
adjustFireLoss(CLAMP(0.01 * exposed_temperature, 1, 5))
|
||||
adjustFireLoss(clamp(0.01 * exposed_temperature, 1, 5))
|
||||
else
|
||||
adjustFireLoss(5)
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
B.hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_core.obj_integrity)]</font></div>"
|
||||
|
||||
/mob/camera/blob/proc/add_points(points)
|
||||
blob_points = CLAMP(blob_points + points, 0, max_blob_points)
|
||||
blob_points = clamp(blob_points + points, 0, max_blob_points)
|
||||
hud_used.blobpwrdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_points)]</font></div>"
|
||||
|
||||
/mob/camera/blob/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/structure/blob/CanAStarPass(ID, dir, caller)
|
||||
. = 0
|
||||
if(ismovableatom(caller))
|
||||
if(ismovable(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSBLOB)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/AddBloodVolume(value)
|
||||
owner.current.blood_volume = CLAMP(owner.current.blood_volume + value, 0, max_blood_volume)
|
||||
owner.current.blood_volume = clamp(owner.current.blood_volume + value, 0, max_blood_volume)
|
||||
update_hud()
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/HandleFeeding(mob/living/carbon/target, mult=1)
|
||||
@@ -112,7 +112,7 @@
|
||||
CheckVampOrgans() // Heart, Eyes
|
||||
if(check_limbs(costMult))
|
||||
return TRUE
|
||||
|
||||
|
||||
// BRUTE: Always Heal
|
||||
var/bruteheal = min(C.getBruteLoss(), actual_regen)
|
||||
var/toxinheal = min(C.getToxLoss(), actual_regen)
|
||||
@@ -121,7 +121,7 @@
|
||||
if(mult == 0)
|
||||
return TRUE
|
||||
if(owner.current.stat >= UNCONSCIOUS) //Faster regeneration while unconcious, so you dont have to wait all day
|
||||
mult *= 2
|
||||
mult *= 2
|
||||
// We have damage. Let's heal (one time)
|
||||
C.adjustBruteLoss(-bruteheal * mult, forced = TRUE)// Heal BRUTE / BURN in random portions throughout the body.
|
||||
C.adjustFireLoss(-fireheal * mult, forced = TRUE)
|
||||
@@ -129,7 +129,7 @@
|
||||
//C.heal_overall_damage(bruteheal * mult, fireheal * mult) // REMOVED: We need to FORCE this, because otherwise, vamps won't heal EVER. Swapped to above.
|
||||
AddBloodVolume((bruteheal * -0.5 + fireheal * -1 + toxinheal * -0.2) / mult * costMult) // Costs blood to heal
|
||||
return TRUE // Healed! Done for this tick.
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/check_limbs(costMult)
|
||||
@@ -137,7 +137,7 @@
|
||||
var/mob/living/carbon/C = owner.current
|
||||
var/list/missing = C.get_missing_limbs()
|
||||
if(missing.len && C.blood_volume < limb_regen_cost + 5)
|
||||
return FALSE
|
||||
return FALSE
|
||||
for(var/targetLimbZone in missing) // 1) Find ONE Limb and regenerate it.
|
||||
C.regenerate_limb(targetLimbZone, FALSE) // regenerate_limbs() <--- If you want to EXCLUDE certain parts, do it like this ----> regenerate_limbs(0, list("head"))
|
||||
AddBloodVolume(50)
|
||||
@@ -183,7 +183,7 @@
|
||||
owner.current.blur_eyes(8 - 8 * (owner.current.blood_volume / BLOOD_VOLUME_BAD))
|
||||
// Nutrition
|
||||
owner.current.nutrition = clamp(owner.current.blood_volume, 545, 0) //The amount of blood is how full we are.
|
||||
//A bit higher regeneration based on blood volume
|
||||
//A bit higher regeneration based on blood volume
|
||||
if(owner.current.blood_volume < 700)
|
||||
additional_regen = 0.4
|
||||
else if(owner.current.blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
@@ -369,8 +369,8 @@
|
||||
//Puke blood only if puke_blood is true, and loose some blood, else just puke normally.
|
||||
if(puke_blood)
|
||||
C.blood_volume = max(0, C.blood_volume - foodInGut * 2)
|
||||
C.vomit(foodInGut * 4, foodInGut * 2, 0)
|
||||
else
|
||||
C.vomit(foodInGut * 4, foodInGut * 2, 0)
|
||||
else
|
||||
C.vomit(foodInGut * 4, FALSE, 0)
|
||||
C.Stun(30)
|
||||
//C.Dizzy(50)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
// Heads?
|
||||
if (target_role == "HEAD")
|
||||
target_amount = rand(1, round(SSticker.mode.num_players() / 20))
|
||||
target_amount = CLAMP(target_amount,1,3)
|
||||
target_amount = clamp(target_amount,1,3)
|
||||
// Department?
|
||||
else
|
||||
switch(target_role)
|
||||
@@ -100,7 +100,7 @@
|
||||
if("Quartermaster")
|
||||
department_string = "Cargo"
|
||||
target_amount = rand(round(SSticker.mode.num_players() / 20), round(SSticker.mode.num_players() / 10))
|
||||
target_amount = CLAMP(target_amount, 2, 4)
|
||||
target_amount = clamp(target_amount, 2, 4)
|
||||
..()
|
||||
|
||||
// EXPLANATION
|
||||
|
||||
@@ -200,39 +200,3 @@
|
||||
to_chat(resident, "<span class='notice'>You fix the mechanism and lock it.</span>")
|
||||
broken = FALSE
|
||||
locked = TRUE
|
||||
|
||||
// Look up recipes.dm OR pneumaticCannon.dm
|
||||
/datum/crafting_recipe/bloodsucker/blackcoffin
|
||||
name = "Black Coffin"
|
||||
result = /obj/structure/closet/crate/coffin/blackcoffin
|
||||
tools = list(/obj/item/weldingtool,
|
||||
/obj/item/screwdriver)
|
||||
reqs = list(/obj/item/stack/sheet/cloth = 1,
|
||||
/obj/item/stack/sheet/mineral/wood = 5,
|
||||
/obj/item/stack/sheet/metal = 1)
|
||||
///obj/item/stack/packageWrap = 8,
|
||||
///obj/item/pipe = 2)
|
||||
time = 150
|
||||
category = CAT_MISC
|
||||
always_availible = TRUE
|
||||
|
||||
/datum/crafting_recipe/bloodsucker/meatcoffin
|
||||
name = "Meat Coffin"
|
||||
result =/obj/structure/closet/crate/coffin/meatcoffin
|
||||
tools = list(/obj/item/kitchen/knife,
|
||||
/obj/item/kitchen/rollingpin)
|
||||
reqs = list(/obj/item/reagent_containers/food/snacks/meat/slab = 5,
|
||||
/obj/item/restraints/handcuffs/cable = 1)
|
||||
time = 150
|
||||
category = CAT_MISC
|
||||
always_availible = TRUE
|
||||
|
||||
/datum/crafting_recipe/bloodsucker/metalcoffin
|
||||
name = "Metal Coffin"
|
||||
result =/obj/structure/closet/crate/coffin/metalcoffin
|
||||
tools = list(/obj/item/weldingtool,
|
||||
/obj/item/screwdriver)
|
||||
reqs = list(/obj/item/stack/sheet/metal = 5)
|
||||
time = 100
|
||||
category = CAT_MISC
|
||||
always_availible = TRUE
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
// Find Animals in Area
|
||||
/* if(rand(0,2) == 0)
|
||||
var/mobCount = 0
|
||||
var/mobMax = CLAMP(area_turfs.len / 25, 1, 4)
|
||||
var/mobMax = clamp(area_turfs.len / 25, 1, 4)
|
||||
for (var/turf/T in area_turfs)
|
||||
if(!T) continue
|
||||
var/mob/living/simple_animal/SA = locate() in T
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
/datum/action/bloodsucker/fortitude
|
||||
name = "Fortitude"//"Cellular Emporium"
|
||||
name = "Fortitude"
|
||||
desc = "Withstand egregious physical wounds and walk away from attacks that would stun, pierce, and dismember lesser beings. You cannot run while active."
|
||||
button_icon_state = "power_fortitude"
|
||||
bloodcost = 30
|
||||
@@ -11,28 +11,27 @@
|
||||
bloodsucker_can_buy = TRUE
|
||||
amToggle = TRUE
|
||||
warn_constant_cost = TRUE
|
||||
var/was_running
|
||||
|
||||
var/this_resist // So we can raise and lower your brute resist based on what your level_current WAS.
|
||||
var/fortitude_resist // So we can raise and lower your brute resist based on what your level_current WAS.
|
||||
|
||||
/datum/action/bloodsucker/fortitude/ActivatePower()
|
||||
var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
var/datum/antagonist/bloodsucker/B = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
var/mob/living/user = owner
|
||||
to_chat(user, "<span class='notice'>Your flesh, skin, and muscles become as steel.</span>")
|
||||
// Traits & Effects
|
||||
ADD_TRAIT(user, TRAIT_PIERCEIMMUNE, "fortitude")
|
||||
ADD_TRAIT(user, TRAIT_NODISMEMBER, "fortitude")
|
||||
ADD_TRAIT(user, TRAIT_STUNIMMUNE, "fortitude")
|
||||
ADD_TRAIT(user, TRAIT_NORUNNING, "fortitude")
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
this_resist = max(0.3, 0.7 - level_current * 0.1)
|
||||
H.physiology.brute_mod *= this_resist//0.5
|
||||
H.physiology.burn_mod *= this_resist//0.5
|
||||
// Stop Running (Taken from /datum/quirk/nyctophobia in negative.dm)
|
||||
var/was_running = (user.m_intent == MOVE_INTENT_RUN)
|
||||
fortitude_resist = max(0.3, 0.7 - level_current * 0.1)
|
||||
H.physiology.brute_mod *= fortitude_resist
|
||||
H.physiology.burn_mod *= fortitude_resist
|
||||
was_running = (user.m_intent == MOVE_INTENT_RUN)
|
||||
if(was_running)
|
||||
user.toggle_move_intent()
|
||||
while(bloodsuckerdatum && ContinueActive(user) || user.m_intent == MOVE_INTENT_RUN)
|
||||
while(B && ContinueActive(user) || user.m_intent == MOVE_INTENT_RUN)
|
||||
if(istype(user.buckled, /obj/vehicle)) //We dont want people using fortitude being able to use vehicles
|
||||
var/obj/vehicle/V = user.buckled
|
||||
var/datum/component/riding/VRD = V.GetComponent(/datum/component/riding)
|
||||
@@ -44,20 +43,21 @@
|
||||
to_chat(user, "<span class='notice'>You fall off the [V], your weight making you too heavy to be supported by it.</span>")
|
||||
// Pay Blood Toll (if awake)
|
||||
if(user.stat == CONSCIOUS)
|
||||
bloodsuckerdatum.AddBloodVolume(-0.5) // Used to be 0.3 blood per 2 seconds, but we're making it more expensive to keep on.
|
||||
B.AddBloodVolume(-0.5)
|
||||
sleep(20) // Check every few ticks that we haven't disabled this power
|
||||
// Return to Running (if you were before)
|
||||
if(was_running && user.m_intent != MOVE_INTENT_RUN)
|
||||
user.toggle_move_intent()
|
||||
|
||||
|
||||
/datum/action/bloodsucker/fortitude/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..()
|
||||
// Restore Traits & Effects
|
||||
REMOVE_TRAIT(user, TRAIT_PIERCEIMMUNE, "fortitude")
|
||||
REMOVE_TRAIT(user, TRAIT_NODISMEMBER, "fortitude")
|
||||
REMOVE_TRAIT(user, TRAIT_STUNIMMUNE, "fortitude")
|
||||
REMOVE_TRAIT(user, TRAIT_NORUNNING, "fortitude")
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.physiology.brute_mod /= this_resist//0.5
|
||||
H.physiology.burn_mod /= this_resist//0.5
|
||||
if(!ishuman(owner))
|
||||
return
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.physiology.brute_mod /= fortitude_resist
|
||||
H.physiology.burn_mod /= fortitude_resist
|
||||
if(was_running && user.m_intent == MOVE_INTENT_WALK)
|
||||
user.toggle_move_intent()
|
||||
|
||||
|
||||
@@ -1,88 +1,46 @@
|
||||
// Level 1: Grapple level 2
|
||||
// Level 2: Grapple 3 from Behind
|
||||
// Level 3: Grapple 3 from Shadows
|
||||
/datum/action/bloodsucker/targeted/lunge
|
||||
|
||||
|
||||
/datum/action/bloodsucker/lunge
|
||||
name = "Predatory Lunge"
|
||||
desc = "Spring at your target and aggressively grapple them without warning. Attacks from concealment or the rear may even knock them down."
|
||||
desc = "Prepare the strenght to grapple your prey."
|
||||
button_icon_state = "power_lunge"
|
||||
bloodcost = 10
|
||||
cooldown = 120
|
||||
target_range = 3
|
||||
power_activates_immediately = TRUE
|
||||
message_Trigger = "Whom will you ensnare within your grasp?"
|
||||
must_be_capacitated = TRUE
|
||||
cooldown = 30
|
||||
bloodsucker_can_buy = TRUE
|
||||
warn_constant_cost = TRUE
|
||||
amToggle = TRUE
|
||||
var/leap_skill_mod = 5
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/CheckCanUse(display_error)
|
||||
if(!..(display_error))// DEFAULT CHECKS
|
||||
return FALSE
|
||||
// Being Grabbed
|
||||
if(owner.pulledby && owner.pulledby.grab_state >= GRAB_AGGRESSIVE)
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You're being grabbed!</span>")
|
||||
return FALSE
|
||||
if(!owner.has_gravity(owner.loc))//TODO figure out how to check if theyre able to move while in nograv
|
||||
if(display_error)
|
||||
to_chat(owner, "<span class='warning'>You cant lunge while floating!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
/datum/action/bloodsucker/lunge/New()
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/CheckValidTarget(atom/A)
|
||||
return iscarbon(A)
|
||||
/datum/action/bloodsucker/lunge/Destroy()
|
||||
. = ..()
|
||||
UnregisterSignal(owner, COMSIG_CARBON_TACKLED)
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/CheckCanTarget(atom/A, display_error)
|
||||
// Check: Self
|
||||
if(target == owner)
|
||||
return FALSE
|
||||
// Check: Range
|
||||
//if (!(target in view(target_range, get_turf(owner))))
|
||||
// if (display_error)
|
||||
// to_chat(owner, "<span class='warning'>Your victim is too far away.</span>")
|
||||
// return FALSE
|
||||
// DEFAULT CHECKS (Distance)
|
||||
if(!..())
|
||||
return FALSE
|
||||
// Check: Turf
|
||||
var/mob/living/L = A
|
||||
if(!isturf(L.loc))
|
||||
return FALSE
|
||||
return TRUE
|
||||
/datum/action/bloodsucker/lunge/ActivatePower()
|
||||
var/mob/living/carbon/user = owner
|
||||
var/datum/antagonist/bloodsucker/B = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
var/datum/component/tackler/T = user.LoadComponent(/datum/component/tackler)
|
||||
T.stamina_cost = 50
|
||||
T.base_knockdown = 3 SECONDS
|
||||
T.range = 4
|
||||
T.speed = 0.8
|
||||
T.skill_mod = 5 //Monstrous tackling
|
||||
T.min_distance = 2
|
||||
active = TRUE
|
||||
user.toggle_throw_mode()
|
||||
RegisterSignal(user, COMSIG_CARBON_TACKLED, .proc/DelayedDeactivatePower)
|
||||
while(B && ContinueActive(user))
|
||||
B.AddBloodVolume(-0.1)
|
||||
sleep(5)
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/FireTargetedPower(atom/A)
|
||||
// set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done.
|
||||
var/mob/living/carbon/target = A
|
||||
var/turf/T = get_turf(target)
|
||||
var/mob/living/L = owner
|
||||
// Clear Vars
|
||||
owner.pulling = null
|
||||
// Will we Knock them Down?
|
||||
var/do_knockdown = !is_A_facing_B(target,owner) || owner.alpha <= 0 || istype(owner.loc, /obj/structure/closet)
|
||||
// CAUSES: Target has their back to me, I'm invisible, or I'm in a Closet
|
||||
// Step One: Heatseek toward Target's Turf
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/_walk, owner, 0), 2 SECONDS)
|
||||
target.playsound_local(get_turf(owner), 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // target-only telegraphing
|
||||
owner.playsound_local(owner, 'sound/bloodsucker/lunge_warn.ogg', 60, FALSE, pressure_affected = FALSE) // audio feedback to the user
|
||||
if(do_mob(owner, owner, 7, TRUE, TRUE))
|
||||
walk_towards(owner, T, 0.1, 10) // yes i know i shouldn't use this but i don't know how to work in anything better
|
||||
if(get_turf(owner) != T && !(isliving(target) && target.Adjacent(owner)) && owner.incapacitated() && !CHECK_MOBILITY(L, MOBILITY_STAND))
|
||||
var/send_dir = get_dir(owner, T)
|
||||
new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE)
|
||||
owner.spin(10)
|
||||
// Step Two: Check if I'm at/adjectent to Target's CURRENT turf (not original...that was just a destination)
|
||||
for(var/i in 1 to 6)
|
||||
if (target.Adjacent(owner))
|
||||
// LEVEL 2: If behind target, mute or unconscious!
|
||||
if(do_knockdown) // && level_current >= 1)
|
||||
target.Knockdown(15 + 10 * level_current,1)
|
||||
target.adjustStaminaLoss(40 + 10 * level_current)
|
||||
// Cancel Walk (we were close enough to contact them)
|
||||
walk(owner, 0)
|
||||
target.Stun(10,1) //Without this the victim can just walk away
|
||||
target.grabbedby(owner) // Taken from mutations.dm under changelings
|
||||
target.grippedby(owner, instant = TRUE) //instant aggro grab
|
||||
break
|
||||
sleep(3)
|
||||
//Without this, the leap component would get removed too early, causing the normal crash into effects.
|
||||
/datum/action/bloodsucker/lunge/proc/DelayedDeactivatePower()
|
||||
addtimer(CALLBACK(src, .proc/DeactivatePower), 1 SECONDS, TIMER_UNIQUE)
|
||||
|
||||
/datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target)
|
||||
..() // activate = FALSE
|
||||
user.update_mobility()
|
||||
/datum/action/bloodsucker/lunge/DeactivatePower(mob/living/user = owner)
|
||||
. = ..()
|
||||
qdel(user.GetComponent(/datum/component/tackler))
|
||||
UnregisterSignal(user, COMSIG_CARBON_TACKLED)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
H.socks = random_socks(H.gender)
|
||||
//H.eye_color = random_eye_color()
|
||||
REMOVE_TRAIT(H, TRAIT_DISFIGURED, null) //
|
||||
H.dna.features = random_features(H.dna.species?.id)
|
||||
H.dna.features = random_features(H.dna.species?.id, H.gender)
|
||||
|
||||
// Apply Appearance
|
||||
H.update_body(TRUE) // Outfit and underwear, also body and privates.
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
objectives += destroy_objective
|
||||
else
|
||||
if(prob(70))
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
var/datum/objective/assassinate/once/kill_objective = new
|
||||
kill_objective.owner = owner
|
||||
if(team_mode) //No backstabbing while in a team
|
||||
kill_objective.find_target_by_role(role = ROLE_CHANGELING, role_type = 1, invert = 1)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
changeling.purchasedpowers -= src
|
||||
|
||||
var/newmob = user.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS)
|
||||
var/newmob = user.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE)
|
||||
|
||||
changeling_transform(newmob, chosen_prof)
|
||||
return TRUE
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
to_chat(user, "<span class='notice'>Our muscles tense and strengthen.</span>")
|
||||
changeling.chem_recharge_slowdown += 0.5
|
||||
else
|
||||
user.remove_movespeed_modifier(MOVESPEED_ID_CHANGELING_MUSCLES)
|
||||
user.remove_movespeed_modifier(/datum/movespeed_modifier/strained_muscles)
|
||||
to_chat(user, "<span class='notice'>Our muscles relax.</span>")
|
||||
changeling.chem_recharge_slowdown -= 0.5
|
||||
if(stacks >= 20)
|
||||
@@ -36,12 +36,12 @@
|
||||
/obj/effect/proc_holder/changeling/strained_muscles/proc/muscle_loop(mob/living/carbon/user)
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
while(active)
|
||||
user.add_movespeed_modifier(MOVESPEED_ID_CHANGELING_MUSCLES, update=TRUE, priority=100, multiplicative_slowdown=-1, blacklisted_movetypes=(FLYING|FLOATING))
|
||||
user.add_movespeed_modifier(/datum/movespeed_modifier/strained_muscles)
|
||||
if(user.stat != CONSCIOUS || user.staminaloss >= 90)
|
||||
active = !active
|
||||
to_chat(user, "<span class='notice'>Our muscles relax without the energy to strengthen them.</span>")
|
||||
user.DefaultCombatKnockdown(40)
|
||||
user.remove_movespeed_modifier(MOVESPEED_ID_CHANGELING_MUSCLES)
|
||||
user.remove_movespeed_modifier(/datum/movespeed_modifier/strained_muscles)
|
||||
changeling.chem_recharge_slowdown -= 0.5
|
||||
break
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
if(!do_after(user, repair_values["healing_for_cycle"] * fabricator.speed_multiplier, target = src, \
|
||||
extra_checks = CALLBACK(fabricator, /obj/item/clockwork/replica_fabricator.proc/fabricator_repair_checks, repair_values, src, user, TRUE)))
|
||||
break
|
||||
obj_integrity = CLAMP(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
|
||||
obj_integrity = clamp(obj_integrity + repair_values["healing_for_cycle"], 0, max_integrity)
|
||||
adjust_clockwork_power(-repair_values["power_required"])
|
||||
playsound(src, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(GLOB.ratvar_awakens)
|
||||
current_power = GLOB.clockwork_power = INFINITY
|
||||
else
|
||||
current_power = GLOB.clockwork_power = CLAMP(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER)
|
||||
current_power = GLOB.clockwork_power = clamp(GLOB.clockwork_power + amount, 0, MAX_CLOCKWORK_POWER)
|
||||
for(var/obj/effect/clockwork/sigil/transmission/T in GLOB.all_clockwork_objects)
|
||||
T.update_icon()
|
||||
var/unlock_message
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
var/mob/living/carbon/C = L
|
||||
C.stuttering = max(8, C.stuttering)
|
||||
C.drowsyness = max(8, C.drowsyness)
|
||||
C.confused += CLAMP(16 - C.confused, 0, 8)
|
||||
C.confused += clamp(16 - C.confused, 0, 8)
|
||||
C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
|
||||
L.adjustFireLoss(15)
|
||||
..()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(issilicon(L))
|
||||
L.DefaultCombatKnockdown(100)
|
||||
else if(iscultist(L))
|
||||
L.confused += CLAMP(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
|
||||
L.confused += clamp(10 - L.confused, 0, 5) // Spearthrow now confuses enemy cultists + just deals extra damage / sets on fire instead of hardstunning + damage
|
||||
to_chat(L, "<span class ='userdanger'>[src] crashes into you with burning force, sending you reeling!</span>")
|
||||
L.adjust_fire_stacks(2)
|
||||
L.DefaultCombatKnockdown(1)
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
var/mob/living/L = M.current
|
||||
if(ishuman(L) && L.stat != DEAD)
|
||||
human_servants++
|
||||
construct_limit = round(CLAMP((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3
|
||||
construct_limit = round(clamp((human_servants / 4), 1, 3)) //1 per 4 human servants, maximum of 3
|
||||
|
||||
//Summon Neovgre: Summon a very powerful combat mech that explodes when destroyed for massive damage.
|
||||
/datum/clockwork_scripture/create_object/summon_arbiter
|
||||
|
||||
@@ -63,4 +63,4 @@
|
||||
break
|
||||
if(!M)
|
||||
M = H.apply_status_effect(STATUS_EFFECT_MANIAMOTOR, src)
|
||||
M.severity = CLAMP(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
|
||||
M.severity = clamp(M.severity + ((11 - get_dist(src, H)) * efficiency * efficiency), 0, MAX_MANIA_SEVERITY)
|
||||
|
||||
@@ -454,16 +454,16 @@
|
||||
S.emp_act(EMP_HEAVY)
|
||||
else if(iscarbon(target))
|
||||
var/mob/living/carbon/C = L
|
||||
C.silent += CLAMP(12 - C.silent, 0, 6)
|
||||
C.stuttering += CLAMP(30 - C.stuttering, 0, 15)
|
||||
C.cultslurring += CLAMP(30 - C.cultslurring, 0, 15)
|
||||
C.silent += clamp(12 - C.silent, 0, 6)
|
||||
C.stuttering += clamp(30 - C.stuttering, 0, 15)
|
||||
C.cultslurring += clamp(30 - C.cultslurring, 0, 15)
|
||||
C.Jitter(15)
|
||||
else // cultstun no longer hardstuns + damages hostile cultists, instead debuffs them hard + deals some damage; debuffs for a bit longer since they don't add the clockie belligerent debuff
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = L
|
||||
C.stuttering = max(10, C.stuttering)
|
||||
C.drowsyness = max(10, C.drowsyness)
|
||||
C.confused += CLAMP(20 - C.confused, 0, 10)
|
||||
C.confused += clamp(20 - C.confused, 0, 10)
|
||||
L.adjustBruteLoss(15)
|
||||
to_chat(user, "<span class='cultitalic'>In an brilliant flash of red, [L] [iscultist(L) ? "writhes in pain" : "falls to the ground!"]</span>")
|
||||
uses--
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
|
||||
var/cursetime = 1800
|
||||
var/timer = SSshuttle.emergency.timeLeft(1) + cursetime
|
||||
var/security_num = seclevel2num(get_security_level())
|
||||
var/security_num = SECLEVEL2NUM(NUM2SECLEVEL(GLOB.security_level))
|
||||
var/set_coefficient = 1
|
||||
switch(security_num)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
@@ -731,7 +731,7 @@
|
||||
if(!L.anti_magic_check())
|
||||
if(is_servant_of_ratvar(L))
|
||||
to_chat(L, "<span class='cultlarge'>\"Kneel for me, scum\"</span>")
|
||||
L.confused += CLAMP(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
|
||||
L.confused += clamp(10 - L.confused, 0, 5) //confuses and lightly knockdowns + damages hostile cultists instead of hardstunning like before
|
||||
L.DefaultCombatKnockdown(15)
|
||||
L.adjustBruteLoss(10)
|
||||
else
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
STOP_PROCESSING(SSobj, core)
|
||||
update_icon()
|
||||
GLOB.poi_list |= src
|
||||
previous_level = get_security_level()
|
||||
previous_level = NUM2SECLEVEL(GLOB.security_level)
|
||||
|
||||
/obj/machinery/nuclearbomb/Destroy()
|
||||
safety = FALSE
|
||||
@@ -358,7 +358,7 @@
|
||||
if(NUKEUI_AWAIT_TIMER)
|
||||
var/number_value = text2num(numeric_input)
|
||||
if(number_value)
|
||||
timer_set = CLAMP(number_value, minimum_timer_set, maximum_timer_set)
|
||||
timer_set = clamp(number_value, minimum_timer_set, maximum_timer_set)
|
||||
playsound(src, 'sound/machines/nuke/general_beep.ogg', 50, FALSE)
|
||||
set_safety()
|
||||
. = TRUE
|
||||
@@ -419,7 +419,7 @@
|
||||
return
|
||||
timing = !timing
|
||||
if(timing)
|
||||
previous_level = get_security_level()
|
||||
previous_level = NUM2SECLEVEL(GLOB.security_level)
|
||||
detonation_timer = world.time + (timer_set * 10)
|
||||
for(var/obj/item/pinpointer/nuke/syndicate/S in GLOB.pinpointer_list)
|
||||
S.switch_mode_to(TRACK_INFILTRATOR)
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
|
||||
/mob/living/simple_animal/slaughter/phasein()
|
||||
. = ..()
|
||||
add_movespeed_modifier(MOVESPEED_ID_SLAUGHTER, update=TRUE, priority=100, multiplicative_slowdown=-1)
|
||||
addtimer(CALLBACK(src, .proc/remove_movespeed_modifier, MOVESPEED_ID_SLAUGHTER, TRUE), 6 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
add_movespeed_modifier(/datum/movespeed_modifier/slaughter)
|
||||
addtimer(CALLBACK(src, .proc/remove_movespeed_modifier, /datum/movespeed_modifier/slaughter), 6 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
|
||||
|
||||
//The loot from killing a slaughter demon - can be consumed to allow the user to blood crawl
|
||||
|
||||
@@ -16,3 +16,6 @@
|
||||
/datum/traitor_class/human/hijack/finalize_traitor(datum/antagonist/traitor/T)
|
||||
T.hijack_speed=1
|
||||
return TRUE
|
||||
|
||||
/datum/traitor_class/human/hijack/clean_up_traitor(datum/antagonist/traitor/T)
|
||||
T.hijack_speed = 0.5
|
||||
|
||||
@@ -38,3 +38,7 @@ GLOBAL_LIST_EMPTY(traitor_classes)
|
||||
/datum/traitor_class/proc/finalize_traitor(datum/antagonist/traitor/T)
|
||||
// Finalization. Return TRUE if should play standard traitor sound/equip, return FALSE if both are special case
|
||||
return TRUE
|
||||
|
||||
/datum/traitor_class/proc/clean_up_traitor(datum/antagonist/traitor/T)
|
||||
// Any effects that need to be cleaned up if traitor class is being swapped.
|
||||
|
||||
@@ -15,36 +15,53 @@
|
||||
threat = 5
|
||||
|
||||
/datum/antagonist/traitor/New()
|
||||
..()
|
||||
if(!GLOB.traitor_classes.len)//Only need to fill the list when it's needed.
|
||||
for(var/I in subtypesof(/datum/traitor_class))
|
||||
new I
|
||||
..()
|
||||
|
||||
/datum/antagonist/traitor/proc/set_traitor_kind(var/kind)
|
||||
/datum/antagonist/traitor/proc/set_traitor_kind(kind)
|
||||
var/swap_from_old = FALSE
|
||||
if(traitor_kind)
|
||||
traitor_kind.remove_innate_effects(owner.current)
|
||||
traitor_kind.clean_up_traitor(src)
|
||||
swap_from_old = TRUE
|
||||
traitor_kind = GLOB.traitor_classes[kind]
|
||||
traitor_kind.apply_innate_effects(owner.current)
|
||||
if(give_objectives)
|
||||
for(var/O in objectives)
|
||||
qdel(O)
|
||||
traitor_kind.forge_objectives(src)
|
||||
if(swap_from_old)
|
||||
traitor_kind.finalize_traitor(src)
|
||||
traitor_kind.greet(src)
|
||||
owner.announce_objectives()
|
||||
|
||||
/proc/get_random_traitor_kind(var/list/blacklist = list())
|
||||
var/chaos_weight = 0
|
||||
if(istype(SSticker.mode,/datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
chaos_weight = (mode.threat - 50)/50
|
||||
var/list/weights = list()
|
||||
for(var/C in GLOB.traitor_classes)
|
||||
if(!(C in blacklist))
|
||||
var/datum/traitor_class/class = GLOB.traitor_classes[C]
|
||||
var/weight = LOGISTIC_FUNCTION(1.5*class.weight,chaos_weight,class.chaos,0)
|
||||
weights[C] = weight * 1000
|
||||
var/choice = pickweight(weights, 0)
|
||||
if(!choice)
|
||||
choice = TRAITOR_HUMAN // it's an "easter egg"
|
||||
var/datum/traitor_class/actual_class = GLOB.traitor_classes[choice]
|
||||
actual_class.weight *= 0.8 // less likely this round
|
||||
return choice
|
||||
|
||||
/datum/antagonist/traitor/on_gain()
|
||||
if(owner.current && isAI(owner.current))
|
||||
set_traitor_kind(TRAITOR_AI)
|
||||
else
|
||||
var/chaos_weight = 0
|
||||
if(istype(SSticker.mode,/datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
chaos_weight = (mode.threat - 50)/50
|
||||
var/list/weights = list()
|
||||
for(var/C in GLOB.traitor_classes)
|
||||
var/datum/traitor_class/class = GLOB.traitor_classes[C]
|
||||
var/weight = LOGISTIC_FUNCTION(1.5*class.weight,chaos_weight,class.chaos,0)
|
||||
weights[C] = weight
|
||||
var/choice = pickweightAllowZero(weights)
|
||||
if(!choice)
|
||||
choice = GLOB.traitor_classes[TRAITOR_HUMAN] // it's an "easter egg"
|
||||
set_traitor_kind(choice)
|
||||
traitor_kind.weight *= 0.8 // less likely this round
|
||||
set_traitor_kind(get_random_traitor_kind())
|
||||
SSticker.mode.traitors += owner
|
||||
owner.special_role = special_role
|
||||
if(give_objectives)
|
||||
traitor_kind.forge_objectives(src)
|
||||
finalize_traitor()
|
||||
..()
|
||||
|
||||
@@ -97,7 +114,8 @@
|
||||
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE)
|
||||
|
||||
/datum/antagonist/traitor/antag_panel_objectives()
|
||||
. = ..()
|
||||
. += "<i><b>Traitor class:</b></i> <a href='?src=[REF(owner)];traitor_class=1;target_antag=[REF(src)]'>[traitor_kind.employer]</a><br>"
|
||||
. += ..()
|
||||
if(contractor_hub?.assigned_targets && length(contractor_hub.assigned_targets))
|
||||
. += "<i><b>Contract Targets</b></i>:<br>"
|
||||
for(var/datum/mind/M in contractor_hub.assigned_targets)
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
/obj/item/scrying/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>You can see...everything!</span>")
|
||||
visible_message("<span class='danger'>[user] stares into [src], their eyes glazing over.</span>")
|
||||
user.ghostize(1)
|
||||
user.ghostize(1, voluntary = TRUE)
|
||||
|
||||
/////////////////////////////////////////Necromantic Stone///////////////////
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
name = "Staff of Change"
|
||||
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself."
|
||||
item_path = /obj/item/gun/magic/staff/change
|
||||
dynamic_requirement = 60
|
||||
dynamic_requirement = 200
|
||||
|
||||
/datum/spellbook_entry/item/staffanimation
|
||||
name = "Staff of Animation"
|
||||
@@ -361,7 +361,7 @@
|
||||
desc = "A collection of wands that allow for a wide variety of utility. Wands have a limited number of charges, so be conservative in use. Comes in a handy belt."
|
||||
item_path = /obj/item/storage/belt/wands/full
|
||||
category = "Defensive"
|
||||
dynamic_requirement = 60
|
||||
dynamic_requirement = 200
|
||||
|
||||
/datum/spellbook_entry/item/armor
|
||||
name = "Mastercrafted Armor Set"
|
||||
@@ -386,7 +386,7 @@
|
||||
name = "Plasma Fist"
|
||||
desc = "A forbidden martial art designed on the surging power of plasma. Use it to harness the ancient power."
|
||||
item_path = /obj/item/book/granter/martial/plasma_fist
|
||||
cost = 3
|
||||
cost = 2
|
||||
|
||||
/datum/spellbook_entry/item/guardian
|
||||
name = "Guardian Deck"
|
||||
|
||||
@@ -229,6 +229,7 @@
|
||||
var/flashcd = 20
|
||||
var/overheat = 0
|
||||
var/obj/item/organ/cyberimp/arm/flash/I = null
|
||||
var/active_light_strength = 7
|
||||
|
||||
/obj/item/assembly/flash/armimplant/burn_out()
|
||||
if(I && I.owner)
|
||||
@@ -248,6 +249,12 @@
|
||||
update_icon(1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/flash/armimplant/Moved(oldLoc, dir)
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
set_light(0)
|
||||
else
|
||||
set_light(7)
|
||||
|
||||
/obj/item/assembly/flash/armimplant/proc/cooldown()
|
||||
overheat = FALSE
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
|
||||
var/new_heat_capacity = air.heat_capacity()
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
air.temperature = CLAMP(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
|
||||
air.temperature = clamp(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
|
||||
return REACTING
|
||||
|
||||
/datum/gas_reaction/nitrylformation //The formation of nitryl. Endothermic. Requires N2O as a catalyst.
|
||||
|
||||
@@ -159,13 +159,13 @@
|
||||
pump_direction = 1
|
||||
|
||||
if("set_input_pressure" in signal.data)
|
||||
input_pressure_min = CLAMP(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
input_pressure_min = clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
output_pressure_max = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
output_pressure_max = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
|
||||
@@ -122,7 +122,7 @@ Passive gate is similar to the regular pump except:
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -144,7 +144,7 @@ Passive gate is similar to the regular pump except:
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
on = !on
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("close_pressure")
|
||||
var/pressure = params["close_pressure"]
|
||||
@@ -106,6 +106,6 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
close_pressure = CLAMP(pressure, 0, open_pressure)
|
||||
close_pressure = clamp(pressure, 0, open_pressure)
|
||||
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
if("set_transfer_rate" in signal.data)
|
||||
var/datum/gas_mixture/air1 = airs[1]
|
||||
transfer_rate = CLAMP(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||
transfer_rate = clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
|
||||
|
||||
if(on != old_on)
|
||||
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("filter")
|
||||
filter_type = null
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("node1")
|
||||
var/value = text2num(params["concentration"])
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
if("set_volume_rate" in signal.data)
|
||||
var/number = text2num(signal.data["set_volume_rate"])
|
||||
var/datum/gas_mixture/air_contents = airs[1]
|
||||
volume_rate = CLAMP(number, 0, air_contents.volume)
|
||||
volume_rate = clamp(number, 0, air_contents.volume)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
@@ -172,7 +172,7 @@
|
||||
rate = text2num(rate)
|
||||
. = TRUE
|
||||
if(.)
|
||||
volume_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE)
|
||||
volume_rate = clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
broadcast_status()
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
open_pressure = CLAMP(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE)
|
||||
investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
if("close_pressure")
|
||||
var/pressure = params["close_pressure"]
|
||||
@@ -107,6 +107,6 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
close_pressure = CLAMP(pressure, 0, open_pressure)
|
||||
close_pressure = clamp(pressure, 0, open_pressure)
|
||||
investigate_log("close pressure was set to [close_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
update_icon()
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
target = text2num(target)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_temperature = CLAMP(target, min_temperature, max_temperature)
|
||||
target_temperature = clamp(target, min_temperature, max_temperature)
|
||||
investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -210,13 +210,13 @@
|
||||
|
||||
if("set_internal_pressure" in signal.data)
|
||||
var/old_pressure = internal_pressure_bound
|
||||
internal_pressure_bound = CLAMP(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
internal_pressure_bound = clamp(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
if(old_pressure != internal_pressure_bound)
|
||||
investigate_log(" internal pressure was set to [internal_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
var/old_pressure = external_pressure_bound
|
||||
external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
if(old_pressure != external_pressure_bound)
|
||||
investigate_log(" external pressure was set to [external_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS)
|
||||
|
||||
@@ -227,10 +227,10 @@
|
||||
internal_pressure_bound = 0
|
||||
|
||||
if("adjust_internal_pressure" in signal.data)
|
||||
internal_pressure_bound = CLAMP(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
internal_pressure_bound = clamp(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("adjust_external_pressure" in signal.data)
|
||||
external_pressure_bound = CLAMP(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
external_pressure_bound = clamp(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("init" in signal.data)
|
||||
name = signal.data["init"]
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if(initialize_directions & dir)
|
||||
return ..()
|
||||
if((NORTH|EAST) & dir)
|
||||
user.ventcrawl_layer = CLAMP(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
user.ventcrawl_layer = clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
if((SOUTH|WEST) & dir)
|
||||
user.ventcrawl_layer = CLAMP(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
user.ventcrawl_layer = clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
|
||||
to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.")
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
release_pressure = CLAMP(round(pressure), can_min_release_pressure, can_max_release_pressure)
|
||||
release_pressure = clamp(round(pressure), can_min_release_pressure, can_max_release_pressure)
|
||||
investigate_log("was set to [release_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
if("valve")
|
||||
var/logmsg
|
||||
@@ -434,7 +434,7 @@
|
||||
var/N = text2num(user_input)
|
||||
if(!N)
|
||||
return
|
||||
timer_set = CLAMP(N,minimum_timer_set,maximum_timer_set)
|
||||
timer_set = clamp(N,minimum_timer_set,maximum_timer_set)
|
||||
log_admin("[key_name(usr)] has activated a prototype valve timer")
|
||||
. = TRUE
|
||||
if("toggle_timer")
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
pressure = text2num(pressure)
|
||||
. = TRUE
|
||||
if(.)
|
||||
pump.target_pressure = CLAMP(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
|
||||
pump.target_pressure = clamp(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE)
|
||||
investigate_log("was set to [pump.target_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS)
|
||||
if("eject")
|
||||
if(holding)
|
||||
|
||||
@@ -487,8 +487,7 @@
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/shielded/ctf
|
||||
toggle_helmet = FALSE // see the whites of their eyes
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
id = /obj/item/card/id/syndicate
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
belt = /obj/item/gun/ballistic/automatic/pistol/deagle/ctf
|
||||
l_pocket = /obj/item/ammo_box/magazine/recharge/ctf
|
||||
r_pocket = /obj/item/ammo_box/magazine/recharge/ctf
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
glasses = /obj/item/clothing/glasses/eyepatch
|
||||
mask = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
head = /obj/item/clothing/head/centhat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
r_pocket = /obj/item/lighter
|
||||
id = /obj/item/card/id
|
||||
@@ -507,7 +507,7 @@
|
||||
uniform = /obj/item/clothing/under/rank/security/officer
|
||||
suit = /obj/item/clothing/suit/armor/vest
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat
|
||||
mask = /obj/item/clothing/mask/gas/sechailer/swat
|
||||
head = /obj/item/clothing/head/helmet/swat/nanotrasen
|
||||
back = /obj/item/storage/backpack/security
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
// How much "space" we give the edge of the map
|
||||
GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "[global.config.directory]/awaymissionconfig.txt"))
|
||||
|
||||
/proc/createRandomZlevel()
|
||||
if(GLOB.awaydestinations.len) //crude, but it saves another var!
|
||||
/proc/createRandomZlevel(name = AWAY_MISSION_NAME, list/traits = list(ZTRAIT_AWAY = TRUE), list/potential_levels = GLOB.potential_away_levels)
|
||||
if(GLOB.random_zlevels_generated[name])
|
||||
stack_trace("[name] level already generated.")
|
||||
return
|
||||
if(!length(potential_levels))
|
||||
stack_trace("No potential [name] level to load has been found.")
|
||||
return
|
||||
|
||||
if(GLOB.potentialRandomZlevels && GLOB.potentialRandomZlevels.len)
|
||||
to_chat(world, "<span class='boldannounce'>Loading away mission...</span>")
|
||||
var/map = pick(GLOB.potentialRandomZlevels)
|
||||
load_new_z_level(map, "Away Mission")
|
||||
to_chat(world, "<span class='boldannounce'>Away mission loaded.</span>")
|
||||
var/start_time = REALTIMEOFDAY
|
||||
var/map = pick(potential_levels)
|
||||
if(!load_new_z_level(map, name, traits))
|
||||
INIT_ANNOUNCE("Failed to load [name]! map filepath: [map]!")
|
||||
return
|
||||
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
GLOB.random_zlevels_generated[name] = TRUE
|
||||
|
||||
/proc/reset_gateway_spawns(reset = FALSE)
|
||||
for(var/obj/machinery/gateway/G in world)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/matrix/mat = matrix()
|
||||
mat.Translate(0, 16)
|
||||
mat.Scale(1, sqrt((x_offset * x_offset) + (y_offset * y_offset)) / 32)
|
||||
mat.Turn(90 - ATAN2(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
mat.Turn(90 - arctan(x_offset, y_offset)) // So... You pass coords in order x,y to this version of atan2. It should be called acsc2.
|
||||
mat.Translate(atom_a.pixel_x, atom_a.pixel_y)
|
||||
|
||||
transform = mat
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
|
||||
log_admin("Build Mode: [key_name(c)] copied [stored] to [AREACOORD(object)]")
|
||||
else if(right_click)
|
||||
if(ismovableatom(object)) // No copying turfs for now.
|
||||
if(ismovable(object)) // No copying turfs for now.
|
||||
to_chat(c, "<span class='notice'>[object] set as template.</span>")
|
||||
stored = object
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
/datum/export/gear/combatgloves
|
||||
cost = 80
|
||||
unit_name = "combat gloves"
|
||||
export_types = list(/obj/item/clothing/gloves/combat, /obj/item/clothing/gloves/fingerless/pugilist/rapid, /obj/item/clothing/gloves/krav_maga)
|
||||
export_types = list(/obj/item/clothing/gloves/tackler/combat, /obj/item/clothing/gloves/tackler/dolphin, /obj/item/clothing/gloves/fingerless/pugilist/rapid, /obj/item/clothing/gloves/krav_maga)
|
||||
include_subtypes = TRUE
|
||||
|
||||
/datum/export/gear/bonegloves
|
||||
@@ -797,4 +797,4 @@ datum/export/gear/glasses //glasses are not worth selling
|
||||
export_types = list(/obj/item/clothing/head/chameleon, /obj/item/clothing/mask/chameleon, /obj/item/clothing/under/chameleon, /obj/item/clothing/suit/chameleon, /obj/item/clothing/glasses/chameleon,\
|
||||
/obj/item/clothing/gloves/chameleon, /obj/item/clothing/head/chameleon, /obj/item/clothing/shoes/chameleon, /obj/item/storage/backpack/chameleon, \
|
||||
/obj/item/storage/belt/chameleon, /obj/item/radio/headset/chameleon, /obj/item/pda/chameleon, /obj/item/stamp/chameleon, /obj/item/clothing/neck/cloak/chameleon)
|
||||
include_subtypes = TRUE
|
||||
include_subtypes = TRUE
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
/obj/item/clothing/suit/armor/vest/russian,
|
||||
/obj/item/clothing/head/helmet/rus_helmet,
|
||||
/obj/item/clothing/shoes/russian,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/under/syndicate/rus_army,
|
||||
/obj/item/clothing/under/costume/soviet,
|
||||
/obj/item/clothing/mask/russian_balaclava,
|
||||
@@ -201,8 +201,8 @@
|
||||
/obj/item/clothing/mask/gas/sechailer/swat,
|
||||
/obj/item/storage/belt/military/assault,
|
||||
/obj/item/storage/belt/military/assault,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/combat)
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated)
|
||||
crate_name = "swat crate"
|
||||
|
||||
/datum/supply_pack/security/armory/wt550
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
desc = "Need some meat? With this do-it-yourself kit you'll be swimming in it! Contains a monkey cube, an IV drip, and some cryoxadone!"
|
||||
cost = 2150
|
||||
contraband = TRUE
|
||||
contains = list(/obj/item/reagent_containers/food/snacks/monkeycube,
|
||||
contains = list(/obj/item/reagent_containers/food/snacks/cube/monkey,
|
||||
/obj/item/restraints/handcuffs/cable,
|
||||
/obj/machinery/iv_drip,
|
||||
/obj/item/reagent_containers/glass/beaker/cryoxadone,
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
/obj/item/clothing/suit/armor/bulletproof,
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/clothing/mask/gas)
|
||||
crate_name = "surplus russian clothing"
|
||||
@@ -109,7 +109,7 @@
|
||||
/obj/item/clothing/head/ushanka,
|
||||
/obj/item/clothing/suit/armor/bulletproof,
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/gloves/combat,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/gun/ballistic/shotgun/boltaction,
|
||||
/obj/item/ammo_box/a762)
|
||||
|
||||
@@ -888,8 +888,8 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
|
||||
var/viewscale = getviewsize(view)
|
||||
var/x = viewscale[1]
|
||||
var/y = viewscale[2]
|
||||
x = CLAMP(x+change, min, max)
|
||||
y = CLAMP(y+change, min,max)
|
||||
x = clamp(x+change, min, max)
|
||||
y = clamp(y+change, min,max)
|
||||
change_view("[x]x[y]")
|
||||
|
||||
/client/proc/change_view(new_size)
|
||||
|
||||
@@ -197,10 +197,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/action_buttons_screen_locs = list()
|
||||
|
||||
//bad stuff
|
||||
var/digestable = FALSE
|
||||
var/devourable = FALSE
|
||||
var/feeding = FALSE
|
||||
var/lickable = FALSE
|
||||
var/vore_flags = 0
|
||||
var/list/belly_prefs = list()
|
||||
var/vore_taste = "nothing in particular"
|
||||
|
||||
@@ -211,6 +208,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
var/show_mismatched_markings = FALSE //determines whether or not the markings lists should show markings that don't match the currently selected species. Intentionally left unsaved.
|
||||
|
||||
var/no_tetris_storage = FALSE
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
|
||||
@@ -866,6 +865,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Widescreen:</b> <a href='?_src_=prefs;preference=widescreenpref'>[widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]</a><br>"
|
||||
dat += "<b>Auto stand:</b> <a href='?_src_=prefs;preference=autostand'>[autostand ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Auto OOC:</b> <a href='?_src_=prefs;preference=auto_ooc'>[auto_ooc ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Force Slot Storage HUD:</b> <a href='?_src_=prefs;preference=no_tetris_storage'>[no_tetris_storage ? "Enabled" : "Disabled"]</a><br>"
|
||||
dat += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
|
||||
if (user && user.client && !user.client.prefs.screenshake==0)
|
||||
dat += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
|
||||
@@ -1837,7 +1837,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
if("s_tone")
|
||||
var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones
|
||||
if(CONFIG_GET(number/allow_custom_skintones))
|
||||
if(CONFIG_GET(flag/allow_custom_skintones))
|
||||
choices += "custom"
|
||||
var/new_s_tone = input(user, "Choose your character's skin tone:", "Character Preference") as null|anything in choices
|
||||
if(new_s_tone)
|
||||
@@ -1966,7 +1966,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
|
||||
var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null
|
||||
if(new_length)
|
||||
features["cock_length"] = CLAMP(round(new_length), min_D, max_D)
|
||||
features["cock_length"] = clamp(round(new_length), min_D, max_D)
|
||||
|
||||
if("cock_shape")
|
||||
var/new_shape
|
||||
@@ -2163,7 +2163,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/danger = CONFIG_GET(number/threshold_body_size_slowdown)
|
||||
var/new_body_size = input(user, "Choose your desired sprite size:\n([min*100]%-[max*100]%), Warning: May make your character look distorted[danger > min ? ", and an exponential slowdown will occur for those smaller than [danger*100]%!" : "!"]", "Character Preference", features["body_size"]*100) as num|null
|
||||
if (new_body_size)
|
||||
new_body_size = CLAMP(new_body_size * 0.01, min, max)
|
||||
new_body_size = clamp(new_body_size * 0.01, min, max)
|
||||
var/dorfy
|
||||
if(danger > new_body_size)
|
||||
dorfy = alert(user, "The chosen size appears to be smaller than the threshold of [danger*100]%, which will lead to an added exponential slowdown. Are you sure about that?", "Dwarfism Alert", "Yes", "Move it to the threshold", "No")
|
||||
@@ -2204,6 +2204,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
autostand = !autostand
|
||||
if("auto_ooc")
|
||||
auto_ooc = !auto_ooc
|
||||
if("no_tetris_storage")
|
||||
no_tetris_storage = !no_tetris_storage
|
||||
if ("screenshake")
|
||||
var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num
|
||||
if (!isnull(desiredshake))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 28
|
||||
#define SAVEFILE_VERSION_MAX 29
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -120,10 +120,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(fexists(vr_path))
|
||||
var/list/json_from_file = json_decode(file2text(vr_path))
|
||||
if(json_from_file)
|
||||
digestable = json_from_file["digestable"]
|
||||
devourable = json_from_file["devourable"]
|
||||
feeding = json_from_file["feeding"]
|
||||
lickable = json_from_file["lickable"]
|
||||
if(json_from_file["digestable"])
|
||||
ENABLE_BITFIELD(vore_flags,DIGESTABLE)
|
||||
if(json_from_file["devourable"])
|
||||
ENABLE_BITFIELD(vore_flags,DEVOURABLE)
|
||||
if(json_from_file["feeding"])
|
||||
ENABLE_BITFIELD(vore_flags,FEEDING)
|
||||
if(json_from_file["lickable"])
|
||||
ENABLE_BITFIELD(vore_flags,LICKABLE)
|
||||
belly_prefs = json_from_file["belly_prefs"]
|
||||
vore_taste = json_from_file["vore_taste"]
|
||||
|
||||
@@ -158,6 +162,24 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(malformed_hockeys[hockey])
|
||||
features["cock_shape"] = malformed_hockeys[hockey]
|
||||
features["cock_taur"] = TRUE
|
||||
|
||||
if(current_version < 29)
|
||||
var/digestable
|
||||
var/devourable
|
||||
var/feeding
|
||||
var/lickable
|
||||
S["digestable"] >> digestable
|
||||
S["devourable"] >> devourable
|
||||
S["feeding"] >> feeding
|
||||
S["lickable"] >> lickable
|
||||
if(digestable)
|
||||
ENABLE_BITFIELD(vore_flags,DIGESTABLE)
|
||||
if(devourable)
|
||||
ENABLE_BITFIELD(vore_flags,DEVOURABLE)
|
||||
if(feeding)
|
||||
ENABLE_BITFIELD(vore_flags,FEEDING)
|
||||
if(lickable)
|
||||
ENABLE_BITFIELD(vore_flags,LICKABLE)
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
@@ -231,7 +253,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["autostand"] >> autostand
|
||||
S["cit_toggles"] >> cit_toggles
|
||||
S["preferred_chaos"] >> preferred_chaos
|
||||
S["auto_ooc"] >> auto_ooc
|
||||
S["auto_ooc"] >> auto_ooc
|
||||
S["no_tetris_storage"] >> no_tetris_storage
|
||||
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
@@ -268,10 +291,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
pda_skin = sanitize_inlist(pda_skin, GLOB.pda_reskins, PDA_SKIN_ALT)
|
||||
screenshake = sanitize_integer(screenshake, 0, 800, initial(screenshake))
|
||||
damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake))
|
||||
widescreenpref = sanitize_integer(widescreenpref, 0, 1, initial(widescreenpref))
|
||||
widescreenpref = sanitize_integer(widescreenpref, 0, 1, initial(widescreenpref))
|
||||
autostand = sanitize_integer(autostand, 0, 1, initial(autostand))
|
||||
cit_toggles = sanitize_integer(cit_toggles, 0, 65535, initial(cit_toggles))
|
||||
auto_ooc = sanitize_integer(auto_ooc, 0, 1, initial(auto_ooc))
|
||||
no_tetris_storage = sanitize_integer(no_tetris_storage, 0, 1, initial(no_tetris_storage))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -336,6 +360,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["cit_toggles"], cit_toggles)
|
||||
WRITE_FILE(S["preferred_chaos"], preferred_chaos)
|
||||
WRITE_FILE(S["auto_ooc"], auto_ooc)
|
||||
WRITE_FILE(S["no_tetris_storage"], no_tetris_storage)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -499,11 +524,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
else //We have no old flavortext, default to new
|
||||
S["feature_flavor_text"] >> features["flavor_text"]
|
||||
|
||||
S["digestable"] >> digestable
|
||||
S["devourable"] >> devourable
|
||||
S["feeding"] >> feeding
|
||||
S["vore_flags"] >> vore_flags
|
||||
S["vore_taste"] >> vore_taste
|
||||
S["lickable"] >> lickable
|
||||
S["belly_prefs"] >> belly_prefs
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
@@ -549,11 +571,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
hair_color = sanitize_hexcolor(hair_color, 3, 0)
|
||||
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
use_custom_skin_tone = sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone))
|
||||
if(use_custom_skin_tone && CONFIG_GET(number/allow_custom_skintones))
|
||||
|
||||
var/static/allow_custom_skintones
|
||||
if(isnull(allow_custom_skintones))
|
||||
allow_custom_skintones = CONFIG_GET(flag/allow_custom_skintones)
|
||||
use_custom_skin_tone = allow_custom_skintones ? sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone)) : FALSE
|
||||
if(use_custom_skin_tone)
|
||||
skin_tone = sanitize_hexcolor(skin_tone, 6, TRUE, "#FFFFFF")
|
||||
else
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones - GLOB.nonstandard_skin_tones, initial(skin_tone))
|
||||
|
||||
horn_color = sanitize_hexcolor(horn_color, 3, FALSE)
|
||||
wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF")
|
||||
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
|
||||
@@ -580,7 +607,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
var/static/size_max
|
||||
if(!size_max)
|
||||
size_max = CONFIG_GET(number/body_size_max)
|
||||
features["body_size"] = sanitize_integer(features["body_size"], size_min, size_max, RESIZE_DEFAULT_SIZE)
|
||||
features["body_size"] = sanitize_num_clamp(features["body_size"], size_min, size_max, RESIZE_DEFAULT_SIZE, 0.01)
|
||||
|
||||
var/static/list/B_sizes
|
||||
if(!B_sizes)
|
||||
@@ -623,10 +650,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
all_quirks = SANITIZE_LIST(all_quirks)
|
||||
|
||||
lickable = sanitize_integer(lickable, FALSE, TRUE, initial(lickable))
|
||||
devourable = sanitize_integer(devourable, FALSE, TRUE, initial(devourable))
|
||||
digestable = sanitize_integer(digestable, FALSE, TRUE, initial(digestable))
|
||||
feeding = sanitize_integer(feeding, FALSE, TRUE, initial(feeding))
|
||||
vore_flags = sanitize_integer(vore_flags, 0, MAX_VORE_FLAG, 0)
|
||||
vore_taste = copytext(vore_taste, 1, MAX_TASTE_LEN)
|
||||
belly_prefs = SANITIZE_LIST(belly_prefs)
|
||||
|
||||
@@ -736,11 +760,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//Quirks
|
||||
WRITE_FILE(S["all_quirks"] , all_quirks)
|
||||
|
||||
WRITE_FILE(S["digestable"] , digestable)
|
||||
WRITE_FILE(S["devourable"] , devourable)
|
||||
WRITE_FILE(S["feeding"] , feeding)
|
||||
WRITE_FILE(S["vore_flags"] , vore_flags)
|
||||
WRITE_FILE(S["vore_taste"] , vore_taste)
|
||||
WRITE_FILE(S["lickable"] , lickable)
|
||||
WRITE_FILE(S["belly_prefs"] , belly_prefs)
|
||||
|
||||
cit_character_pref_save(S)
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/obj/item/clothing/gloves/tackler
|
||||
name = "gripper gloves"
|
||||
desc = "Special gloves that manipulate the blood vessels in the wearer's hands, granting them the ability to launch headfirst into walls."
|
||||
icon_state = "tackle"
|
||||
item_state = "tackle"
|
||||
transfer_prints = TRUE
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
resistance_flags = NONE
|
||||
//custom_premium_price = 350
|
||||
/// For storing our tackler datum so we can remove it after
|
||||
var/datum/component/tackler
|
||||
/// See: [/datum/component/tackler/var/stamina_cost]
|
||||
var/tackle_stam_cost = 25
|
||||
/// See: [/datum/component/tackler/var/base_knockdown]
|
||||
var/base_knockdown = 1 SECONDS
|
||||
/// See: [/datum/component/tackler/var/range]
|
||||
var/tackle_range = 4
|
||||
/// See: [/datum/component/tackler/var/min_distance]
|
||||
var/min_distance = 0
|
||||
/// See: [/datum/component/tackler/var/speed]
|
||||
var/tackle_speed = 1
|
||||
/// See: [/datum/component/tackler/var/skill_mod]
|
||||
var/skill_mod = 1
|
||||
|
||||
/obj/item/clothing/gloves/tackler/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(slot == ITEM_SLOT_GLOVES)
|
||||
var/mob/living/carbon/human/H = user
|
||||
tackler = H.AddComponent(/datum/component/tackler, stamina_cost=tackle_stam_cost, base_knockdown = base_knockdown, range = tackle_range, speed = tackle_speed, skill_mod = skill_mod, min_distance = min_distance)
|
||||
|
||||
/obj/item/clothing/gloves/tackler/dropped(mob/user)
|
||||
. = ..()
|
||||
if(tackler)
|
||||
qdel(tackler)
|
||||
|
||||
/obj/item/clothing/gloves/tackler/dolphin
|
||||
name = "dolphin gloves"
|
||||
desc = "Sleek, aerodynamic gripper gloves that are less effective at actually performing takedowns, but more effective at letting the user sail through the hallways and cause accidents."
|
||||
icon_state = "tackledolphin"
|
||||
item_state = "tackledolphin"
|
||||
|
||||
tackle_stam_cost = 15
|
||||
base_knockdown = 0.5 SECONDS
|
||||
tackle_range = 5
|
||||
tackle_speed = 2
|
||||
min_distance = 2
|
||||
skill_mod = -2
|
||||
|
||||
/obj/item/clothing/gloves/tackler/combat
|
||||
name = "gorilla gloves"
|
||||
desc = "Premium quality combative gloves, heavily reinforced to give the user an edge in close combat tackles, though they are more taxing to use than normal gripper gloves. Fireproof to boot!"
|
||||
icon_state = "combat"
|
||||
item_state = "blackgloves"
|
||||
|
||||
tackle_stam_cost = 35
|
||||
base_knockdown = 1.5 SECONDS
|
||||
tackle_range = 5
|
||||
skill_mod = 3
|
||||
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
resistance_flags = NONE
|
||||
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated
|
||||
name = "guerrilla gloves"
|
||||
desc = "Superior quality combative gloves, good for performing tackle takedowns as well as absorbing electrical shocks."
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
|
||||
/obj/item/clothing/gloves/tackler/rocket
|
||||
name = "rocket gloves"
|
||||
desc = "The ultimate in high risk, high reward, perfect for when you need to stop a criminal from fifty feet away or die trying. Banned in most Spinward gridiron football and rugby leagues."
|
||||
icon_state = "tacklerocket"
|
||||
item_state = "tacklerocket"
|
||||
|
||||
tackle_stam_cost = 50
|
||||
base_knockdown = 2 SECONDS
|
||||
tackle_range = 10
|
||||
min_distance = 7
|
||||
tackle_speed = 6
|
||||
skill_mod = 7
|
||||
|
||||
/obj/item/clothing/gloves/tackler/offbrand
|
||||
name = "improvised gripper gloves"
|
||||
desc = "Ratty looking fingerless gloves wrapped with sticky tape. Beware anyone wearing these, for they clearly have no shame and nothing to lose."
|
||||
icon_state = "fingerless"
|
||||
item_state = "fingerless"
|
||||
|
||||
tackle_stam_cost = 30
|
||||
base_knockdown = 1.75 SECONDS
|
||||
min_distance = 2
|
||||
skill_mod = -1
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
uniform = /obj/item/clothing/under/rank/centcom/officer
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset/headset_cent/alt
|
||||
|
||||
/datum/outfit/ert/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
@@ -69,8 +69,8 @@
|
||||
id = /obj/item/card/id/ert/Security
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/ert/sec
|
||||
glasses = /obj/item/clothing/glasses/hud/security/sunglasses
|
||||
back = /obj/item/storage/backpack/security
|
||||
belt = /obj/item/storage/belt/security/full
|
||||
back = /obj/item/storage/backpack/security
|
||||
backpack_contents = list(/obj/item/storage/box/engineer=1,\
|
||||
/obj/item/storage/box/handcuffs=1,\
|
||||
/obj/item/clothing/mask/gas/sechailer=1,\
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
uniform = /obj/item/clothing/under/rank/centcom/commander
|
||||
suit = /obj/item/clothing/suit/armor/bulletproof
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset/headset_cent/commander
|
||||
glasses = /obj/item/clothing/glasses/eyepatch
|
||||
mask = /obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
@@ -234,7 +234,7 @@
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
suit = /obj/item/clothing/suit/space/officer
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
glasses = /obj/item/clothing/glasses/thermal/eyepatch
|
||||
ears = /obj/item/radio/headset/headset_cent/commander
|
||||
mask = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
@@ -316,7 +316,7 @@
|
||||
uniform = /obj/item/clothing/under/costume/soviet
|
||||
head = /obj/item/clothing/head/pirate/captain
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
ears = /obj/item/radio/headset/headset_cent
|
||||
glasses = /obj/item/clothing/glasses/thermal/eyepatch
|
||||
suit = /obj/item/clothing/suit/pirate/captain
|
||||
@@ -372,7 +372,7 @@
|
||||
uniform = /obj/item/clothing/under/color/green
|
||||
suit = /obj/item/clothing/suit/space/hardsuit/deathsquad
|
||||
shoes = /obj/item/clothing/shoes/combat/swat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
mask = /obj/item/clothing/mask/gas/sechailer/swat
|
||||
glasses = /obj/item/clothing/glasses/hud/toggle/thermal
|
||||
back = /obj/item/storage/backpack/security
|
||||
@@ -431,7 +431,7 @@
|
||||
glasses = /obj/item/clothing/glasses/debug
|
||||
ears = /obj/item/radio/headset/headset_cent/commander
|
||||
mask = /obj/item/clothing/mask/gas/welding/up
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
belt = /obj/item/storage/belt/utility/chief/full
|
||||
l_pocket = /obj/item/gun/magic/wand/resurrection/debug
|
||||
r_pocket = /obj/item/gun/magic/wand/death/debug
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
name = "Syndicate VR Operative - Basic"
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
shoes = /obj/item/clothing/shoes/combat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
gloves = /obj/item/clothing/gloves/tackler/combat/insulated
|
||||
back = /obj/item/storage/backpack
|
||||
id = /obj/item/card/id/syndicate
|
||||
belt = /obj/item/gun/ballistic/automatic/pistol
|
||||
|
||||
@@ -408,7 +408,6 @@
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/syndi/owl
|
||||
mutantrace_variation = STYLE_DIGITIGRADE
|
||||
|
||||
|
||||
//Wizard hardsuit
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
@@ -473,6 +472,7 @@
|
||||
name = "medical hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Built with lightweight materials for easier movement."
|
||||
item_state = "medical_hardsuit"
|
||||
slowdown = 0.8
|
||||
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/firstaid, /obj/item/healthanalyzer, /obj/item/stack/medical)
|
||||
armor = list("melee" = 30, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 100, "rad" = 60, "fire" = 60, "acid" = 75)
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/medical
|
||||
@@ -748,63 +748,20 @@
|
||||
allowed = null
|
||||
armor = list("melee" = 30, "bullet" = 15, "laser" = 30, "energy" = 10, "bomb" = 10, "bio" = 100, "rad" = 50, "fire" = 100, "acid" = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
var/current_charges = 3
|
||||
var/max_charges = 3 //How many charges total the shielding has
|
||||
var/current_charges //if null, will default to max_chargs
|
||||
var/recharge_delay = 200 //How long after we've been shot before we can start recharging. 20 seconds here
|
||||
var/recharge_cooldown = 0 //Time since we've last been shot
|
||||
var/recharge_rate = 1 //How quickly the shield recharges once it starts charging
|
||||
var/shield_state = "shield-old"
|
||||
var/shield_on = "shield-old"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/Initialize()
|
||||
. = ..()
|
||||
if(!allowed)
|
||||
allowed = GLOB.advanced_hardsuit_allowed
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/check_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(current_charges > 0)
|
||||
block_return[BLOCK_RETURN_NORMAL_BLOCK_CHANCE] = 100
|
||||
block_return[BLOCK_RETURN_BLOCK_CAPACITY] = (block_return[BLOCK_RETURN_BLOCK_CAPACITY] || 0) + current_charges
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
recharge_cooldown = world.time + recharge_delay
|
||||
if(current_charges > 0)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
owner.visible_message("<span class='danger'>[owner]'s shields deflect [attack_text] in a shower of sparks!</span>")
|
||||
current_charges--
|
||||
if(recharge_rate)
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(current_charges <= 0)
|
||||
owner.visible_message("[owner]'s shield overloads!")
|
||||
shield_state = "broken"
|
||||
owner.update_inv_wear_suit()
|
||||
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return BLOCK_NONE
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/process()
|
||||
if(world.time > recharge_cooldown && current_charges < max_charges)
|
||||
current_charges = CLAMP((current_charges + recharge_rate), 0, max_charges)
|
||||
playsound(loc, 'sound/magic/charge.ogg', 50, 1)
|
||||
if(current_charges == max_charges)
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
shield_state = "[shield_on]"
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/C = loc
|
||||
C.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/ComponentInitialize()
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/file2use = style_flags & STYLE_ALL_TAURIC ? 'modular_citadel/icons/mob/64x32_effects.dmi' : 'icons/effects/effects.dmi'
|
||||
. += mutable_appearance(file2use, shield_state, MOB_LAYER + 0.01)
|
||||
AddComponent(/datum/component/shielded, current_charges, max_charges, recharge_delay, recharge_rate, ITEM_SLOT_OCLOTHING, shield_state)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/shielded
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
@@ -833,7 +790,6 @@
|
||||
hardsuit_type = "ert_security"
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/ctf/red
|
||||
shield_state = "shield-red"
|
||||
shield_on = "shield-red"
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/ctf/blue
|
||||
name = "blue shielded hardsuit"
|
||||
@@ -896,7 +852,6 @@
|
||||
item_state = "swat_suit"
|
||||
hardsuit_type = "syndi"
|
||||
max_charges = 4
|
||||
current_charges = 4
|
||||
recharge_delay = 15
|
||||
armor = list("melee" = 80, "bullet" = 80, "laser" = 50, "energy" = 50, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
|
||||
strip_delay = 130
|
||||
|
||||
@@ -199,10 +199,9 @@
|
||||
icon_state = "battlemage"
|
||||
item_state = "battlemage"
|
||||
recharge_rate = 0
|
||||
max_charges = INFINITY
|
||||
current_charges = 15
|
||||
recharge_cooldown = INFINITY
|
||||
shield_state = "shield-red"
|
||||
shield_on = "shield-red"
|
||||
min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT
|
||||
max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
|
||||
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/shielded/wizard
|
||||
@@ -243,6 +242,7 @@
|
||||
if(!istype(W))
|
||||
to_chat(user, "<span class='warning'>The rune can only be used on battlemage armour!</span>")
|
||||
return
|
||||
W.current_charges += 8
|
||||
to_chat(user, "<span class='notice'>You charge \the [W]. It can now absorb [W.current_charges] hits.</span>")
|
||||
var/datum/component/shielded/S = GetComponent(/datum/component/shielded)
|
||||
S.adjust_charges(8)
|
||||
to_chat(user, "<span class='notice'>You charge \the [W]. It can now absorb [S.charges] hits.</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
|
||||
if(accessory_overlay)
|
||||
. += accessory_overlay
|
||||
|
||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
|
||||
if((has_sensor == BROKEN_SENSORS) && istype(I, /obj/item/stack/cable_coil))
|
||||
@@ -99,8 +101,7 @@
|
||||
if((flags_inv & HIDEACCESSORY) || (A.flags_inv & HIDEACCESSORY))
|
||||
return TRUE
|
||||
|
||||
var/accessory_color = attached_accessory.icon_state
|
||||
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', "[accessory_color]")
|
||||
accessory_overlay = mutable_appearance('icons/mob/clothing/accessories.dmi', "attached_accessory.icon_state")
|
||||
accessory_overlay.alpha = attached_accessory.alpha
|
||||
accessory_overlay.color = attached_accessory.color
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/clothing/under/dress/skirt
|
||||
/obj/item/clothing/under/dress
|
||||
mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON
|
||||
|
||||
/obj/item/clothing/under/dress/skirt
|
||||
@@ -182,7 +182,6 @@
|
||||
icon_state = "bride_white"
|
||||
item_state = "bride_white"
|
||||
can_adjust = FALSE
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/under/dress/wedding/orange
|
||||
name = "orange wedding dress"
|
||||
@@ -213,7 +212,6 @@
|
||||
desc = "A fancy skirt made with polychromic threads."
|
||||
icon_state = "polyskirt"
|
||||
item_state = "rainbow"
|
||||
mutantrace_variation = NONE
|
||||
var/list/poly_colors = list("#FFFFFF", "#F08080", "#808080")
|
||||
|
||||
/obj/item/clothing/under/dress/skirt/polychromic/ComponentInitialize()
|
||||
@@ -226,5 +224,4 @@
|
||||
icon_state = "polypleat"
|
||||
item_state = "rainbow"
|
||||
body_parts_covered = CHEST|GROIN|ARMS
|
||||
mutantrace_variation = NONE
|
||||
poly_colors = list("#8CC6FF", "#808080", "#FF3535")
|
||||
|
||||
@@ -57,8 +57,7 @@
|
||||
icon_state = "tactifool"
|
||||
item_state = "bl_suit"
|
||||
has_sensor = TRUE
|
||||
mutantrace_variation = NONE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
|
||||
|
||||
/obj/item/clothing/under/syndicate/sniper
|
||||
name = "Tactical turtleneck suit"
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
/obj/item/clothing/under/trek/medsci/next
|
||||
desc = "The uniform worn by medsci officers. This one's from the mid 2360s."
|
||||
icon_state = "trek_next_medsci"
|
||||
item_state = "b_suit"
|
||||
|
||||
|
||||
//ENT
|
||||
@@ -67,35 +68,51 @@
|
||||
/obj/item/clothing/under/trek/command/voy
|
||||
desc = "The uniform worn by command officers of the 2370s."
|
||||
icon_state = "trek_voy_command"
|
||||
item_state = "trek_voy_command"
|
||||
item_state = "r_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/engsec/voy
|
||||
desc = "The uniform worn by operations officers of the 2370s."
|
||||
icon_state = "trek_voy_engsec"
|
||||
item_state = "trek_voy_engsec"
|
||||
item_state = "y_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/medsci/voy
|
||||
desc = "The uniform worn by medsci officers of the 2370s."
|
||||
icon_state = "trek_voy_medsci"
|
||||
item_state = "trek_voy_medsci"
|
||||
item_state = "b_suit"
|
||||
|
||||
|
||||
//DS9
|
||||
/obj/item/clothing/under/trek/command/ds9
|
||||
desc = "The uniform worn by command officers of the 2380s."
|
||||
icon_state = "trek_ds9_command"
|
||||
item_state = "trek_ds9_command"
|
||||
item_state = "r_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/engsec/ds9
|
||||
desc = "The uniform worn by operations officers of the 2380s."
|
||||
icon_state = "trek_ds9_engsec"
|
||||
item_state = "trek_ds9_engsec"
|
||||
item_state = "y_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/medsci/ds9
|
||||
desc = "The uniform undershirt worn by medsci officers of the 2380s."
|
||||
icon_state = "trek_ds9_medsci"
|
||||
item_state = "trek_ds9_medsci"
|
||||
item_state = "b_suit"
|
||||
|
||||
//The Motion Picture
|
||||
/obj/item/clothing/under/trek/fedutil
|
||||
name = "federation utility uniform"
|
||||
desc = "The uniform worn by United Federation enlisted crew members in 2285s."
|
||||
icon_state = "trek_tmp_enlist"
|
||||
item_state = "r_suit"
|
||||
|
||||
/obj/item/clothing/under/trek/fedutil/trainee
|
||||
name = "federation trainee utility uniform"
|
||||
desc = "The uniform worn by United Federation enlisted trainees in 2285s."
|
||||
icon_state = "trek_tmp_trainee"
|
||||
|
||||
/obj/item/clothing/under/trek/fedutil/service
|
||||
name = "federation service uniform"
|
||||
desc = "The uniform worn by United Federation enlists for service work in 2285s."
|
||||
icon_state = "trek_tmp_service"
|
||||
|
||||
//Q
|
||||
/obj/item/clothing/under/trek/Q
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/T = pick(turfs)
|
||||
new /datum/spacevine_controller(T) //spawn a controller at turf
|
||||
new /datum/spacevine_controller(T, pick(subtypesof(/datum/spacevine_mutation)), rand(30,100), rand(5,10), src) //spawn a controller at turf with randomized stats and a single random mutation
|
||||
|
||||
|
||||
/datum/spacevine_mutation
|
||||
@@ -227,13 +227,13 @@
|
||||
quality = NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/thorns/on_cross(obj/structure/spacevine/holder, mob/living/crosser)
|
||||
if(prob(severity) && istype(crosser) && !isvineimmune(holder))
|
||||
if(prob(severity) && istype(crosser) && !isvineimmune(crosser))
|
||||
var/mob/living/M = crosser
|
||||
M.adjustBruteLoss(5)
|
||||
to_chat(M, "<span class='alert'>You cut yourself on the thorny vines.</span>")
|
||||
|
||||
/datum/spacevine_mutation/thorns/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
|
||||
if(prob(severity) && istype(hitter) && !isvineimmune(holder))
|
||||
if(prob(severity) && istype(hitter) && !isvineimmune(hitter))
|
||||
var/mob/living/M = hitter
|
||||
M.adjustBruteLoss(5)
|
||||
to_chat(M, "<span class='alert'>You cut yourself on the thorny vines.</span>")
|
||||
@@ -251,7 +251,7 @@
|
||||
holder.obj_integrity = holder.max_integrity
|
||||
|
||||
/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
|
||||
if(I.get_sharpness())
|
||||
if(I?.get_sharpness())
|
||||
. = expected_damage * 0.5
|
||||
else
|
||||
. = expected_damage
|
||||
@@ -344,16 +344,17 @@
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/weapons/slash.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/slash.ogg', 50, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/spacevine/Crossed(mob/crosser)
|
||||
if(isliving(crosser))
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_cross(src, crosser)
|
||||
/obj/structure/spacevine/Crossed(atom/movable/AM)
|
||||
if(!isliving(AM))
|
||||
return
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
SM.on_cross(src, AM)
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/structure/spacevine/attack_hand(mob/user)
|
||||
@@ -378,10 +379,9 @@
|
||||
var/list/vine_mutations_list
|
||||
var/mutativeness = 1
|
||||
|
||||
/datum/spacevine_controller/New(turf/location, list/muts, potency, production)
|
||||
/datum/spacevine_controller/New(turf/location, list/muts, potency, production, datum/round_event/event = null)
|
||||
vines = list()
|
||||
growth_queue = list()
|
||||
spawn_spacevine_piece(location, null, muts)
|
||||
START_PROCESSING(SSobj, src)
|
||||
vine_mutations_list = list()
|
||||
init_subtypes(/datum/spacevine_mutation/, vine_mutations_list)
|
||||
@@ -428,6 +428,7 @@
|
||||
for(var/datum/spacevine_mutation/SM in SV.mutations)
|
||||
SM.on_birth(SV)
|
||||
location.Entered(SV)
|
||||
return SV
|
||||
|
||||
/datum/spacevine_controller/proc/VineDestroyed(obj/structure/spacevine/S)
|
||||
S.master = null
|
||||
@@ -531,14 +532,13 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(isvineimmune(mover))
|
||||
. = TRUE
|
||||
else
|
||||
. = ..()
|
||||
return TRUE
|
||||
|
||||
/proc/isvineimmune(atom/A)
|
||||
. = FALSE
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(("vines" in M.faction) || ("plants" in M.faction))
|
||||
. = TRUE
|
||||
return TRUE
|
||||
return FALSE
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!(ismecha(M) && mech_sized))
|
||||
return
|
||||
|
||||
if(ismovableatom(M))
|
||||
if(ismovable(M))
|
||||
if(GLOB.portals.len)
|
||||
var/obj/effect/portal/P = pick(GLOB.portals)
|
||||
if(P && isturf(P.loc))
|
||||
|
||||
@@ -396,6 +396,16 @@
|
||||
list_reagents = list(/datum/reagent/consumable/orangejuice = 100)
|
||||
foodtype = FRUIT| BREAKFAST
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/bio_carton
|
||||
name = "small carton box"
|
||||
desc = "A small biodegradable carton box made from plant biomatter."
|
||||
icon_state = "eco_box"
|
||||
item_state = "carton"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
|
||||
volume = 50
|
||||
isGlass = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/bottle/cream
|
||||
name = "milk cream"
|
||||
desc = "It's cream. Made from milk. What else did you think you'd find in there?"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
var/foodtype = NONE
|
||||
var/last_check_time
|
||||
var/food_quality = 50
|
||||
|
||||
/obj/item/reagent_containers/food/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -23,6 +24,9 @@
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/reagent_containers/food/proc/adjust_food_quality(new_quality)
|
||||
food_quality = clamp(new_quality,0,100)
|
||||
|
||||
/obj/item/reagent_containers/food/proc/checkLiked(var/fraction, mob/M)
|
||||
if(last_check_time + 50 < world.time)
|
||||
if(ishuman(M))
|
||||
@@ -32,13 +36,13 @@
|
||||
to_chat(H,"<span class='warning'>What the hell was that thing?!</span>")
|
||||
H.adjust_disgust(25 + 30 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "toxic_food", /datum/mood_event/disgusting_food)
|
||||
else if(foodtype & H.dna.species.disliked_food)
|
||||
else if((foodtype & H.dna.species.disliked_food) || food_quality <= 30)
|
||||
to_chat(H,"<span class='notice'>That didn't taste very good...</span>")
|
||||
H.adjust_disgust(11 + 15 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food)
|
||||
else if(foodtype & H.dna.species.liked_food)
|
||||
else if(((foodtype & H.dna.species.liked_food) && food_quality >= 50) || food_quality >= 70) //you like food of high quality, and food of regular quality you have a preference for
|
||||
to_chat(H,"<span class='notice'>I love this taste!</span>")
|
||||
H.adjust_disgust(-5 + -2.5 * fraction)
|
||||
H.adjust_disgust(-5 + (-2.5 * food_quality/50) + -2.5 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food)
|
||||
else
|
||||
if(foodtype & H.dna.species.toxic_food)
|
||||
@@ -48,4 +52,4 @@
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "breakfast", /datum/mood_event/breakfast)
|
||||
last_check_time = world.time
|
||||
|
||||
#undef STOP_SERVING_BREAKFAST
|
||||
#undef STOP_SERVING_BREAKFAST
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
var/list/ingredients = list()
|
||||
var/ingredients_placement = INGREDIENTS_FILL
|
||||
var/customname = "custom"
|
||||
var/total_quality = 0 //quality of all ingredients added together
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/customizable/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -56,6 +57,9 @@
|
||||
S.reagents.trans_to(src,min(S.reagents.total_volume, 15)) //limit of 15, we don't want our custom food to be completely filled by just one ingredient with large reagent volume.
|
||||
foodtype |= S.foodtype
|
||||
update_snack_overlays(S)
|
||||
//quality of customised food is average of the ingredient's qualities
|
||||
total_quality += S.food_quality
|
||||
food_quality = total_quality / length(ingredients)
|
||||
to_chat(user, "<span class='notice'>You add the [I.name] to the [name].</span>")
|
||||
update_name(S)
|
||||
else
|
||||
|
||||
@@ -153,6 +153,12 @@ All foods are distributed among various categories. Use common sense.
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/examine(mob/user)
|
||||
. = ..()
|
||||
if(food_quality >= 70)
|
||||
. += "It is of a high quality."
|
||||
else
|
||||
if(food_quality <= 30)
|
||||
. += "It is of a low quality."
|
||||
|
||||
if(bitecount == 0)
|
||||
return
|
||||
else if(bitecount == 1)
|
||||
@@ -283,9 +289,9 @@ All foods are distributed among various categories. Use common sense.
|
||||
S.create_reagents(S.volume, reagent_flags, reagent_value)
|
||||
if(reagents)
|
||||
reagents.trans_to(S, reagents.total_volume)
|
||||
if(S.bonus_reagents && S.bonus_reagents.len)
|
||||
if(cooking_efficiency && length(S.bonus_reagents))
|
||||
for(var/r_id in S.bonus_reagents)
|
||||
var/amount = S.bonus_reagents[r_id] * cooking_efficiency
|
||||
var/amount = round(S.bonus_reagents[r_id] * cooking_efficiency)
|
||||
if(r_id == /datum/reagent/consumable/nutriment || r_id == /datum/reagent/consumable/nutriment/vitamin)
|
||||
S.reagents.add_reagent(r_id, amount, tastes)
|
||||
else
|
||||
@@ -296,6 +302,10 @@ All foods are distributed among various categories. Use common sense.
|
||||
var/obj/item/result
|
||||
if(cooked_type)
|
||||
result = new cooked_type(T)
|
||||
//if the result is food, set its food quality to the original food item's quality
|
||||
if(isfood(result))
|
||||
var/obj/item/reagent_containers/food/food_output = result
|
||||
food_output.adjust_food_quality(food_quality + M.quality_increase)
|
||||
if(istype(M))
|
||||
initialize_cooked_food(result, M.efficiency)
|
||||
else
|
||||
|
||||
@@ -197,6 +197,7 @@
|
||||
icon = 'icons/obj/food/food.dmi'
|
||||
icon_state = ""
|
||||
bitesize = 2
|
||||
var/fried_garbage = FALSE //did you really fry a fire extinguisher?
|
||||
|
||||
GLOBAL_VAR_INIT(frying_hardmode, TRUE)
|
||||
GLOBAL_VAR_INIT(frying_bad_chem_add_volume, TRUE)
|
||||
@@ -227,21 +228,13 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
|
||||
item_flags = fried.item_flags
|
||||
obj_flags = fried.obj_flags
|
||||
|
||||
if(istype(fried, /obj/item/reagent_containers/food/snacks))
|
||||
if(isfood(fried))
|
||||
fried.reagents.trans_to(src, fried.reagents.total_volume)
|
||||
qdel(fried)
|
||||
else
|
||||
fried.forceMove(src)
|
||||
trash = fried
|
||||
if(!istype(fried, /obj/item/reagent_containers/food) && GLOB.frying_hardmode && GLOB.frying_bad_chems.len)
|
||||
var/R = rand(1, GLOB.frying_bad_chems.len)
|
||||
var/bad_chem = GLOB.frying_bad_chems[R]
|
||||
var/bad_chem_amount = GLOB.frying_bad_chems[bad_chem]
|
||||
if(GLOB.frying_bad_chem_add_volume)
|
||||
reagents.maximum_volume += bad_chem_amount + 2 //Added room for condensed cooking oil
|
||||
reagents.add_reagent(bad_chem, bad_chem_amount)
|
||||
//All fried inedible items also get condensed cooking oil added, which induces minor vomiting and heart damage
|
||||
reagents.add_reagent(/datum/reagent/toxin/condensed_cooking_oil, 2)
|
||||
fried_garbage = TRUE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/deepfryholder/Destroy()
|
||||
if(trash)
|
||||
@@ -249,6 +242,13 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/deepfryholder/On_Consume(mob/living/eater)
|
||||
if(fried_garbage && GLOB.frying_hardmode && GLOB.frying_bad_chems.len)
|
||||
var/R = rand(1, GLOB.frying_bad_chems.len)
|
||||
var/bad_chem = GLOB.frying_bad_chems[R]
|
||||
var/bad_chem_amount = GLOB.frying_bad_chems[bad_chem]
|
||||
eater.reagents.add_reagent(bad_chem, bad_chem_amount)
|
||||
//All fried inedible items also get condensed cooking oil added, which induces minor vomiting and heart damage
|
||||
eater.reagents.add_reagent(/datum/reagent/toxin/condensed_cooking_oil, 2)
|
||||
if(trash)
|
||||
QDEL_NULL(trash)
|
||||
..()
|
||||
@@ -259,18 +259,22 @@ GLOBAL_LIST_INIT(frying_bad_chems, list(
|
||||
add_atom_colour(rgb(166,103,54), FIXED_COLOUR_PRIORITY)
|
||||
name = "lightly-fried [name]"
|
||||
desc = "[desc] It's been lightly fried in a deep fryer."
|
||||
adjust_food_quality(food_quality - 5)
|
||||
if(16 to 49)
|
||||
add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
|
||||
name = "fried [name]"
|
||||
desc = "[desc] It's been fried, increasing its tastiness value by [rand(1, 75)]%."
|
||||
adjust_food_quality(food_quality - 10)
|
||||
if(50 to 59)
|
||||
add_atom_colour(rgb(63,23,4), FIXED_COLOUR_PRIORITY)
|
||||
name = "deep-fried [name]"
|
||||
desc = "[desc] Deep-fried to perfection."
|
||||
adjust_food_quality(food_quality) //we shouldn't punish perfection in the fried arts
|
||||
if(60 to INFINITY)
|
||||
add_atom_colour(rgb(33,19,9), FIXED_COLOUR_PRIORITY)
|
||||
name = "the physical manifestation of the very concept of fried foods"
|
||||
desc = "A heavily-fried...something. Who can tell anymore?"
|
||||
adjust_food_quality(0) //good job, you're truly the best cook.
|
||||
filling_color = color
|
||||
foodtype |= FRIED
|
||||
|
||||
|
||||
@@ -222,36 +222,6 @@
|
||||
tastes = list("meat" = 1, "onions" = 1, "garlic" = 1)
|
||||
foodtype = MEAT
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube
|
||||
name = "monkey cube"
|
||||
desc = "Just add water!"
|
||||
icon_state = "monkeycube"
|
||||
bitesize = 12
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 2)
|
||||
filling_color = "#CD853F"
|
||||
tastes = list("the jungle" = 1, "bananas" = 1)
|
||||
foodtype = MEAT | SUGAR
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/On_Consume(mob/living/carbon/M)
|
||||
if(iscarbon(M))
|
||||
M.visible_message("[src] bursts out of [M]!</span>")
|
||||
M.emote("scream")
|
||||
M.DefaultCombatKnockdown(40)
|
||||
M.adjustBruteLoss(60)
|
||||
Expand()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/proc/Expand()
|
||||
var/mob/spammer = get_mob_by_key(fingerprintslast)
|
||||
var/mob/living/carbon/monkey/bananas = new(drop_location(), TRUE, spammer)
|
||||
if (!QDELETED(bananas))
|
||||
visible_message("<span class='notice'>[src] expands!</span>")
|
||||
bananas.log_message("Spawned via [src] at [AREACOORD(src)], Last attached mob: [key_name(spammer)].", LOG_ATTACK)
|
||||
else if (!spammer) // Visible message in case there are no fingerprints
|
||||
visible_message("<span class='notice'>[src] fails to expand!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/enchiladas
|
||||
name = "enchiladas"
|
||||
desc = "Viva La Mexico!"
|
||||
@@ -372,3 +342,70 @@
|
||||
bonus_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/consumable/nutriment/vitamin = 1)
|
||||
tastes = list("meat" = 3, "smokey sauce" = 1)
|
||||
foodtype = MEAT
|
||||
|
||||
////////////// Cubes //////////
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube
|
||||
name = "debug cube"
|
||||
desc = "Just add water!"
|
||||
icon_state = "monkeycube"
|
||||
bitesize = 12
|
||||
list_reagents = list(/datum/reagent/consumable/nutriment = 2)
|
||||
filling_color = "#CD853F"
|
||||
tastes = list("broken" = 1, "code" = 1)
|
||||
foodtype = MEAT | SUGAR
|
||||
var/dried_being = /mob/living/carbon/monkey //What the cube will spawn mob wise
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/On_Consume(mob/living/carbon/M)
|
||||
if(iscarbon(M))
|
||||
M.visible_message("[src] bursts out of [M]!</span>")
|
||||
M.emote("scream")
|
||||
M.DefaultCombatKnockdown(40)
|
||||
M.adjustBruteLoss(60)
|
||||
Expand()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/proc/Expand()
|
||||
var/mob/spammer = get_mob_by_key(fingerprintslast)
|
||||
var/mob/living/water = new dried_being(drop_location(), TRUE, spammer)
|
||||
if (!QDELETED(water))
|
||||
visible_message("<span class='notice'>[src] expands!</span>")
|
||||
water.log_message("Spawned via [src] at [AREACOORD(src)], Last attached mob: [key_name(spammer)].", LOG_ATTACK)
|
||||
else if (!spammer) // Visible message in case there are no fingerprints
|
||||
visible_message("<span class='notice'>[src] fails to expand!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/monkey
|
||||
name = "monkey cube"
|
||||
desc = "Just add water!"
|
||||
tastes = list("the jungle" = 1, "bananas" = 1)
|
||||
dried_being = /mob/living/carbon/monkey
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/beno
|
||||
name = "alien drone cube"
|
||||
desc = "Just add water and run!"
|
||||
tastes = list("the jungle" = 1, "acid" = 1)
|
||||
dried_being = /mob/living/carbon/alien/humanoid/drone
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/goat
|
||||
name = "goat cube"
|
||||
tastes = list("grass" = 1)
|
||||
dried_being = /mob/living/simple_animal/hostile/retaliate/goat
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/cow
|
||||
name = "cow cube"
|
||||
tastes = list("milk" = 1, "beef" = 1)
|
||||
dried_being = /mob/living/simple_animal/cow
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/cube/egg
|
||||
//Well eggs normally are able to hatch into small birds, this one does not.
|
||||
//Also in order to have a normal egg hatch you need a hen to lay the egg that is able to hatch, meaning this one is for on-demand hen needs.
|
||||
name = "egg cube thing"
|
||||
desc = "Just add water, hey wait a second..."
|
||||
icon_state = "egg"
|
||||
filling_color = "#F0E68C"
|
||||
cooked_type = /obj/item/reagent_containers/food/snacks/boiledegg
|
||||
list_reagents = list(/datum/reagent/consumable/eggyolk = 5)
|
||||
tastes = list("dried eggs" = 1, "confusion" = 1)
|
||||
dried_being = /mob/living/simple_animal/chicken
|
||||
|
||||
@@ -440,6 +440,40 @@
|
||||
filling_color = "#CD853F"
|
||||
tastes = list("meat" = 2, "dough" = 2, "laziness" = 1)
|
||||
foodtype = GRAIN
|
||||
var/list/cached_reagents_amount
|
||||
var/previous_typepath
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/donkpocket/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!cooked_type) //maploaded cooked donk pockets won't cool down anyway.
|
||||
desc += " This one will stay warm for a long time, great."
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/donkpocket/initialize_cooked_food(obj/item/reagent_containers/food/snacks/donkpocket/S, cooking_efficiency = 1)
|
||||
. = ..()
|
||||
if(istype(S))
|
||||
desc = initial(desc) //reset the desc since will now cool down.
|
||||
for(var/R in S.bonus_reagents)
|
||||
LAZYSET(S.cached_reagents_amount, R, S.reagents.get_reagent_amount(R))
|
||||
S.previous_typepath = type
|
||||
addtimer(CALLBACK(S, .proc/cool_down), 7 MINUTES) //canonically they reverted back to normal after 7 minutes.
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/donkpocket/proc/cool_down()
|
||||
if(!previous_typepath) //This shouldn't happen.
|
||||
qdel(src)
|
||||
return
|
||||
var/spoiled = FALSE
|
||||
for(var/R in cached_reagents_amount)
|
||||
var/amount = cached_reagents_amount[R]
|
||||
if(reagents.get_reagent_amount(R) < amount)
|
||||
spoiled = TRUE
|
||||
reagents.remove_reagent(R, amount) //no reagent duping please.
|
||||
var/obj/item/reagent_containers/food/snacks/donkpocket/D = new previous_typepath(drop_location())
|
||||
D.create_reagents(D.volume, reagent_flags, reagent_value)
|
||||
reagents.trans_to(D, reagents.total_volume)
|
||||
if(spoiled)
|
||||
D.cooked_type = null
|
||||
D.desc += " This one has gone cold and mushy, pretty unsuitable for cooking."
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/donkpocket/warm
|
||||
name = "warm Donk-pocket"
|
||||
|
||||
@@ -104,6 +104,12 @@ God bless America.
|
||||
else if(!frying && user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='notice'>You put [I] into [src].</span>")
|
||||
frying = new/obj/item/reagent_containers/food/snacks/deepfryholder(src, I)
|
||||
//setup food quality for item depending on if it's edible or not
|
||||
if(isfood(I))
|
||||
var/obj/item/reagent_containers/food/original_food = I
|
||||
frying.adjust_food_quality(original_food.food_quality) //food quality remains unchanged until degree of frying is calculated
|
||||
else
|
||||
frying.adjust_food_quality(10) //inedible fried item has low quality
|
||||
icon_state = "fryer_on"
|
||||
fry_loop.start()
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
break
|
||||
|
||||
if(href_list["portion"])
|
||||
portion = CLAMP(input("How much drink do you want to dispense per glass?") as num, 0, 50)
|
||||
portion = clamp(input("How much drink do you want to dispense per glass?") as num, 0, 50)
|
||||
|
||||
if(href_list["pour"] || href_list["m_pour"])
|
||||
if(glasses-- <= 0)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/gibtime = 40 // Time from starting until meat appears
|
||||
var/meat_produced = 0
|
||||
var/ignore_clothing = FALSE
|
||||
var/meat_quality = 35 //food_quality of meat produced
|
||||
|
||||
|
||||
/obj/machinery/gibber/Initialize()
|
||||
@@ -23,8 +24,10 @@
|
||||
/obj/machinery/gibber/RefreshParts()
|
||||
gibtime = 40
|
||||
meat_produced = 0
|
||||
meat_quality = 35 // unupgraded this means quality is 50, and max upgraded it is 95
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
meat_produced += B.rating
|
||||
meat_quality += B.rating * 15
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
gibtime -= 5 * M.rating
|
||||
if(M.rating >= 2)
|
||||
@@ -181,6 +184,7 @@
|
||||
|
||||
for (var/i=1 to meat_produced)
|
||||
var/obj/item/reagent_containers/food/snacks/meat/slab/newmeat = new typeofmeat
|
||||
newmeat.adjust_food_quality(meat_quality)
|
||||
newmeat.name = "[sourcename] [newmeat.name]"
|
||||
if(istype(newmeat))
|
||||
newmeat.subjectname = sourcename
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
var/broken = 0 // 0, 1 or 2 // How broken is it???
|
||||
var/max_n_of_items = 10
|
||||
var/efficiency = 0
|
||||
var/quality_increase = 5 // how much do we increase the quality of microwaved items
|
||||
var/productivity = 0
|
||||
var/datum/looping_sound/microwave/soundloop
|
||||
var/list/ingredients = list() // may only contain /atom/movables
|
||||
|
||||
@@ -43,11 +45,16 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/microwave/RefreshParts()
|
||||
efficiency = 0
|
||||
efficiency = 0.6
|
||||
productivity = 0
|
||||
max_n_of_items = 5
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
efficiency += M.rating
|
||||
efficiency += M.rating * 0.4
|
||||
productivity += M.rating
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
|
||||
max_n_of_items = 10 * M.rating
|
||||
quality_increase = M.rating * 5
|
||||
break
|
||||
|
||||
/obj/machinery/microwave/examine(mob/user)
|
||||
@@ -83,7 +90,7 @@
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
. += "<span class='notice'>The status display reads:</span>"
|
||||
. += "<span class='notice'>- Capacity: <b>[max_n_of_items]</b> items.<span>"
|
||||
. += "<span class='notice'>- Cook time reduced by <b>[(efficiency - 1) * 25]%</b>.<span>"
|
||||
. += "<span class='notice'>- Cook time reduced by <b>[(productivity - 1) * 25]%</b>.<span>"
|
||||
|
||||
/obj/machinery/microwave/update_icon_state()
|
||||
if(broken)
|
||||
@@ -240,7 +247,7 @@
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
return
|
||||
|
||||
if(prob(max((5 / efficiency) - 5, dirty * 5))) //a clean unupgraded microwave has no risk of failure
|
||||
if(prob(dirty * 5 / (5 * efficiency))) //a clean unupgraded microwave has no risk of failure
|
||||
muck()
|
||||
return
|
||||
for(var/obj/O in ingredients)
|
||||
@@ -285,7 +292,7 @@
|
||||
update_icon()
|
||||
loop(MICROWAVE_MUCK, 4)
|
||||
|
||||
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * efficiency, 2)) // standard wait is 10
|
||||
/obj/machinery/microwave/proc/loop(type, time, wait = max(12 - 2 * productivity, 2)) // standard wait is 10
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(type == MICROWAVE_PRE)
|
||||
pre_fail()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
playsound(src.loc, 'sound/machines/hiss.ogg', 50, 1)
|
||||
grinded -= required_grind
|
||||
for(var/i = 0, i < cube_production, i++)
|
||||
new /obj/item/reagent_containers/food/snacks/monkeycube(src.loc)
|
||||
new /obj/item/reagent_containers/food/snacks/cube/monkey(src.loc)
|
||||
to_chat(user, "<span class='notice'>The machine's display flashes that it has [grinded] monkeys worth of material left.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The machine needs at least [required_grind] monkey(s) worth of material to produce a monkey cube. It only has [grinded].</span>")
|
||||
|
||||
@@ -14,10 +14,13 @@
|
||||
var/processing = FALSE
|
||||
var/rating_speed = 1
|
||||
var/rating_amount = 1
|
||||
var/quality_increase = 5
|
||||
|
||||
/obj/machinery/processor/RefreshParts()
|
||||
quality_increase = 0
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
rating_amount = B.rating
|
||||
quality_increase += B.rating * 5
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
rating_speed = M.rating
|
||||
|
||||
@@ -28,8 +31,10 @@
|
||||
|
||||
/obj/machinery/processor/proc/process_food(datum/food_processor_process/recipe, atom/movable/what)
|
||||
if (recipe.output && loc && !QDELETED(src))
|
||||
var/obj/item/reagent_containers/food/food_input = what
|
||||
for(var/i = 0, i < rating_amount, i++)
|
||||
new recipe.output(drop_location())
|
||||
var/obj/item/reagent_containers/food/food_output = new recipe.output(drop_location())
|
||||
food_output.adjust_food_quality(food_input.food_quality + quality_increase)
|
||||
if (ismob(what))
|
||||
var/mob/themob = what
|
||||
themob.gib(TRUE,TRUE,TRUE)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
return
|
||||
else
|
||||
bomb_timer = input(user, "Set the [bomb] timer from [BOMB_TIMER_MIN] to [BOMB_TIMER_MAX].", bomb, bomb_timer) as num
|
||||
bomb_timer = CLAMP(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX)
|
||||
bomb_defused = FALSE
|
||||
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)] has trapped a [src] with [bomb] set to [bomb_timer * 2] seconds."
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
parts |= reqs
|
||||
|
||||
//////////////////////////////////////////FOOD MIXTURES////////////////////////////////////
|
||||
|
||||
/datum/chemical_reaction/tofu
|
||||
name = "Tofu"
|
||||
id = "tofu"
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/datum/reagent/consumable/sodiumchloride = 1,
|
||||
/datum/reagent/consumable/blackpepper = 1,
|
||||
/obj/item/reagent_containers/glass/bowl = 1,
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube = 1,
|
||||
/obj/item/reagent_containers/food/snacks/cube/monkey = 1,
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana = 1
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/soup/monkeysdelight
|
||||
|
||||
@@ -138,7 +138,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
|
||||
|
||||
/datum/chatOutput/proc/setMusicVolume(volume = "")
|
||||
if(volume)
|
||||
adminMusicVolume = CLAMP(text2num(volume), 0, 100)
|
||||
adminMusicVolume = clamp(text2num(volume), 0, 100)
|
||||
|
||||
//Sends client connection details to the chat to handle and save
|
||||
/datum/chatOutput/proc/sendClientData()
|
||||
|
||||
@@ -81,9 +81,7 @@
|
||||
ENABLE_BITFIELD(mob.flags_1, HOLOGRAM_1)
|
||||
if(isliving(mob))
|
||||
var/mob/living/L = mob
|
||||
L.feeding = FALSE
|
||||
L.devourable = FALSE
|
||||
L.digestable = FALSE
|
||||
L.vore_flags = 0
|
||||
return mob
|
||||
|
||||
/obj/effect/holodeck_effect/mobspawner/deactivate(var/obj/machinery/computer/holodeck/HC)
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/biogenerator/RefreshParts()
|
||||
var/E = 0
|
||||
var/P = 0
|
||||
var/max_storage = 40
|
||||
var/E = 0.5
|
||||
var/P = 0.5
|
||||
var/max_storage = 20
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
P += B.rating
|
||||
max_storage = 40 * B.rating
|
||||
P += B.rating * 0.5
|
||||
max_storage = max(20 * B.rating, max_storage)
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
E += M.rating
|
||||
E += M.rating * 0.5
|
||||
efficiency = E
|
||||
productivity = P
|
||||
max_items = max_storage
|
||||
@@ -196,7 +196,7 @@
|
||||
dat += "<A href='?src=[REF(src)];create=[D.id];amount=5'>x5</A>"
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
dat += "<A href='?src=[REF(src)];create=[D.id];amount=10'>x10</A>"
|
||||
dat += "([D.materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]/efficiency])<br>"
|
||||
dat += "([CEILING(D.materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]/efficiency, 1)])<br>"
|
||||
dat += "</div>"
|
||||
else
|
||||
dat += "<div class='statusDisplay'>No container inside, please insert container.</div>"
|
||||
@@ -214,12 +214,16 @@
|
||||
to_chat(usr, "<span class='warning'>The biogenerator is in the process of working.</span>")
|
||||
return
|
||||
var/S = 0
|
||||
var/total = 0
|
||||
for(var/obj/item/reagent_containers/food/snacks/grown/I in contents)
|
||||
S += 5
|
||||
if(I.reagents.get_reagent_amount(/datum/reagent/consumable/nutriment) < 0.1)
|
||||
points += 1*productivity
|
||||
else points += I.reagents.get_reagent_amount(/datum/reagent/consumable/nutriment)*10*productivity
|
||||
var/nutri_amount = I.reagents.get_reagent_amount(/datum/reagent/consumable/nutriment)
|
||||
if(nutri_amount < 0.1)
|
||||
total += 1*productivity
|
||||
else
|
||||
total += nutri_amount*10*productivity
|
||||
qdel(I)
|
||||
points += round(total)
|
||||
if(S)
|
||||
processing = TRUE
|
||||
update_icon()
|
||||
@@ -235,12 +239,13 @@
|
||||
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = TRUE)
|
||||
if(materials.len != 1 || materials[1] != SSmaterials.GetMaterialRef(/datum/material/biomass))
|
||||
return FALSE
|
||||
if (materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]*multiplier/efficiency > points)
|
||||
var/cost = CEILING(materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]*multiplier/efficiency, 1)
|
||||
if (cost > points)
|
||||
menustat = "nopoints"
|
||||
return FALSE
|
||||
else
|
||||
if(remove_points)
|
||||
points -= materials[SSmaterials.GetMaterialRef(/datum/material/biomass)]*multiplier/efficiency
|
||||
points -= cost
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
@@ -311,7 +316,7 @@
|
||||
else if(href_list["create"])
|
||||
var/amount = (text2num(href_list["amount"]))
|
||||
//Can't be outside these (if you change this keep a sane limit)
|
||||
amount = CLAMP(amount, 1, 50)
|
||||
amount = clamp(amount, 1, 50)
|
||||
var/id = href_list["create"]
|
||||
if(!stored_research.researched_designs.Find(id))
|
||||
//naughty naughty
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user