Merge branch 'master' into digileg-runtime
This commit is contained in:
@@ -304,6 +304,9 @@
|
||||
if(AM && isturf(AM.loc))
|
||||
step(AM, turn(AM.dir, 180))
|
||||
|
||||
/atom/proc/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube)
|
||||
return
|
||||
|
||||
//returns the mob's dna info as a list, to be inserted in an object's blood_DNA list
|
||||
/mob/living/proc/get_blood_dna_list()
|
||||
if(get_blood_id() != "blood")
|
||||
@@ -354,9 +357,6 @@
|
||||
/atom/proc/handle_fall()
|
||||
return
|
||||
|
||||
/atom/proc/handle_slip()
|
||||
return
|
||||
|
||||
/atom/proc/singularity_act()
|
||||
return
|
||||
|
||||
|
||||
59
code/game/gamemodes/clown_ops/bananium_bomb.dm
Normal file
59
code/game/gamemodes/clown_ops/bananium_bomb.dm
Normal file
@@ -0,0 +1,59 @@
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium
|
||||
name = "bananium fission explosive"
|
||||
desc = "You probably shouldn't stick around to see if this is armed."
|
||||
icon = 'icons/obj/machines/nuke.dmi'
|
||||
icon_state = "bananiumbomb_base"
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon()
|
||||
if(deconstruction_state == NUKESTATE_INTACT)
|
||||
switch(get_nuke_state())
|
||||
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
|
||||
icon_state = "bananiumbomb_base"
|
||||
update_icon_interior()
|
||||
update_icon_lights()
|
||||
if(NUKE_ON_TIMING)
|
||||
cut_overlays()
|
||||
icon_state = "bananiumbomb_timing"
|
||||
if(NUKE_ON_EXPLODING)
|
||||
cut_overlays()
|
||||
icon_state = "bananiumbomb_exploding"
|
||||
else
|
||||
icon_state = "bananiumbomb_base"
|
||||
update_icon_interior()
|
||||
update_icon_lights()
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station)
|
||||
switch(off_station)
|
||||
if(0)
|
||||
return CINEMATIC_NUKE_CLOWNOP
|
||||
if(1)
|
||||
return CINEMATIC_NUKE_MISS
|
||||
if(2)
|
||||
return CINEMATIC_NUKE_FAKE //it is farther away, so just a bikehorn instead of an airhorn
|
||||
return CINEMATIC_NUKE_FAKE
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/really_actually_explode(off_station)
|
||||
Cinematic(get_cinematic_type(off_station), world)
|
||||
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T || T.z != z)
|
||||
continue
|
||||
H.Stun(10)
|
||||
var/obj/item/clothing/C
|
||||
if(!H.w_uniform || H.dropItemToGround(H.w_uniform))
|
||||
C = new /obj/item/clothing/under/rank/clown(H)
|
||||
C.flags_1 |= NODROP_1 //mwahaha
|
||||
H.equip_to_slot_or_del(C, slot_w_uniform)
|
||||
|
||||
if(!H.shoes || H.dropItemToGround(H.shoes))
|
||||
C = new /obj/item/clothing/shoes/clown_shoes(H)
|
||||
C.flags_1 |= NODROP_1
|
||||
H.equip_to_slot_or_del(C, slot_shoes)
|
||||
|
||||
if(!H.wear_mask || H.dropItemToGround(H.wear_mask))
|
||||
C = new /obj/item/clothing/mask/gas/clown_hat(H)
|
||||
C.flags_1 |= NODROP_1
|
||||
H.equip_to_slot_or_del(C, slot_wear_mask)
|
||||
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.gain_trauma(/datum/brain_trauma/mild/phobia, TRAUMA_RESILIENCE_LOBOTOMY, "clowns") //MWA HA HA
|
||||
66
code/game/gamemodes/clown_ops/clown_ops.dm
Normal file
66
code/game/gamemodes/clown_ops/clown_ops.dm
Normal file
@@ -0,0 +1,66 @@
|
||||
/datum/game_mode/nuclear/clown_ops
|
||||
name = "clown ops"
|
||||
config_tag = "clownops"
|
||||
|
||||
announce_span = "danger"
|
||||
announce_text = "Clown empire forces are approaching the station in an attempt to HONK it!\n\
|
||||
<span class='danger'>Operatives</span>: Secure the nuclear authentication disk and use your bananium fission explosive to HONK the station.\n\
|
||||
<span class='notice'>Crew</span>: Defend the nuclear authentication disk and ensure that it leaves with you on the emergency shuttle."
|
||||
|
||||
operative_antag_datum_type = /datum/antagonist/nukeop/clownop
|
||||
leader_antag_datum_type = /datum/antagonist/nukeop/leader/clownop
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/game_mode/nuclear/clown_ops/pre_setup()
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/machinery/nuclearbomb/syndicate/S in GLOB.nuke_list)
|
||||
var/turf/T = get_turf(S)
|
||||
if(T)
|
||||
qdel(S)
|
||||
new /obj/machinery/nuclearbomb/syndicate/bananium(T)
|
||||
for(var/V in pre_nukeops)
|
||||
var/datum/mind/the_op = V
|
||||
the_op.assigned_role = "Clown Operative"
|
||||
the_op.special_role = "Clown Operative"
|
||||
|
||||
/datum/game_mode/nuclear/clown_ops/generate_report()
|
||||
return "One of Central Command's trading routes was recently disrupted by a raid carried out by the Gorlex Marauders. They seemed to only be after one ship - a highly-sensitive \
|
||||
transport containing a bananium fission explosive, although it is useless without the proper code and authorization disk. While the code was likely found in minutes, the only disk that \
|
||||
can activate this explosive is on your station. Ensure that it is protected at all times, and remain alert for possible intruders."
|
||||
|
||||
|
||||
/datum/outfit/syndicate/clownop
|
||||
name = "Clown Operative - Basic"
|
||||
uniform = /obj/item/clothing/under/syndicate
|
||||
shoes = /obj/item/clothing/shoes/clown_shoes/combat
|
||||
mask = /obj/item/clothing/mask/gas/clown_hat
|
||||
gloves = /obj/item/clothing/gloves/combat
|
||||
back = /obj/item/storage/backpack/clown
|
||||
ears = /obj/item/device/radio/headset/syndicate/alt
|
||||
l_pocket = /obj/item/pinpointer/nuke/syndicate
|
||||
r_pocket = /obj/item/bikehorn
|
||||
id = /obj/item/card/id/syndicate
|
||||
backpack_contents = list(/obj/item/storage/box/syndie=1,\
|
||||
/obj/item/kitchen/knife/combat/survival,
|
||||
/obj/item/reagent_containers/spray/waterflower/lube)
|
||||
implants = list(/obj/item/implant/sad_trombone)
|
||||
|
||||
uplink_type = /obj/item/device/radio/uplink/clownop
|
||||
|
||||
/datum/outfit/syndicate/clownop/no_crystals
|
||||
tc = 0
|
||||
|
||||
/datum/outfit/syndicate/clownop/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
..()
|
||||
if(visualsOnly)
|
||||
return
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
|
||||
/datum/outfit/syndicate/clownop/leader
|
||||
name = "Clown Operative Leader - Basic"
|
||||
id = /obj/item/card/id/syndicate/nuke_leader
|
||||
r_hand = /obj/item/device/nuclear_challenge/clownops
|
||||
command_radio = TRUE
|
||||
298
code/game/gamemodes/clown_ops/clown_weapons.dm
Normal file
298
code/game/gamemodes/clown_ops/clown_weapons.dm
Normal file
@@ -0,0 +1,298 @@
|
||||
/obj/item/reagent_containers/spray/waterflower/lube
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist. A <i>slippery</i> twist."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
amount_per_transfer_from_this = 3
|
||||
spray_range = 1
|
||||
stream_range = 1
|
||||
volume = 30
|
||||
list_reagents = list("lube" = 30)
|
||||
|
||||
//COMBAT CLOWN SHOES
|
||||
//Clown shoes with combat stats and noslip. Of course they still squeek.
|
||||
/obj/item/clothing/shoes/clown_shoes/combat
|
||||
name = "combat clown shoes"
|
||||
desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeek at 100% capacity."
|
||||
flags_1 = NOSLIP_1
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50)
|
||||
strip_delay = 70
|
||||
resistance_flags = NONE
|
||||
permeability_coefficient = 0.05
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
|
||||
//The super annoying version
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat
|
||||
name = "mk-honk combat shoes"
|
||||
desc = "The culmination of years of clown combat research, these shoes leave a trail of chaos in their wake. They will slowly recharge themselves over time, or can be manually charged with bananium."
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50)
|
||||
strip_delay = 70
|
||||
resistance_flags = NONE
|
||||
permeability_coefficient = 0.05
|
||||
pockets = /obj/item/storage/internal/pocket/shoes
|
||||
always_noslip = TRUE
|
||||
var/max_recharge = 3000 //30 peels worth
|
||||
var/recharge_rate = 34 //about 1/3 of a peel per tick
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
bananium.insert_amount(max_recharge, MAT_BANANIUM)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process()
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
var/bananium_amount = bananium.amount(MAT_BANANIUM)
|
||||
if(bananium_amount < max_recharge)
|
||||
bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/attack_self(mob/user)
|
||||
ui_action_click(user)
|
||||
|
||||
//BANANIUM SWORD
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium
|
||||
name = "bananium sword"
|
||||
desc = "An elegant weapon, for a more civilized age."
|
||||
force = 0
|
||||
throwforce = 0
|
||||
force_on = 0
|
||||
throwforce_on = 0
|
||||
hitsound = null
|
||||
attack_verb_on = list("slipped")
|
||||
clumsy_check = FALSE
|
||||
sharpness = IS_BLUNT
|
||||
item_color = "yellow"
|
||||
heat = 0
|
||||
light_color = "#ffff00"
|
||||
var/next_trombone_allowed = 0
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.enabled = active
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user)
|
||||
..()
|
||||
if(active)
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.Slip(M)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum)
|
||||
. = ..()
|
||||
if(active)
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.Slip(hit_atom)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params)
|
||||
if((world.time > next_trombone_allowed) && istype(I, /obj/item/melee/transforming/energy/sword/bananium))
|
||||
next_trombone_allowed = world.time + 50
|
||||
to_chat(user, "You slap the two swords together. Sadly, they do not seem to fit.")
|
||||
playsound(src, 'sound/misc/sadtrombone.ogg', 50)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/transform_weapon(mob/living/user, supress_message_text)
|
||||
..()
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.enabled = active
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user)
|
||||
return ""
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/bananium/suicide_act(mob/user)
|
||||
if(!active)
|
||||
transform_weapon(user, TRUE)
|
||||
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku, but the blade slips off of them harmlessly!</span>")
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.Slip(user)
|
||||
return SHAME
|
||||
|
||||
//BANANIUM SHIELD
|
||||
|
||||
/obj/item/shield/energy/bananium
|
||||
name = "bananium energy shield"
|
||||
desc = "A shield that stops most melee attacks, protects user from almost all energy projectiles, and can be thrown to slip opponents."
|
||||
throw_speed = 1
|
||||
clumsy_check = 0
|
||||
base_icon_state = "bananaeshield"
|
||||
force = 0
|
||||
throwforce = 0
|
||||
throw_range = 5
|
||||
on_force = 0
|
||||
on_throwforce = 0
|
||||
on_throw_speed = 1
|
||||
|
||||
/obj/item/shield/energy/bananium/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.enabled = active
|
||||
|
||||
/obj/item/shield/energy/bananium/attack_self(mob/living/carbon/human/user)
|
||||
..()
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.enabled = active
|
||||
|
||||
/obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1)
|
||||
if(active)
|
||||
if(iscarbon(thrower))
|
||||
var/mob/living/carbon/C = thrower
|
||||
C.throw_mode_on() //so they can catch it on the return.
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/energy/bananium/throw_impact(atom/hit_atom)
|
||||
if(active)
|
||||
var/caught = hit_atom.hitby(src, 0, 0)
|
||||
if(iscarbon(hit_atom) && !caught)//if they are a carbon and they didn't catch it
|
||||
GET_COMPONENT(slipper, /datum/component/slippery)
|
||||
slipper.Slip(hit_atom)
|
||||
if(thrownby && !caught)
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, 1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
//BOMBANANA
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana/bombanana
|
||||
trash = /obj/item/grown/bananapeel/bombanana
|
||||
bitesize = 1
|
||||
customfoodfilling = FALSE
|
||||
seed = null
|
||||
tastes = list("explosives" = 10)
|
||||
list_reagents = list("vitamin" = 1)
|
||||
|
||||
/obj/item/grown/bananapeel/bombanana
|
||||
desc = "A peel from a banana. Why is it beeping?"
|
||||
seed = null
|
||||
var/det_time = 50
|
||||
var/obj/item/grenade/syndieminibomb/bomb
|
||||
|
||||
/obj/item/grown/bananapeel/bombanana/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, det_time)
|
||||
bomb = new /obj/item/grenade/syndieminibomb(src)
|
||||
bomb.det_time = det_time
|
||||
if(iscarbon(loc))
|
||||
to_chat(loc, "[src] begins to beep.")
|
||||
var/mob/living/carbon/C = loc
|
||||
C.throw_mode_on()
|
||||
bomb.preprime(loc, null, FALSE)
|
||||
|
||||
/obj/item/grown/bananapeel/bombanana/Destroy()
|
||||
. = ..()
|
||||
QDEL_NULL(bomb)
|
||||
|
||||
/obj/item/grown/bananapeel/bombanana/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is deliberately slipping on the [src.name]! It looks like \he's trying to commit suicide.</span>")
|
||||
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -1)
|
||||
bomb.preprime(user, 0, FALSE)
|
||||
return (BRUTELOSS)
|
||||
|
||||
//TEARSTACHE GRENADE
|
||||
|
||||
/obj/item/grenade/chem_grenade/teargas/moustache
|
||||
name = "tear-stache grenade"
|
||||
desc = "A handsomely-attired teargas grenade."
|
||||
icon_state = "moustacheg"
|
||||
clumsy_check = GRENADE_NONCLUMSY_FUMBLE
|
||||
|
||||
/obj/item/grenade/chem_grenade/teargas/moustache/prime()
|
||||
var/myloc = get_turf(src)
|
||||
. = ..()
|
||||
for(var/mob/living/carbon/M in view(6, myloc))
|
||||
if(!istype(M.wear_mask, /obj/item/clothing/mask/gas/clown_hat) && !istype(M.wear_mask, /obj/item/clothing/mask/gas/mime) )
|
||||
if(!M.wear_mask || M.dropItemToGround(M.wear_mask))
|
||||
var/obj/item/clothing/mask/fakemoustache/sticky/the_stash = new /obj/item/clothing/mask/fakemoustache/sticky()
|
||||
M.equip_to_slot_or_del(the_stash, slot_wear_mask, TRUE, TRUE, TRUE, TRUE)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky
|
||||
var/unstick_time = 600
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky/Initialize()
|
||||
. = ..()
|
||||
flags_1 |= NODROP_1
|
||||
addtimer(CALLBACK(src, .proc/unstick), unstick_time)
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/sticky/proc/unstick()
|
||||
flags_1 &= ~NODROP_1
|
||||
|
||||
//DARK H.O.N.K. AND CLOWN MECH WEAPONS
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana
|
||||
name = "bombanana mortar"
|
||||
desc = "Equipment for clown exosuits. Launches exploding banana peels."
|
||||
icon_state = "mecha_bananamrtr"
|
||||
projectile = /obj/item/grown/bananapeel/bombanana
|
||||
projectiles = 8
|
||||
projectile_energy_cost = 1000
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache
|
||||
name = "\improper HONKeR-6 grenade launcher"
|
||||
desc = "A weapon for combat exosuits. Launches primed tear-stache grenades."
|
||||
icon_state = "mecha_grenadelnchr"
|
||||
projectile = /obj/item/grenade/chem_grenade/teargas/moustache
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
projectiles = 6
|
||||
missile_speed = 1.5
|
||||
projectile_energy_cost = 800
|
||||
equip_cooldown = 60
|
||||
det_time = 20
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache/can_attach(obj/mecha/combat/honker/M)
|
||||
if(..())
|
||||
if(istype(M))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/mecha/combat/honker/dark
|
||||
desc = "Produced by \"Tyranny of Honk, INC\", this exosuit is designed as heavy clown-support. This one has been painted black for maximum fun. HONK!"
|
||||
name = "\improper Dark H.O.N.K"
|
||||
icon_state = "darkhonker"
|
||||
max_integrity = 300
|
||||
deflect_chance = 15
|
||||
armor = list("melee" = 40, "bullet" = 40, "laser" = 50, "energy" = 35, "bomb" = 20, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
max_temperature = 35000
|
||||
operation_req_access = list(ACCESS_SYNDICATE)
|
||||
wreckage = /obj/structure/mecha_wreckage/honker/dark
|
||||
max_equip = 3
|
||||
|
||||
/obj/mecha/combat/honker/dark/GrantActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
thrusters_action.Grant(user, src)
|
||||
|
||||
|
||||
/obj/mecha/combat/honker/dark/RemoveActions(mob/living/user, human_occupant = 0)
|
||||
..()
|
||||
thrusters_action.Remove(user)
|
||||
|
||||
/obj/mecha/combat/honker/dark/add_cell(obj/item/stock_parts/cell/C)
|
||||
if(C)
|
||||
C.forceMove(src)
|
||||
cell = C
|
||||
return
|
||||
cell = new /obj/item/stock_parts/cell/hyper(src)
|
||||
|
||||
/obj/mecha/combat/honker/dark/loaded/Initialize()
|
||||
. = ..()
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/honker()
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar/bombanana()//Needed more offensive weapons.
|
||||
ME.attach(src)
|
||||
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/tearstache()//The mousetrap mortar was not up-to-snuff.
|
||||
ME.attach(src)
|
||||
|
||||
/obj/structure/mecha_wreckage/honker/dark
|
||||
name = "\improper Dark H.O.N.K wreckage"
|
||||
icon_state = "darkhonker-broken"
|
||||
@@ -19,6 +19,9 @@
|
||||
|
||||
var/datum/team/nuclear/nuke_team
|
||||
|
||||
var/operative_antag_datum_type = /datum/antagonist/nukeop
|
||||
var/leader_antag_datum_type = /datum/antagonist/nukeop/leader
|
||||
|
||||
/datum/game_mode/nuclear/pre_setup()
|
||||
var/n_agents = min(round(num_players() / 10), antag_candidates.len, agents_possible)
|
||||
if(n_agents >= required_enemies)
|
||||
@@ -37,12 +40,12 @@
|
||||
/datum/game_mode/nuclear/post_setup()
|
||||
//Assign leader
|
||||
var/datum/mind/leader_mind = pre_nukeops[1]
|
||||
var/datum/antagonist/nukeop/L = leader_mind.add_antag_datum(/datum/antagonist/nukeop/leader)
|
||||
var/datum/antagonist/nukeop/L = leader_mind.add_antag_datum(leader_antag_datum_type)
|
||||
nuke_team = L.nuke_team
|
||||
//Assign the remaining operatives
|
||||
for(var/i = 2 to pre_nukeops.len)
|
||||
var/datum/mind/nuke_mind = pre_nukeops[i]
|
||||
nuke_mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
|
||||
nuke_mind.add_antag_datum(operative_antag_datum_type)
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/nuclear/OnNukeExplosion(off_station)
|
||||
@@ -131,6 +134,7 @@
|
||||
|
||||
var/tc = 25
|
||||
var/command_radio = FALSE
|
||||
var/uplink_type = /obj/item/device/radio/uplink/nuclear
|
||||
|
||||
|
||||
/datum/outfit/syndicate/leader
|
||||
@@ -150,7 +154,7 @@
|
||||
R.command = TRUE
|
||||
|
||||
if(tc)
|
||||
var/obj/item/device/radio/uplink/nuclear/U = new(H, H.key, tc)
|
||||
var/obj/item/device/radio/uplink/U = new uplink_type(H, H.key, tc)
|
||||
H.equip_to_slot_or_del(U, slot_in_backpack)
|
||||
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H)
|
||||
|
||||
@@ -76,6 +76,11 @@
|
||||
|
||||
var/wall_turret_direction //The turret will try to shoot from a turf in that direction when in a wall
|
||||
|
||||
var/manual_control = FALSE //
|
||||
var/datum/action/turret_quit/quit_action
|
||||
var/datum/action/turret_toggle/toggle_action
|
||||
var/mob/remote_controller
|
||||
|
||||
/obj/machinery/porta_turret/Initialize()
|
||||
. = ..()
|
||||
if(!base)
|
||||
@@ -154,6 +159,7 @@
|
||||
cp = null
|
||||
QDEL_NULL(stored_gun)
|
||||
QDEL_NULL(spark_system)
|
||||
remove_control()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -179,6 +185,14 @@
|
||||
dat += "Neutralize All Non-Security and Non-Command Personnel: <A href='?src=[REF(src)];operation=shootall'>[stun_all ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Neutralize All Unidentified Life Signs: <A href='?src=[REF(src)];operation=checkxenos'>[check_anomalies ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Neutralize All Non-Loyalty Implanted Personnel: <A href='?src=[REF(src)];operation=checkloyal'>[shoot_unloyal ? "Yes" : "No"]</A><BR>"
|
||||
if(issilicon(user))
|
||||
if(!manual_control)
|
||||
var/mob/living/silicon/S = user
|
||||
if(S.hack_software)
|
||||
dat += "Assume direct control : <a href='?src=[REF(src)];operation=manual'>Manual Control</a><br>"
|
||||
else
|
||||
dat += "Warning! Remote control protocol enabled.<br>"
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "autosec", "Automatic Portable Turret Installation", 300, 300)
|
||||
popup.set_content(dat)
|
||||
@@ -212,6 +226,9 @@
|
||||
check_anomalies = !check_anomalies
|
||||
if("checkloyal")
|
||||
shoot_unloyal = !shoot_unloyal
|
||||
if("manual")
|
||||
if(issilicon(usr) && !manual_control)
|
||||
give_control(usr)
|
||||
interact(usr)
|
||||
|
||||
/obj/machinery/porta_turret/power_change()
|
||||
@@ -359,6 +376,8 @@
|
||||
popDown()
|
||||
return
|
||||
|
||||
if(manual_control)
|
||||
return
|
||||
var/list/targets = list()
|
||||
var/static/things_to_scan = typecacheof(list(/mob/living, /obj/mecha))
|
||||
|
||||
@@ -566,6 +585,66 @@
|
||||
src.mode = mode
|
||||
power_change()
|
||||
|
||||
|
||||
/datum/action/turret_toggle
|
||||
name = "Toggle Mode"
|
||||
icon_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon_state = "mech_cycle_equip_off"
|
||||
|
||||
/datum/action/turret_toggle/Trigger()
|
||||
var/obj/machinery/porta_turret/P = target
|
||||
if(!istype(P))
|
||||
return
|
||||
P.setState(P.on,!P.mode)
|
||||
|
||||
/datum/action/turret_quit
|
||||
name = "Release Control"
|
||||
icon_icon = 'icons/mob/actions/actions_mecha.dmi'
|
||||
button_icon_state = "mech_eject"
|
||||
|
||||
/datum/action/turret_quit/Trigger()
|
||||
var/obj/machinery/porta_turret/P = target
|
||||
if(!istype(P))
|
||||
return
|
||||
P.remove_control(owner)
|
||||
|
||||
/obj/machinery/porta_turret/proc/give_control(mob/A)
|
||||
if(manual_control)
|
||||
return FALSE
|
||||
remote_controller = A
|
||||
if(!quit_action)
|
||||
quit_action = new(src)
|
||||
quit_action.Grant(remote_controller)
|
||||
if(!toggle_action)
|
||||
toggle_action = new(src)
|
||||
toggle_action.Grant(remote_controller)
|
||||
remote_controller.reset_perspective(src)
|
||||
remote_controller.click_intercept = src
|
||||
manual_control = TRUE
|
||||
always_up = TRUE
|
||||
popUp()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/porta_turret/proc/remove_control()
|
||||
if(!manual_control)
|
||||
return FALSE
|
||||
if(remote_controller)
|
||||
quit_action.Remove(remote_controller)
|
||||
toggle_action.Remove(remote_controller)
|
||||
remote_controller.click_intercept = null
|
||||
remote_controller.reset_perspective()
|
||||
always_up = initial(always_up)
|
||||
manual_control = FALSE
|
||||
remote_controller = null
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/porta_turret/proc/InterceptClickOn(mob/living/caller, params, atom/A)
|
||||
if(!manual_control)
|
||||
return FALSE
|
||||
add_logs(caller,A,"fired with manual turret control at")
|
||||
target(A)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/porta_turret/syndicate
|
||||
installation = null
|
||||
always_up = 1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/equip_ready = 1 //whether the equipment is ready for use. (or deactivated/activated for static stuff)
|
||||
var/energy_drain = 0
|
||||
var/obj/mecha/chassis = null
|
||||
var/range = MELEE //bitflags
|
||||
var/range = MELEE //bitFflags
|
||||
var/salvageable = 1
|
||||
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
|
||||
var/pacifist_safe = TRUE //Controls if equipment can be used to attack by a pacifist.
|
||||
@@ -94,9 +94,16 @@
|
||||
chassis.use_power(energy_drain)
|
||||
. = do_after(chassis.occupant, equip_cooldown, target=target)
|
||||
set_ready_state(1)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/do_after_mecha(atom/target, delay)
|
||||
if(!chassis)
|
||||
return
|
||||
var/C = chassis.loc
|
||||
. = do_after(chassis.occupant, delay, target=target)
|
||||
if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target)&chassis.dir))
|
||||
return 0
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/can_attach(obj/mecha/M)
|
||||
if(M.equipment.len<M.max_equip)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
// Drill, Diamond drill, Mining scanner
|
||||
|
||||
#define DRILL_BASIC 1
|
||||
#define DRILL_HARDENED 2
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill
|
||||
name = "exosuit drill"
|
||||
@@ -10,6 +13,8 @@
|
||||
energy_drain = 10
|
||||
force = 15
|
||||
pacifist_safe = FALSE
|
||||
var/drill_delay = 7
|
||||
var/drill_level = DRILL_BASIC
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/Initialize()
|
||||
. = ..()
|
||||
@@ -29,27 +34,39 @@
|
||||
"<span class='italics'>You hear drilling.</span>")
|
||||
|
||||
if(do_after_cooldown(target))
|
||||
set_ready_state(FALSE)
|
||||
log_message("Started drilling [target]")
|
||||
if(isturf(target))
|
||||
var/turf/T = target
|
||||
T.drill_act(src)
|
||||
else
|
||||
log_message("Drilled through [target]")
|
||||
set_ready_state(TRUE)
|
||||
return
|
||||
while(do_after_mecha(target, drill_delay))
|
||||
if(isliving(target))
|
||||
if(istype(src , /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
||||
drill_mob(target, chassis.occupant, 120)
|
||||
else
|
||||
drill_mob(target, chassis.occupant)
|
||||
drill_mob(target, chassis.occupant)
|
||||
playsound(src,'sound/weapons/drill.ogg',40,1)
|
||||
else if(isobj(target))
|
||||
var/obj/O = target
|
||||
O.take_damage(15, BRUTE, 0, FALSE, get_dir(chassis, target))
|
||||
playsound(src,'sound/weapons/drill.ogg',40,1)
|
||||
else
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
set_ready_state(TRUE)
|
||||
return
|
||||
set_ready_state(TRUE)
|
||||
|
||||
/turf/proc/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
return
|
||||
|
||||
/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(drill.do_after_mecha(src, 60 / drill.drill_level))
|
||||
drill.log_message("Drilled through [src]")
|
||||
dismantle_wall(TRUE, FALSE)
|
||||
|
||||
/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
|
||||
if(istype(drill, /obj/item/mecha_parts/mecha_equipment/drill/diamonddrill))
|
||||
if(drill.do_after_cooldown(src))//To slow down how fast mechs can drill through the station
|
||||
if(drill.drill_level >= DRILL_HARDENED)
|
||||
if(drill.do_after_mecha(src, 120 / drill.drill_level))
|
||||
drill.log_message("Drilled through [src]")
|
||||
ex_act(EXPLODE_LIGHT)
|
||||
dismantle_wall(TRUE, FALSE)
|
||||
else
|
||||
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")
|
||||
|
||||
@@ -91,30 +108,40 @@
|
||||
GET_COMPONENT_FROM(butchering, /datum/component/butchering, src)
|
||||
butchering.butchering_enabled = FALSE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user, var/drill_damage=80)
|
||||
target.visible_message("<span class='danger'>[chassis] drills [target] with [src].</span>", \
|
||||
"<span class='userdanger'>[chassis] drills [target] with [src].</span>")
|
||||
add_logs(user, target, "attacked", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
if(target.stat == DEAD)
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user)
|
||||
target.visible_message("<span class='danger'>[chassis] is drilling [target] with [src]!</span>", \
|
||||
"<span class='userdanger'>[chassis] is drilling you with [src]!</span>")
|
||||
add_logs(user, target, "drilled", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
if(target.stat == DEAD && target.getBruteLoss() >= 200)
|
||||
add_logs(user, target, "gibbed", name)
|
||||
if(target.butcher_results.len || target.guaranteed_butcher_results.len)
|
||||
if(LAZYLEN(target.butcher_results) || LAZYLEN(target.guaranteed_butcher_results))
|
||||
GET_COMPONENT_FROM(butchering, /datum/component/butchering, src)
|
||||
butchering.Butcher(chassis, target)
|
||||
else
|
||||
target.gib()
|
||||
else
|
||||
target.take_bodypart_damage(drill_damage)
|
||||
//drill makes a hole
|
||||
var/obj/item/bodypart/target_part = target.get_bodypart(ran_zone("chest"))
|
||||
target.apply_damage(10, BRUTE, "chest", target.run_armor_check(target_part, "melee"))
|
||||
|
||||
if(target)
|
||||
target.Unconscious(200)
|
||||
target.updatehealth()
|
||||
//blood splatters
|
||||
var/splatter_dir = get_dir(chassis, target)
|
||||
if(isalien(target))
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target.drop_location(), splatter_dir)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir)
|
||||
|
||||
//organs go everywhere
|
||||
if(target_part && prob(10 * drill_level))
|
||||
target_part.dismember(BRUTE)
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/drill/diamonddrill
|
||||
name = "diamond-tipped exosuit drill"
|
||||
desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!"
|
||||
icon_state = "mecha_diamond_drill"
|
||||
equip_cooldown = 10
|
||||
drill_delay = 4
|
||||
drill_level = DRILL_HARDENED
|
||||
force = 15
|
||||
|
||||
|
||||
@@ -140,3 +167,6 @@
|
||||
return
|
||||
scanning_time = world.time + equip_cooldown
|
||||
mineral_scan_pulse(get_turf(src))
|
||||
|
||||
#undef DRILL_BASIC
|
||||
#undef DRILL_HARDENED
|
||||
@@ -138,16 +138,16 @@
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_ghost(mob/dead/observer/O)
|
||||
if(!teleport(O))
|
||||
if(!teleport(O, TRUE))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M)
|
||||
if(!istype(M) || istype(M, /obj/effect) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M, force = FALSE)
|
||||
if(!force && (!istype(M) || istype(M, /obj/effect) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M)))) //Things that shouldn't teleport.
|
||||
return
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored)
|
||||
if(!force && (!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored))
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
|
||||
|
||||
@@ -599,8 +599,8 @@
|
||||
/obj/item/stock_parts/capacitor = 6)
|
||||
|
||||
/obj/item/circuitboard/machine/chem_dispenser
|
||||
name = "Portable Chem Dispenser (Machine Board)"
|
||||
build_path = /obj/machinery/chem_dispenser/constructable
|
||||
name = "Chem Dispenser (Machine Board)"
|
||||
build_path = /obj/machinery/chem_dispenser
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 2,
|
||||
/obj/item/stock_parts/capacitor = 1,
|
||||
|
||||
@@ -202,6 +202,6 @@
|
||||
var/turf/T = get_turf(loc)
|
||||
if(isopenturf(T))
|
||||
var/turf/open/theturf = T
|
||||
theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10, wet_time_to_add = 5)
|
||||
theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
|
||||
|
||||
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] using its release valve.</span>")
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
var/active = 0
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
var/clumsy_check = GRENADE_CLUMSY_FUMBLE
|
||||
|
||||
/obj/item/grenade/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] primes [src], then eats it! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -32,8 +33,14 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
var/clumsy = user.has_trait(TRAIT_CLUMSY)
|
||||
if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE))
|
||||
if(prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
else if(!clumsy && (clumsy_check == GRENADE_NONCLUMSY_FUMBLE))
|
||||
to_chat(user, "<span class='warning'>You pull the pin on [src]. Attached to it is a pink ribbon that says, \"<span class='clown'>HONK</span>\"</span>")
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -43,8 +43,7 @@
|
||||
for(var/turf/T in view(freeze_range,loc))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
|
||||
F.MakeSlippery(TURF_WET_PERMAFROST, 6 MINUTES)
|
||||
for(var/mob/living/carbon/L in T)
|
||||
L.adjustStaminaLoss(stamina_damage)
|
||||
L.adjust_bodytemperature(-230)
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/transforming/energy/suicide_act(mob/user)
|
||||
if(!active)
|
||||
transform_weapon(user, TRUE)
|
||||
user.visible_message("<span class='suicide'>[user] is [pick("slitting [user.p_their()] stomach open with", "falling on")] [src]! It looks like [user.p_theyre()] trying to commit seppuku!</span>")
|
||||
return (BRUTELOSS|FIRELOSS)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/obj/item/melee/transforming
|
||||
sharpness = IS_SHARP
|
||||
var/active = FALSE
|
||||
var/force_on = 30 //force when active
|
||||
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
|
||||
@@ -8,10 +9,10 @@
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/list/attack_verb_off = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
var/bonus_active = FALSE //If the faction damage bonus is active
|
||||
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
var/clumsy_check = TRUE
|
||||
|
||||
/obj/item/melee/transforming/Initialize()
|
||||
. = ..()
|
||||
@@ -81,6 +82,6 @@
|
||||
to_chat(user, "<span class='notice'>[src] [active ? "is now active":"can now be concealed"].</span>")
|
||||
|
||||
/obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
if(clumsy_check && user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
|
||||
@@ -60,16 +60,24 @@
|
||||
name = "energy combat shield"
|
||||
desc = "A shield that reflects almost all energy projectiles, but is useless against physical attacks. It can be retracted, expanded, and stored anywhere."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "eshield0" // eshield1 for expanded
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("shoved", "bashed")
|
||||
throw_range = 5
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("shoved", "bashed")
|
||||
var/base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted
|
||||
var/on_force = 10
|
||||
var/on_throwforce = 8
|
||||
var/on_throw_speed = 2
|
||||
var/active = 0
|
||||
var/clumsy_check = TRUE
|
||||
|
||||
/obj/item/shield/energy/Initialize()
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state]0"
|
||||
|
||||
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
return 0
|
||||
@@ -78,23 +86,23 @@
|
||||
return (active)
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
if(clumsy_check && user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
|
||||
user.take_bodypart_damage(5)
|
||||
active = !active
|
||||
icon_state = "eshield[active]"
|
||||
icon_state = "[base_icon_state][active]"
|
||||
|
||||
if(active)
|
||||
force = 10
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
force = on_force
|
||||
throwforce = on_throwforce
|
||||
throw_speed = on_throw_speed
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 35, 1)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = 3
|
||||
throwforce = 3
|
||||
throw_speed = 3
|
||||
force = initial(force)
|
||||
throwforce = initial(throwforce)
|
||||
throw_speed = initial(throw_speed)
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 35, 1)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
|
||||
@@ -227,6 +227,14 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
tesla_zap(src, 3, power_bounced)
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
|
||||
|
||||
//The surgeon general warns that being buckled to certain objects recieving powerful shocks is greatly hazardous to your health
|
||||
//Only tesla coils and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later.
|
||||
/obj/proc/tesla_buckle_check(var/strength)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, tesla_shock = 1)
|
||||
|
||||
/obj/proc/reset_shocked()
|
||||
obj_flags &= ~BEING_SHOCKED
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@
|
||||
anchored = TRUE
|
||||
icon = 'icons/turf/walls/wall.dmi'
|
||||
icon_state = "wall"
|
||||
var/mineral = /obj/item/stack/sheet/metal
|
||||
var/mineral_amount = 2
|
||||
var/walltype = /turf/closed/wall
|
||||
var/girder_type = /obj/structure/girder/displaced
|
||||
var/opening = FALSE
|
||||
layer = CLOSED_TURF_LAYER
|
||||
density = TRUE
|
||||
opacity = 1
|
||||
max_integrity = 100
|
||||
@@ -28,6 +24,11 @@
|
||||
smooth = SMOOTH_TRUE
|
||||
can_be_unanchored = FALSE
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
var/mineral = /obj/item/stack/sheet/metal
|
||||
var/mineral_amount = 2
|
||||
var/walltype = /turf/closed/wall
|
||||
var/girder_type = /obj/structure/girder/displaced
|
||||
var/opening = FALSE
|
||||
|
||||
/obj/structure/falsewall/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -534,9 +534,6 @@
|
||||
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
|
||||
return ..()
|
||||
|
||||
|
||||
#define PIRATE_NAMES_FILE "pirates.json"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate
|
||||
name = "space pirate sleeper"
|
||||
desc = "A cryo sleeper smelling faintly of rum."
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/table/attack_hand(mob/living/user)
|
||||
if(user.pulling && isliving(user.pulling))
|
||||
if(Adjacent(user) && user.pulling && isliving(user.pulling))
|
||||
var/mob/living/pushed_mob = user.pulling
|
||||
if(pushed_mob.buckled)
|
||||
to_chat(user, "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>")
|
||||
@@ -81,6 +81,9 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/table/attack_tk()
|
||||
return FALSE
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSTABLE))
|
||||
return 1
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
soundloop.stop()
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/tile = loc
|
||||
tile.MakeSlippery(TURF_WET_WATER, min_wet_time = 5, wet_time_to_add = 1)
|
||||
tile.MakeSlippery(TURF_WET_WATER, min_wet_time = 5 SECONDS, wet_time_to_add = 1 SECONDS)
|
||||
|
||||
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
/turf/open
|
||||
var/slowdown = 0 //negative for faster, positive for slower
|
||||
|
||||
var/wet = 0
|
||||
var/wet_time = 0 // Time in seconds that this floor will be wet for.
|
||||
var/mutable_appearance/wet_overlay
|
||||
var/postdig_icon_change = FALSE
|
||||
var/postdig_icon
|
||||
var/list/archdrops
|
||||
var/wet
|
||||
|
||||
/turf/open/Initialize()
|
||||
. = ..()
|
||||
if(wet)
|
||||
AddComponent(/datum/component/wet_floor, wet, INFINITY, 0, INFINITY, TRUE)
|
||||
|
||||
/turf/open/indestructible
|
||||
name = "floor"
|
||||
@@ -164,11 +168,11 @@
|
||||
for(var/mob/living/L in contents)
|
||||
if(L.bodytemperature <= 50)
|
||||
L.apply_status_effect(/datum/status_effect/freon)
|
||||
MakeSlippery(TURF_WET_PERMAFROST, 5)
|
||||
MakeSlippery(TURF_WET_PERMAFROST, 50)
|
||||
return 1
|
||||
|
||||
/turf/open/proc/water_vapor_gas_act()
|
||||
MakeSlippery(TURF_WET_WATER, min_wet_time = 10, wet_time_to_add = 5)
|
||||
MakeSlippery(TURF_WET_WATER, min_wet_time = 100, wet_time_to_add = 50)
|
||||
|
||||
for(var/mob/living/simple_animal/slime/M in src)
|
||||
M.apply_water()
|
||||
@@ -177,7 +181,7 @@
|
||||
for(var/obj/effect/O in src)
|
||||
if(is_cleanable(O))
|
||||
qdel(O)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/turf/open/handle_slip(mob/living/carbon/C, knockdown_amount, obj/O, lube)
|
||||
if(C.movement_type & FLYING)
|
||||
@@ -224,132 +228,23 @@
|
||||
|
||||
/turf/open/copyTurf(turf/T)
|
||||
. = ..()
|
||||
if(. && isopenturf(T) && wet_time)
|
||||
var/turf/open/O = T
|
||||
O.MakeSlippery(wet_setting = wet, wet_time_to_add = wet_time) //we're copied, copy how wet we are also
|
||||
if(. && isopenturf(T))
|
||||
GET_COMPONENT(slip, /datum/component/wet_floor)
|
||||
if(slip)
|
||||
var/datum/component/wet_floor/WF = T.AddComponent(/datum/component/wet_floor)
|
||||
WF.InheritComponent(slip)
|
||||
|
||||
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0) // 1 = Water, 2 = Lube, 3 = Ice, 4 = Permafrost, 5 = Slide
|
||||
wet_time = max(wet_time+wet_time_to_add, min_wet_time)
|
||||
if(wet >= wet_setting)
|
||||
return
|
||||
wet = wet_setting
|
||||
UpdateSlip()
|
||||
if(wet_setting != TURF_DRY)
|
||||
if(wet_overlay)
|
||||
cut_overlay(wet_overlay)
|
||||
else
|
||||
wet_overlay = mutable_appearance()
|
||||
var/turf/open/floor/F = src
|
||||
if(istype(F))
|
||||
if(wet_setting == TURF_WET_PERMAFROST)
|
||||
wet_overlay.icon = 'icons/effects/water.dmi'
|
||||
wet_overlay.icon_state = "ice_floor"
|
||||
else if(wet_setting == TURF_WET_ICE)
|
||||
wet_overlay.icon = 'icons/turf/overlays.dmi'
|
||||
wet_overlay.icon_state = "snowfloor"
|
||||
else
|
||||
wet_overlay.icon = 'icons/effects/water.dmi'
|
||||
wet_overlay.icon_state = "wet_floor_static"
|
||||
else
|
||||
wet_overlay.icon = 'icons/effects/water.dmi'
|
||||
wet_overlay.icon_state = "wet_static"
|
||||
add_overlay(wet_overlay)
|
||||
HandleWet()
|
||||
/turf/open/proc/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0, max_wet_time = MAXIMUM_WET_TIME, permanent)
|
||||
AddComponent(/datum/component/wet_floor, wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
|
||||
|
||||
/turf/open/proc/UpdateSlip()
|
||||
var/intensity
|
||||
var/lube_flags
|
||||
switch(wet)
|
||||
if(TURF_WET_WATER)
|
||||
intensity = 60
|
||||
lube_flags = NO_SLIP_WHEN_WALKING
|
||||
if(TURF_WET_LUBE)
|
||||
intensity = 80
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_ICE)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_PERMAFROST)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP
|
||||
else
|
||||
qdel(GetComponent(/datum/component/slippery))
|
||||
return
|
||||
var/datum/component/slippery/S = LoadComponent(/datum/component/slippery, NONE, CALLBACK(src, .proc/AfterSlip))
|
||||
S.intensity = intensity
|
||||
S.lube_flags = lube_flags
|
||||
|
||||
/turf/open/proc/AfterSlip(mob/living/L)
|
||||
if(wet == TURF_WET_LUBE)
|
||||
L.confused = max(L.confused, 8)
|
||||
|
||||
/turf/open/proc/MakeDry(wet_setting = TURF_WET_WATER)
|
||||
if(wet > wet_setting || !wet)
|
||||
return
|
||||
spawn(rand(0,20))
|
||||
if(wet == TURF_WET_PERMAFROST)
|
||||
wet = TURF_WET_ICE
|
||||
else if(wet == TURF_WET_ICE)
|
||||
wet = TURF_WET_WATER
|
||||
else
|
||||
wet = TURF_DRY
|
||||
if(wet_overlay)
|
||||
cut_overlay(wet_overlay)
|
||||
UpdateSlip()
|
||||
|
||||
/turf/open/proc/HandleWet()
|
||||
if(!wet)
|
||||
//It's possible for this handler to get called after all the wetness is
|
||||
//cleared, so bail out if that is the case
|
||||
return
|
||||
if(!wet_time && wet < TURF_WET_ICE)
|
||||
MakeDry(TURF_WET_ICE)
|
||||
if(wet_time > MAXIMUM_WET_TIME)
|
||||
wet_time = MAXIMUM_WET_TIME
|
||||
if(wet == TURF_WET_ICE && air.temperature > T0C)
|
||||
for(var/obj/O in contents)
|
||||
if(O.flags_2 & FROZEN_2)
|
||||
O.make_unfrozen()
|
||||
MakeDry(TURF_WET_ICE)
|
||||
MakeSlippery(TURF_WET_WATER)
|
||||
if(wet != TURF_WET_PERMAFROST)
|
||||
switch(air.temperature)
|
||||
if(-INFINITY to T0C)
|
||||
if(wet != TURF_WET_ICE && wet)
|
||||
MakeDry(TURF_WET_ICE)
|
||||
MakeSlippery(TURF_WET_ICE)
|
||||
if(T0C to T20C)
|
||||
wet_time = max(0, wet_time-1)
|
||||
if(T20C to T0C + 40)
|
||||
wet_time = max(0, wet_time-2)
|
||||
if(T0C + 40 to T0C + 60)
|
||||
wet_time = max(0, wet_time-3)
|
||||
if(T0C + 60 to T0C + 80)
|
||||
wet_time = max(0, wet_time-5)
|
||||
if(T0C + 80 to T0C + 100)
|
||||
wet_time = max(0, wet_time-10)
|
||||
if(T0C + 100 to INFINITY)
|
||||
wet_time = 0
|
||||
else if (GetTemperature() > BODYTEMP_COLD_DAMAGE_LIMIT) //seems like a good place
|
||||
MakeDry(TURF_WET_PERMAFROST)
|
||||
else
|
||||
wet_time = max(0, wet_time-5)
|
||||
if(wet && wet < TURF_WET_ICE && !wet_time)
|
||||
MakeDry(TURF_WET_ICE)
|
||||
if(!wet && wet_time)
|
||||
wet_time = 0
|
||||
if(wet)
|
||||
addtimer(CALLBACK(src, .proc/HandleWet), 15, TIMER_UNIQUE)
|
||||
/turf/open/proc/MakeDry(wet_setting = TURF_WET_WATER, immediate = FALSE, amount = INFINITY)
|
||||
SendSignal(COMSIG_TURF_MAKE_DRY, wet_setting, immediate, amount)
|
||||
|
||||
/turf/open/get_dumping_location()
|
||||
return src
|
||||
|
||||
/turf/open/proc/ClearWet()//Nuclear option of immediately removing slipperyness from the tile instead of the natural drying over time
|
||||
wet = TURF_DRY
|
||||
UpdateSlip()
|
||||
if(wet_overlay)
|
||||
cut_overlay(wet_overlay)
|
||||
|
||||
qdel(GetComponent(/datum/component/wet_floor))
|
||||
|
||||
/turf/open/rad_act(pulse_strength)
|
||||
. = ..()
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
GET_COMPONENT(chasm_component, /datum/component/chasm)
|
||||
chasm_component.drop(AM)
|
||||
|
||||
/turf/open/chasm/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0)
|
||||
/turf/open/chasm/MakeSlippery()
|
||||
return
|
||||
|
||||
/turf/open/chasm/MakeDry(wet_setting = TURF_WET_WATER)
|
||||
/turf/open/chasm/MakeDry()
|
||||
return
|
||||
|
||||
/turf/open/chasm/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
/turf/open/floor/plating/asteroid/burn_tile()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0)
|
||||
/turf/open/floor/plating/asteroid/MakeSlippery()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/MakeDry(wet_setting = TURF_WET_WATER)
|
||||
/turf/open/floor/plating/asteroid/MakeDry()
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/asteroid/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
@@ -143,22 +143,15 @@
|
||||
planetary_atmos = TRUE
|
||||
baseturfs = /turf/open/floor/plating/ice
|
||||
slowdown = 1
|
||||
wet = TURF_WET_PERMAFROST
|
||||
attachment_holes = FALSE
|
||||
|
||||
/turf/open/floor/plating/ice/Initialize()
|
||||
. = ..()
|
||||
UpdateSlip()
|
||||
MakeSlippery(TURF_WET_PERMAFROST, INFINITY, 0, INFINITY, TRUE)
|
||||
|
||||
/turf/open/floor/plating/ice/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
|
||||
return
|
||||
|
||||
/turf/open/floor/plating/ice/HandleWet()
|
||||
if(wet == TURF_WET_ICE)
|
||||
return
|
||||
..()
|
||||
MakeSlippery(TURF_WET_ICE) //rewet after ..() clears out lube/ice etc.
|
||||
|
||||
/turf/open/floor/plating/ice/smooth
|
||||
icon_state = "smooth"
|
||||
smooth = SMOOTH_MORE | SMOOTH_BORDER
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/turf/open/lava/ex_act(severity, target)
|
||||
contents_explosion(severity, target)
|
||||
|
||||
/turf/open/lava/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0)
|
||||
/turf/open/lava/MakeSlippery()
|
||||
return
|
||||
|
||||
/turf/open/lava/MakeDry(wet_setting = TURF_WET_WATER)
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
planetary_atmos = TRUE
|
||||
slowdown = 1
|
||||
wet = TURF_WET_WATER
|
||||
|
||||
/turf/open/water/HandleWet()
|
||||
if(wet == TURF_WET_WATER)
|
||||
return
|
||||
..()
|
||||
MakeSlippery(TURF_WET_WATER) //rewet after ..() clears out lube/ice etc.
|
||||
/turf/open/water/Initialize()
|
||||
. = ..()
|
||||
MakeSlippery(TURF_WET_WATER, INFINITY, 0, INFINITY, TRUE)
|
||||
|
||||
@@ -84,6 +84,9 @@
|
||||
/turf/open/space/proc/CanBuildHere()
|
||||
return TRUE
|
||||
|
||||
/turf/open/space/handle_slip()
|
||||
return
|
||||
|
||||
/turf/open/space/attackby(obj/item/C, mob/user, params)
|
||||
..()
|
||||
if(!CanBuildHere())
|
||||
@@ -162,10 +165,7 @@
|
||||
A.newtonian_move(A.inertia_dir)
|
||||
|
||||
|
||||
/turf/open/space/MakeSlippery(wet_setting = TURF_WET_WATER, min_wet_time = 0, wet_time_to_add = 0)
|
||||
return
|
||||
|
||||
/turf/open/space/handle_slip()
|
||||
/turf/open/space/MakeSlippery()
|
||||
return
|
||||
|
||||
/turf/open/space/singularity_act()
|
||||
|
||||
Reference in New Issue
Block a user