mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into zefix
This commit is contained in:
@@ -175,7 +175,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
//Handles repairs (and also upgrades).
|
||||
|
||||
/obj/item/clothing/suit/space/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal))
|
||||
if(istype(W,/obj/item/stack/sheet/plastic) || istype(W,/obj/item/stack/sheet/metal))
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
to_chat(user, "\red How do you intend to patch a hardsuit while someone is wearing it?")
|
||||
@@ -188,10 +188,10 @@ var/global/list/breach_burn_descriptors = list(
|
||||
var/obj/item/stack/sheet/P = W
|
||||
if(P.amount < 3)
|
||||
P.use(P.amount)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? P.amount : (P.amount*2) ), user)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/plastic) ? P.amount : (P.amount*2) ), user)
|
||||
else
|
||||
P.use(3)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/mineral/plastic) ? 3 : 5), user)
|
||||
repair_breaches(BURN, ( istype(P,/obj/item/stack/sheet/plastic) ? 3 : 5), user)
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
|
||||
@@ -135,12 +135,24 @@
|
||||
desc = "A paramedic EVA helmet. Used in the recovery of bodies from space."
|
||||
icon_state = "paramedic-eva-helmet"
|
||||
item_state = "paramedic-eva-helmet"
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/hats.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/suit/space/eva/paramedic
|
||||
name = "Paramedic EVA suit"
|
||||
icon_state = "paramedic-eva"
|
||||
item_state = "paramedic-eva"
|
||||
desc = "A paramedic EVA suit. Used in the recovery of bodies from space."
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/suit/space/eva
|
||||
name = "EVA suit"
|
||||
@@ -149,12 +161,13 @@
|
||||
desc = "A lightweight space suit with the basic ability to protect the wearer from the vacuum of space during emergencies."
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
species_restricted = list("exclude", "Diona", "Wryn")
|
||||
species_fit = list("Vox")
|
||||
species_fit = list("Vox", "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi',
|
||||
"Vulpkanin" = 'icons/mob/species/vulpkanin/suit.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi',
|
||||
"Vox" = 'icons/obj/clothing/species/vox/suits.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva
|
||||
@@ -166,9 +179,10 @@
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 20)
|
||||
flash_protect = 0
|
||||
species_restricted = list("exclude", "Diona", "Wryn")
|
||||
species_fit = list("Vox")
|
||||
species_fit = list("Vox", "Vulpkanin")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi'
|
||||
"Vox" = 'icons/mob/species/vox/helmet.dmi',
|
||||
"Vulpkanin" = 'icons/mob/species/vulpkanin/helmet.dmi'
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Vox" = 'icons/obj/clothing/species/vox/hats.dmi'
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
time = 150
|
||||
reqs = list(/obj/item/stack/rods = 3,
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/stack/sheet/mineral/plastic = 3,
|
||||
/obj/item/stack/sheet/plastic = 3,
|
||||
/obj/item/stack/sheet/wood = 5)
|
||||
tools = list(/obj/item/weapon/weldingtool,
|
||||
/obj/item/weapon/screwdriver)
|
||||
|
||||
@@ -17,7 +17,19 @@
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/T = pick(turfs)
|
||||
new/obj/effect/spacevine_controller(T) //spawn a controller at turf
|
||||
var/obj/effect/spacevine_controller/SC = new /obj/effect/spacevine_controller(T, , rand(30,70),rand(5,2)) //spawn a controller at turf
|
||||
|
||||
// Make the event start fun - give the vine a random hostile mutation
|
||||
if(SC.vines.len)
|
||||
SV = SC.vines[1]
|
||||
var/list/mutations = SC.mutations_list.Copy()
|
||||
while(mutations.len)
|
||||
var/datum/spacevine_mutation/SM = pick_n_take(mutations)
|
||||
if(SM.quality == NEGATIVE && !SM.nofun)
|
||||
SM.add_mutation_to_vinepiece(SV)
|
||||
break
|
||||
mutations.Cut()
|
||||
mutations = null
|
||||
|
||||
|
||||
/datum/spacevine_mutation
|
||||
@@ -25,11 +37,22 @@
|
||||
var/severity = 1
|
||||
var/hue
|
||||
var/quality
|
||||
// For stuff that isn't fun as a random-event vine
|
||||
var/nofun = FALSE
|
||||
|
||||
/datum/spacevine_mutation/proc/add_mutation_to_vinepiece(obj/effect/spacevine/holder)
|
||||
holder.mutations |= src
|
||||
holder.color = hue
|
||||
|
||||
/datum/spacevine_mutation/proc/remove_mutation_from_vinepiece(obj/effect/spacevine/holder)
|
||||
holder.mutations -= src
|
||||
var/datum/spacevine_mutation/oldmutation
|
||||
if(holder.mutations.len)
|
||||
oldmutation = pick(holder.mutations)
|
||||
holder.color = oldmutation.hue
|
||||
else
|
||||
holder.color = ""
|
||||
|
||||
/datum/spacevine_mutation/proc/process_mutation(obj/effect/spacevine/holder)
|
||||
return
|
||||
|
||||
@@ -136,6 +159,11 @@
|
||||
/datum/spacevine_mutation/space_covering/on_grow(obj/effect/spacevine/holder)
|
||||
process_mutation(holder)
|
||||
|
||||
/datum/spacevine_mutation/space_covering/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(target.type == /turf/space && !locate(/obj/effect/spacevine) in target)
|
||||
holder.master.spawn_spacevine_piece(target, holder)
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/space_covering/process_mutation(obj/effect/spacevine/holder)
|
||||
var/turf/T = get_turf(holder)
|
||||
if(is_type_in_typecache(T, coverable_turfs))
|
||||
@@ -155,7 +183,12 @@
|
||||
|
||||
/datum/spacevine_mutation/bluespace/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(holder.energy > 1 && !locate(/obj/effect/spacevine) in target)
|
||||
// Lose bluespace upon piercing a single tile, and drop it from our own mutations too
|
||||
// Representing a loss in "high potential"
|
||||
// also conveniently prevents this from spreading too crazily
|
||||
remove_mutation_from_vinepiece(holder)
|
||||
holder.master.spawn_spacevine_piece(target, holder)
|
||||
playsound(holder, 'sound/misc/interference.ogg', 50, 1)
|
||||
. = TRUE
|
||||
|
||||
/datum/spacevine_mutation/light
|
||||
@@ -190,6 +223,8 @@
|
||||
hue = "#ff0000"
|
||||
quality = NEGATIVE
|
||||
severity = 2
|
||||
// kaboom events aren't fun
|
||||
nofun = TRUE
|
||||
|
||||
/datum/spacevine_mutation/explosive/on_explosion(explosion_severity, obj/effect/spacevine/holder)
|
||||
if(explosion_severity < 3)
|
||||
@@ -234,6 +269,15 @@
|
||||
quality = NEGATIVE
|
||||
|
||||
/datum/spacevine_mutation/aggressive_spread/on_spread(obj/effect/spacevine/holder, turf/target)
|
||||
if(istype(target, /turf/simulated/wall/r_wall))
|
||||
// Too tough to pierce - should lead to interesting spread patterns
|
||||
return
|
||||
// Bust through windows or other stuff blocking the way
|
||||
if(!target.Enter(holder))
|
||||
for(var/atom/movable/AM in target)
|
||||
if(istype(AM, /obj/effect/spacevine) || !AM.density)
|
||||
continue
|
||||
AM.ex_act(severity)
|
||||
target.ex_act(severity) // vine immunity handled at /mob/ex_act
|
||||
. = TRUE
|
||||
|
||||
@@ -348,7 +392,7 @@
|
||||
name = "plasticine"
|
||||
hue = "#222288"
|
||||
mineral_results = list(
|
||||
/obj/item/stack/sheet/mineral/plastic = 1
|
||||
/obj/item/stack/sheet/plastic = 1
|
||||
)
|
||||
|
||||
/datum/spacevine_mutation/mineral/wood
|
||||
@@ -406,8 +450,8 @@
|
||||
if(!master.vines.len)
|
||||
var/obj/item/seeds/kudzu/KZ = new(loc)
|
||||
KZ.mutations |= mutations
|
||||
KZ.set_potency(master.mutativeness * 10)
|
||||
KZ.set_production((master.spread_cap / initial(master.spread_cap)) * 5)
|
||||
KZ.set_potency(10 ** sqrt(master.mutativeness))
|
||||
KZ.set_production(10 - (master.spread_cap / 10))
|
||||
qdel(master)
|
||||
master = null
|
||||
mutations.Cut()
|
||||
@@ -499,11 +543,19 @@
|
||||
spawn_spacevine_piece(loc, , muts)
|
||||
processing_objects.Add(src)
|
||||
init_subtypes(/datum/spacevine_mutation/, mutations_list)
|
||||
if(potency != null)
|
||||
mutativeness = potency / 10
|
||||
if(potency != null && potency > 0)
|
||||
// 1 mutativeness at 10 potency
|
||||
// 4 mutativeness at 100 potency
|
||||
mutativeness = log(10, potency) ** 2
|
||||
if(production != null)
|
||||
spread_cap /= production / 5
|
||||
spread_multiplier *= production / 5
|
||||
// 1 production is crazy powerful
|
||||
var/spread_value = max(10 - production, 1)
|
||||
// 40 at 6 production
|
||||
// 90 at 1 production
|
||||
spread_cap = spread_value * 10
|
||||
// 6 vines/spread at 6 production
|
||||
// ~2.5 vines/spread at 1 production
|
||||
spread_multiplier /= spread_value / 5
|
||||
..()
|
||||
|
||||
|
||||
@@ -618,7 +670,8 @@
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
spread_success |= SM.on_spread(src, stepturf) // If this returns 1, spreading succeeded
|
||||
if(!locate(/obj/effect/spacevine, stepturf))
|
||||
if(stepturf.Enter(src))
|
||||
// snowflake for space turf, but space turf is super common and a big deal
|
||||
if(!istype(stepturf, /turf/space) && stepturf.Enter(src))
|
||||
if(master)
|
||||
master.spawn_spacevine_piece(stepturf, src)
|
||||
spread_success = TRUE
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -179,7 +179,7 @@
|
||||
con_type = "glass bottle"
|
||||
max_define = MAX_GLASS
|
||||
mat_ratio = RATIO_GLASS
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral/plastic))
|
||||
else if(istype(S, /obj/item/stack/sheet/plastic))
|
||||
con_type = "plastic bottle"
|
||||
max_define = MAX_PLAST
|
||||
mat_ratio = RATIO_PLAST
|
||||
|
||||
@@ -528,9 +528,9 @@
|
||||
H.healths.icon_state = "health7"
|
||||
else
|
||||
switch(H.hal_screwyhud)
|
||||
if(1) H.healths.icon_state = "health6"
|
||||
if(2) H.healths.icon_state = "health7"
|
||||
if(5) H.healths.icon_state = "health0"
|
||||
if(SCREWYHUD_CRIT) H.healths.icon_state = "health6"
|
||||
if(SCREWYHUD_DEAD) H.healths.icon_state = "health7"
|
||||
if(SCREWYHUD_HEALTHY) H.healths.icon_state = "health0"
|
||||
else
|
||||
switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss)
|
||||
if(100 to INFINITY) H.healths.icon_state = "health0"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
amount = amount * species.stun_mod
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/SetSleeping(amount, updating = 1)
|
||||
/mob/living/carbon/human/SetSleeping(amount, updating = 1, no_alert = FALSE)
|
||||
if(species)
|
||||
amount = amount * species.stun_mod
|
||||
..()
|
||||
@@ -1202,7 +1202,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]_s")
|
||||
if(species.bodyflags & HAS_SKIN_COLOR)
|
||||
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(tail_marking_icon)
|
||||
if(tail_marking_icon && !tail_marking_style.tails_allowed)
|
||||
tail_s.Blend(tail_marking_icon, ICON_OVERLAY)
|
||||
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
|
||||
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
|
||||
@@ -1270,7 +1270,7 @@ var/global/list/damage_icon_parts = list()
|
||||
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]w_s")
|
||||
if(species.bodyflags & HAS_SKIN_COLOR)
|
||||
tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
if(tail_marking_icon)
|
||||
if(tail_marking_icon && !tail_marking_style.tails_allowed)
|
||||
tailw_s.Blend(tail_marking_icon, ICON_OVERLAY)
|
||||
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
|
||||
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
if(..())
|
||||
handle_dreams()
|
||||
adjustStaminaLoss(-10)
|
||||
if(prob(10) && health && !hal_crit)
|
||||
if(prob(10) && health && hal_screwyhud != SCREWYHUD_CRIT)
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
// Keep SSD people asleep
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
req_access = list(access_engine, access_robotics)
|
||||
ventcrawler = 2
|
||||
magpulse = 1
|
||||
|
||||
|
||||
default_language = "Drone"
|
||||
|
||||
// We need to keep track of a few module items so we don't need to do list operations
|
||||
@@ -23,7 +23,7 @@
|
||||
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
|
||||
var/obj/item/stack/sheet/wood/stack_wood = null
|
||||
var/obj/item/stack/sheet/glass/cyborg/stack_glass = null
|
||||
var/obj/item/stack/sheet/mineral/plastic/cyborg/stack_plastic = null
|
||||
var/obj/item/stack/sheet/plastic/stack_plastic = null
|
||||
var/obj/item/weapon/matter_decompiler/decompiler = null
|
||||
|
||||
//Used for self-mailing.
|
||||
@@ -43,7 +43,7 @@
|
||||
remove_language("Galactic Common")
|
||||
add_language("Drone Talk", 1)
|
||||
add_language("Drone", 1)
|
||||
|
||||
|
||||
// Disable the microphone wire on Drones
|
||||
if(radio)
|
||||
radio.wires.CutWireIndex(WIRE_TRANSMIT)
|
||||
@@ -70,7 +70,7 @@
|
||||
stack_metal = locate(/obj/item/stack/sheet/metal/cyborg) in src.module
|
||||
stack_wood = locate(/obj/item/stack/sheet/wood) in src.module
|
||||
stack_glass = locate(/obj/item/stack/sheet/glass/cyborg) in src.module
|
||||
stack_plastic = locate(/obj/item/stack/sheet/mineral/plastic/cyborg) in src.module
|
||||
stack_plastic = locate(/obj/item/stack/sheet/plastic) in src.module
|
||||
|
||||
//Grab decompiler.
|
||||
decompiler = locate(/obj/item/weapon/matter_decompiler) in src.module
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
// /obj/item/weapon/paper_bundle,
|
||||
/obj/item/weapon/card/id
|
||||
)
|
||||
|
||||
|
||||
/obj/item/weapon/gripper/New()
|
||||
..()
|
||||
can_hold = typecacheof(can_hold)
|
||||
@@ -374,7 +374,7 @@
|
||||
stack = stack_wood
|
||||
if("plastic")
|
||||
if(!stack_plastic)
|
||||
stack_plastic = new /obj/item/stack/sheet/mineral/plastic/cyborg(src.module)
|
||||
stack_plastic = new /obj/item/stack/sheet/plastic(src.module)
|
||||
stack_plastic.amount = 1
|
||||
stack = stack_plastic
|
||||
|
||||
|
||||
@@ -354,19 +354,19 @@
|
||||
|
||||
// SLEEPING
|
||||
|
||||
/mob/living/Sleeping(amount, updating = 1)
|
||||
SetSleeping(max(sleeping, amount), updating)
|
||||
/mob/living/Sleeping(amount, updating = 1, no_alert = FALSE)
|
||||
SetSleeping(max(sleeping, amount), updating, no_alert)
|
||||
|
||||
/mob/living/SetSleeping(amount, updating = 1)
|
||||
/mob/living/SetSleeping(amount, updating = 1, no_alert = FALSE)
|
||||
sleeping = max(amount, 0)
|
||||
update_sleeping_effects()
|
||||
update_sleeping_effects(no_alert)
|
||||
if(updating)
|
||||
update_stat()
|
||||
update_canmove()
|
||||
|
||||
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1)
|
||||
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, no_alert = FALSE)
|
||||
var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper)
|
||||
SetSleeping(new_value, updating)
|
||||
SetSleeping(new_value, updating, no_alert)
|
||||
|
||||
// SLOWED
|
||||
|
||||
|
||||
@@ -30,9 +30,10 @@
|
||||
else
|
||||
clear_fullscreen("nearsighted")
|
||||
|
||||
/mob/living/update_sleeping_effects()
|
||||
/mob/living/update_sleeping_effects(no_alert = FALSE)
|
||||
if(sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
if(!no_alert)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
else
|
||||
clear_alert("asleep")
|
||||
|
||||
|
||||
@@ -199,6 +199,10 @@
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
|
||||
if(istype(mob.get_active_hand(), /obj/item))
|
||||
var/obj/item/I = mob.get_active_hand()
|
||||
I.moved(mob, n, direct)
|
||||
|
||||
if(!mob.Process_Spacemove(direct))
|
||||
return 0
|
||||
|
||||
|
||||
+44
-67
@@ -114,7 +114,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
//
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
|
||||
var/turf/T = src.loc
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
return
|
||||
|
||||
@@ -149,7 +149,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
if(c.d1 == 12 || c.d2 == 12)
|
||||
c.qdel()*/
|
||||
///// Z-Level Stuff
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [user.loc.loc]([T.x], [T.y], [T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>)","wires")
|
||||
investigate_log("was cut by [key_name(usr, usr.client)] in [get_area(user)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires")
|
||||
|
||||
qdel(src) // qdel
|
||||
return
|
||||
@@ -162,6 +162,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return
|
||||
coil.cable_join(src, user)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/twohanded/rcl))
|
||||
var/obj/item/weapon/twohanded/rcl/R = W
|
||||
if(R.loaded)
|
||||
R.loaded.cable_join(src, user)
|
||||
R.is_empty(user)
|
||||
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
|
||||
if(powernet && (powernet.avail > 0)) // is it powered?
|
||||
@@ -197,12 +203,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
qdel(src) // qdel
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
new/obj/item/stack/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color)
|
||||
qdel(src) // qdel
|
||||
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
new/obj/item/stack/cable_coil(src.loc, src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color)
|
||||
qdel(src) // qdel
|
||||
return
|
||||
|
||||
@@ -505,7 +511,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
// General procedures
|
||||
///////////////////////////////////
|
||||
//you can use wires to heal robotics
|
||||
/obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/stack/cable_coil/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
|
||||
@@ -613,11 +619,11 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
return C
|
||||
|
||||
// called when cable_coil is clicked on a turf/simulated/floor
|
||||
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user)
|
||||
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user, dirnew)
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
|
||||
if(!T.can_have_cabling())
|
||||
if(!isturf(T) || T.intact || !T.can_have_cabling())
|
||||
to_chat(user, "<span class='warning'>You can only lay cables on catwalks and plating!</span>")
|
||||
return
|
||||
|
||||
@@ -629,44 +635,46 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
to_chat(user, "<span class='warning'>You can't lay cable at a place that far away!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
var/dirn
|
||||
|
||||
var/dirn = null
|
||||
if(!dirnew) //If we weren't given a direction, come up with one! (Called as null from catwalk.dm and floor.dm)
|
||||
if(user.loc == T)
|
||||
dirn = user.dir // if laying on the tile we're on, lay in the direction we're facing
|
||||
dirn = user.dir //If laying on the tile we're on, lay in the direction we're facing
|
||||
else
|
||||
dirn = get_dir(T, user)
|
||||
else
|
||||
dirn = dirnew
|
||||
|
||||
for(var/obj/structure/cable/LC in T)
|
||||
if(LC.d2 == dirn && LC.d1 == 0)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
return
|
||||
for(var/obj/structure/cable/LC in T)
|
||||
if(LC.d2 == dirn && LC.d1 == 0)
|
||||
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
|
||||
return
|
||||
|
||||
var/obj/structure/cable/C = get_new_cable(T)
|
||||
var/obj/structure/cable/C = get_new_cable(T)
|
||||
|
||||
//set up the new cable
|
||||
C.d1 = 0 //it's a O-X node cable
|
||||
C.d2 = dirn
|
||||
C.add_fingerprint(user)
|
||||
C.updateicon()
|
||||
//set up the new cable
|
||||
C.d1 = 0 //it's a O-X node cable
|
||||
C.d2 = dirn
|
||||
C.add_fingerprint(user)
|
||||
C.updateicon()
|
||||
|
||||
//create a new powernet with the cable, if needed it will be merged later
|
||||
var/datum/powernet/PN = new()
|
||||
PN.add_cable(C)
|
||||
//create a new powernet with the cable, if needed it will be merged later
|
||||
var/datum/powernet/PN = new()
|
||||
PN.add_cable(C)
|
||||
|
||||
C.mergeConnectedNetworks(C.d2) //merge the powernet with adjacents powernets
|
||||
C.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets
|
||||
C.mergeConnectedNetworks(C.d2) //merge the powernet with adjacents powernets
|
||||
C.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets
|
||||
|
||||
if(C.d2 & (C.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions
|
||||
C.mergeDiagonalsNetworks(C.d2)
|
||||
if(C.d2 & (C.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions
|
||||
C.mergeDiagonalsNetworks(C.d2)
|
||||
|
||||
use(1)
|
||||
|
||||
use(1)
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new /obj/item/stack/cable_coil(get_turf(C), 1, C.color)
|
||||
qdel(C) // qdel
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(C.loc, 1, C.color)
|
||||
qdel(C) // qdel
|
||||
return C
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
// or click on a turf that already contains a "node" cable
|
||||
@@ -675,7 +683,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
if(!isturf(U))
|
||||
return
|
||||
|
||||
var/turf/T = C.loc
|
||||
var/turf/T = get_turf(C)
|
||||
|
||||
if(!isturf(T) || T.intact) // sanity checks, also stop use interacting with T-scanner revealed cable
|
||||
return
|
||||
@@ -700,38 +708,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
// cable is pointing at us, we're standing on an open tile
|
||||
// so create a stub pointing at the clicked cable on our tile
|
||||
|
||||
var/fdirn = turn(dirn, 180) // the opposite direction
|
||||
|
||||
for(var/obj/structure/cable/LC in U) // check to make sure there's not a cable there already
|
||||
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
||||
to_chat(user, "There's already a cable at that position.")
|
||||
return
|
||||
|
||||
var/obj/structure/cable/NC = new(U)
|
||||
NC.cableColor(color)
|
||||
|
||||
NC.d1 = 0
|
||||
NC.d2 = fdirn
|
||||
NC.add_fingerprint()
|
||||
NC.updateicon()
|
||||
|
||||
//create a new powernet with the cable, if needed it will be merged later
|
||||
var/datum/powernet/newPN = new()
|
||||
newPN.add_cable(NC)
|
||||
|
||||
NC.mergeConnectedNetworks(NC.d2) //merge the powernet with adjacents powernets
|
||||
NC.mergeConnectedNetworksOnTurf() //merge the powernet with on turf powernets
|
||||
|
||||
if(NC.d2 & (NC.d2 - 1))// if the cable is layed diagonally, check the others 2 possible directions
|
||||
NC.mergeDiagonalsNetworks(NC.d2)
|
||||
|
||||
use(1)
|
||||
|
||||
if(NC.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(NC.loc, 1, NC.color)
|
||||
qdel(NC) // qdel
|
||||
|
||||
place_turf(T, user, turn(dirn, 180))
|
||||
return
|
||||
|
||||
// exisiting cable doesn't point at our position, so see if it's a stub
|
||||
@@ -777,7 +754,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(C.loc, 2, C.color)
|
||||
new/obj/item/stack/cable_coil(get_turf(C), 2, C.color)
|
||||
qdel(C) // qdel
|
||||
return
|
||||
|
||||
|
||||
@@ -81,13 +81,14 @@
|
||||
|
||||
/obj/item/projectile/bullet/pellet
|
||||
name = "pellet"
|
||||
damage = 15
|
||||
damage = 12.5
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/New()
|
||||
range = rand(8)
|
||||
range = rand(1, 8)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/on_range()
|
||||
var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread
|
||||
@@ -99,7 +100,8 @@
|
||||
damage = 3
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/New()
|
||||
range = rand(10)
|
||||
range = rand(1, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = 0)
|
||||
..()
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/plastication/on_reaction(datum/reagents/holder)
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/mineral/plastic
|
||||
var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/plastic
|
||||
M.amount = 10
|
||||
M.forceMove(get_turf(holder.my_atom))
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
item_state = "cespace_suit"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank)
|
||||
species_fit = null
|
||||
sprite_sheets = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva/anomaly
|
||||
name = "Excavation hood"
|
||||
@@ -30,3 +33,6 @@
|
||||
icon_state = "cespace_helmet"
|
||||
item_state = "cespace_helmet"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 100, rad = 100)
|
||||
species_fit = null
|
||||
sprite_sheets = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
@@ -789,6 +789,54 @@
|
||||
/mob/living/silicon/robot/drone,
|
||||
/mob/living/simple_animal/bot/mulebot
|
||||
)
|
||||
var/state = PLASTIC_FLAPS_NORMAL
|
||||
var/can_deconstruct = TRUE
|
||||
|
||||
/obj/structure/plasticflaps/examine(mob/user)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(PLASTIC_FLAPS_NORMAL)
|
||||
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 180*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] from the floor.</span>")
|
||||
else if(iswelder(W))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(loc)
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
@@ -844,6 +892,11 @@
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/proc/deconstruct(disassembled = TRUE)
|
||||
if(can_deconstruct)
|
||||
new /obj/item/stack/sheet/plastic/five(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||
name = "\improper Airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
Reference in New Issue
Block a user