New Alcatraz Gear (#28780)

* New Alcatraz Gear

* compile fix

* Tweak key spawn code

* Testing, fixes, and started the tree

* Finished ammotree

* decrease if ambiguity
This commit is contained in:
Kurfursten
2021-03-25 12:49:49 -05:00
committed by GitHub
parent b453c57024
commit 287923ec2f
23 changed files with 499 additions and 65 deletions

View File

@@ -187,7 +187,7 @@
return 0
else if(allowed_materials)
if(allowed_materials)
var/allowed_materials_volume = 0
for(var/mat_id in allowed_materials)
@@ -200,7 +200,7 @@
to_chat(user, output)
return 0
else if(isrobot(user))
if(isrobot(user))
if(isMoMMI(user))
var/mob/living/silicon/robot/mommi/M = user
if(M.is_in_modules(I))
@@ -209,8 +209,8 @@
else
to_chat(user, "You cannot recycle your built in tools.")
return 0
else if(!I.recyclable())
to_chat(user, "<span class = 'notice'>You can not recycle /the [I] at this time.</span>")
if(!I.recyclable(src))
to_chat(user, "<span class = 'notice'>You can not recycle \the [I] at this time.</span>")
return 0
if(user.drop_item(I, src))

View File

@@ -354,8 +354,7 @@
if(is_type_in_list(S, illegalSwap) || is_type_in_list(S, illegalSwap))
MT = MINDMACHINE_SHIELDED
if((ishigherbeing(S)) || (ismonkey(S)))
var/mob/living/carbon/T = S
if(T.is_wearing_item(/obj/item/clothing/head/tinfoil))
if(S.is_wearing_any(list(/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
MT = MINDMACHINE_SHIELDED
if(S == occupantOne)
mindTypeOne = MT

View File

@@ -85,7 +85,7 @@
if(!anchored)
to_chat(user, "<span class='warning'>You must secure \the [src] before you can make use of it!</span>")
return 1
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton) || istype(G, /obj/item/energy_magazine) || istype(G, /obj/item/ammo_storage/magazine/lawgiver) || istype(G, /obj/item/weapon/rcs))
if(istype(G, /obj/item/weapon/gun/energy) || istype(G, /obj/item/weapon/melee/baton) || istype(G, /obj/item/energy_magazine) || istype(G, /obj/item/ammo_storage/magazine/lawgiver) || istype(G, /obj/item/weapon/rcs) || istype(G, /obj/item/clothing/head/helmet/stun))
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
to_chat(user, "<span class='notice'>Your gun's recharge port was removed to make room for a miniaturized reactor.</span>")
return 1

View File

@@ -3121,7 +3121,6 @@ var/global/num_vending_terminals = 1
/obj/item/weapon/card/id/vox/extra = 3,
/obj/item/weapon/stamp/trader = 3,
/obj/item/weapon/capsule = 60,
/obj/item/weapon/implantcase/peace = 5,
/obj/item/vaporizer = 1,
/obj/item/weapon/storage/trader_chemistry = 1,
/obj/structure/closet/secure_closet/wonderful = 1,

View File

@@ -4,7 +4,7 @@
icon_state = "recharge_floor"
var/obj/machinery/mech_bay_recharge_port/recharge_port
var/obj/machinery/computer/mech_bay_power_console/recharge_console
var/obj/mecha/recharging_mecha = null
var/obj/recharging_mecha = null
var/capacitor_max = 0 //How much can be stored
var/capacitor_stored = 0 //How much is presently stored
layer = ABOVE_TILE_LAYER
@@ -31,27 +31,36 @@
/obj/machinery/mech_bay_recharge_floor/process()
..()
if(recharging_mecha&&capacitor_stored)
recharging_mecha.give_power(capacitor_stored)
var/obj/item/weapon/cell/C = recharging_mecha.get_cell()
C.give(capacitor_stored)
capacitor_stored = 0
else if(capacitor_stored<capacitor_max && recharge_port && !recharging_mecha)
var/delta = min(recharge_port.pr_recharger.max_charge,capacitor_max-capacitor_stored)
use_power(delta*150)
capacitor_stored += delta
/obj/machinery/mech_bay_recharge_floor/Crossed(var/obj/mecha/mecha)
/obj/machinery/mech_bay_recharge_floor/Crossed(var/atom/A)
. = ..()
if(istype(mecha))
mecha.occupant_message("<b>Initializing power control devices.</b>")
init_devices()
if(recharge_console && recharge_port)
recharging_mecha = mecha
recharge_console.mecha_in(mecha)
return
else if(!recharge_console)
mecha.occupant_message("<span class='rose'>Control console not found. Terminating.</span>")
else if(!recharge_port)
mecha.occupant_message("<span class='rose'>Power port not found. Terminating.</span>")
return
var/obj/O
if(istype(A, /obj/mecha))
O = A
else if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/stun))
O = H.head
if(!O)
return
to_mech(O,"<b>Initializing power control devices.</b>")
init_devices()
if(recharge_console && recharge_port)
recharging_mecha = O
recharge_console.mecha_in(O)
return
else if(!recharge_console)
to_mech(O,"<span class='rose'>Control console not found. Terminating.</span>")
else if(!recharge_port)
to_mech(O,"<span class='rose'>Power port not found. Terminating.</span>")
/obj/machinery/mech_bay_recharge_floor/Uncrossed(atom)
. = ..()
@@ -59,7 +68,12 @@
recharging_mecha = null
if(recharge_console)
recharge_console.mecha_out()
return
else if(ishuman(atom))
var/mob/living/carbon/human/C = atom
if(C.head == recharging_mecha)
recharging_mecha = null
if(recharge_console)
recharge_console.mecha_out()
/obj/machinery/mech_bay_recharge_floor/proc/init_devices()
recharge_console = locate() in range(1,src)
@@ -107,13 +121,14 @@
lasercount += SP.rating-1
set_voltage(450+lasercount*100)
/obj/machinery/mech_bay_recharge_port/proc/start_charge(var/obj/mecha/recharging_mecha)
/obj/machinery/mech_bay_recharge_port/proc/start_charge(var/obj/recharging_mecha)
if(stat&(NOPOWER|BROKEN))
recharging_mecha.occupant_message("<span class='rose'>Power port not responding. Terminating.</span>")
to_mech(recharging_mecha,"<span class='rose'>Power port not responding. Terminating.</span>")
return 0
else
if(recharging_mecha.cell)
recharging_mecha.occupant_message("Now charging...")
var/obj/item/weapon/cell/C = recharging_mecha.get_cell()
if(C)
to_mech(recharging_mecha,"Now charging...")
pr_recharger.start(list(src, recharging_mecha))
return 1
else
@@ -153,24 +168,30 @@
var/max_charge = 450
check_for_null = 0 //since port.stop_charge() must be called. The checks are made in process()
/datum/global_iterator/mech_bay_recharger/process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/mecha/mecha)
/datum/global_iterator/mech_bay_recharger/process(var/obj/machinery/mech_bay_recharge_port/port, var/obj/O)
if(!port)
return 0
if(mecha && (mecha in get_turf(port.recharge_floor)))
if(!mecha.cell)
if(O && (port.recharge_floor in get_turf(O)))
var/obj/item/weapon/cell/C = O.get_cell()
if(!C)
return
var/delta = min(max_charge, mecha.cell.maxcharge - mecha.cell.charge)
var/delta = min(max_charge, C.maxcharge - C.charge)
if(delta>0)
mecha.give_power(delta)
C.give(delta)
port.use_power(delta*150)
else
mecha.occupant_message("<span class='notice'><b>Fully charged.</b></span>")
to_mech(O,"<span class='notice'><b>Fully charged.</b></span>")
port.stop_charge()
else
port.stop_charge()
/proc/to_mech(var/obj/O, var/chat)
if(istype(O, /obj/mecha))
var/obj/mecha/M = O
M.occupant_message(chat)
else if(isliving(O.loc))
to_chat(O.loc,chat)
/obj/machinery/computer/mech_bay_power_console
name = "Mech Bay Power Control Console"
@@ -186,21 +207,18 @@
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/mech_bay_power_console/proc/mecha_in(var/obj/mecha/mecha)
/obj/machinery/computer/mech_bay_power_console/proc/mecha_in(var/obj/O)
if(stat&(NOPOWER|BROKEN))
mecha.occupant_message("<span class='rose'>Control console not responding. Terminating...</span>")
to_mech(O,"<span class='rose'>Control console not responding. Terminating...</span>")
return
if(recharge_port && autostart)
var/answer = recharge_port.start_charge(mecha)
var/answer = recharge_port.start_charge(O)
if(answer)
src.icon_state = initial(src.icon_state)+"_on"
return
icon_state = initial(src.icon_state)+"_on"
/obj/machinery/computer/mech_bay_power_console/proc/mecha_out()
if(recharge_port)
recharge_port.stop_charge()
return
/obj/machinery/computer/mech_bay_power_console/power_change()
if(stat & BROKEN)
@@ -226,7 +244,7 @@
/obj/machinery/computer/mech_bay_power_console/attack_hand(mob/user as mob)
if(..())
return
if(!src.stat && (get_dist(src, user) <= 1 || istype(user, /mob/living/silicon)))
if(!stat && Adjacent(user) || istype(user, /mob/living/silicon))
return interact(user)
/obj/machinery/computer/mech_bay_power_console/interact(mob/user as mob)
@@ -238,8 +256,8 @@
output += {"<b>Mech Bay Recharge Station Data:</b><div style='margin-left: 15px;'>
<b>Mecha: </b>[recharge_floor.recharging_mecha||"None"]<br>"}
if(recharge_floor.recharging_mecha)
var/cell_charge = recharge_floor.recharging_mecha.get_charge()
output += "<b>Cell charge: </b>[isnull(cell_charge)?"No powercell found":"[recharge_floor.recharging_mecha.cell.charge]/[recharge_floor.recharging_mecha.cell.maxcharge]"]<br>"
var/obj/item/weapon/cell/C = recharge_floor.recharging_mecha.get_cell()
output += "<b>Cell charge: </b>[isnull(C)?"No powercell found":"[C.charge]/[C.maxcharge]"]<br>"
output += "</div>"
if(!recharge_port)
output += "<span class='rose'>Mech Bay Power Port not initialized.</span><br>"
@@ -249,4 +267,3 @@
output += "</ body></html>"
user << browse(output, "window=mech_bay_console")
onclose(user, "mech_bay_console")
return

View File

@@ -1360,7 +1360,7 @@ var/global/list/image/blood_overlays = list()
/obj/item/proc/remote_attack(atom/target, mob/user, atom/movable/eye)
return
/obj/item/proc/recyclable() //Called by RnD machines, for added object-specific sanity.
/obj/item/proc/recyclable(var/obj/machinery/r_n_d/fabricator/F) //Called by RnD machines, for added object-specific sanity.
return TRUE
/obj/item/proc/on_mousedrop_to_inventory_slot()

View File

@@ -201,16 +201,89 @@ var/global/list/alcatraz_stuff = list(
/obj/item/clothing/accessory/bangerboy,
/obj/item/key/security/spare,
/obj/item/weapon/ram_kit,
/obj/item/device/vampirehead,)
/obj/item/device/vampirehead,
/obj/item/weapon/storage/lockbox/unlockable/peace,
/obj/item/clothing/head/helmet/stun,
/obj/item/weapon/secway_kit,
)
/obj/structure/closet/crate/chest/alcatraz/New()
..()
for(var/i = 1 to 6)
for(var/i = 1 to 7)
if(!alcatraz_stuff.len)
return
var/path = pick_n_take(alcatraz_stuff)
new path(src)
/obj/item/clothing/head/helmet/stun
name = "stun helmet"
desc = "For the experimental program of deploying armless security officers. Its complex wiring is known to block out psychic powers and 5G signals."
icon_state = "helmetstun"
light_power = 2.5
light_range = 4
light_color = LIGHT_COLOR_ORANGE
mech_flags = MECH_SCAN_FAIL
var/obj/item/weapon/cell/bcell
/obj/item/clothing/head/helmet/stun/New()
..()
bcell = new(src)
bcell.charge = bcell.maxcharge
update_icon()
/obj/item/clothing/head/helmet/stun/Destroy()
if (bcell)
qdel(bcell)
bcell = null
return ..()
/obj/item/clothing/head/helmet/stun/get_cell()
return bcell
/obj/item/clothing/head/helmet/stun/examine(mob/user)
..()
if(bcell)
to_chat(user, "<span class='info'>The helmet is [round(bcell.percent())]% charged.</span>")
/obj/item/clothing/head/helmet/stun/mob_can_equip(mob/M, slot, disable_warning = 0, automatic = 0)
if(!..() || !ishuman(M))
return CANNOT_EQUIP
if(clumsy_check(M))
to_chat(M, "<span class='warning'>You get stunned trying to don \the [src].</span>")
return CANNOT_EQUIP
var/mob/living/carbon/human/C = M
if(!C.head)
return CAN_EQUIP
if(C.head.canremove)
return CAN_EQUIP_BUT_SLOT_TAKEN
return CAN_EQUIP
/obj/item/clothing/head/helmet/stun/proc/use(var/amount)
if(!bcell || bcell.charge < amount)
return FALSE
bcell.use(amount)
return TRUE
#define STUN_HELMET_STRENGTH 10
/obj/item/clothing/head/helmet/stun/bite_action(mob/target)
if(!isliving(loc) || !isliving(target) || !use(STUN_HELMET_STRENGTH**2))
return FALSE
var/mob/living/user = loc
var/mob/living/L = target
if(iscarbon(target))
var/mob/living/carbon/C = L
if(C.check_shields(0,src))
return FALSE
L.apply_effect(STUN_HELMET_STRENGTH, STUTTER)
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
L.Knockdown(STUN_HELMET_STRENGTH)
L.Stun(STUN_HELMET_STRENGTH)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Stunned [L.name] ([L.ckey]) with [name]</font>"
L.attack_log += "\[[time_stamp()]\]<font color='orange'> Stunned by [user.name] ([user.ckey]) with [name]</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) stunned [L.name] ([L.ckey]) with [name]</font>" )
return TRUE
/obj/item/clothing/accessory/bangerboy
name = "\improper Banger Boy Advance"
desc = "The beloved sequel to the Banger Boy Color. Tap it or the clothing item it is attached to with grenades to trigger them for early detonation. Straps nicely onto security armor."
@@ -475,7 +548,8 @@ var/global/list/alcatraz_stuff = list(
/obj/item/key/security/spare/New()
..()
var/list/map_names = list("Defficiency","Bagelstation","Meta Club","Packed Station","Asteroid Station","Box Station")
var/list/map_names = list("Defficiency","Bagelstation","Meta Club","Packed Station","Asteroid Station","Box Station",
"Snow Station", "NRV Horizon", "Synergy Station", "Lamprey Station")
map_names -= map.nameLong
home_map = pick(map_names)
@@ -1056,6 +1130,95 @@ var/global/list/alcatraz_stuff = list(
living_mover.put_in_hands(I)
to_chat(mover,"<span class='good'>\The [src] dispenses a reward!</span>")
#define AT_SEED 0
#define AT_PLANTED 1
#define AT_SAPLING 2
#define AT_MATURE 3
#define AT_FLOWERING 4
/obj/structure/ammotree
name = "ammo tree seed"
desc = "The seed of an ammo tree. A gene-modified plant that was developed to synthesize metals. <B>If it was rammed in with enough force, you could get it to grow.</B>"
icon = 'icons/obj/flora/big_pots.dmi'
icon_state = "ammotree-0"
density = FALSE
anchored = FALSE
pixel_x = -16
plane = ABOVE_HUMAN_PLANE
var/state = AT_SEED
/obj/structure/ammotree/attackby(obj/item/I, mob/user)
if(state == AT_SEED && istype(I, /obj/item/weapon/batteringram))
state = AT_PLANTED
playsound(src, 'sound/effects/shieldbash.ogg', 50, 1)
processing_objects += src
else
..()
update_icon()
/obj/structure/ammotree/attack_hand(mob/user)
if(state != AT_FLOWERING)
return
visible_message("<span class='notice>[user] picks some ammo fruit from \the [src].</span>")
state = AT_MATURE
update_icon()
processing_objects += src
playsound(loc, "sound/effects/plant_rustle.ogg", 50, 1, -1)
for(var/i = 1 to 4)
new /obj/item/ammofruit(user.loc)
/obj/structure/ammotree/update_icon()
icon_state = "ammotree-[state]"
switch(state)
if(AT_PLANTED)
name = "strange pot"
desc = "Something is clearly putting down roots below."
if(AT_SAPLING)
name = "ammo tree sapling"
desc = "An ammo tree sapling. It looks thin enough to snap like a twig."
if(AT_MATURE)
name = "ammo tree"
desc = "A gene-modified plant that was developed to synthesize metals."
/obj/structure/ammotree/process()
if(state >= AT_FLOWERING)
processing_objects -= src
return
if(prob(1))
state++
update_icon()
/obj/item/ammofruit
name = "ammofruit"
desc = "Not edible. Feed it into your local ammolathe."
icon = 'icons/obj/ammo.dmi'
icon_state = "ammofruit"
w_class = W_CLASS_SMALL
/obj/item/ammofruit/New()
..()
pixel_x = rand(-3,3)
pixel_y = rand(-3,3)
materials = new /datum/materials(src)
materials.addAmount(MAT_IRON,CC_PER_SHEET_METAL*2)
if(prob(25))
if(prob(60))
materials.addAmount(MAT_PLASMA,CC_PER_SHEET_MISC*2)
name = "dragonbreath ammofruit"
icon_state = "ammofruit_plasma"
else
materials.addAmount(MAT_GLASS,CC_PER_SHEET_GLASS)
materials.addAmount(MAT_PLASTIC,CC_PER_SHEET_MISC)
materials.addAmount(MAT_WOOD, CC_PER_SHEET_MISC)
name = "gunstock ammofruit"
icon_state = "ammofruit_glass"
else
materials.addAmount(MAT_IRON,CC_PER_SHEET_METAL)
/obj/item/ammofruit/recyclable(var/obj/machinery/r_n_d/fabricator/F)
if(!istype(F, /obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/ammolathe))
return FALSE
return TRUE
//Mystery mob cubes//////////////

View File

@@ -283,6 +283,14 @@
else
. = ..()
/obj/item/weapon/storage/lockbox/unlockable/peace
name = "semi-secure lockbox (pax implants)"
/obj/item/weapon/storage/lockbox/unlockable/peace/New()
..()
for(var/i = 1 to 5)
new/obj/item/weapon/implantcase/peace(src)
/obj/item/weapon/storage/lockbox/coinbox
name = "coinbox"
desc = "A secure container for the profits of a vending machine."

View File

@@ -177,7 +177,10 @@
if(ishuman(M))
target = M
if(!user.Adjacent(M) || !user.Adjacent(src))
if(user!=M && (!user.Adjacent(M) || !user.Adjacent(src)))
return
if(get_dist(src,user) > buckle_range)
return
if(target && target.op_stage.butt == 4 && Adjacent(target) && user.Adjacent(src) && !user.incapacitated()) //Butt surgery is at stage 4

View File

@@ -13,6 +13,7 @@
icon_state = "keysec"
/obj/structure/bed/chair/vehicle/secway/set_keys() //doesn't spawn with keys, mapped in
return
/obj/structure/bed/chair/vehicle/secway/make_offsets()
offsets = list(
@@ -58,3 +59,234 @@
//icon_state = "gokart_wreck"
name = "secway wreckage"
desc = "Nothing to see here!"
var/list/random_tool_sounds = list('sound/items/Ratchet.ogg','sound/items/Screwdriver.ogg', 'sound/items/Screwdriver2.ogg',
'sound/items/Wirecutter.ogg', 'sound/weapons/toolhit.ogg','sound/items/Welder.ogg', 'sound/items/Welder2.ogg',
'sound/items/Crowbar.ogg')
var/list/descriptive_sprites = list("I go for the classics", "A big donut", "A Rottweiler combat cyborg", "I'm the head honcho", "A winged chariot", "A goofy steed")
/obj/item/weapon/secway_kit
name = "custom secway kit"
desc = "Everything you need to build your own custom Secway."
icon = 'icons/obj/device.dmi'
icon_state = "modkit"
flags = FPRINT
w_class = W_CLASS_SMALL
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/newsprites_lefthand.dmi', "right_hand" = 'icons/mob/in-hand/right/newsprites_righthand.dmi')
var/remaining_upgrades = 3
var/obj/structure/bed/chair/vehicle/secway/custom/baby
var/named = FALSE
/obj/item/weapon/secway_kit/New()
..()
baby = new(src)
/obj/item/weapon/secway_kit/examine(mob/user)
..()
if(!named)
to_chat(user,"<span class='warning'>It needs a name!</span>")
to_chat(user,"<span class='warning'>It has room for [remaining_upgrades] more upgrades.</span>")
if(remaining_upgrades < 1)
return
if(!baby.can_have_carts)
to_chat(user,"<span class='info'>There's space for a cart hook made of metal sheeting.</span>")
if(baby.max_health < 300)
to_chat(user,"<span class='info'>It hasn't been upgraded with plasteel for armoring.</span>")
if(!(baby.pass_flags & PASSMOB) || baby.knockdown_time > 1 || baby.impact_sound)
//Don't suggest if already adding impact upgrades
to_chat(user,"<span class='info'>If you rubbed ectoplasm on it, it would cruise through people instead of bumping them.</span>")
if(!is_type_in_list(/datum/action/vehicle/toggle_headlights,baby.vehicle_actions))
to_chat(user,"<span class='info'>Noone has added a flashlight for headlights or a siren helmet for police lights.</span>")
if(baby.knockdown_time < 3 || baby.pass_flags & PASSMOB)
//Note: you can't use this upgrade if you already don't bump targets
to_chat(user,"<span class='info'>A sheet of plastic would make a good bumper for knocking people over.</span>")
if(baby.can_take_pai == FALSE)
to_chat(user,"<span class='info'>With an unprinted circuitboard you could slot in a personal AI.</span>")
if(!baby.impact_sound || baby.pass_flags & PASSMOB)
//Don't suggest if already ethereal
to_chat(user,"<span class='info'>There's a good spot for a hailer to make legal noises when you hit stuff.</span>")
if(!baby.can_spacemove)
to_chat(user,"<span class='info'>A spacepod core is just what this thing needs to move in space.</span>")
if(baby.movement_delay > 0.8)
to_chat(user,"<span class='info'>If it had an RTG cell, this thing could go a little faster.</span>")
if(baby.explodes)
to_chat(user,"<span class='info'>With a taser, it could be rigged to fire a countermeasure if destroyed.</span>")
if(baby.buckle_range < 7)
to_chat(user,"<span class='info'>Just needs a bluespace crystal and you could buckle in remotely!</span>")
/obj/item/weapon/secway_kit/attack_self(mob/user)
var/choice = alert(user, "What would you like to do?","Custom Secway","Name","Appearance", "Finish")
switch(choice)
if("Name")
baby.name = input(user, "What will you call it?", "Secway Name", baby.name) as null|text
named = TRUE
if("Appearance")
var/iconchoice = input(user, "What inspired your design?", "Secway Appearance", null) as null|anything in descriptive_sprites
switch(iconchoice)
if("I go for the classics")
baby.icon_state = "secway-custom-classic"
if("A big donut")
baby.icon_state = "secway-custom-sprinkes"
if("A Rottweiler combat cyborg")
baby.icon_state = "secway-custom-rottweiler"
if("I'm the head honcho")
baby.icon_state = "secway-custom-HoS"
if("A winged chariot")
baby.icon_state = "secway-custom-chariot"
if("A goofy steed")
baby.icon_state = "secway-custom-steed"
if("Finish")
if(remaining_upgrades < 1 && named)
baby.forceMove(get_turf(loc))
new /obj/item/key/security/spare(baby.loc)
qdel(src)
else
to_chat(user,"<span class='warning'>It isn't done yet!</span>")
/obj/item/weapon/secway_kit/attackby(obj/item/W, mob/living/user)
if(remaining_upgrades<1)
return ..()
if(istype(W, /obj/item/stack/sheet/metal) && !baby.can_have_carts)
baby.can_have_carts = TRUE
else if(istype(W, /obj/item/stack/sheet/plasteel) && baby.max_health < 300)
baby.max_health = 300
baby.health = 300
else if(istype(W, /obj/item/weapon/ectoplasm) && !(baby.pass_flags & PASSMOB))
baby.pass_flags |= PASSMOB
else if(istype(W, /obj/item/device/flashlight) && !is_type_in_list(/datum/action/vehicle/toggle_headlights,baby.vehicle_actions))
new /datum/action/vehicle/toggle_headlights(baby)
else if(istype(W, /obj/item/clothing/head/helmet/siren) && !is_type_in_list(/datum/action/vehicle/toggle_headlights,baby.vehicle_actions))
new /datum/action/vehicle/toggle_headlights/siren(baby)
baby.siren = TRUE
else if(istype(W,/obj/item/stack/sheet/mineral/plastic) && baby.knockdown_time < 3)
baby.knockdown_time = 3
else if(istype(W,/obj/item/device/hailer) && !baby.impact_sound)
baby.impact_sound = 'sound/voice/halt.ogg'
else if(istype(W,/obj/item/weapon/circuitboard/blank) && !baby.can_take_pai)
baby.can_take_pai = TRUE
else if(istype(W,/obj/item/pod_parts/core) && !baby.can_spacemove)
baby.can_spacemove = TRUE
else if(istype(W,/obj/item/weapon/cell/rad) && baby.movement_delay > 0.8)
baby.movement_delay = 0.8
else if(istype(W,/obj/item/bluespace_crystal) && baby.buckle_range < 7)
baby.buckle_range = 7
else if(istype(W,/obj/item/weapon/gun/energy/taser) && baby.explodes)
baby.explodes = FALSE
else
return ..()
playsound(src, pick(random_tool_sounds), 50, 1)
to_chat(user,"<span class='notice'>You add \the [W] to \the [src].")
use(W, user)
remaining_upgrades--
return TRUE //cancel attack
/obj/item/weapon/secway_kit/proc/use(var/obj/item/I, mob/living/user)
if(istype(I,/obj/item/stack/sheet))
var/obj/item/stack/sheet/S = I
S.use(1)
else
user.drop_item(I,src)
qdel(I)
/obj/structure/bed/chair/vehicle/secway/custom
name = "Baby"
desc = "An elite secway, lovingly crafted by a security member."
icon_state = "secway-custom-classic"
keytype = /obj/item/key/security/spare
req_access = list(63)
health = 200
max_health = 200
var/knockdown_time = 1
var/hit_damage = 0
var/impact_sound = null
var/explodes = TRUE
var/siren = FALSE
/obj/structure/bed/chair/vehicle/secway/custom/process()
..()
if(light && siren)
if(light_color == "#FF0000")
light_color = "#0000FF"
else
light_color = "#FF0000"
/obj/structure/bed/chair/vehicle/secway/custom/to_bump(var/atom/obstacle)
if(istype(obstacle,/obj/machinery) && !istype(obstacle,/obj/machinery/door))
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
obstacle.shake(1, 3)
if(isliving(obstacle))
if(impact_sound)
playsound(src, impact_sound, 100, 1, vary = 0)
var/mob/living/idiot = obstacle
if(hit_damage)
idiot.apply_damage(hit_damage, BRUTE, LIMB_CHEST)
visible_message("\The [src] slams into [idiot] with its mounted knife!")
idiot.Knockdown(knockdown_time)
return ..()
/obj/structure/bed/chair/vehicle/secway/custom/check_key(var/mob/user)
if(!allowed(user))
return FALSE
return ..()
/obj/structure/bed/chair/vehicle/secway/custom/can_warn()
return FALSE
/obj/structure/bed/chair/vehicle/secway/custom/die()
density = 0
visible_message("<span class='warning'>\The [nick] explodes!</span>")
if(explodes)
explosion(src.loc,-1,0,2,7,10)
else
//fire projectiles
var/list/fire_shots = alldirs.Copy()
while(fire_shots.len)
var/target_dir = pick_n_take(fire_shots)
var/obj/item/projectile/energy/electrode/E = new(src.loc)
E.starting = E.loc
var/throwturf = get_ranged_target_turf(src, target_dir, 7)
E.OnFired(throwturf)
E.process()
unlock_atom(occupant)
if(wreckage_type)
var/obj/effect/decal/mecha_wreckage/wreck = new wreckage_type(src.loc)
setup_wreckage(wreck)
qdel(src)
/obj/structure/bed/chair/vehicle/secway/custom/pAImove(mob/living/silicon/pai/user, dir)
if(!..())
return
var/turf/T = loc
if(!T.has_gravity() && !can_spacemove)
return
step(src, dir)
/obj/structure/bed/chair/vehicle/secway/custom/Process_Spacemove(var/check_drift = 0)
return can_spacemove
/obj/structure/bed/chair/vehicle/secway/custom/can_apply_inertia()
return !can_spacemove
/obj/structure/bed/chair/vehicle/secway/custom/everything
name = "The Towberman"
icon_state = "secway-custom-HoS"
health = 300
max_health = 300
knockdown_time = 3
impact_sound = 'sound/voice/halt.ogg'
explodes = FALSE
buckle_range = 7
movement_delay = 0.9
can_take_pai = TRUE
can_spacemove = TRUE
can_have_carts = TRUE
//Doesn't have ectoplasm upgrade since that renders the crash upgrades pointless
/obj/structure/bed/chair/vehicle/secway/custom/everything/New()
..()
new /datum/action/vehicle/toggle_headlights/siren(src)

View File

@@ -148,6 +148,8 @@
to_chat(user, "<span class='warning'>You jam \the [W] into \the [src]'s ignition and feel like a genius as you try turning it!</span>")
playsound(src, "sound/items/screwdriver.ogg", 10, 1)
H.adjustBrainLoss(10)
else
return ..()
/obj/structure/bed/chair/vehicle/attack_hand(mob/user)
if(occupant && occupant == user)
@@ -230,7 +232,9 @@
return 1
/obj/structure/bed/chair/vehicle/proc/can_buckle(mob/M, mob/user)
if(M != user || !ishigherbeing(user) || !Adjacent(user) || user.restrained() || user.lying || user.stat || user.locked_to || occupant)
if(M != user || !ishigherbeing(user) || user.restrained() || user.lying || user.stat || user.locked_to || occupant)
return 0
if(!Adjacent(user) && buckle_range <= 1)
return 0
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -248,6 +252,9 @@
"<span class='notice'>[M] climbs onto \the [nick]!</span>",\
"<span class='notice'>You climb onto \the [nick]!</span>")
if(!Adjacent(M))
playsound(src, 'sound/weapons/emitter2.ogg', 50, 1)
lock_atom(M, /datum/locking_category/buckle/chair/vehicle)
add_fingerprint(user)

View File

@@ -390,6 +390,9 @@
species_restricted = list("exclude","Muton")
var/gave_out_gifts = FALSE //for snowman animation
/obj/item/clothing/head/proc/bite_action(mob/target)
return
/obj/item/proc/islightshielded() // So as to avoid unneeded casts.
return FALSE

View File

@@ -28,6 +28,11 @@
return
//end vampire code
if(M.head && istype(M.head,/obj/item/clothing/head))
var/obj/item/clothing/head/H = M.head
if(H.bite_action(src))
return //Head slot item overrode the bite
var/armor_modifier = 30
var/damage = rand(1, 5)*dam_check

View File

@@ -180,6 +180,11 @@
//BITES
/mob/living/bite_act(mob/living/carbon/human/M as mob)
if(M.head && istype(M.head,/obj/item/clothing/head))
var/obj/item/clothing/head/H = M.head
if(H.bite_action(src))
return //Head slot item overrode the bite
var/datum/butchering_product/teeth/T = locate(/datum/butchering_product/teeth) in M.butchering_drops
var/damage = 0
var/attacktype = "bitten"

View File

@@ -601,7 +601,7 @@
switch(spell)
if(1) //Mass Hallucination
for(var/mob/living/carbon/human/H in victims)
if(H.head && istype(H.head,/obj/item/clothing/head/tinfoil))
if(H.is_wearing_any(list(/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
continue
if(M_PSY_RESIST in H.mutations)
continue

View File

@@ -2211,16 +2211,9 @@ mob/proc/on_foot()
//to_chat(world, "[target] has psy resist")
to_chat(src, "The target mind is resisting!")
return 0
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.is_wearing_item(/obj/item/clothing/head/tinfoil, slot_head))
to_chat(src, "Interference is disrupting the connection with the target mind.")
return 0
if(ismartian(target))
var/mob/living/carbon/complex/martian/MR = target
if(MR.is_wearing_any(list(/obj/item/clothing/head/helmet/space/martian, /obj/item/clothing/head/tinfoil), slot_head))
to_chat(src, "Interference is disrupting the connection with the target mind.")
return 0
if(target.is_wearing_any(list(/obj/item/clothing/head/helmet/space/martian,/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
to_chat(src, "Interference is disrupting the connection with the target mind.")
return 0
return 1
/mob/proc/get_personal_ambience()

View File

@@ -78,7 +78,7 @@
to_chat(user, "<span class = 'info'>It has \a [held_item] floating within.</span>")
to_chat(user, "<span class = 'info'><a HREF='?src=\ref[user];lookitem=\ref[held_item]'>Take a closer look.</a></span>")
/obj/item/weapon/reagent_containers/glass/jar/recyclable()
/obj/item/weapon/reagent_containers/glass/jar/recyclable(var/obj/machinery/r_n_d/fabricator/F)
if(held_item)
return FALSE
return TRUE

View File

@@ -177,7 +177,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
if(!istype(user))
return 0
if(user.head && istype(user.head,/obj/item/clothing/head/tinfoil))
if(user.is_wearing_any(list(/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
return 1
return 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 83 KiB