mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-04 22:11:27 +00:00
* - I rearranged X_defense.dm mob files, more damage_procs.dm.Here's what's inside: * X_defense.dm: is for the procs of attacks onto the mob, all the XXX_act() proc (things happening to the mob), as well as protection check and get procs (armor, ear prot, projectile dismemberment) * damage_procs.dm: actual damage procs like adjustBruteLoss() getfireloss, any proc that handles damaging. - some bugfixes with gibspawner effects. - monkey's bodyparts can be dismembered and are used to create its icon. - brains are no longer carbons. - all carbon have bodyparts that can be dropped when the mob is gibbed. - adminspawned bodyparts now have a default icon. - robotic parts are now a child of bodyparts. - health analyzer on alien/monkey shows damage on each limb - added admin option to add/remove bodyparts for all carbon (instead of just remove on humans) - Fixes keycheck message spam for janicart and all when trying to move. - Fixes bug with buckling to a scooter while limbless. - removed arg "hit_zone" in proj's on_hit() because we can already use the def_zone var (where hit_zone got its value) - Fixes mob not getting any damage when hit by a projectile on their missing limb, despite a hit message shown). carbon/apply_damage() now when we specify a def_zone and the corresponding BP is missing we default to the chest instead of stopping the proc. Consistently with how human/attacked_by() default to its attack to chest if missing limb. - Fixes mini uzi icon when empty and no mag (typo). - I renamed and changed a bit check_eye_prot and ear prot - renamed flash_eyes to flash_act() - I made a soundbang_act() similar to flash_act but for loud bangs. - added a gib and dust animation to larva. - husked monkeys - no damage overlay for husk or skeleton. - damage overlay for robotic limb now. - no damage overlay when organic bodypart husked. - one handed human with a bloody hand still get a bloody single hand overlay. - fix admin heal being unable to heal robotic bodyparts. - slightly touched robotic bodypart sprites (head one pixel too high) - Fixes 18532 "beheaded husk has hair". - Fixes 18584 "Ling stasis appearance bug" - no more eyes or lipstick on husks. - can remove flashes/wires/cells from robot chest and head with crowbar. - Fixes not being able to surgically amputate robotic arm/leg. * More merge conflict fixes and adding the new files I forgot to add. * of course I forgot birdstation * More typos and stuff I forgot to undo. * Fixing a typo in examine.dm Removing an unnecessary check. Making admin heal regenerate limbs on all carbons. Monkey-human transformation now transfer missing limbs info and presence of a cavity implant. NODISMEMBER species can still lack a limb if the mob lacked a limb and changed into that new species. Changeling Regenerate ability now also regenerate limbs when in monkey form. (and remove some cryptic useless code) * Fixing more conflicts with remie's multihands PR. * Fixes runtime with hud when calling build_hand_slots(). Fixes lightgeist healing not working. Fixes null.handle_fall() runtimes with pirate mobs. Fixes typo in has_left_hadn() and has_right_hand(). * Derp, forgot to remove debug message.
145 lines
4.9 KiB
Plaintext
145 lines
4.9 KiB
Plaintext
/obj/vehicle/scooter
|
|
name = "scooter"
|
|
desc = "A fun way to get around."
|
|
icon_state = "scooter"
|
|
|
|
/obj/vehicle/scooter/attackby(obj/item/I, mob/user, params)
|
|
if(istype(I, /obj/item/weapon/wrench))
|
|
user << "<span class='notice'>You begin to remove the handlebars...</span>"
|
|
playsound(get_turf(user), 'sound/items/Ratchet.ogg', 50, 1)
|
|
if(do_after(user, 40/I.toolspeed, target = src))
|
|
new /obj/vehicle/scooter/skateboard(get_turf(src))
|
|
new /obj/item/stack/rods(get_turf(src),2)
|
|
user << "<span class='notice'>You remove the handlebars from [src].</span>"
|
|
qdel(src)
|
|
|
|
/obj/vehicle/scooter/handle_vehicle_layer()
|
|
if(dir == SOUTH)
|
|
layer = ABOVE_MOB_LAYER
|
|
else
|
|
layer = OBJ_LAYER
|
|
|
|
/obj/vehicle/scooter/handle_vehicle_offsets()
|
|
..()
|
|
if(has_buckled_mobs())
|
|
for(var/m in buckled_mobs)
|
|
var/mob/living/buckled_mob = m
|
|
switch(buckled_mob.dir)
|
|
if(NORTH)
|
|
buckled_mob.pixel_x = 0
|
|
if(EAST)
|
|
buckled_mob.pixel_x = -2
|
|
if(SOUTH)
|
|
buckled_mob.pixel_x = 0
|
|
if(WEST)
|
|
buckled_mob.pixel_x = 2
|
|
if(buckled_mob.get_num_legs() > 0)
|
|
buckled_mob.pixel_y = 5
|
|
else
|
|
buckled_mob.pixel_y = -4
|
|
|
|
/obj/vehicle/scooter/buckle_mob(mob/living/M, force = 0)
|
|
if(!istype(M))
|
|
return 0
|
|
if(M.get_num_legs() < 2 && M.get_num_arms() <= 0)
|
|
M << "<span class='warning'>Your limbless body can't use [src].</span>"
|
|
return 0
|
|
. = ..()
|
|
|
|
/obj/vehicle/scooter/post_buckle_mob(mob/living/M)
|
|
vehicle_move_delay = initial(vehicle_move_delay)
|
|
if(M.get_num_legs() < 2)
|
|
vehicle_move_delay ++
|
|
|
|
/obj/vehicle/scooter/skateboard
|
|
name = "skateboard"
|
|
desc = "An unfinished scooter which can only barely be called a skateboard. It's still rideable, but probably unsafe. Looks like you'll need to add a few rods to make handlebars."
|
|
icon_state = "skateboard"
|
|
vehicle_move_delay = 0//fast
|
|
density = 0
|
|
|
|
/obj/vehicle/scooter/skateboard/post_buckle_mob(mob/living/M)//allows skateboards to be non-dense but still allows 2 skateboarders to collide with each other
|
|
if(has_buckled_mobs())
|
|
density = 1
|
|
else
|
|
density = 0
|
|
..()
|
|
|
|
/obj/vehicle/scooter/skateboard/Bump(atom/A)
|
|
..()
|
|
if(A.density && has_buckled_mobs())
|
|
var/mob/living/carbon/H = buckled_mobs[1]
|
|
var/atom/throw_target = get_edge_target_turf(H, pick(cardinal))
|
|
unbuckle_mob(H)
|
|
H.throw_at_fast(throw_target, 4, 3)
|
|
H.Weaken(5)
|
|
H.adjustStaminaLoss(40)
|
|
visible_message("<span class='danger'>[src] crashes into [A], sending [H] flying!</span>")
|
|
playsound(src, 'sound/effects/bang.ogg', 50, 1)
|
|
|
|
/obj/vehicle/scooter/skateboard/MouseDrop(atom/over_object)
|
|
var/mob/living/carbon/M = usr
|
|
if(!istype(M) || M.incapacitated() || !Adjacent(M))
|
|
return
|
|
if(has_buckled_mobs() && over_object == M)
|
|
M << "<span class='warning'>You can't lift this up when somebody's on it.</span>"
|
|
return
|
|
if(over_object == M)
|
|
var/obj/item/weapon/melee/skateboard/board = new /obj/item/weapon/melee/skateboard()
|
|
M.put_in_hands(board)
|
|
qdel(src)
|
|
|
|
//CONSTRUCTION
|
|
/obj/item/scooter_frame
|
|
name = "scooter frame"
|
|
desc = "A metal frame for building a scooter. Looks like you'll need to add some metal to make wheels."
|
|
icon = 'icons/obj/vehicles.dmi'
|
|
icon_state = "scooter_frame"
|
|
w_class = 3
|
|
|
|
/obj/item/scooter_frame/attackby(obj/item/I, mob/user, params)
|
|
if(istype(I, /obj/item/weapon/wrench))
|
|
user << "<span class='notice'>You deconstruct [src].</span>"
|
|
new /obj/item/stack/rods(get_turf(src),10)
|
|
playsound(get_turf(user), 'sound/items/Ratchet.ogg', 50, 1)
|
|
qdel(src)
|
|
return
|
|
|
|
else if(istype(I, /obj/item/stack/sheet/metal))
|
|
var/obj/item/stack/sheet/metal/M = I
|
|
if(M.get_amount() < 5)
|
|
user << "<span class='warning'>You need at least five metal sheets to make proper wheels!</span>"
|
|
return
|
|
user << "<span class='notice'>You begin to add wheels to [src].</span>"
|
|
if(do_after(user, 80, target = src))
|
|
if(!M || M.get_amount() < 5)
|
|
return
|
|
M.use(5)
|
|
user << "<span class='notice'>You finish making wheels for [src].</span>"
|
|
new /obj/vehicle/scooter/skateboard(user.loc)
|
|
qdel(src)
|
|
|
|
/obj/vehicle/scooter/skateboard/attackby(obj/item/I, mob/user, params)
|
|
if(istype(I, /obj/item/weapon/screwdriver))
|
|
user << "<span class='notice'>You begin to deconstruct and remove the wheels on [src]...</span>"
|
|
playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)
|
|
if(do_after(user, 20, target = src))
|
|
user << "<span class='notice'>You deconstruct the wheels on [src].</span>"
|
|
new /obj/item/stack/sheet/metal(get_turf(src),5)
|
|
new /obj/item/scooter_frame(get_turf(src))
|
|
qdel(src)
|
|
|
|
else if(istype(I, /obj/item/stack/rods))
|
|
var/obj/item/stack/rods/C = I
|
|
if(C.get_amount() < 2)
|
|
user << "<span class='warning'>You need at least two rods to make proper handlebars!</span>"
|
|
return
|
|
user << "<span class='notice'>You begin making handlebars for [src].</span>"
|
|
if(do_after(user, 25, target = src))
|
|
if(!C || C.get_amount() < 2)
|
|
return
|
|
user << "<span class='notice'>You add the rods to [src], creating handlebars.</span>"
|
|
C.use(2)
|
|
new/obj/vehicle/scooter(get_turf(src))
|
|
qdel(src)
|