diff --git a/baystation12.dme b/baystation12.dme index fd1058c3b44..68d5ab3d3d0 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1101,6 +1101,7 @@ #include "code\modules\projectiles\guns\energy\stun.dm" #include "code\modules\projectiles\guns\energy\temperature.dm" #include "code\modules\projectiles\guns\projectile\automatic.dm" +#include "code\modules\projectiles\guns\projectile\bow.dm" #include "code\modules\projectiles\guns\projectile\pistol.dm" #include "code\modules\projectiles\guns\projectile\pneumatic.dm" #include "code\modules\projectiles\guns\projectile\revolver.dm" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 93b46ef959f..d0bb19bbd57 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -81,6 +81,7 @@ new /obj/item/clothing/shoes/black(src) new /obj/item/clothing/shoes/leather(src) new /obj/item/clothing/shoes/white(src) + new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src) return diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index 196915d4688..a5bd53d960c 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -69,6 +69,14 @@ color = "hop" flags = FPRINT | TABLEPASS +/obj/item/clothing/under/rank/head_of_personnel_whimsy + desc = "A blue jacket and red tie, with matching red cuffs! Snazzy. Wearing this makes you feel more important than your job title does." + name = "head of personnel's suit" + icon_state = "hopwhimsy" + item_state = "hopwhimsy" + color = "hopwhimsy" + flags = FPRINT | TABLEPASS + /obj/item/clothing/under/rank/hydroponics desc = "It's a jumpsuit designed to protect against minor plant-related hazards." diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 12b363fc316..1cf951c53b8 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -228,14 +228,14 @@ if(istype(used_weapon,/obj/item/weapon)) var/obj/item/weapon/W = used_weapon if(damage > (5*W.w_class) && (prob(damage/W.w_class) || sharp)) //The larger it is, the harder it needs to hit to stick. - W.loc = organ //Sharp objects will always embed if they do enough damage. + W.loc = src //Sharp objects will always embed if they do enough damage. organ.implants += W visible_message("\The [W] sticks in the wound!") W.add_blood(src) else if(istype(used_weapon,/obj/item/projectile)) //We don't want to use the actual projectile item, so we spawn some shrapnel. if(prob(50) && damagetype == BRUTE) var/obj/item/weapon/shard/shrapnel/S = new() - S.loc = organ + S.loc = src organ.implants += S visible_message("The projectile sticks in the wound!") S.add_blood(src) diff --git a/code/modules/projectiles/guns/projectile/bow.dm b/code/modules/projectiles/guns/projectile/bow.dm new file mode 100644 index 00000000000..a052f198422 --- /dev/null +++ b/code/modules/projectiles/guns/projectile/bow.dm @@ -0,0 +1,190 @@ +/obj/item/weapon/arrow + + name = "bolt" + desc = "It's got a tip for you - get the point?" + icon = 'icons/obj/weapons.dmi' + icon_state = "bolt" + item_state = "bolt" + flags = FPRINT | TABLEPASS + throwforce = 12 + w_class = 2.0 + sharp = 1 + +/obj/item/weapon/arrow/proc/removed() //Helper for metal rods falling apart.. + return + +/obj/item/weapon/arrow/rod + + name = "metal rod" + desc = "Don't cry for me, Orithena." + icon_state = "metal-rod" + +/obj/item/weapon/arrow/rod/removed(mob/user) + if(throwforce == 20) // The rod has been superheated - we don't want it to be useable when removed from the bow. + user << "[src] shatters into a scattering of overstressed metal shards as it leaves the crossbow." + var/obj/item/weapon/shard/shrapnel/S = new() + S.loc = get_turf(src) + src.Del() + +/obj/item/weapon/crossbow + + name = "powered crossbow" + desc = "A 2557AD twist on an old classic. Pick up that can." + icon = 'icons/obj/weapons.dmi' + icon_state = "crossbow" + item_state = "crossbow-solid" + w_class = 4.0 + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY + slot_flags = SLOT_BELT | SLOT_BACK + + w_class = 3.0 + + var/tension = 0 // Current draw on the bow. + var/max_tension = 5 // Highest possible tension. + var/release_speed = 5 // Speed per unit of tension. + var/mob/living/current_user = null // Used to see if the person drawing the bow started drawing it. + var/obj/item/weapon/arrow = null // Nocked arrow. + var/obj/item/weapon/cell/cell = null // Used for firing special projectiles like rods. + +/obj/item/weapon/crossbow/attackby(obj/item/W as obj, mob/user as mob) + if(!arrow) + if (istype(W,/obj/item/weapon/arrow)) + user.drop_item() + arrow = W + arrow.loc = src + user.visible_message("[user] slides [arrow] into [src].","You slide [arrow] into [src].") + icon_state = "crossbow-nocked" + return + else if(istype(W,/obj/item/stack/rods)) + var/obj/item/stack/rods/R = W + R.use(1) + arrow = new /obj/item/weapon/arrow/rod(src) + arrow.loc = src + user.visible_message("[user] haphazardly jams [arrow] into [src].","You jam [arrow] into [src].") + if(cell) + if(cell.charge >= 500) + user << "[arrow] plinks and crackles as it begins to glow red-hot." + arrow.throwforce = 20 + arrow.icon_state = "metal-rod-superheated" + + return + + if(istype(W, /obj/item/weapon/cell)) + if(!cell) + user.drop_item() + W.loc = src + cell = W + user << "You jam [cell] into [src] and wire it to the firing coil." + if(arrow) + if(istype(arrow,/obj/item/weapon/arrow/rod) && cell.charge >= 500) + user << "[arrow] plinks and crackles as it begins to glow red-hot." + arrow.throwforce = 20 + arrow.icon_state = "metal-rod-superheated" + cell.charge -= 500 + else + user << "[src] already has a cell installed." + + else if(istype(W, /obj/item/weapon/screwdriver)) + if(cell) + var/obj/item/C = cell + C.loc = get_turf(user) + cell = null + user << "You jimmy [cell] out of [src] with [W]." + else + user << "[src] doesn't have a cell installed." + + else + ..() + +/obj/item/weapon/crossbow/attack_self(mob/living/user as mob) + if(tension) + if(arrow) + user.visible_message("[user] relaxes the tension on [src]'s string and removes [arrow].","You relax the tension on [src]'s string and remove [arrow].") + var/obj/item/weapon/arrow/A = arrow + A.loc = get_turf(src) + A.removed(user) + arrow = null + else + user.visible_message("[user] relaxes the tension on [src]'s string.","You relax the tension on [src]'s string.") + tension = 0 + icon_state = "crossbow" + else + draw(user) + +/obj/item/weapon/crossbow/proc/draw(var/mob/user as mob) + + if(!arrow) + user << "You don't have anything nocked to [src]." + return + + if(user.restrained()) + return + + current_user = user + + user.visible_message("[user] begins to draw back the string of [src].","You begin to draw back the string of [src].") + tension = 1 + spawn(25) increase_tension(user) + +/obj/item/weapon/crossbow/proc/increase_tension(var/mob/user as mob) + + if(!arrow || !tension || current_user != user) //Arrow has been fired, bow has been relaxed or user has changed. + return + + tension++ + icon_state = "crossbow-drawn" + + if(tension>=max_tension) + tension = max_tension + usr << "[src] clunks as you draw the string to its maximum tension!" + else + user.visible_message("[usr] draws back the string of [src]!","You continue drawing back the string of [src]!") + spawn(25) increase_tension(user) + +/obj/item/weapon/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params) + + if (istype(target, /obj/item/weapon/storage/backpack )) + src.dropped() + return + + else if (target.loc == user.loc) + return + + else if (locate (/obj/structure/table, src.loc)) + return + + else if(target == user) + return + + if (!arrow) + user << "You have no arrow nocked to [src]!" + return 0 + else + spawn(0) Fire(target,user,params) + +/obj/item/weapon/crossbow/proc/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0) + + add_fingerprint(user) + + var/turf/curloc = get_turf(user) + var/turf/targloc = get_turf(target) + if (!istype(targloc) || !istype(curloc)) + return + + user.visible_message("[user] releases [src] and sends [arrow] streaking toward [target]!","You release [src] and send [arrow] streaking toward [target]!") + + var/obj/item/weapon/arrow/A = arrow + A.loc = get_turf(user) + A.throw_at(target,10,tension*release_speed) + arrow = null + tension = 0 + icon_state = "crossbow" + +/obj/item/weapon/crossbow/dropped(mob/user) + if(arrow) + var/obj/item/weapon/arrow/A = arrow + A.loc = get_turf(src) + A.removed(user) + arrow = null + tension = 0 + icon_state = "crossbow" \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index c72663a6a78..130ea2ba7ac 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -1,5 +1,4 @@ - /obj/item/weapon/reagent_containers/borghypo name = "Cyborg Hypospray" desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment." @@ -16,7 +15,7 @@ var/recharge_time = 5 //Time it takes for shots to recharge (in seconds) var/list/datum/reagents/reagent_list = list() - var/list/reagent_ids = list("doctorsdelight", "inaprovaline", "spaceacillin") + var/list/reagent_ids = list("tricordrazine", "inaprovaline", "spaceacillin") //var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "anti_toxin", "inaprovaline", "spaceacillin") /obj/item/weapon/reagent_containers/borghypo/New() @@ -105,4 +104,4 @@ empty = 0 if(empty) - usr << "\blue It is currently empty. Allow some time for the internal syntheszier to produce more." \ No newline at end of file + usr << "\blue It is currently empty. Allow some time for the internal syntheszier to produce more." diff --git a/html/changelog.html b/html/changelog.html index 8c1b4d60a82..44b3cd609bc 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -68,6 +68,14 @@ should be listed in the changelog upon commit though. Thanks. -->