mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #1754 from Whitellama/master
Ports/Fixes for the merge!
This commit is contained in:
@@ -96,11 +96,25 @@
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
|
||||
/obj/item/roller
|
||||
name = "roller bed"
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
/obj/structure/stool/bed/roller/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src)
|
||||
buckled_mob.loc = src.loc
|
||||
else
|
||||
buckled_mob = null
|
||||
|
||||
/obj/structure/stool/bed/roller/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.lying || user.stat || M.buckled || istype(usr, /mob/living/silicon/pai) )
|
||||
@@ -123,3 +137,14 @@
|
||||
icon_state = "down"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
..()
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
if(buckled_mob) return 0
|
||||
visible_message("[usr] collapses \the [src.name]")
|
||||
new/obj/item/roller(get_turf(src))
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
@@ -9,6 +9,7 @@ var/global/floorIsLava = 0
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if (C.holder.level >= 1)
|
||||
var/msg = rendered
|
||||
if (admin_ref)
|
||||
msg = dd_replacetext(msg, "%admin_ref%", "\ref[C]")
|
||||
@@ -22,6 +23,7 @@ var/global/floorIsLava = 0
|
||||
log_adminwarn(rendered)
|
||||
for (var/client/C in admin_list)
|
||||
if (C)
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
|
||||
@@ -185,6 +185,9 @@
|
||||
var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null
|
||||
var/mode = 0
|
||||
var/condi = 0
|
||||
var/bottlesprite = "1" //yes, strings
|
||||
var/pillsprite = "1"
|
||||
var/client/has_sprites = list()
|
||||
var/useramount = 30 // Last used amount
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
@@ -347,6 +350,7 @@
|
||||
P.name = "[name] pill"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "pill"+pillsprite
|
||||
reagents.trans_to(P,50)
|
||||
|
||||
else if (href_list["createbottle"])
|
||||
@@ -357,11 +361,33 @@
|
||||
P.name = "[name] bottle"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "bottle"+bottlesprite
|
||||
reagents.trans_to(P,30)
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
|
||||
reagents.trans_to(P,50)
|
||||
|
||||
else if(href_list["change_pill"])
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&pill_sprite=[i]\"><img src=\"pill[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["change_bottle"])
|
||||
#define MAX_BOTTLE_SPRITE 20 //max icon state of the bottle sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&bottle_sprite=[i]\"><img src=\"bottle[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["pill_sprite"])
|
||||
pillsprite = href_list["pill_sprite"]
|
||||
else if(href_list["bottle_sprite"])
|
||||
bottlesprite = href_list["bottle_sprite"]
|
||||
else
|
||||
usr << browse(null, "window=chem_master")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -372,6 +398,13 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(!(user.client in has_sprites)) //yes, it's in three places, so they get downloaded even when they arent going to be shown, because they could be in the future
|
||||
spawn()
|
||||
has_sprites += user.client
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
usr << browse_rsc(icon('chemical.dmi', "pill" + num2text(i)), "pill[i].png")
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
usr << browse_rsc(icon('chemical.dmi', "bottle" + num2text(i)), "bottle[i].png")
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.machine = src
|
||||
@@ -418,8 +451,8 @@
|
||||
else
|
||||
dat += "Empty<BR>"
|
||||
if(!condi)
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A>"
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A><a href=\"?src=\ref[src]&change_bottle=1\"><img src=\"bottle[bottlesprite].png\" /></a>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
|
||||
if(!condi)
|
||||
|
||||
@@ -20,6 +20,10 @@ em {font-style: normal; font-weight: bold;}
|
||||
.adminobserver {color: #996600; font-weight: bold;}
|
||||
.admin {color: #386aff; font-weight: bold;}
|
||||
|
||||
.mod {color: #735638; font-weight: bold;}
|
||||
.modooc {color: #184880; font-weight: bold;}
|
||||
.adminmod {color: #402A14; font-weight: bold;}
|
||||
|
||||
.name { font-weight: bold;}
|
||||
|
||||
.say {}
|
||||
|
||||
Reference in New Issue
Block a user