mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
This commit is contained in:
@@ -62,10 +62,13 @@ ZIPPO
|
||||
var/lit = 0
|
||||
var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
var/icon_off = "cigoff"
|
||||
var/type_butt = /obj/item/weapon/cigbutt
|
||||
var/butt_icon = "cigbutt"
|
||||
var/butt_name = "Cigarette butt"
|
||||
var/butt_desc = "A manky old cigarette butt."
|
||||
var/lastHolder = null
|
||||
var/smoketime = 300
|
||||
var/chem_volume = 15
|
||||
var/is_butt = 0
|
||||
|
||||
/obj/item/clothing/mask/cigarette/New()
|
||||
..()
|
||||
@@ -115,19 +118,20 @@ ZIPPO
|
||||
|
||||
/obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob)
|
||||
..()
|
||||
if(istype(glass)) //you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
if(transfered) //if reagents were transfered, show the message
|
||||
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
|
||||
else //if not, either the beaker was empty, or the cigarette was full
|
||||
if(!glass.reagents.total_volume)
|
||||
user << "<span class='notice'>[glass] is empty.</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
if(!is_butt)
|
||||
if(istype(glass)) //you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
if(transfered) //if reagents were transfered, show the message
|
||||
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
|
||||
else //if not, either the beaker was empty, or the cigarette was full
|
||||
if(!glass.reagents.total_volume)
|
||||
user << "<span class='notice'>[glass] is empty.</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
if(!src.lit && !is_butt)
|
||||
src.lit = 1
|
||||
damtype = "fire"
|
||||
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
|
||||
@@ -155,38 +159,49 @@ ZIPPO
|
||||
var/turf/location = get_turf(src)
|
||||
smoketime--
|
||||
if(smoketime < 1)
|
||||
new type_butt(location)
|
||||
processing_objects.Remove(src)
|
||||
put_out()
|
||||
if(ismob(loc))
|
||||
var/mob/living/M = loc
|
||||
M << "<span class='notice'>Your [name] goes out.</span>"
|
||||
M.u_equip(src) //un-equip it so the overlays can update
|
||||
M.update_inv_wear_mask(0)
|
||||
del(src)
|
||||
return
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
if(reagents && reagents.total_volume) // check if it has any reagents at all
|
||||
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
|
||||
var/mob/living/carbon/C = loc
|
||||
if(prob(15)) // so it's not an instarape in case of acid
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
else // else just remove some of the reagents
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
if(!is_butt)
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
if(!is_butt)
|
||||
if(reagents && reagents.total_volume) // check if it has any reagents at all
|
||||
if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob
|
||||
var/mob/living/carbon/C = loc
|
||||
if(prob(15)) // so it's not an instarape in case of acid
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM)
|
||||
else // else just remove some of the reagents
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
|
||||
if(lit == 1)
|
||||
user.visible_message("<span class='notice'>[user] calmly drops and treads on the lit [src], putting it out instantly.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
new type_butt(T)
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.shoes)
|
||||
user.visible_message("<span class='notice'>[user] crushes [src] on the sole of his shoes, putting it out instantly.</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] spits oh his fingers, then puts down [src].</span>")
|
||||
put_out()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/put_out()
|
||||
if(src.lit == 1)
|
||||
src.lit = -1
|
||||
src.is_butt = 1
|
||||
icon_state = src.butt_icon
|
||||
desc = src.butt_desc
|
||||
name = src.butt_name
|
||||
usr.update_inv_l_hand()
|
||||
usr.update_inv_r_hand()
|
||||
|
||||
|
||||
////////////
|
||||
// CIGARS //
|
||||
@@ -197,7 +212,10 @@ ZIPPO
|
||||
icon_state = "cigaroff"
|
||||
icon_on = "cigaron"
|
||||
icon_off = "cigaroff"
|
||||
type_butt = /obj/item/weapon/cigbutt/cigarbutt
|
||||
is_butt = 0
|
||||
butt_icon = "cigarbutt"
|
||||
butt_name = "Cigar butt"
|
||||
butt_desc = "A manky old cigar butt."
|
||||
throw_speed = 0.5
|
||||
item_state = "cigaroff"
|
||||
smoketime = 1500
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
name = "Grenade Casing"
|
||||
icon_state = "chemg"
|
||||
item_state = "flashbang"
|
||||
desc = "A hand made chemical grenade."
|
||||
w_class = 2.0
|
||||
force = 2.0
|
||||
var/stage = 0
|
||||
var/state = 0
|
||||
var/path = 0
|
||||
var/obj/item/weapon/circuitboard/circuit = null
|
||||
var/obj/item/device/assembly_holder/detonator = null
|
||||
var/list/beakers = new/list()
|
||||
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
|
||||
var/affected_area = 3
|
||||
@@ -18,30 +19,80 @@
|
||||
R.my_atom = src
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if(stage > 1)
|
||||
..()
|
||||
if(!stage || stage==1)
|
||||
if(detonator)
|
||||
// detonator.loc=src.loc
|
||||
usr.put_in_hands(detonator)
|
||||
detonator=null
|
||||
stage=0
|
||||
icon_state = initial(icon_state)
|
||||
else if(beakers.len)
|
||||
for(var/obj/B in beakers)
|
||||
if(istype(B))
|
||||
beakers -= B
|
||||
user.put_in_hands(B)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
if(stage > 1 && !active && clown_check(user))
|
||||
user << "<span class='warning'>You prime \the [name]!</span>"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)//TODO:Have grenades use the new assembly things
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) primed \a [src].</font>")
|
||||
log_admin("ATTACK: [user] ([user.ckey]) primed \a [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) primed \a [src].")
|
||||
|
||||
if(istype(W,/obj/item/device/assembly_holder) && !stage && path != 2)
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/device/assembly_holder) && (!stage || stage==1) && path != 2)
|
||||
var/obj/item/device/assembly_holder/det = W
|
||||
if(istype(det.a_left,det.a_right.type) || (!isigniter(det.a_left) && !isigniter(det.a_right)))
|
||||
user << "\red Assembly must contain one igniter."
|
||||
return
|
||||
if(!det.secured)
|
||||
user << "\red Assembly must be secured with screwdriver."
|
||||
return
|
||||
path = 1
|
||||
user << "\blue You add [W] to the metal casing."
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
|
||||
del(W) //Okay so we're not really adding anything here. cheating.
|
||||
user.remove_from_mob(det)
|
||||
det.loc = src
|
||||
detonator = det
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
else if(istype(W,/obj/item/weapon/screwdriver) && stage == 1 && path != 2)
|
||||
path = 1
|
||||
if(beakers.len)
|
||||
user << "\blue You lock the assembly."
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
|
||||
name = "grenade"
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else
|
||||
user << "\red You need to add at least one beaker before locking the assembly."
|
||||
else if(is_type_in_list(W, allowed_containers) && stage == 1 && path != 2)
|
||||
else if(istype(W,/obj/item/weapon/screwdriver) && path != 2)
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
if(beakers.len)
|
||||
user << "\blue You lock the assembly."
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
|
||||
name = "grenade"
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else
|
||||
// user << "\red You need to add at least one beaker before locking the assembly."
|
||||
user << "\blue You lock the empty assembly."
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
|
||||
name = "fake grenade"
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
stage = 2
|
||||
else if(stage == 2)
|
||||
if(active && prob(95))
|
||||
user << "\red You trigger the assembly!"
|
||||
prime()
|
||||
return
|
||||
else
|
||||
user << "\blue You unlock the assembly."
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
icon_state = initial(icon_state) + (detonator?"_ass":"")
|
||||
stage = 1
|
||||
active = 0
|
||||
else if(is_type_in_list(W, allowed_containers) && (!stage || stage==1) && path != 2)
|
||||
path = 1
|
||||
if(beakers.len == 2)
|
||||
user << "\red The grenade can not hold more containers."
|
||||
@@ -52,18 +103,47 @@
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
beakers += W
|
||||
stage = 1
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
else
|
||||
user << "\red \the [W] is empty."
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
usr << desc
|
||||
if(detonator)
|
||||
usr << "With attached [detonator.name]"
|
||||
|
||||
activate()
|
||||
if(active) return
|
||||
if(detonator)
|
||||
if(!isigniter(detonator.a_left))
|
||||
detonator.a_left.activate()
|
||||
active = 1
|
||||
if(!isigniter(detonator.a_right))
|
||||
detonator.a_right.activate()
|
||||
active = 1
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
|
||||
return
|
||||
|
||||
proc/primed(var/primed = 1)
|
||||
if(active)
|
||||
icon_state = initial(icon_state) + (primed?"_primed":"_active")
|
||||
|
||||
prime()
|
||||
if(!stage || stage<2) return
|
||||
|
||||
//if(prob(reliability))
|
||||
var/has_reagents = 0
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
if(G.reagents.total_volume) has_reagents = 1
|
||||
|
||||
active = 0
|
||||
if(!has_reagents)
|
||||
icon_state = initial(icon_state) +"_locked"
|
||||
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
state = 0
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
|
||||
@@ -91,6 +171,7 @@
|
||||
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
|
||||
G.loc = get_turf(src.loc)*/
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/large
|
||||
name = "Large Chem Grenade"
|
||||
desc = "An oversized grenade that affects a larger area."
|
||||
|
||||
@@ -20,12 +20,9 @@
|
||||
log_admin("ATTACK: [user] ([user.ckey]) clumsily primed \a [src]")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) clumsily primed \a [src]")
|
||||
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
spawn(5)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return 0
|
||||
return 1
|
||||
@@ -67,20 +64,27 @@
|
||||
log_admin("ATTACK: [user] ([user.ckey]) primed \a [src].")
|
||||
message_admins("ATTACK: [user] ([user.ckey]) primed \a [src].")
|
||||
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
spawn(det_time)
|
||||
if(user)
|
||||
user.drop_item()
|
||||
prime()
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/proc/activate()
|
||||
if(active)
|
||||
return
|
||||
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
active = 1
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
|
||||
spawn(det_time)
|
||||
prime()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/proc/prime()
|
||||
// playsound(loc, 'sound/items/Welder2.ogg', 25, 1)
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
/obj/proc/process()
|
||||
processing_objects.Remove(src)
|
||||
return 0
|
||||
//skytodo
|
||||
/*
|
||||
/obj/assume_air(datum/air_group/giver)
|
||||
|
||||
/obj/assume_air(datum/gas_mixture/giver)
|
||||
if(loc)
|
||||
return loc.assume_air(giver)
|
||||
else
|
||||
@@ -34,7 +33,7 @@
|
||||
return loc.return_air()
|
||||
else
|
||||
return null
|
||||
*/
|
||||
|
||||
/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
|
||||
//Return: (NONSTANDARD)
|
||||
// null if object handles breathing logic for lifeform
|
||||
|
||||
Reference in New Issue
Block a user